# Plotting a parametric function with three input variables

I want to plot a 2D parametric function of the form: $$f_x(\theta_1,\theta_2,\theta_3) = \cos(\theta_1)+\cos(\theta_1+\theta_2)+\cos(\theta_1+\theta_2+\theta_3)$$ $$f_y(\theta_1,\theta_2,\theta_3) = \sin(\theta_1)+\sin(\theta_1+\theta_2)+\sin(\theta_1+\theta_2+\theta_3)$$

where the ranges for the input variables are: $\theta_1 \in [-\pi,\pi]$ and $\theta_2 \in [-\pi,\pi]$ and $\theta_3 \in [\frac{-\pi }{2},\frac{\pi }{2}]$

I tried to use ParametricPlot, but it takes only two input variables.

Can any one help me with this?

I guess it should be a union of these things:

Table[ParametricPlot[With[{c = c},
{Cos[a] + Cos[a + b] + Cos[a + b + c],
Sin[a] + Sin[a + b] + Sin[a + b + c]}],
{a, -Pi, Pi}, {b, -Pi, Pi}], {c, -Pi/2, Pi/2, Pi/24}]


Or

Show[%, PlotRange->All]


Using smaller step sizes in the Table command, it becomes pretty evident you get an annulus contained in the disk of radius 3. A little analysis shows that the annulus has outer radius 3 and inner radius $2\sqrt{2}-3 \approx -0.171573$.

• I can't see the relevance for using a With Statement. Aug 10, 2014 at 12:16
• @hieron The With statement is certainly not necessary but makes it super simple to extract individual plots. You can use With[{c=Pi/2},___], for example to look at that particular image. It arose because I did exactly that when trying to figure out what was going on mathematically. Clearly, this would be particularly nice, if there were more cs in the expression. Aug 10, 2014 at 12:39
Manipulate[ParametricPlot [
{Cos[a] + Cos[a + b] + Cos[a + b + c],
Sin[a] + Sin[a + b] + Sin[a + b + c]},
{a, -Pi, Pi}, {b, -Pi, Pi}, PlotStyle -> Yellow],
{c, -Pi/2, Pi/2, Pi/24}]


Effect of c in Manipulate is to change diameter of smallest circle of tangency for circle traversing disk. Slow step by step change of c works better to update plot. You can see effects by Manipulate slider e.g., swapping between c and a produces eccentric circles etc...