Use polar plots to make natural-looking shapes.
Run the code to make a heart-like (“cardioid”) plot. Try values other than 0.5—for example, 1 or 4:
PolarPlot plots curves in polar coordinates.
This plots the path of a point that has a constant distance of 1 unit from the origin as an angle sweeps from 0 to 360 degrees:
Drag the slider to see how the curve is plotted:
This plots the path of a point whose distance from the origin is proportional to the angle:
Drag the slider to see how this curve is plotted:
This plots a heart shape (“cardioid”):
Drag the slider to see how the cardioid is plotted:
Allow the parameter to change. Drag the slider to get different shapes:
Hint: press (Windows) or (Mac) while dragging the slider for fine adjustment.
Note: click the “+” to the right of the slider to see the value of the parameter.
Add a slider to control the value of the parameter with Manipulate.
Replace the parameter 0.5 with the variable n, wrap the PolarPlot expression with Manipulate, and specify that n varies from 0 to 10, with an initial value of 0.5. Now you can drag the slider to change the value of the parameter:
Add a plot range to keep the plot from jumping around as you drag the slider:
Make the curve thick and red. Try other colors, like Blue or Green:
Hint: color names are capitalized—for example, Purple, Gray, and Green.
PolarPlot normally draws a blue curve:
You can change the color of the curve with PlotStyle:
Make the curve thicker with AbsoluteThickness. If there is more than one style element, put the elements in a list ({}):
Share It—Make an interactive website for exploring heart and flower curves:
Deploy the Manipulate to the Wolfram Cloud where anyone with a browser can use it:
Click on the link in the output to visit the site.
Tell the world about your creation by sharing the link via email, tweet, or other message.