'=========================================================================== ' Subject: 3D ROTATING WIREFRAME FACE Date: 09-04-99 (12:41) ' Author: Michael Galos Code: QB, QBasic, PDS ' Origin: galvin@powerup.com.au Packet: GRAPHICS.ABC '=========================================================================== SCREEN 13 pi = 3.141592654# / 180 a = 160: b = 100: c = 31 s = 2000: r1 = 60: r2 = 5 1 FOR i = 1 TO 360 STEP 1 x1 = a + r1 * SIN(pi * (i - 3)) y1 = (b - 5) + r2 * COS(pi * (i - 3)) x2 = a + (r1 - 15) * SIN(pi * (i - 4)) y2 = (b - 20) + r2 * COS(pi * (i - 4)) x3 = a + r1 * SIN(pi * (i + 3)) y3 = (b - 5) + r2 * COS(pi * (i + 3)) x4 = a + (r1 - 15) * SIN(pi * (i + 4)) y4 = (b - 20) + r2 * COS(pi * (i + 4)) x5 = a + (r1 - 16) * SIN(pi * (i - 20)) y5 = (b - 25) + r2 * COS(pi * (i - 20)) x6 = a + (r1 - 16) * SIN(pi * (i + 20)) y6 = (b - 25) + r2 * COS(pi * (i + 20)) x7 = a + (r1 - 14) * SIN(pi * (i - 30)) y7 = (b - 23) + r2 * COS(pi * (i - 30)) x8 = a + (r1 - 14) * SIN(pi * (i + 30)) y8 = (b - 23) + r2 * COS(pi * (i + 30)) x9 = a + (r1 - 18) * SIN(pi * (i - 20)) y9 = (b - 21) + r2 * COS(pi * (i - 20)) x10 = a + (r1 - 18) * SIN(pi * (i - 27)) y10 = (b - 20) + r2 * COS(pi * (i - 27)) x11 = a + (r1 - 18) * SIN(pi * (i - 14)) y11 = (b - 20) + r2 * COS(pi * (i - 14)) x12 = a + (r1 - 18) * SIN(pi * (i - 20)) y12 = (b - 18) + r2 * COS(pi * (i - 20)) x13 = a + (r1 - 18) * SIN(pi * (i + 20)) y13 = (b - 21) + r2 * COS(pi * (i + 20)) x14 = a + (r1 - 18) * SIN(pi * (i + 27)) y14 = (b - 20) + r2 * COS(pi * (i + 27)) x15 = a + (r1 - 18) * SIN(pi * (i + 14)) y15 = (b - 20) + r2 * COS(pi * (i + 14)) x16 = a + (r1 - 18) * SIN(pi * (i + 20)) y16 = (b - 18) + r2 * COS(pi * (i + 20)) x17 = a + (r1 - 13) * SIN(pi * (i - 8)) y17 = (b - 3) + r2 * COS(pi * (i - 7)) x18 = a + (r1 - 13) * SIN(pi * (i + 7)) y18 = (b - 3) + r2 * COS(pi * (i + 7)) x19 = a + (r1 - 13) * SIN(pi * (i - 5)) y19 = (b + 5) + r2 * COS(pi * (i - 5)) x20 = a + (r1 - 13) * SIN(pi * (i - 20)) y20 = (b + 5) + r2 * COS(pi * (i - 20)) x21 = a + (r1 - 13) * SIN(pi * (i - 5)) y21 = (b + 8) + r2 * COS(pi * (i - 5)) x22 = a + (r1 - 13) * SIN(pi * (i + 5)) y22 = (b + 5) + r2 * COS(pi * (i + 5)) x23 = a + (r1 - 13) * SIN(pi * (i + 20)) y23 = (b + 5) + r2 * COS(pi * (i + 20)) x24 = a + (r1 - 13) * SIN(pi * (i + 5)) y24 = (b + 8) + r2 * COS(pi * (i + 5)) x25 = a + (r1 - 13) * SIN(pi * (i + 8)) y25 = (b + 15) + r2 * COS(pi * (i + 8)) x26 = a + (r1 - 13) * SIN(pi * (i - 8)) y26 = (b + 15) + r2 * COS(pi * (i - 8)) LINE (x1, y1)-(x2, y2), c LINE (x1, y1)-(x3, y3), c LINE (x3, y3)-(x4, y4), c LINE (x4, y4)-(x6, y6), c LINE (x2, y2)-(x5, y5), c LINE (x7, y7)-(x5, y5), c LINE (x8, y8)-(x6, y6), c LINE (x9, y9)-(x10, y10), c LINE (x9, y9)-(x11, y11), c LINE (x10, y10)-(x12, y12), c LINE (x11, y11)-(x12, y12), c LINE (x13, y13)-(x14, y14), c LINE (x13, y13)-(x15, y15), c LINE (x14, y14)-(x16, y16), c LINE (x15, y15)-(x16, y16), c LINE (x17, y17)-(x1, y1), c LINE (x18, y18)-(x3, y3), c LINE (x18, y18)-(x17, y17), c LINE (x19, y19)-(x20, y20), c LINE (x21, y21)-(x20, y20), c LINE (x22, y22)-(x19, y19), c LINE (x24, y24)-(x21, y21), c LINE (x22, y22)-(x23, y23), c LINE (x24, y24)-(x23, y23), c LINE (x25, y25)-(x26, y26), c FOR t = 1 TO s: NEXT t GOSUB erase1 NEXT i GOTO 1 erase1: LINE (x1, y1)-(x2, y2), 0 LINE (x1, y1)-(x3, y3), 0 LINE (x3, y3)-(x4, y4), 0 LINE (x2, y2)-(x5, y5), 0 LINE (x4, y4)-(x6, y6), 0 LINE (x7, y7)-(x5, y5), 0 LINE (x8, y8)-(x6, y6), 0 LINE (x9, y9)-(x10, y10), 0 LINE (x9, y9)-(x11, y11), 0 LINE (x10, y10)-(x12, y12), 0 LINE (x11, y11)-(x12, y12), 0 LINE (x13, y13)-(x14, y14), 0 LINE (x13, y13)-(x15, y15), 0 LINE (x14, y14)-(x16, y16), 0 LINE (x15, y15)-(x16, y16), 0 LINE (x17, y17)-(x1, y1), 0 LINE (x18, y18)-(x3, y3), 0 LINE (x18, y18)-(x17, y17), 0 LINE (x19, y19)-(x20, y20), 0 LINE (x21, y21)-(x20, y20), 0 LINE (x22, y22)-(x19, y19), 0 LINE (x22, y22)-(x23, y23), 0 LINE (x24, y24)-(x23, y23), 0 LINE (x24, y24)-(x21, y21), 0 LINE (x25, y25)-(x26, y26), 0 RETURN