Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void rysujSpirale(int obroty=6, float promien_zew=1.0, float kat=0){
- glBegin(GL_LINE_STRIP);
- float teta = (kat / 180 * 3.14);
- float przyrost = 2 * 3.14 / 100;
- int nn = obroty * 100;
- float przyrost_promienia = promien_zew / nn;
- for (int i = 0; i < nn; i++){
- teta = teta + przyrost;
- float obecny_promien = przyrost_promienia*i;
- float x = cos(teta)*obecny_promien;
- float y = sin(teta)*obecny_promien;
- glVertex2f(x, y);
- }
- glEnd();
- }
Advertisement
Add Comment
Please, Sign In to add comment