Sub FillCorn
' param color
GraphicsWindow.BrushColor = cs[color][1]
GraphicsWindow.FillTriangle(x, y, x - width, y + height, x - width / 2, y + height)
GraphicsWindow.BrushColor = cs[color][2]
GraphicsWindow.FillTriangle(x, y, x + width / 2, y + height, x - width / 2, y + height)
GraphicsWindow.BrushColor = cs[color][3]
GraphicsWindow.FillTriangle(x, y, x + width, y + height, x + width / 2, y + height)
EndSub
Sub Tulip
' param x, y
' param size
' param color
width = Math.Floor(size / 15)
height = width * 4
' stem
GraphicsWindow.PenColor = "#00CC00"
yBottom = y + size
GraphicsWindow.DrawLine(x, y + height / 2, x, y + size)
' leaves
GraphicsWindow.BrushColor = "#006600"
GraphicsWindow.FillTriangle(x, yBottom, x - width / 2, yBottom - height, x + width* 1.5, yBottom - height * 3)
GraphicsWindow.BrushColor = "#009900"
GraphicsWindow.FillTriangle(x, yBottom, x + width / 2, yBottom - height, x - width* 1.5, yBottom - height * 3)
' flower
GraphicsWindow.BrushColor = cs[color][1]
GraphicsWindow.FillEllipse(x, y, width, height)
GraphicsWindow.BrushColor = cs[color][2]
GraphicsWindow.FillEllipse(x - width / 2, y, width, height)
GraphicsWindow.FillEllipse(x - width, y + height / 2, width * 2, height / 2)
GraphicsWindow.BrushColor = cs[color][3]
GraphicsWindow.FillEllipse(x - width, y, width, height)
EndSub