|
|
#1 |
|
Junior Member
Join Date: Aug 2006
Posts: 19
|
Please, explain me this:
I was reading PAK-9's progamming guide, in the superscope section, when realized that this will draw a square:
INIT: n=6; x1=0.5; y1=0.5; x2=0.5; y2=-0.5; x3=-0.5; y3=-0.5; x4=-0.5; y4= 0.5; x5=-0.5; y5=0.5; x6=0.5; y6=0.5; FRAME: curpoint=0; POINT: curpoint=curpoint+1; x=(if(equal(curpoint,1),x1, if(equal(curpoint,2),x2, if(equal(curpoint,3),x3, if(equal(curpoint,4),x4, if(equal(curpoint,5),x5,x6)))))); y=(if(equal(curpoint,1),y1, if(equal(curpoint,2),y2, if(equal(curpoint,3),y3, if(equal(curpoint,4),y4, if(equal(curpoint,5),y5,y6)))))); BUT, why this draws a square: Init n=5; Frame Rot=0; Point=0; Beat Point x1=-equal(point,0)+equal(point,1)+equal(point,2)-equal(point,3); y1=equal(point,0)+equal(point,1)-equal(point,2)-equal(point,3); x1=x1*0.5; y1=y1*0.5; x=x1*cos(rot)-y1*sin(rot); y=x1*sin(rot)+y1*cos(rot); point=if(equal(point,3),0,point+1); WHY?????????? ok, I know it's a rotating square, but still is a square... Thanks in advance. |
|
|
|
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|