Code Sketch


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

val sclr = ColorMaker.hsla(32, 0.08, 0.68, 0.65)
        
val clr1 = cm.radialGradient(
        80, 00, 
        sclr, 95, white, false)
         

def sky = ColorMaker.hsl(243, 0.83, 0.09)
def grnd = ColorMaker.hsla(122, 0.76, 0.30, 0.97)
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(ColorMaker.hsl(307, 0.84, 0.68)),
wings.withTranslation(-5, 80).withRotation(125).withFillColor(ColorMaker.hsl(307, 0.84, 0.68)),
wings.withTranslation(-5, -80).withRotation(55)withFillColor(ColorMaker.hsl(307, 0.84, 0.68)),
wings.withTranslation(-5, -80).withRotation(125)withFillColor(ColorMaker.hsl(307, 0.84, 0.68)),
tail.withTranslation(0, -100).withFillColor(brown),
body1.withFillColor(brown)
).withPenThickness(4).withPenColor(ColorMaker.hsl(200, 0.20, 0.79))

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,150)

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