void drawFlower(float radius, Vec2d center,int petals,float petalSize){
Vec2d cp; //circle points as vector
float points =400;
float pointRatio = points/petals;
glBegin(GL_LINE_LOOP);
for (int i = 0; i<points; i++){//number of points (x) x/number gives number of arcs how many points are in one arc of 360
float x =i; // watch the is
float angle = ((2*PI)/points)*i; //2*pi is 360 divided into degree segments based on points multiplied by what point your on
float addOn = petalSize * d_sin(((x/pointRatio)*360) );// to make a sine wave map to radius
cp.x= cos(angle) * (radius+addOn); //gets the length of x in unit circle and muiltiplies by radius the size out
cp.y= sin(angle) * (radius+addOn); //gets the length of y and muiltiplies by radius
cp = cp+center; //sets the offset center point
//cp.x += 300; //adds in the of set
//cp.y += 300; //adds in the of set
glColor3f( (mouseX/windowW),(mouseY/windowH),0.0f);
printf( "%f \n", addOn );
//cp.x= cp.x+ addOn; //gets the length of x in unit circle and muiltiplies by radius the size out
// cp.y= cp.y+ addOn;
glVertex2f(cp.x,cp.y);
}
glEnd( );
}