siteIcon

Addison's Flower Challenge

Challenges Home

flower
Hints:
Consider:

This flower was inspired by the Honey of a Bee design in the Novice Gallery.

  1. Sky: TNTGradient based on a whiteStroke at the bottom of the canvas, morphing to a blueStroke after about 320 steps
  2. Stem: TNTArc forestGreenStroke centered at the lower right corner of the canvas beginning at 125° and ending at 180° with a radius of 14. The stroke's lineWidth property was set to .5
  3. The center of the flower is a TNTPoint at (3,2)
  4. The 7 (numPetals) larger hotPink petals are TNTEllipse elements, whose centers are equally-distributed along a radius of 3 from the flower's center. Each petal is created and drawn within a for-loop: Each petal's center is first calculated using a SohCahToa application: The initial angle is zero and is increased each time through the loop by deltaTheta, which is 360°/numPetals.
  5. Immediately after a hotPink petal is drawn, the petal's 'a' property (width) is divided by 1.2 and its 'b' property (height) is divided by 2, and it's fill color (fcolr) is changed to yellow and it is redrawn before the loop ends.
  6. Yellow and pink strokes are provided on each petal as shown
  7. The center of the flower is a TNTOrb whose initial disk is centered at (3,2) with a radius of 2 and a fill color of gold. The final disk is centered at (3.5, 2.5) with a radius of .5 and is filled with yellow. The orb is made in 8 steps.
  8. By using a variable for the number of petals (numPetals), the 'look' of the flower can be changed by changing only one number.