What are you talking about? It supports Object Oriented Programming

by qbguy (no login)

DIM c!(360), s!(360)
DIM x(8), y(8), Z(8), x2(8), y2(8), Z2(8), x3(8), y3(8)



FOR i = 1 TO 360
c!(i) = COS(i * 3.14 / 180): s!(i) = SIN(i * 3.14 / 180)
NEXT
FOR i = 1 TO 8: READ x(i): READ y(i): READ Z(i): NEXT

phi = 1: theta = 1
xcenter = 150: ycenter = 100: zcenter = 256


SCREEN 7, 0, 1, 0

DO


CLS
FOR i = 1 TO 8

x2(i) = -x(i) * s!(theta) + y(i) * c!(theta)
y2(i) = -x(i) * c!(theta) * s!(phi) - y(i) * s!(theta) * s!(phi) - Z(i) * c!(phi) + p
Z2(i) = -x(i) * c!(theta) * c!(phi) - y(i) * s!(theta) * c!(phi) + Z(i) * s!(phi)

x3(i) = 256 * (x2(i) / (Z2(i) + zcenter)) + xcenter
y3(i) = 256 * (y2(i) / (Z2(i) + zcenter)) + ycenter

PSET (x3(i), y3(i)), 15
NEXT

LINE (x3(1), y3(1))-(x3(3), y3(3)), 15
LINE (x3(1), y3(1))-(x3(4), y3(4)), 15
LINE (x3(1), y3(1))-(x3(5), y3(5)), 15

LINE (x3(2), y3(2))-(x3(3), y3(3)), 15
LINE (x3(2), y3(2))-(x3(4), y3(4)), 15
LINE (x3(2), y3(2))-(x3(6), y3(6)), 15

LINE (x3(7), y3(7))-(x3(6), y3(6)), 15
LINE (x3(7), y3(7))-(x3(3), y3(3)), 15
LINE (x3(7), y3(7))-(x3(5), y3(5)), 15

LINE (x3(8), y3(8))-(x3(5), y3(5)), 15
LINE (x3(8), y3(8))-(x3(4), y3(4)), 15
LINE (x3(8), y3(8))-(x3(6), y3(6)), 15

PCOPY 1, 0


phi = phi + 1: theta = theta + 1
IF phi > 360 THEN phi = phi - 360
IF theta > 360 THEN theta = theta - 360

t!=TIMER
WHILE t!=TIMER
WEND

LOOP

DATA 50,50,-50
DATA -50,-50,-50
DATA -50,50,-50
DATA 50,-50,-50

DATA 50,50,50
DATA -50,-50,50
DATA -50,50,50
DATA 50,-50,50

Posted on Jan 27, 2008, 9:22 AM

Respond to this message   

Return to Index


Response TitleAuthor and Date
Re: What are you talking about? It supports Object Oriented Programming on Jan 27
 Your direction is what you think is the most popular.roy on Jan 27
  *Organizing. I must join the "R" club lol.roy on Jan 27
 * Did you run the code? It orients an object-- see, Object Oriented Programingqbguy on Jan 27