https://editor.p5js.org/Yurriii/sketches/MZ2Df3g3h

What did you originally intend to create?

I originally intended to build a 3D visualization where a shape (like a sphere or cone) would move randomly in three dimensions. My goal was to see an evolving trail of shapes that I could rotate around, making it feel dynamic and immersive.

Narrate the process of creating your sketch.

  1. Starting with 2D Concepts

    I first looked at random walker examples in 2D—where a point moves on the canvas by taking small random steps. This gave me the idea of storing each new position in an array, so I could draw multiple shapes from previous locations and create a “trail.”

  2. Transitioning to 3D

    Next, I switched to WEBGL mode in p5.js and used orbitControl() to allow easy rotation of the scene. This immediately made the sketch feel more interactive and obviously 3D.

  3. Experimenting with Shapes and Sizes

    Initially, I used small spheres that moved around, but then I started experimenting with different sizes. At one point, I tried extremely large spheres (sphere(1000)) to fill the screen, which created interesting visuals. I also tried box(), cone(), or torus() just to see the different geometry effects.

  4. Adjusting Color and Lighting

    This was a turning point. I’d used fill(hueVal, 80, 80) to color shapes in 2D sketches, but in a 3D environment with lighting, fill() alone doesn’t always produce visible colors. After some trial and error (and reading documentation/watching videos), I discovered that using material functions like emissiveMaterial() or ambientMaterial() was needed for better color rendering with 3D lights in p5.js.

What resources and examples did you draw on to create your sketch? What was most helpful / least helpful from this week’s materials?

https://www.youtube.com/watch?v=k2FguXvqp60

What problems/discoveries did you encounter along the way?

Color Issue with 3D and Lights