Name: polar
Type: 2D

Name: polar2
Type: 2D
Authors: Joel and Michael Faber


Polar Variation Flame Pack Samples 82.28 KB 69 downloads

By Rick Sidwell This is the sample flame pack to go along with Rick's excellent explanation...


Polar coordinates are an alternative to the more common rectangular coordinates that simplifies the math for many applications. In fact, about about a quarter of the many JWildfire variations are based on polar coordinates! Understanding them can help us use these variations more effectively.

Rectangular coordinates (also called Cartesian coordinates after their inventor René Descartes) identify the location of a point in two dimensional space using the distance from a special point, the origin, in two directions. The point (x, y) is x units to the right of the origin and y units up from the origin. We can visualize how they work by setting one element (x or y) to some constant value and drawing the curve created by letting the other element be any value. For rectangular coordinates, the curves will always be lines, as shown in this diagram:

For example, the line labeled “x=1” is a vertical line that contains all the points where x is 1 and y is between -2.5 and 2.5. The point (-0.5, 1.5) is located at the intersection of the vertical x=-0.5 line and the horizontal y=1.5 line. The origin (0,0) is at the intersection of the x=0 and y=0 lines.

Note that flame fractal programs, including JWildfire, flip the vertical axis, so the line y=1 is below the y=0 line (the x-axis), where the line y=-1 is shown above. The JWildfire interface compensates for this when moving the triangles, but it is important to know when you set the values on the Affine tab manually. As we shall see shortly, it is also important to know when using some variations.

Polar coordinates take a different approach: using distance and direction. The point (ρ, θ) is ρ units from the origin along a line that is at angle θ from the line extending horizontally right from the origin. (For those not familiar with Greek, ρ and θ are the greek letters rho and theta. Some people use r instead of ρ and ϕ (phi) or t instead of θ). A grid showing constant values of ρ and θ looks like this:

Constant values of ρ result in circles and constant values of θ result in lines with one end at the origin. For example, the curve ρ=2 contains all points at distance 2 from the origin: a circle. The curve θ=π contains all the points on a horizontal line left of the origin (here cut off at distance 3). The angle θ can be expressed in radians or degrees. Since the variations that deal directly with polar coordinates use radians, that’s what we use here. Since 180° equals π radians, we can easily convert from radians to degrees by multiplying by 180/π, and from degrees to radians by multiplying by π/180.

Unlike rectangular coordinates, there are multiple ways to express any point in polar coordinates. For example, all of the following represent the same point, ((0, -2) in rectangular coordinates).

  • (2, -π/2): From the origin, go right 2 units, then go clockwise along the circle π/2 radians (one fourth of the way).
  • (2, 3π/2): From the origin, go right 2 units, then go counter-clockwise along the circle 3π/2 radians (three fourths of the way).
  • (2, -5π/2): From the origin, go right 2 units, then go clockwise along the circle 5π/2 radians (one full turn plus another fourth).
  • (-2, π/2): From the origin, go left 2 units, then go counter-clockwise along the circle π/2 radians (one fourth of the way).

When we need a unique representation, such as when converting to polar coordinates, we restrict the possible values to ρ ≥ 0 and -π 0, and points less then one unit have ρ < 0. The angle θ is the same as polar coordinates. Here is a log-polar grid:

3 thoughts on “polar”

Leave a Comment