Skip to content

Latest commit

 

History

History

module01-vectors

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Vectors

This module, we are really digging into the foundational material for the class. Almost every example all semester long will make use of vectors! This is a chance to learn about what vectors are, how they work in p5.js, and practice coding with them.

Core Material

For each module, I will provide written and video tutorials on the topics. You can review whichever format suits you best. If the amount feels overwhelming, please reach out and we can help you narrow things down, and select a subset of the material to focus an exercise around. It's a lot!

Supplemental Material

For each module, I will provide a list of additional video tutorials and readings that you may draw on for further exploration. It's unlikely you would be able to consume everything in one week and if you are looking for guidance about what might fit with your interests and learning style the most, please reach out.

Code Examples

Assignment

Try using vectors! Here are some suggestions:

  • Find any sketch you previously created in p5.js with separate x,y variables for elements on the sketch. Can you rewrite the sketch with createVector() for each of these pairs?
  • For example, rework your sketch from week 1 and use vectors! Try incorporating the concept of forces into the environment by working with only the acceleration of the object. Create a formula for calculating a dynamic acceleration, one that changes over time based on any number of factors.
  • The p5.Vector class can be very useful expanding the random walk object to create fractal-like patterns. Two examples are Diffusion Limited Aggregation and Brownian Tree Snowflake. Create your own variation of these patterns. What would happen if you added forces and acceleration?

Instructions

  • Document your work on the web with a short blog post. Here are some guiding questions if you are not sure what to write about:
    • What did you originally intend to create?
    • Narrate the process of creating your sketch.
    • What resources and examples did you draw on to create your sketch? What was most helpful / least helpful from this week’s materials.
    • What problems/discoveries did you encounter along the way?
  • Submit a link to your blog post to the course Brightspace.

Emoji Key

The following emoji key will hopefully help you navigate the material for each module.

  • 🚂 Video tutorial from Coding Train
  • 🎥 Other video tutorial
  • 📗 Nature of Code book
  • 📕 Other reading
  • 💻 Code examples
  • 🎨 Creative project references