void drawPetals(void){
int petals=10; //number of petals
float iRad= 10; //inner radius
float Amp=100; //petal length
int angle;
int numPoints=1400;
float Rad;
int m = round(720/petals);
float Wavelength;
if (m%2==0){
Wavelength= m;
}
else{
Wavelength=m+1;
}
Vec2d P;
Vec2d center(200,200);
glBegin(GL_LINE_LOOP);
for(angle = 0; angle < numPoints; angle++){
float A = 360.0 / numPoints * angle;
Rad= iRad+abs(Amp*(cos_deg(A/Wavelength*360.0)));
P.x = (cos_deg(A) * Rad);
P.y = sin_deg(A) * Rad;
P = P+ center;
glVertex2f(P.x, P.y);
}
glEnd();
}
