Polar plot

The polar coordinates r and \theta can be converted to the Cartesian coordinates x and y using the trigonometry functions:

\begin{cases} x=r\cdot\cos(\theta) \\ y=r\cdot\sin(\theta)\end{cases}

It follows that a figure specified in (r, \theta) can be plotted by ‘plot2d’ as a parametric curve:

Fig. 1 r = \cos(5\theta)

It is possible to plot two or more parametric curves together:

Fig. 2 r=\theta and r=\cos(5\theta)

An alternate is the ‘draw2d’ function, it draws graphic objects created by the ‘polar’ function:

Fig. 3 r=\theta and r=\cos(5\theta)

Fig. 4 shows a graceful geometric curve that resembles a butterfly. Its equation is expressed in polar coordinates by

r = e^{\sin(\theta)} - 2\cos(4\theta)+\sin(\frac{\theta}{12})^5

Fig. 4

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s