Select Page

CS 1334 The University of Texas at Dallas Javascript Creating a Forest Project

Question Description

I’m working on a javascript exercise and need support to help me understand better.

1. Create a new Khan Academy project?

2. Create a function called “Leaf” that will draw a leaf

  • the function should have x, y, and angle input parameters. Use those values in the function to position and rotate the leaf. ?
  • draw the leaf using any shapes you like (at least 3) ?
  • the leaf should not be rotationally symmetrical (it should look different when ?you rotate it) ?
  • the leaf should be positioned and rotated based on its stem, not it’s center

3. ?Create a function called “Tree” that will draw the trunk and branches of a tree ?

  • the function should have x, y parameters to place the tree ?
  • draw the tree using any shapes you like (at least 3) ?
  • the tree should be positioned and rotated based on its trunk ?

4. Use the Tree() and Leaf() functions to draw multiple trees (at least 2) with multiple leaves (at least 20 each)?

5. Save your code and submit on e-learning using the submission template.

If you ?have time: ?

  • try adding a parameter to change the color of the leaves?
  • create an additional function that draws a tree and it’s leaves together
  • use mouseDragged() to add more leaves to the trees ?

"Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you "A" results."

Order Solution Now