gizmobench

Polar Graphing Calculator

Type r as a function of theta and the curve appears, with the numbers that made it beside it. Two things here are deliberate. The expression is read by a parser written for this page, so only the functions listed under the plot exist and a name outside that list is an error that names what is available, not a silent reference to something else. And the curve is broken rather than joined: tan(theta) has no usable value near a quarter turn, so the arc ends there and a new one starts on the far side instead of a straight line being drawn across the plot. The even grid of 720 samples is the grid the readout counts, extra points are worked out between those samples where the curve turns quickly, and 25 angles spread across the range sit in the coordinate table underneath with r, x and y.

radians720 samples721 points, 1 arc
plotcardioid
0π/2π3π/2r 2
r max
2.00
r min
0.00
Range
0 to 2π
Samples
720
Theta at max, min
0 and π

  • r is worked out at 721 evenly spaced angles from 0 to 2π, and neighbouring points are joined with straight lines.
  • r max and r min are the largest and smallest r among those samples, not a solved maximum.
  • The even samples already resolve this curve, so no extra points were needed.

The angle

The range is read in the unit you choose: pi, 2pi and plain numbers all work in radians. In degrees a full turn is 360, and sin, cos and tan take degrees too.

Angle unit
Quick turns

Between 32 and 4,000 even steps across the range, which is one more angle than that counting both ends. More samples resolve a tighter curve, and the page adds its own extra points between them where the curve turns quickly.

Worked examples

Each one runs through the same function as your own expression. Load one to see it in the field.

  • 1 + cos(theta)0 to 2pi
    cardioid, r max 2.00
  • sin(3 theta)0 to 2pi
    three-petal rose, r max 1.00
  • tan(theta)0 to 2pi
    curve, broken past the plot edge into 3 arcs

Coordinate samples

25 angles spread across the range, with r and the point it lands on. This is the same grid the plot is drawn from, so the numbers here are the numbers on the stage.

thetarxy
0220
π/121.96591.89890.5088
π/61.8661.6160.933
π/41.70711.20711.2071
π/31.50.751.299
5π/121.25880.32581.2159
π/216.123e-171
7π/120.7412-0.19180.7159
2π/30.5-0.250.433
3π/40.2929-0.20710.2071
5π/60.134-0.1160.067
11π/120.0341-0.03290.0088
π000
13π/120.0341-0.0329-0.0088
7π/60.134-0.116-0.067
5π/40.2929-0.2071-0.2071
4π/30.5-0.25-0.433
17π/120.7412-0.1918-0.7159
3π/21-1.837e-16-1
19π/121.25880.3258-1.2159
5π/31.50.75-1.299
7π/41.70711.2071-1.2071
11π/61.8661.616-0.933
23π/121.96591.8989-0.5088
22-4.899e-16

What the expression may contain

theta is the angle. These functions and constants are the whole vocabulary: a name that is not here is an error rather than a surprise, because the text is parsed here and never run as code.

  • sinsine
  • coscosine
  • tantangent
  • sec1 / cos
  • csc1 / sin
  • cotcos / sin
  • asininverse sine
  • acosinverse cosine
  • ataninverse tangent
  • sinhhyperbolic sine
  • coshhyperbolic cosine
  • tanhhyperbolic tangent
  • sqrtsquare root
  • absabsolute value
  • expe to the power
  • lnnatural log
  • loglog base 10
  • floorround down
  • ceilround up
  • roundround to the nearest whole number
  • sign-1, 0 or 1
  • minthe smaller of two values
  • maxthe larger of two values
  • pihalf a turn in radians
  • taua full turn in radians
  • ethe base of the natural log
  • Only the listed functions are available: the expression is read by a parser on this page, never run as code. The list is sin, cos, tan, sec, csc, cot, asin, acos, atan, sinh, cosh, tanh, sqrt, abs, exp, ln, log, floor, ceil, round, sign, min, max.
  • Shape names are a heuristic match against a short list of standard polar forms: circle, cardioid, limaçon, rose and Archimedean spiral. Anything else is left unnamed.
  • A feature narrower than the gap between two samples can be missed. Raise the sample count to look closer.
  • It plots r against theta and reports the samples. It does not rearrange equations, differentiate or find where two curves meet.
