OSL

2D Polar Coordinates
Figure 3 illustrates how the location of a point, within a polar coordinate system, is
specified by distance (
Relative to the center of the 1 x 1 polygon, shown in figure 3, the coordinates of
the hilited box are,
Listing 1

Drawing CurvesThe School of Mathematics and Statistics at the University of St.Andrews, Scotland maintains a web site of "Famous Curves". Many of the curves are defined by formula that require the use of polar coordinates. For example, figure 4 uses the polar description of a curve called the "Trisectrix of Maclaurin"
Listing 2 provides the code for the shader that produced the pattern shown above. 
Listing 2  maclaurin.osl

© 2002 Malcolm Kesson. All rights reserved.