0
$\begingroup$

I want to animate a Hypocycloid using computer code. So far i have drawn the circles here.

I have found this definition on wikipedia and I want to animate the image that is on the right.

I did something similar here with a sine wave. I used a counter and changed the position of the shapes using cos and sin to plot the changing shapes on each change of the counter.

This new graph is infinitely more complicated.

Wikipedia gives the following equations:

$x(\theta) = (R - r) \cos \theta + r \cos((k - 1) \theta)$

$y(\theta) = (R - r) \sin \theta - r \sin((k - 1) \theta)$

I do not know how to solve these equations.

Why is it $x(\theta) = $ and not just $x =$ ?

How do I find $\theta$ when it occurs on both sides of the equation ; besides, I do not understand what $k$ is.

$\endgroup$
2
  • $\begingroup$ What is the software you use ? $\endgroup$
    – Jean Marie
    May 31, 2017 at 22:10
  • $\begingroup$ @JeanMarie I use d3.js , the source code for all the charts is here github.com/dagda1/d3-geometry $\endgroup$
    – dagda1
    Jun 1, 2017 at 12:52

1 Answer 1

2
$\begingroup$

You misunderstand the meaning of $x(\theta)$. The parentheses do not indicate multiplication; they instead indicate that $x$ is a function of the parameter $\theta$. To plot this curve for a given $R$, $r$, and $k$, all you need to do is plug in various values of $\theta$ into each equation on the RHS, and the first equation gives you the $x$-coordinate and the second gives you the $y$-coordinate.

$\endgroup$
2
  • $\begingroup$ great, what is k in this instance. $\endgroup$
    – dagda1
    May 31, 2017 at 20:52
  • $\begingroup$ @dagda1 $k$ is just another fixed constant, in this case the number of windings. It is related to the symmetry of the resulting figure, so when $k = 5$ for example, you should get a figure with fivefold symmetry. $\endgroup$
    – heropup
    May 31, 2017 at 20:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .