Code Sketch


Flower Design
By: Vinod Naik
Category: Art
cleari()
setBackground(crimsonCornsilk)
setSpeed(superFast)

def newColor = cm.crimson
setBackground(cm.linearGradient(
    100, -30, cm.cornSilk,-30,170, newColor))
    
def crimsonCornsilk = Color(0, 32, 37)



def flower1 = Picture{
        repeat(36){
        setFillColor(red)
        left()
        right(160,20)
        right()
        right(130,10)        
    }
}.thatsFilledWith(crimsonCornsilk)

def flower2 = Picture{
        repeat(36){
        setFillColor(red)
        left()
        right(100,20)
        right()
        right(100,20)        
    }
}.thatsFilledWith(crimsonCornsilk)


flower1.thatsTranslated(-250, 150).thatsFilledWith(cm.darkBlue).draw
flower1.thatsTranslated(-150, 100).thatsFilledWith(cm.darkTurquoise).draw
flower1.thatsTranslated(-50, 50).thatsFilledWith(cm.floralWhite).draw
flower1.thatsTranslated(100, 50).thatsFilledWith(cm.forestGreen).draw
flower1.thatsTranslated(210, 100).thatsFilledWith(cm.mediumOrchid).draw
flower1.thatsTranslated(310, 150).thatsFilledWith(cm.mediumVioletRed).draw
flower1.thatsTranslated(28, -1).thatsScaled(0.5).draw
flower2.thatsTranslated(-50, -50).thatsFilledWith(cm.blue).draw
flower2.thatsTranslated(-150, -100).thatsFilledWith(cm.gold).draw
flower2.thatsTranslated(-250, -150).thatsFilledWith(cm.pink).draw
flower2.thatsTranslated(50, -50).thatsFilledWith(cm.cyan).draw
flower2.thatsTranslated(150, -100).thatsFilledWith(cm.chartReuse).draw
flower2.thatsTranslated(250, -150).thatsFilledWith(cm.cornflowerBlue).draw