Week 2 Assignment

Maria Mendez

Problem 5 Necklace

void drawNecklace(void){

float v=0;
int i;
float angle2=1;
int numPoints=160;
float Rad= 160;
Vec2d P;
Vec2d center(200,200);

glBegin(GL_LINE_LOOP);
for(i = 0; angle2 < numPoints; i++){
P.x = cos(angle2) * Rad;
P.y = sin(angle2) * Rad;
P = P+ center;

glVertex2f(P.x, P.y);
angle2+=0.885;
}
glEnd();

}