A class to draw parametric curves. They are supposed to be given in cartesian coordinates, and conversion to polar coordinates will have to be done by the user beforehand.

The relevant part of the header is :

-(
id)initWithXAxis:(PHxAxis*)xaxis yAxis:(PHyAxis*)yaxis
function:(
int (*)(double,double*,double*))aFunction
tmin:(
double)valueTmin tmax:(double)valueTmax;

-(
void)setFunction:(int (*)(double,double*,double*))newFunction;
-(
void)setTmin:(double)newTmin;
-(
void)setTmax:(double)newTmax;
-(
void)setTmin:(double)newTmin tmax:(double)newTmax;
-(
void)setWidth:(float)newWidth;
-(
void)setMinimumNumberOfPoints:(int)npoints;
-(
void)setAdaptive:(int)maxSubdivision;

A range has to be defined, and the minimum number of points defines the smallest parameter interval between two points. By default, it is 200, but it could be a good policy to take it larger. An adaptive (to be improved, I hope) algorithm is used to add subpoints, by dichotomy, up to a certain number of steps, which can be changed. (0 means there is no adaptive algorithm used, and the minimumNumberOfPoints is exactly the number of points calculated and drawn.)