A drawing of samples, read by a parser. The expression is parsed by this page rather than evaluated as code, so only the functions listed are available. Sampling is adaptive and the curve is broken where the function jumps, so an asymptote is drawn as a gap instead of a straight line across the plot.

Common questions

How do I plot a cardioid?
Type 1 + cos(theta) and leave the range at 0 to 2pi. The page names it a cardioid, reports r max 2.00 at theta 0 and r min 0.00 at theta pi, and draws it as one unbroken arc. The name is a heuristic match: the parsed expression is compared against a short list of standard polar forms, so 1 + cos(theta) and 1 - 2 sin(theta) are named a cardioid and a limaçon with an inner loop, while an expression outside that list is drawn and left unnamed rather than guessed at.
Why does my curve have gaps in it?
Because r left the plot or had no value there, and joining the two sides would draw a line that is not part of the curve. tan(theta) is the clear case: r runs away near a quarter turn and a full three quarters of a turn, so the page cuts the arc at the edge of the plot and starts a new one on the other side, three arcs with two gaps. Where r stays in a sensible range the plot reaches the largest sample and nothing is cut; where a few samples run away, the edge is set from the bulk of them instead, so a handful of enormous values near an asymptote cannot flatten the rest of the curve into a dot at the middle.
How many petals does a rose curve have?
It depends on whether the multiplier on theta is odd or even. sin(3 theta) is named a three-petal rose here, and it is complete in half a turn; sin(2 theta) is a four-petal rose and needs the full turn. That is the odd and even rule: k petals for odd k, 2k petals for even k. If the range you set is too short for the whole shape, the name says so, for example part of a four-petal rose from 0 to pi.
What can I type in the expression?
theta for the angle, numbers, brackets, + - * / ^, and the functions and constants listed under the plot: sin, cos, tan, sec, csc, cot, asin, acos, atan, sinh, cosh, tanh, sqrt, abs, exp, ln, log, floor, ceil, round, sign, min and max, with pi, tau and e as constants. Multiplication can be left out where it is obvious, so 2theta, 3 cos(theta) and sin(3 theta) all read the way you would write them on paper. A name outside that list, an unclosed bracket or a stray character each produce their own message saying what to change.
Can I work in degrees instead of radians?
Yes, and it is a real mode rather than a relabelling. In degrees a full turn is 0 to 360, and sin, cos and tan take their argument in degrees too, so sin(theta) peaks at theta 90 exactly as it peaks at pi/2 in radians. The range fields accept expressions in either mode, so pi, 2pi and 3pi/2 are all valid entries in radians, and the readout prints angles back as multiples of pi where they are one.
How many samples does it take, and does that change the shape?
720 steps across the range by default, which is 721 evenly spaced angles counting both ends, and you can set anything from 32 to 4,000 steps. Those even samples are what r max, r min and the coordinate table report. On top of them the page works out extra points wherever two neighbours land far apart on the page, which is why a tight curve like sin(10 theta) ends up with more plotted points than samples. A feature narrower than the gap between two samples can still be missed, so raise the count when you want to look closely at something small.
Can I keep the graph?
Copy SVG puts the drawing on the clipboard as markup and Download SVG saves it as a file, both built from the same scene the stage draws, so the file cannot disagree with the picture. Each arc of the curve is its own path in that file, which is how the gaps survive being pasted somewhere else. Copy samples as CSV gives you the coordinate table as theta, r, x and y, with any angle where r has no value written out as such rather than left blank.
What will this page not do?
It plots r against theta and reports what it sampled. It does not rearrange an equation for you, work out where two curves meet, or turn the drawing into a proof: the shape name is a match against a list of standard forms and nothing more. It also draws one expression at a time, so comparing two curves means plotting them one after the other.

The expression is parsed by this page rather than evaluated as code, so only the functions listed are available. Sampling is adaptive and the curve is broken where the function jumps, so an asymptote is drawn as a gap instead of a straight line across the plot.