Nature of Code: Week 3 – Oscillation

This week I wanted to experiment with Sin and Cos to understand what happens when I change different parts of the formula.

The first one is a change in the angular motion example.  I added a “reset” for when the circles reach the width, they begin to reverse. I think it is a nice visualization of angular motion.

waves1 from Lindsey Frances on Vimeo.

The second is creating the polar roses.  I also made the radius multiplied by .05 to create a changing diameter.

I then began to experiment with the wave equation. For my first wave, I created this. I switched the x and the y around in the lines to create a vertical wave. From there, I began to add changes such as making the increments smaller in the for loop (example) and changing cos to sin in the mapping as well as the parameters (example.)  By doing these, it helped me to better visualize what I can do in my code with sin and cos.

waves3 from Lindsey Frances on Vimeo.

waves4 from Lindsey Frances on Vimeo.

From here, I began to create moving petal-like objects.  I  did this by again creating small increments in the for loop ( which causes a more solid like look) and made the startAngle smaller.  I also added a change in the color based on the angle change (example). I then experimented with subtracting a variable within the line equations (example).

waves7 from Lindsey Frances on Vimeo.

waves11 from Lindsey Frances on Vimeo.

I also wanted to see what would happen if I squared the angle within the mapping(example) and put it to the power of the fourth(example).  It was interesting because it created this triangular patterns.

waves8 from Lindsey Frances on Vimeo.

waves9 from Lindsey Frances on Vimeo.

Leave a Reply

Your email address will not be published. Required fields are marked *