Week 5 - Optical Illusion

This week I took less of an artistic approach and more of a learning one. I did not create an optical illusion, but I explored and played with the potential possibilities of loops.

As illustrated in the diagram below, I used trigonometry concepts to construct spheres in p5.js.

1 . Basic Sphere

I began making 2-dimensional loops using two angles, theta and phi. I enabled them to draw a vertex at every 5 degrees of the two angles.

I added a few sliders to make the sphere more interactive. First, I made the density slider and embedded it into the loops instead of 5 degrees. Now I can change the number of vertexes in my sphere.

I also made sliders for theta and phi values which enabled me to trim the sphere from the x and y axes.

2 . Spiral Sphere

I reiterated the sphere, and this time, I created just one loop. We only need 180 degrees of theta value this time, so I divided the slider value by 2. A sphere showed up again, but it was a spiral one.

3. Spherical Lissajous Curve

I used the spiral sphere, named it LisaJous 3D, and set the theta max limit to 360. I added some multiplications in the theta values of the formulas inside the loops. This gave us a gorgeous curvy sphere. I embedded some more frequency sliders and gave them more interactivity.

4. Bumpy Sphere

This time I took the normal sphere and named it Bumpy Sphere. I tweaked the formula a bit which gave us a bumpy sphere. I also linked the frequency sliders to the formulas, which gave us playful interactions.

Reflection

I loved working on this week's assignment and am glad I used it to learn something complex. I stepped back and followed a tutorial. Trigonometry has always intimidated me, and I feel a bit more comfortable and confident after playing with it using code and seeing the result in visuals.

Credits

What We can Create w/ p5js & Spherical Coordinates

: