TrochoidPlot
Example Notebook

by Xah Lee
http://xahlee.org/
Created 1995.
Last Modified: 2024-10

What does this package do

This package plot curves traced out by rolling a circle on another fixed circle or line.
Or generate a animation of rolling circle.

Loading the package

Get[StringJoin[NotebookDirectory[],"TrochoidPlot.wl"]]

Exported functions

TrochoidPlot
TrochoidAnimation
RollingCircleAnimation

TrochoidPlot

?TrochoidPlot

TrochoidPlot[(2/3),(2/3),{0,2 2 π}]

TrochoidPlot[-(2/3),(2/3),{0,2 2 π}]

TrochoidPlot[{-(2/3),(2/3)},{(2/3)},{0,2 2 π}]

TrochoidPlot[{-(2/3),(2/3)},{(2/3)},{0,2 π}]

TrochoidPlot[{-1/3,(1/3)},Range[0,1,.2]]

TrochoidPlot[{-0.2,0.2},4]

TrochoidPlot[{((-3)/8),((-3)/4),(3/8),(3/4)},{(3/8)},{0,3 2 π},PlotPoints->30,PlotStyle->{Red ,Blue}]

TrochoidPlot[Range[.1,1,.1],{.5},PlotStyle->Table[Hue[.7,i,.8],{i,0,1,(1/10)}]]

GraphicsGrid[Partition[Table[TrochoidPlot[{(1/i),-(1/i)},{(1/i)}],{i,1,9}],3]]

TrochoidAnimation

?TrochoidAnimation

Effects of varying h

TrochoidAnimation[{(1/4),(1/4)},{0,1},NumberOfFrames->6]

TrochoidAnimation[{((-1)/4),((-1)/4)},{0,1},NumberOfFrames->6]

use ListAnimate to turn it into an animation

ListAnimate@TrochoidAnimation[{(1/4),(1/4)},{0,1},NumberOfFrames->10]

TrochoidAnimation[{(3/7),(3/7)},{0,2.5},{0,3 2 π},PlotPoints->30,NumberOfFrames->9]

Varying the size of rolling circle b.

TrochoidAnimation[{((-1)/3),(1/3)},{(1/3),(1/3)},NumberOfFrames->6]

TrochoidAnimation[{(1/5),(1/2)},{.35,.35},NumberOfFrames->12]

Varying both b and h.

TrochoidAnimation[{.2,.5},{.2,.5}]

Making a graphic array

GraphicsGrid@((Partition[#,3])&)@Table[TrochoidPlot[{3/8,3/4},{i},{0,3 2 Pi},Axes->False,PlotStyle->{Red ,Blue}],{i,0,1.7,.2}]

Rolling circle animation

wonderwheel

ListAnimate@ RollingCircleAnimation[(1/3),{1/3},{0,2 π,(π/30)}]

ListAnimate@ RollingCircleAnimation[(1/2),{(1/2)},NumberOfSpokes->1]

ListAnimate@ RollingCircleAnimation[-1,{0.5,1,1.5},{0,2 Pi, 2 Pi/40}]

Rolling circle on line animation

RollingCircleOnLineAnimation[1,{1},{0,2 π,((2 π)/20)}]

Making a graphic array

GraphicsGrid@Partition[RollingCircleAnimation[1/3,{1/3},{0,2  Pi,2  Pi/20},DotStyle->{{PointSize[.04],Red }},CirclesOn->True,NumberOfSpokes->1,DiskStyle->Hue[.72,.7,1],SpokeStyle->{{Hue[.18,1,.8],Thickness[.02]}},Axes->False],5]