You are on page 1of 5

Cos[θ] Sin[θ] 0

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]

I n [ ] : = Cir1 = {r Cos[t], r Sin[t]}, {t, 0, 2 Pi};

I n [ ] : = ParametricPlot[{r Cos[t], r Sin[t]}, {t, 0, 2 Pi}]

◼ Cycloidal Curve

Parameter of the Point


I n [ ] : = r = 10;

I n [ ] : = p1 = {0, r, 1};
2 example-plot.nb

I n [ ] : = ListPlot[{Take[p1, 2]}, AspectRatio  1, PlotStyle  Black]


O u t [ ] =

20

15

10

-1.0 -0.5 0.5 1.0

Parameter of the Circle


I n [ ] : = cir1 = ParametricPlot[{r Cos[t], r + r Sin[t]}, {t, 0, 360 * Degree}]
O u t [ ] =

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

Transformation Matrices (Translation and Rotation)


I n [ ] : = Mtr = Mt . Mr
O u t [ ] =

{{Cos[θ], Sin[θ], 10 θ}, {- Sin[θ], Cos[θ], 10}, {0, 0, 1}}

Plot Cycloidal Curve


TrajCyc = {};
{tmin, tmax} = {0, 2 Pi};
For[i = 0, i < 50, i ++,
ti = tmin + (tmax - tmin) * i / 49;
Mtr = Mt.Mr.p1 /. θ  ti;
AppendTo[TrajCyc, Take[Mtr, 2]];
]
4 example-plot.nb

I n [ ] : = g1 = Graphics[{PointSize[0.02], Blue, Point[TrajCyc]},


Axes  True, Ticks  True, AxesLabel  {x, y}]
O u t [ ] =
10

20

15

10

10 20 30 40

I n [ ] : = cir1
O u t [ ] =

20

15

10

-10 -5 5 10
example-plot.nb 5

I n [ ] : = Show[cir1, g1, PlotRange  All]


O u t [ ] =

20

15

10

20 40

You might also like