Assorted Projects

Fractal Builder




Fractal Presets

Instructions

  • moveForward(distance) - Moves the pen forward by the given distance.
  • moveTo(x,y) - Moves the pen to a given location.
  • turnLeft(degrees) - Rotates the pen left by the given degrees.
  • turnRight(degrees) - Rotates the pen right by the given degrees.
  • penUp() - Lifts the pen so it moves without drawing.
  • penDown() - Puts the pen back down to resume drawing.
  • setColor(hexColor) - Changes the pen color using a hex code (e.g., setColor("#FF0000")).
  • setBackgroundColor(hexColor) - Changes the canvas background color.
  • getX() - Returns the current X coordinate of the pen.
  • getY() - Returns the current Y coordinate of the pen.
  • setX(value) - Sets the X coordinate of the pen.
  • setY(value) - Sets the Y coordinate of the pen.
  • getAngle(degrees) - Returns the angle of the pen.
  • setAngle(degrees) - Sets the angle of the pen.
  • console.log(string) - Sends text to the console.
  • Basic Javascript syntax - var, while, if, function, etc.