Code Sketch
Boat
cleari()
setSpeed(fast)
setPenColor(Color(0, 75, 221))
left()
hop(100)
left(270)
hop(-120)
setPenFontSize(40)
write ("Sailing in KOJO")
def isoscelesTriangle = Picture{
left()
left(80)
forward(150)
left(80)
forward(150)
left(140)
forward(230)
}
isoscelesTriangle
.thatsRotated(60)
.thatsFilledWith(red)
.draw
isoscelesTriangle
.thatsFilledWith(red)
.thatsRotatedAround(240, 29, -81)
.draw
isoscelesTriangle
.thatsTranslated(-115, 200)
.thatsRotated(60)
.thatsFilledWith(red).draw
def rightangledTriangle = Picture{
right(90)
forward(90)
left(90)
forward(150)
left(147)
forward(180)
}
rightangledTriangle
.thatsFilledWith(yellow)
.thatsTranslated(-100, 02)
.thatsStrokeColored(yellow)
.draw
rightangledTriangle
.thatsFilledWith(yellow)
.thatsRotated(-90)
.thatsTranslated(-05, 91)
.thatsStrokeColored(yellow)
.thatsScaled(1.0, 2.2)
.draw
def skyBlue = Color(147, 147, 255)
def linearGradient =
cm.linearGradient(-50, 90, white, -45, -73, skyBlue, false)
setBackground(linearGradient)