Categories
creative coding lab recitations

generative motion

  • List math functions that you utilized in your animation. Please share your experience while using them. What functions did you find useful? What made you confused and struggle?

Sin(), cos(), noise()?, random()?, map()?

I found all of them quite useful, especially the sin() and cos() ones as it allowed me to create some interesting shapes.

  • What kind of motion have you explored? What was the process like while combining them?

I was trying to practice as much as I could with these functions so I chose creating angular motion as it requires all the interesting functions:) I just wanted to create something interesting and be on time for the GIF to be created;

  • How did you adjust sin() values using map() function? Describe the effectiveness.

this is how I used sin() and map() to make the diameters of the circles follow sine pattern.

dia = map(sin(frameCount * 0.01), -1, 1, 2, 30);

this is how my code deals with it:

angle = angle + angleVel;
x = width / 2 + cos(angle) * radDist; 
y = height / 2 + sin(angle) * radDist;

i have an angle variable that increases and the sin() or cos() changes so it finds the right new spot.

in my code i have also included the incrementation of “radDist” so that the radius of the circle was increasing every loop.

link to the code: https://editor.p5js.org/zhuanya28/sketches/RLpzRR0aR 

Leave a Reply

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