DEF DRAW_WIRE_RECTPRISM GLINE 200-8,120-8,200+8,120-8,#RED GLINE 200-8,120+8,200+8,120+8,#RED GLINE 200-8,120-8,200-8,120+8,#RED GLINE 200+8,120-8,200+8,120+8,#RED GLINE 200-4,120-4,200+4,120-4,RGB(90,0,0) GLINE 200-4,120+4,200+4,120+4,RGB(90,0,0) GLINE 200-4,120-4,200-4,120+4,RGB(90,0,0) GLINE 200+4,120-4,200+4,120+4,RGB(90,0,0) GLINE 200-8,120-8,200-4,120-4,RGB(175,0,0) GLINE 200+8,120-8,200+4,120-4,RGB(175,0,0) GLINE 200-8,120+8,200-4,120+4,RGB(175,0,0) GLINE 200+8,120+8,200+4,120+4,RGB(175,0,0) ENDDraws a tiny red "cube" shape. You can see the lines get darker making it look like it has depth
3D projection
Root / Programming Questions / [.]
DFrostCreated:
This is the function I usually use for two-axis rotation.
DEF ROT_3D X,Y,Z,A1,A2 OUT X3,Y3,Z3 VAR W=SIN(RAD(A1)),W2=SIN(RAD(A2)) VAR H=COS(RAD(A1)),H2=COS(RAD(A2)) VAR Z2=Z*H-X*W X3=Z*W+X*H Y3=Y*H2-Z2*W2 Z3=Y*W2+Z2*H2 ENDIt's also faster if you calculate all the sin/cos calculation before you calculate all the point's locations.