Im not sure if this goes in here, but this is for a graphics programming class. Feel free to move it mods if need be
The code below draws a straight line on the screen. When I change the FOR LOOP VARIABLE, th(theta), to go from 0 to 2pi (i.e. 2*3.15159) it displays 7 dots on the screen.
When I change theta to 4*pi it displays 13 dots on the screen.
The question is, shouldn't it still display 7 dots on the screen because cos is periodc. So the same values are repeated again
Code:
float y;
float th;
float x;
for(th=0;th<=2*3.14159;th++)
{
x= 100 + 80*cos(th);
y= 70;
pDC->SetPixel(x,y,RGB(0,0,255));
}