I wish to plot two hypotrochoids moving around a ring-gear in lock-step with respect to each other, with the second hypotrochoid's plotted position being dependent on the first hypotrochoid's parametric (t).
My implementation uses degrees, with 0˚ being cardinally north, 90˚, east.
x1= ((rb - r1) * sin (t)) + (d1 * sin((rb - r1) * t / r1)) y1= ((rb - r1) * cos (t)) - (d1 * cos((rb - r1) * t / r1))
I tried multiplying t by r1/r2 so the two gears would move around the ring at the same rate, and adding 180, but that didn't work well. This was just a hopeful guess, as I'm quite over my head.
t2= (t * r1/r2) + 180 x2= ((rb - r2) * sin (t2)) + (d2 * sin((rb - r2) * t2 / r2)) y2= ((rb - r2) * cos (t2)) - (d2 * cos((rb - :2) * t2 / r2))
What do I have to do to t and/or the second calculations to plot x2 and y2 for a second hypotrochoid that starts at say, 180˚ (though it could be any offset, I'll be happy with 180˚) from the first, and keeps its relative position?
I'm using t as an index for an array of [x1,y1] and [x2,y2], as the actual plot I want is of a point on a line connecting position 1 to position 2 is a set distance away from position 1. This is modelled on a physical drawing machine called an "Illumicon". I have made an implementation without any trig at all in ACSLogo (don't judge :), so I know what results to expect if/when I get the trig right.
Here are some diagrams and some animations to help explain:



After playing around with the formulae, I determined the virtual gears were already in lock-step for a given value of
t, so my attempt at trying to compensate for the different circumferences was causing the unexpected results.So to get a 180˚ offset, I just multiplied
x2andy2by-1. I should probably instead do something like add tot21/2 the periodicity of thex2andy2hypotrochoid.Here are two plots of the points 75 units from (x1,y1) towards (-x2,-y2), for t = 1..33300, rb=300, r1=120, d1=60, r2=148, d2=140, the latter when I was modifying
t2