p5.js Experience and Iceberg Simulation


Hello! This is my second devlog in Drawing, Moving, and Seeing with Code Spring 2025. This log covers my p5.js experience and the iceberg simulation. 

I have used p5.js before, so these things were not new. I learned loops, functions, variables, and all the basics last semester. This makes me feel more confident, but I am excited to challenge myself. 

I tried a few different ways for my random walk. First, I tried random points for a few lines. I would say the main issue with this was having logic for how and where the different lines start to make it one cohesive line. An error I kept getting in my console that said lines expected numbers but received NaN. I ended up removing those lines that gave me issues, but I believe it was due to problems with my variable and equation use. I tried to use random to call two sets of coordinates and then draw a line in between them. In my vision for the project, I wanted the length of my segments to vary. I could not make this work.

Finally, I simplified the code and started over. I made the final iceberg path simulation using just one set of coordinates.  The simulation path generates in chunks, not in smooth, unnatural lines. I think this path generation looks natural and unique. I think it creates a more compelling piece of art than uniformity and sharpness.

https://editor.p5js.org/gracelynn/full/Z4BN3BmU9 

Leave a comment

Log in with itch.io to leave a comment.