top of page
Search

October second post

  • Writer: Chelsea Yang
    Chelsea Yang
  • Nov 4, 2020
  • 1 min read

This week I worked on learning how to code shapes in certain coordinates, incorporating text, as well as creating different background colors.


Through using the p5.js community learning page and the introductory book, i learnt to create shapes of different centers, width and height. I tried to incorporate colors and dimensions to shapes, and learnt how to locate shapes on a canvas from the mouse. By changing the center coordinate values to mouse X and mouse Y, ellipses could be drawn at the position of the mouse. When the mouse is clicked, the ellipse could turn into a different color.


I learnt to create a rectangle with the rect() block, stating the center coordinate from the left, center coordinate from the right, width and height in the parenthesis.


I also learnt to create texts through the text() block, including the text in a single quote and it’s coordinates in the parenthesis.

 
 
 

Recent Posts

See All
Interview

While searching for an interviewee who has interest and understanding in the field of computer science and art, I approached Carol Wang...

 
 
 

Comments


Post: Blog2_Post

Citation: Make: Getting Started with p5.js by Lauren McCathy, Casy Reas, and Ben Fry. Copyright 2015 Maker Media, Inc., 978-1-457-18677-6.

©2020 by Chelsea STEAM 10. Proudly created with Wix.com

bottom of page