In my opinion (as an educator) I think p5.js is the best coding language to start with whether you are just starting out on your coding journey or want a coding language that is very visual and creative. The reason that p5.js is so good for beginners is that the results are instantaneous and visual. It is fun and addictive at the same time. It is challenging and rewarding.

Useful Websites

The Coding Train

This is the definitive place for p5.js and Processing. Created by the wonderful Dan Shiffman

Steve’s MakerSpace

This is brilliant resource if you are wanting to develop artistic skills with coding in p5.js

Learning to Code

If you have never done ay coding before then my suggestion is to start here with this pdf download as a taster. It will give you a glimpse into coding, in so many ways it is easier than trying to describe what coding is (which is virtually impossible). All you need is a computer (or tablet) with wifi connection, this works best with either Chrome or Safari as your web browser. If that has given you a taste for learning more about coding then begin with Algorithmic Art (kindle eBook) by downloading the kindle app on your computer (or tablet) and work through the exercises one small step at a time.

Taster

A quick taster session in p5.js.

Algorithmic Art

This eBook is your starting place for your coding journey. You don’t have to have any coding skills, nor do you have to have a degree in maths but a willingness to work logically and methodically. This is how to create using colour, shapes and patterns using a coding language called p5.js. Perfect for beginners and experts.

Algorithmic Art Part 2

Algorithmic Art part 2 continues where the first part left off. Develop more ideas around perlin noise, particles and how to manipulate pixels on the canvas.

Creating 3D Art

You can create 3D objects using WEBGL with p5.js, I am still putting the book together but below are some draft pdfs to be getting on with. Please be aware these are in draft form.

Introduction to 3D shapes

Downloading the Suzanne Object

Downloading image (square)

Downloading video (square)

Visualisation

This where p5.js can come into its own with the power of JavaScript behind it. You can create great visitations even from a CSV file. I am still putting the book together but below are some draft pdfs to be getting on with. Please be aware these are in draft form.

Music Visualisation

Fast Fourier Transform

Keyboard and Mouse

MP3 Music Download

Image Download

Making Games

One way to supercharge your coding is to create games. This tests your coding skills and is fun at the same time, also you can share your games with others and finds ways to refine and improve. These two books are examples that you can develop further, their purpose is to give you a broad coding experience with a singular purpose. These eBooks do not assume any coding experience but I would encourage you to start with Algorithmic Art but it is not essential. This covers the following games: Lerp (this is to whet your appetite), Pong (a very popular game back in the day) and Flappy Bird (a more recent game, very simple to play, very addictive)

Games part 2 ebook covers the following games: Space Invaders (a space invaders game, another classic one), Asteroids (destroying asteroids is the name of the game) and The Maze (create a randomly generated maze and then play it). It assumes you have already worked through the first book. After these two eBooks try a game/physics engine matter.js and create the angry bird game (pdfs below)

Physics Engines

There are a few physics engines that you can use for either games or physics simulations, Here we will look at two, Matter.js and Toxiclibs.js which can be used with p5.js. I am still putting the book together but below are some draft pdfs to be getting on with. Please be aware these are in draft form.

Matter.js

Angry Birds

Toxiclibs.js

Physics Simulation

P5.js is a great coding language for developing and illustrating simulations. These are some simple examples of trying to simulate natural movement and motion, the first book looks at pendulums, springs and particle systems.

The second eBook covers quite a lot of different aspects of physics simulations: perlin noise, random mover, forces, N-Body, seek, flee, pursuit, evade, catch and respawn, arrive, wander, scalar projection, path following

Artificial Intelligence

Artificial Intelligence is constantly in the news and has found a new audience. People are using it in their millions (and have been for many years) because of the likes of ChatGPT and Bard. Yet few have any inkling of what AI or machine learning is. This book takes you step by step through the process from a complete beginner to having a working understanding of what AI is and how to build your own.

ML5.js CNN

PoseNet Classification

PoseNet Regression

MobileNet

Genetic Algorithms

A genetic algorithm is one that mimics the selection process in nature where a species evolves over time, where the positive traits are passed down from generation to generation. Examples would be the best at finding food, hunting or avoiding predators. In this book we are creating systems where this can be applied not just to simulate an ecosystem but also help to solve mathematical challenges.

Neural Evolution

This links with the Genetic Algorithms and Artificial Intelligence. We play the game of Flappy Bird but this time we give it a brain using TensorFlow.js, then use genetic algorithm principles. I am still putting the book together but below are some draft pdfs to be getting on with. Please be aware these are in draft form.

Linear Regression

Least Square

Building a Perceptron

Polynomial Regression

Third Degree Polynomial

TensorFlow.js Layers

TensorFlow.js XOR

TensorFlow.js Flappy Bird