Code Sketch
Diya
clear()
showAxes()
showGrid()
def backgroundColor= cm.radialMultipleGradient(
0, 0,
400,
Seq(0, 0.8),
Seq(yellow, white),
false)
setBackground(backgroundColor)
def baseColor = cm.linearGradient(
0, 0,
Color(244, 174, 66, 242),
200, 0,
brown,
true)
setFillColor(baseColor)
//cleari()
setSpeed(superFast)
//setBackground(cm.darkMagenta.fadeOut(0.5))
//setPenColor(cm.blue.fadeOut(0.4))
//def aquaBlue = ColorMaker.hsla(86, 1.00, 0.50, 0.46)
//setFillColor(aquaBlue)
//def rightSquare = repeat(4) {
// forward(100)
// right(90)
//}
//
//def leftSquare = repeat(4) {
// forward(100)
// left(90)
//}
//repeatFor(100 to 400 by 100) { angle =>
//
// setFillColor(aquaBlue.spin(angle))
// rightSquare
// leftSquare
//
// hop(100)
// right()
// hop(100)
// left()
//
//}
//circle in a circle
//right(360, 100)
//right(360, 50)
//rounded square
//repeat(4) {
// forward(100)
// right(90, 30)
//
//}
//pattern
//repeat(360/20) {
// setFillColor(randomColor.fadeOut(0.51))
// right(360, 100)
// right(20)
//
//}
// hop(270)
// changePosition(-100, 0)
// setPenFontSize(50)
// changePosition(-75, 0)
// setPenColor(yellow)
// write("Image")
//repeat(360/20) {
// setFillColor(randomColor.fadeOut(0.51))
// right(360, 100)
// right(20)
// left(20)
// right(-160, 100)
// setHeading(90)
// right(angle)
//}
//base
right()
hop(200)
right()
right(180, 200)
//left arc
right(120)
left(60, 200)
//right arc
left(60)
right(120)
left(60, 200)
penUp()
left(-60, 200)
right(60)
penDown()
//diya
def diyaColor = cm.radialMultipleGradient(
0, 0,
200,
Seq(0, 0.5, 0.6),
Seq(red, yellow, orange),
false)
setFillColor(diyaColor)
right(30)
left(60, 200)
left(150)
right(30)
left(60, 200)
left(150)