Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,33 @@
|
|||
#define PI 3.14159265358979323
|
||||
#define SCALE 50
|
||||
#define SIZE 320
|
||||
#define zoff 0.5773502691896257645091487805019574556
|
||||
#define cylr 1.6329931618554520654648560498039275946
|
||||
screenres SIZE, SIZE, 4
|
||||
|
||||
dim as double theta = 0.0, dtheta = 1.5, x(0 to 5), lasttime, dt = 1./30
|
||||
|
||||
dim as double cylphi(0 to 5) = {PI/6, 5*PI/6, 3*PI/2, 11*PI/6, PI/2, 7*PI/6}
|
||||
|
||||
sub drawcube( x() as double, colour as uinteger )
|
||||
for i as uinteger = 0 to 2
|
||||
line (SIZE/2, SIZE/2-SCALE/zoff) - (x(i), SIZE/2-SCALE*zoff), colour
|
||||
line (SIZE/2, SIZE/2+SCALE/zoff) - (x(5-i), SIZE/2+SCALE*zoff), colour
|
||||
line ( x(i), SIZE/2-SCALE*zoff ) - ( x(i mod 3 + 3), SIZE/2+SCALE*zoff ), colour
|
||||
line ( x(i), SIZE/2-SCALE*zoff ) - ( x((i+1) mod 3 + 3), SIZE/2+SCALE*zoff ), colour
|
||||
next i
|
||||
end sub
|
||||
|
||||
while inkey=""
|
||||
lasttime = timer
|
||||
for i as uinteger = 0 to 5
|
||||
x(i) = SIZE/2 + SCALE*cylr*cos(cylphi(i)+theta)
|
||||
next i
|
||||
drawcube x(), 15
|
||||
|
||||
while timer < lasttime + dt
|
||||
wend
|
||||
theta += dtheta*(timer-lasttime)
|
||||
drawcube x(),0
|
||||
wend
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue