Let’s make a rocket ship kind of like the Saturn V used in the moon landings!
TO rocket
;step [rocket]
;uncomment step line above to 'step through'
;building the rocket. You will need to call
;rocket twice
clearscreen
penup
up 90
setfillcolor red
cone 10 30 12
;create the nose cone
;cone takes three parameters:
;radius, depth (or height) and sides
;So in this case, a radius of 10 turtle
;units, a depth of 30 turtle units, and
;12 sides.
;the cone is created under the turtle
down 180
;flip over
setfillcolor white
cylinder 10 50 12
;create the body
;cylinder takes three parameters:
;radius, depth and sides, like cone
;the cylinder is created under the turtle
;similarly to cone
lower 50
;lowers the turtle, like as if going
;down in an elevator
;same as: down 90 forward 50 up 90
setfillcolor blue
cutcone 10 15 20 12
;create the base
;cutcone creates a truncated cone
;cutcone takes four parameters:
;near radius, far radius, depth and sides
;like cone, the cut cone is created under
;the turtle
;begin APOLLO inscription
up 90
raise 11
;going up! (like in an elevator)
settypedepth 5
settypesize 6
slideright 3
;same as right 90 forward 3 left 90
inscribe | APOLLO|
;incribe prints text in front of the turtle
;without moving it.
;compare with typeset which prints to the right
;and moves the turtle.
slideleft 3
;same as left 90 forward 3 right 90
lower 11
;going down!
down 90
;not the same as lower, which lowers
;down tilts the turtle down
;end of APOLLO inscription
;begin fins:
lower 20
up 90
setfillcolor grey
twosided
;light both sides of surfaces
rat 40 lat 40
;create a triangle to the right,
;(Right Angle Triangle = rat)
;and a triangle to the left
;(Left-facing right Angle Triangle = lat)
rollright 90
setfillcolor lightblue
rat 40 lat 40
rollleft 90 down 90
;end fins
;begin rockets
forward 8
setfillcolor yellow
cylinder 5 5 10
back 16
cylinder 5 5 10
forward 8
slideleft 8
cylinder 5 5 10
slideright 16
cylinder 5 5 10
;end rockets
;begin fire
setfillcolor orange
lower 5
cutcone 3 2 3 10
slideleft 16
cutcone 3 2 3 10
slideright 8
forward 8
cutcone 3 2 3 10
back 16
cutcone 3 2 3 10
;end fire
END