Coordinate Systems in Graphs

We've seen lots of kinds of Theorist graphs. But so far, they all have had rectangular coordinates. How do you get a polar graph?

Good question.

To understand, you need to know about the two conversion functions that Theorist has for polar coordinates, FromPloar() and ToPolar().

This notebook shows an equation, and how it looks on a polar, and on a normal rectangular coordinate system.

Note that it's drawing the same function, it's just drawn with a different coordinate system. Here's what it looks like inside:

Note how the vector looks the same, it's just got this function FromPolar() wrapped around it. This is a normal Theorist function. It takes, as arguments, either two numbers, or a vector with two components. There's also a function ToPolar() that does the reverse conversion.

In this notebook, there's a vector named polar. You can change the value of the vector to see how ToPolar() and FromPolar() work, and you can see how the vector moves.

The first number is the radius number, the second is the angle in radians. You probably shouldn't change the first number to be larger than 2 or 3 because that might put the point out of view. Notice that if you make the second number to be outside the range -3.14...+3.14 then the recalculated polar coordinates will be changed to be within that range; this is normal wraparound.

So you can see that the function FromPolar() simply converts the polar coordinates to rectanglular coordinates so that the normal rectangular graph can draw it.

But how do the axes and grids for polar plots work? Well, they work the same way. All the lines are mapped through the same function. Here is what the axes and grids for a polar graph look like.

Note that they use a new graph constant, named radius. This constant is set to the radius of the graph area, specifically for polar and other graphs.

What other graphs? Theorist also does cylindrical and spherical coordinates the same way as polar.


Back

The End

How Do Graphs Work?