Moving in the plane

Ivan Cnop
Vrije universiteit Brussel
icnop@vub.ac.be

Parametric plots

Two functions needed to describe coordinates

Template: these coordinates are functions of a new variable called "parameter"

ParametricPlot[{x[t], y[t]},{t, a, b}
	,AspectRatio -> Automatic
		,PlotRange -> {{-r, r}, {-r, r}}]

Example

a = -4;
b = 4;	
ParametricPlot[{t, t^2},{t, a, b}
	,AspectRatio -> Automatic
		,PlotRange -> {{a, b}, {-1, b^2}}]

Graphing functions is done by setting the first coordinate = parameter

Clear[f]

f[t_] := 2 Cos[3 Sin[t]]
		a = -4;
b = 4;	
ParametricPlot[{t, f[t]},{t, a, b}
	,AspectRatio -> Automatic
		,PlotRange -> {{a, b}, {-3, 3}}]

It allows to draw curves that are not the graph of a (single) function:

a = -4;
b = 4;	
ParametricPlot[{t^2, t},{t, a, b}
	,AspectRatio -> Automatic
		,PlotRange -> {{0, 20}, {a, b}}]

a = -4;
b = 4;	
ParametricPlot[{t^2, t^3},{t, a, b}
	,AspectRatio -> Automatic
		,PlotRange -> {{a, b}, {a, b}}]

Show[%, PlotRange -> {{0, 1}, {-1, 1}}]

Clear[f]

f[t_] := 2 Cos[3 Sin[t]]
		a = -4;
b = 4;	
ParametricPlot[{t + f[t], f[t]},{t, a, b}
	,AspectRatio -> Automatic
		,PlotRange -> {{a, b}, {-3, 3}}]

f[t_] := 2 Cos[3 Sin[t]]
		a = -4;
b = 4;	
ParametricPlot[{f[t] - t/2, f[t] + t/2},{t, a, b}
	,AspectRatio -> Automatic
		,PlotRange -> {{a, b}, {-3, 3}}]

Looking at Circles

a = 0; b = Pi; r = 1.5;
ParametricPlot[{Cos[t], Sin[t]},{t, a, b}
	,AspectRatio -> Automatic
		,PlotRange -> {{-r, r}, {-r, r}}]

a = Pi/2; b =  2  Pi; r = 1.5;
ParametricPlot[{Cos[t], Sin[t]},{t, a, b}
	,AspectRatio -> Automatic
		,PlotRange -> {{-r, r}, {-r, r}}]

a = 0; b = Pi; r = 1.5;
ParametricPlot[{Sin[t], Cos[t]},{t, a, b}
	,AspectRatio -> Automatic
		,PlotRange -> {{-r, r}, {-r, r}}]

Animation

Do[
	ParametricPlot[{Cos[t], Sin[t]},{t, j, j +  .5}
	,AspectRatio -> Automatic
		,PlotRange -> {{-r, r}, {-r, r}}]
,{j, 0, 4 Pi, Pi/6}]

Ellipses

Stretching Circles

A=(({{1, 0}, {0, 1.5}}))

Eigensystem[A]//TableForm

a = 0;
b = 2 Pi;	
r = 3;
ParametricPlot[A . {Cos[t], Sin[t]},{t, a, b}
	,AspectRatio -> Automatic
		,PlotRange -> {{-r, r}, {-r, r}}]

A=(({{1.5, 0}, {0, 1}}))

Eigensystem[A] // TableForm

a = 0;
b = 2 Pi;	
r = 3;
ParametricPlot[A . {Cos[t], Sin[t]},{t, a, b}
	,AspectRatio -> Automatic
		,PlotRange -> {{-r, r}, {-r, r}}]

Rotating

Rotating over an angle is performed by

B=(({{Cos[alfa], -Sin[alfa]}, {+Sin[alfa], Cos[alfa]}}))

Eigensystem[B] // TableForm

alfa = N[π/6]
a = 0;
b = 2 Pi;	
r = 3;
ParametricPlot[B . A . {Cos[t], Sin[t]},{t, a, b}
	,AspectRatio -> Automatic
		,PlotRange -> {{-r, r}, {-r, r}}]

A=(({{1.5, 2}, {0, 1}}))

Eigensystem[A] // TableForm

a = 0; b = 2*Pi; r = 3; 
ParametricPlot[A . {Cos[t], Sin[t]}, {t, a, b}, 
   AspectRatio -> Automatic, PlotRange -> {{-r, r}, {-r, r}}]

Spiral curves

\(\(\(	\)\(ParametricPlot[{E^t\ Cos[t], E^t\ Sin[t]}, {t, \(-2\), 
        6}
	, AspectRatio -> Automatic
		, 
      PlotRange -> {{\(-20\), 5}, {\(-5\), 10}}]\)\)\)

\(\(\(	\)\(ParametricPlot[{t\ \ Cos[t], t\ Sin[t]}, {t, 0, 6}
	, 
      AspectRatio -> Automatic
		, 
      PlotRange -> {{\(-10\), 10}, {\(-10\), 10}}]\)\)\)

\(\(\(	\)\(ParametricPlot[{Log[t]\ Cos[t], Log[t]\ \ Sin[t]}, {t, 1, 
        40}
	, AspectRatio -> Automatic
		, 
      PlotRange -> {{\(-5\), 5}, {\(-5\), 5}}]\)\)\)

Animation

\(\(\(	\)\(Table[
      ParametricPlot[{t\ \ Cos[t + angle], t\ Sin[t + angle]}, {t, 0, 6}
	, 
        AspectRatio -> Automatic
		, 
        PlotRange -> {{\(-10\), 10}, {\(-10\), 10}}]
, {angle, 0, 2\ Pi, \ 
        Pi/6}]\)\)\)

\(\(\(	\)\(Table[
      ParametricPlot[{t\ \ Cos[\(-t\) + angle], t\ Sin[\(-t\) + angle]}, {t, 
          0, 6}
	, AspectRatio -> Automatic
		, 
        PlotRange -> {{\(-10\), 10}, {\(-10\), 10}}]
, {angle, 0, 2\ Pi, \ 
        Pi/6}]\)\)\)

A flower

Show[%, %%]

Lissajous Figures

\(\(\(	\)\(ParametricPlot[{Cos[3\ t], \ Sin[5\ t]}, {t, 0, 2\ Pi}
	, 
      AspectRatio -> Automatic
		, 
      PlotRange -> {{\(-1\), 1}, {\(-1\), 1}}]\)\)\)

Animation

\(\(\(	\)\(Do[
	
      ParametricPlot[{Cos[3\ t], \ Sin[5\ t]}, {t, j, j +  .2}
	, 
        AspectRatio -> Automatic
		, 
        PlotRange -> {{\(-1\), 1}, {\(-1\), 1}}]
, {j, 0, 2\ \ Pi, 
        Pi/24}]\)\)\)