Examples / p5.js Examples / / Christmas Tree

Christmas Tree

example p5.js javascript creating-functions

This sketch creates a drawTree() function that draws a Christmas tree, and then calls that function multiple times to draw a Christmas tree farm.

christmas trees

Click here to edit this code in the p5.js editor.

Remix Ideas

  • Change the color, size, or shape of your tree.
  • Add blinking lights to your tree.
  • Add presents or a train under your tree.
  • Give the farm a snowy background.

Comments and Questions

Happy Coding is a community of folks just like you learning about coding.
Do you have a comment or question? Post it here!