Introducing p5.js

Learning to code isn’t easy, but it can be fun! For those new to developing code, there are many programming languages to choose from, including python and JavaScript.

Any language comes with a lot of details, much like learning a “normal” language like Frech, Japanese or Hawaiian. There is syntax and vocabulary to learn.

What makes learning computer programming languages difficult is knowing “what to say”. What do you want a computer language to do for you? It’s important to keep in mind that learning to code also means simultaneously learning what code can do. Sometimes the second part is the hardest.

Individual languages often have a lot of information and details that needs to be organized. Kind of like books in a library. For example, python has a library for doing mathematical computations and it has a library for making plots like pie and bar charts.

JavaScript is a useful language for developing webpages. It can cause things on the page to spin and dance and respond to clicks. It can also have other effects behind the scenes. A library for JavaScript that is particularly good at animations is called p5 or p5.js.

The p5.js library is a simple and satisfying way to learn how to code. We will use it to combine science and math lessons with computer animations. To learn more about the p5.js library, check out their website.

Sean Downes

Theoretical physicist, coffee and outdoor recreation enthusiast.

https://www.pasayten.org
Previous
Previous

Modelling a Trajectory