Professional Documents
Culture Documents
HW-Cycloid Curve Plot
HW-Cycloid Curve Plot
I n [ ] : = mr = - Sin[θ] Cos[θ] 0 ;
0 0 1
I n [ ] : = p1 = {3, 0, 1};
p2 = mr.p1
O u t [ ] =
{3 Cos[θ], - 3 Sin[θ], 1}
I n [ ] : = p2 /. θ 90 * Degree
O u t [ ] =
{0, - 3, 1}
I n [ ] : = ans = {};
{θmin, θmax} = {0, Pi};
For[i = 0, i < 50, i ++, thi = θmin + (θmax - θmin) * i / 49;
p2 = mr.p1 /. θ thi;
AppendTo[ans, Take[p2, 2]];
]
Graphics[{PointSize[0.02], Blue, Point[ans]},
Axes True, Ticks True, AxesLabel {x, y}]
I n [ ] : = r = 10;
θ = Pi / 5;
{x, y} = {r Cos[θ], r Sin[θ]};
p3 = ListPlot[{{r Cos[θ], r Sin[θ]}}, AspectRatio 1, PlotStyle Black]
◼ Cycloidal Curve
I n [ ] : = p1 = {0, r, 1};
2 example-plot.nb
20
15
10
20
15
10
-10 -5 5 10
example-plot.nb 3
Rotation Matrix
Cos[θ] Sin[θ] 0
I n [ ] : = Mr = - Sin[θ] Cos[θ] 0 ;
0 0 1
Translation Matrix
1 0 r*θ
I n [ ] : = Mt = 01 r ;
00 1
20
15
10
10 20 30 40
I n [ ] : = cir1
O u t [ ] =
20
15
10
-10 -5 5 10
example-plot.nb 5
20
15
10
20 40