Code Sketch


reflection
By: Sampada Dhupkar
Category: Art
cleari()
showAxes()

val sclr = ColorMaker.hsl(28, 1.00, 0.50)
        
val clr1 = cm.radialGradient(
        70, 00, 
        sclr, 85, yellow, false)
         

def sky = ColorMaker.hsl(240, 0.30, 0.65)
def grnd = ColorMaker.hsl(39, 0.93, 0.29)
def bkgrnd = cm.linearGradient(
                -200, 200, 
                sky, -200, 
                -200, grnd, false)

setBackground(bkgrnd)

def sun = Picture {
    setFillColor(clr1)
    setPenColor(clr1)
    right(360,80)
}
draw(sun.withTranslation(200, 230),sun.withScaling(0.7).withFlippedY.withTranslation(200, -10))         
def wings = Picture.ellipse(55, 80)
def body1 = Picture.ellipse(30, 100)
def tail = Picture.ellipse(20, 60)

val dragonFly = picStack(
wings.withTranslation(-5, 80).withRotation(55).withFillColor(cm.red),
wings.withTranslation(-5, 80).withRotation(125).withFillColor(cm.red),
wings.withTranslation(-5, -80).withRotation(55)withFillColor(cm.red),
wings.withTranslation(-5, -80).withRotation(125)withFillColor(cm.red),
tail.withTranslation(0, -100).withFillColor(brown),
body1.withFillColor(brown)
).withPenThickness(4).withPenColor(cm.lightGreen)

def raw = picStack(dragonFly.withRotation(45).withTranslation(-400, 200),
     dragonFly.withRotation(45).withScaling(0.8),
     dragonFly.withRotation(45).withScaling(0.6).withTranslation(350, -150),
     dragonFly.withRotation(45).withScaling(0.4).withTranslation(400, -300),
     )
draw (raw.withTranslation(-100, -280).withScaling(0.2))

val wclr = ColorMaker.hsla(199, 1.00, 0.68, 0.65)
val wclr1 = cm.radialGradient(50, 0, wclr, 60, white, false)

def water = Picture.ellipse(470,130)

draw(water.thatsStrokeColored(wclr).withFillColor(wclr))
draw (raw.withScaling(0.2))