Drawing Segment using polar coordinates I am trying to figure out a strategy for drawing a straight line using two intersecting rotating circles. (Imagine a turntable and it's arm, I need to figure out how to rotate them both in order for arm to draw a straight line on disc)
Here is what I am trying to do basically: https://youtu.be/VvTow_PRPis?t=10m11s
To simplify the problem. I have made this drawing:

There are 2 circles, with radiuses r (on the left) and R (on the right) R intersects r exactly at it's origin.
Left circle is a rotating disc that I want to "draw" on. Right circle is representing an "arm" to draw "with".
Let's say I want to draw a segment AB on left circle.
point B is described by polar coordinates (alpha and "l") relative to circle "r" origin.
point A is currently at intersection arc. and is described by polar coordinates (beta and R) relative to circle "R" origin.
There should be a function "f prime" describing how angle of rotatoin of circle "r" changes over time. And there should be function f describing how angle of rotation of circle "R" changes over same period of time, in such a way that arm of "R" circle draws a straight line on the "r" disc.
I am curious first of all what kind of function is it (is it parabolic?), and how do I approach the figuring out of that equasions based on known variables (R, r, alpha, l, beta) Is this some kind of known problem? I am a software engineer trying to make an algorythm for that so, not really sure how to attack the math part of this. Would be happy if someone can suggest how to do this.
Thanks for taking a look!
 A: Instead of drawing a line on the “turntable,” imagine the “tone arm” following a straight groove in the surface as the turntable rotates. For a given turntable rotation angle $\theta$, we want to find the tone-arm angle $\phi$ that keeps the business end of the tone arm in this groove. 
Place the center of the turntable—the center of rotation—at the origin and the tone arm pivot (i.e., the center of the circle of radius $R$) at $\mathbf c=(-R,0)$, as pictured below. Note that we don’t really care about the radius $r$ of the turntable. It only serves to constrain the placement of the line segment’s endpoints.  

We will first solve a slightly more general but simpler problem by extending our line segment to a line that is rotated around the origin. Define this line by its unit normal $\mathbf n_\theta=(\cos\theta,\sin\theta)$ and fixed distance $d\ge0$ from the origin. Here $\theta$ represents the angle that $\mathbf n_\theta$ makes with the positive $x$-axis. If you draw a perpendicular to this line through $\mathbf c$, it will be parallel to $\mathbf n_\theta$, so it, too, makes an angle of $\theta$ with the positive $x$-axis. Call the angle between this perpendicular and the tone arm, represented by the radial segment from $\mathbf c$ to the intersection of the line and circle, $\alpha$. The tone-arm angle is clearly $\phi=\theta-\alpha$. The signed distance from our rotating line to the tone-arm pivot $\mathbf c$ is given by $d-\mathbf n_\theta\cdot\mathbf c$ and so we have $$\cos\alpha={d-\mathbf n_\theta\cdot\mathbf c\over R}=\frac d R+\cos\theta.\tag{1}$$ Equipped with this relationship between turntable rotation and tone-arm angle, we can proceed with the specific problem.  
Given the points $A=(x_a,y_a)$ and $B=(x_b,y_b)$, the unit normal of the line through them is $$\mathbf n=\pm\left({y_a-y_b\over\sqrt{(x_a-x_b)^2+(y_a-y_b)^2}},{x_b-x_a\over\sqrt{(x_a-x_b)^2+(y_a-y_b)^2}}\right).\tag{2}$$ The distance of this line from the origin is given by $\mathbf n\cdot A$ (also by $\mathbf n\cdot B$). Choose the sign for $\mathbf n$ that makes this quantity positive. Note that this sign choice matches the orientation of the triangle $\triangle{OBA}$, which is also the sign of the “cross product:” $s=\operatorname{sgn}(x_by_a-x_ay_b)$. This sign also tells us which way we’ll be rotating the turntable (positive being counterclockwise per the usual convention). I’ll leave working out the correct sign choice when the line passes through the origin to you.  
Now we just need a range of valid values for the turntable rotation angle $\theta$ so that we stay on the segment $\overline{AB}$. Observe that $\theta$ doesn’t enter into equation (1) explicitly. As long as we have the line’s unit normal and its distance from the origin, we can compute the tone-arm angle. So, instead of calculating a unit normal for an absolute angle as we did above, we can take the initial unit normal that we computed in (2) and rotate it through some angle $\theta'$ to get the normal of the rotated line segment. This rotation can be effected using well-known formulas.  

Since $A$ starts under the tone arm, the initial value of $\theta'$ is $0$. As we noted above, orientation of $\triangle{OBA}$ gives us our rotation direction, so it only remains to find the value of $\theta'$ that corresponds to having $B$ under the tone arm. It’s tempting to say that this is $\angle{AOB}$, but this is only true if $A$ and $B$ are at the same distance from the origin. Instead, we need the angle between $B$ and the intersection $B'$ of the tone-arm circle with a circle of radius $\|B\|$ centered on the origin. A straightforward calculation yields an $x$-coordinate of $-\|B\|^2/2R$ for this intersection, with corresponding $y$-coordinate $\pm\|B\|\sqrt{1-\|B\|^2/4R^2}$. We choose the sign here to match the sign of $A$’s $y$-coordinate. (As before, I leave sorting out the special case that $A$ lies on the $x$-axis to you.) Once we’ve chosen the correct $B'$, $\theta_{max}'$ is simply $\angle B'-\angle B$, normalized to lie in the interval $[-\pi,\pi]$.  
We now have a way to compute a function $g:\theta'\mapsto\phi$ that gives us the tone-arm angle that tracks the rotating line segment. If the actual motion of the turntable is given by some arbitrary continuous function $f:t\mapsto\theta'$, the induced motion of the tone arm is then given by the composition $g\circ f$.  
The above scheme doesn’t exactly match the problem’s setup or nomenclature, but I expect that you’ll be able to adapt it to them without any trouble.
A: I don't entirely understand what you are seeking, but
it is not possible to draw a straight line with just two circles.
A more complex mechanism is required, e.g., the Peaucellier linkage:



Image from Wikipedia article.


