Code Sketch
Kumauni Aipen
clear()
setPenColor(white)
setBackground(Color(193, 3, 8))
setPenThickness(3)
setSpeed(fast)
def line() {
right()
forward(600)
}
line()
hop(-600)
right()
hop(50)
left()
left()
line()
def aipan() {
repeatFor(1 to 10) { e =>
val lane = e * 2 + 10
forward(lane)
hop(-lane)
right()
hop(5)
left()
}
forward(30)
hop(-30)
repeatFor(10 to 1 by -1) { f =>
val la = f * 2 + 10
forward(la)
hop(-la)
right()
hop(5)
left()
}
}
setPosition(10, -45)
left()
repeat(5) {
aipan()
right()
hop(20)
left()
}
left()
left()
hop(10)
right()
forward(610)
left()
hop(100)
left()
left()
line()
hop(-600)
right()
hop(50)
left()
left()
line()
setPosition(10, -200)
left()
repeat(5) {
aipan()
right()
hop(20)
left()
}
hop(50)
left()
forward(610)
right()
def polygon(n: Int) {
repeat(5) {
forward(n)
right(72)
}
}
def circle() {
repeat(360) {
forward(0.3)
right(1)
}
}
def design() {
repeat(2) {
hop(10)
left()
hop(-50)
polygon(50)
right()
hop(10)
left()
polygon(40)
circle()
hop(-100)
}
}
design()
setPosition (150 , -150 )
right(180)
design()
setPosition (300 , -150 )
right(180)
design ()
setPosition (450 , -150 )
right(180)
design ()
right()
hop(400)
right()
hop(40)
//println (availableFontNames )
setPenFont(Font("Tw Cen MT Condensed Extra Bold", 40) )
write (" Kumauni Aipen " )
invisible()