pngs 180 120 hw5trackroll2- 30

fps 8
div t f l

# angle from 0 to 360, with cos and sin of it
mul angle t 360
cos c angle
mul x c 5
mul ang2 angle 2
sin s ang2
add z s -5
cos c2 ang2
mul c3 c2 4
mul s2 s 4
add s3 s2 -5

# Set a 3-by-2 aspect ratio, 90° field-of-view in Y, near plane at 0.1, far plane at 10
loadp 0.6666666666666 0 0 0  0 1 0 0  0 0 -1.02020202020202 -0.20202020202020202  0 0 -1 0

object box world
position x -3 z
xyz -0.5 -0.5 -0.5
xyz -0.5 -0.5  0.5
xyz -0.5  0.5 -0.5
xyz -0.5  0.5  0.5
xyz  0.5 -0.5 -0.5
xyz  0.5 -0.5  0.5
xyz  0.5  0.5 -0.5
xyz  0.5  0.5  0.5
color 0 0.5 0.5
trif 1 2 3
trif 2 3 4
color 1 0.5 0.5
trif 5 6 7
trif 6 7 8
color 0.5 0 0.5
trif 1 2 5
trif 2 5 6
color 0.5 1 0.5
trif 3 4 7
trif 4 7 8
color 0.5 0.5 0
trif 1 3 5
trif 3 5 7
color 0.5 0.5 1
trif 2 4 6
trif 4 6 8


object box2 world
position c3 4 s3
xyz -0.5 -0.5 -0.5
xyz -0.5 -0.5  0.5
xyz -0.5  0.5 -0.5
xyz -0.5  0.5  0.5
xyz  0.5 -0.5 -0.5
xyz  0.5 -0.5  0.5
xyz  0.5  0.5 -0.5
xyz  0.5  0.5  0.5
color 0 0.5 0.5
trif 1 2 3
trif 2 3 4
color 1 0.5 0.5
trif 5 6 7
trif 6 7 8
color 0.5 0 0.5
trif 1 2 5
trif 2 5 6
color 0.5 1 0.5
trif 3 4 7
trif 4 7 8
color 0.5 0.5 0
trif 1 3 5
trif 3 5 7
color 0.5 0.5 1
trif 2 4 6
trif 4 6 8


object dummy world
position 0 0 0

object t1 world
position 0 3 -5
quaternion c s z ang2
bone 3
trackroll box +x box2
xyz -0.3 -0.3 0
xyz -0.3  0.3 3
xyz  0.3 -0.3 3
xyz  0.3  0.3 0
color 0 0.5 0
trif 1 2 3
color 1 0 0
trif 2 3 4
color 0.5 0 1
trif 3 4 1
color 0 0.25 1
trif 4 1 2

object tip t1
position 0 0 3


object t2 t1
position 0 1 0
quaternion c s z ang2
bone 3
trackroll box -x dummy
xyz -0.3 -0.3 0
xyz -0.3  0.3 3
xyz  0.3 -0.3 3
xyz  0.3  0.3 0
color 0 0.5 0
trif 1 2 3
color 1 0 0
trif 2 3 4
color 0.5 0 1
trif 3 4 1
color 0 0.25 1
trif 4 1 2

object t3 t2
position 0 -2 0
quaternion c s z ang2
bone 3
trackroll tip +y box2
xyz -0.3 -0.3 0
xyz -0.3  0.3 3
xyz  0.3 -0.3 3
xyz  0.3  0.3 0
color 0 0.5 0
trif 1 2 3
color 1 0 0
trif 2 3 4
color 0.5 0 1
trif 3 4 1
color 0 0.25 1
trif 4 1 2

object t4 t3
position -1 0 0
quaternion c s z ang2
bone 3
trackroll box -y dummy
xyz -0.3 -0.3 0
xyz -0.3  0.3 3
xyz  0.3 -0.3 3
xyz  0.3  0.3 0
color 0 0.5 0
trif 1 2 3
color 1 0 0
trif 2 3 4
color 0.5 0 1
trif 3 4 1
color 0 0.25 1
trif 4 1 2