Polar Plotter Math

θ: ---, r: ---
0.00 6.28
50%

What is a Polar Plotter?

Quick Answer: A graphing tool that draws curves defined in polar coordinates r = f(θ). Instead of x and y, it uses distance from origin and angle. It visualizes circles, cardioids, roses, spirals, and other fascinating shapes instantly.

Theory Behind Polar Coordinates

In the polar system, a point is described by a distance r from the origin and an angle θ from the positive x‑axis. The relationship r = f(θ) generates a curve. This plotter converts polar to Cartesian for drawing: x = r cos(θ), y = r sin(θ). The tool evaluates the expression using Math.js over a range of θ values, then plots the points on a polar grid (concentric circles and radial lines). Negative r values are handled by plotting in the opposite direction (adding π to θ). It supports all standard functions and trigonometric operations.

Key formulas: x = r * cos(θ), y = r * sin(θ), with r = given expression. View transform uses a square canvas with world coordinates centered.

Step-by-Step Examples

Example 1: Circle (off-center)

  1. Enter 2 * sin(theta). Set θ from 0 to 3.14 (π).
  2. You'll see a circle of diameter 2 passing through the origin, centered at (0,1) in Cartesian.
  3. Use the trace slider to see the point move as θ varies.

Example 2: Cardioid

  1. Type 2 * (1 + cos(theta)). Range 0 to 6.28 (2π).
  2. A heart‑shaped curve appears. Its cusp is at the origin, and it bulges to the right.
  3. Click Animate to watch the drawing sequence.

Example 3: Three‑Petal Rose

  1. Input 3 * cos(3 * theta). Range 0 to 3.14 (π) to get all 3 petals.
  2. Notice how the curve loops and crosses the origin.
  3. Experiment with different coefficients: cos(2*theta) gives 4 petals.

Frequently Asked Questions

What variable must I use in the expression?

Use theta as the angle variable. Example: 2 + sin(3*theta). The engine evaluates radians.

How are negative r values handled?

Negative radii are plotted in the opposite direction: a point with r = -3 at angle θ is the same as r = 3 at angle θ + π. This can create interesting inner loops.

Why does the curve stop suddenly at the range end?

The plot only draws between θ min and θ max you set. Extend the max slider to see more of the periodic pattern.

Can I zoom and pan?

Yes, use the mouse wheel to zoom. Hold Shift and drag to pan the view. Reset View returns to the default square [-5,5] range.

What's the difference between polar and Cartesian plotting?

Polar plotting uses distance from origin and angle, great for circular and symmetric patterns. Cartesian uses x and y coordinates. Many curves (like circles) have simpler equations in polar form.