Function Repository Resource:

EpicyclePlot

Source Notebook

Plot the composition of cycles having different radii, frequencies and phases

Contributed by: Jon McLoone

ResourceFunction["EpicyclePlot"][{r1,r2,},t]

plots the epicycle where the component cycle of frequency i has radius ri.

ResourceFunction["EpicyclePlot"][{{r1,f1},{r2,f2},},t]

plots the epicycle with component radii ri and frequencies fi.

ResourceFunction["EpicyclePlot"][{{r1,f1,ϕ1},{r2,f2,ϕ2},},t]

plots the epicycle with the given component radii and frequencies, with relative phases given by the ϕi.

ResourceFunction["EpicyclePlot"][data,t,{t0,t1}]

plots the epicycle given by data at time t together with the path traced between time t0 and t1.

Details and Options

ResourceFunction["EpicyclePlot"] accepts all the options of Graphics, together with "PathStyle", "SpokeStyle", "CircleStyle" and "PointStyle" that determine the appearance of the resulting plot.

Examples

Basic Examples (2) 

A plot of epicycles with radii 1, 0.2 and 0.1 and frequencies of 1, 2 and 3:

In[1]:=
ResourceFunction["EpicyclePlot"][{1, 0.2, 0.1}, 0.5]
Out[1]=

Replot, also showing the path traced out by the composition between t=0 and t=2π:

In[2]:=
ResourceFunction["EpicyclePlot"][{1, 0.2, 0.1}, 0.5, {0, 2 \[Pi]}]
Out[2]=

Options (3) 

The style of the four elements of an EpicyclePlot are controlled with "PathStyle", "SpokeStyle", "CircleStyle" and "PointStyle":

In[3]:=
ResourceFunction[
 "EpicyclePlot"][{{1, 1}, {0.2, 7}}, 0.5, {0, 2 \[Pi]}, "SpokeStyle" -> None, "CircleStyle" -> None, "PointStyle" -> None]
Out[3]=

The options "PathStyle", "SpokeStyle", "CircleStyle" and "PointStyle" accept style directives:

In[4]:=
ResourceFunction[
 "EpicyclePlot"][{{1, 1}, {0.2, 4}}, 0.5, {0, 2 \[Pi]}, "SpokeStyle" -> Blue, "CircleStyle" -> Directive[Gray, Dashed], "PointStyle" -> PointSize[0.04], "PathStyle" ->
  Thickness[0.01]]
Out[4]=

All Graphics options are supported:

In[5]:=
ResourceFunction[
 "EpicyclePlot"][{{1, 1}, {0.2, 7}}, 0.5, {0, 2 \[Pi]}, Background -> LightBlue]
Out[5]=

Neat Examples (1) 

Explore loci of epicycles of radius 1/3, 1/2, 1:

In[6]:=
Manipulate[
 ResourceFunction["EpicyclePlot"][{{1/3, f1}, {1/2, f2}, {1, f3}}, 0, {0, 2 \[Pi]}, "CircleStyle" -> None, "PointStyle" -> None, "SpokeStyle" -> None],
 {{f1, 17}, -20, 20},
 {{f2, -7}, -20, 20},
 {{f3, -1}, -20, 20}]
Out[6]=

Publisher

Jon McLoone

Version History

  • 3.0.0 – 07 December 2020
  • 2.0.0 – 29 October 2020
  • 1.0.0 – 15 October 2019

Related Resources

License Information