Code Sketch


Flower
By: Manisha Chodankar
Category: Art
clear()

def curve = Picture.fromVertexShape { x =>
    x.beginShape()
    x.vertex(-150,0)
    x.quadraticVertex(
        -100, 100,
        150, 0
        )

        x.quadraticVertex(
        -100, -100,
        -150, 0
        )

        x.endShape()
}

.thatsTranslated(-150, 0)
def leaf = picStack(
    curve,
    curve.thatsRotated(-45),
    curve.thatsRotated(45),
  curve.thatsRotated(90),
  curve.thatsRotated(135),
  curve.thatsRotated(180),
    curve.thatsRotated(225),
  curve.thatsRotated(270),
  curve.thatsRotated(360),
).thatsFilledWith(Color(255, 16, 231))
    
    leaf.draw()