Please play it by YOURSELF here!
https://editor.p5js.org/TinaZhang226/sketches/3Z0sXT72w
Inspiration:
People are having different habits in drawing the same “heart” shape~ so I want to create a canvas using p5.js where people could draw the heart shape as they want and try manipulating different attributes.
Basic Logic:
Need many sliders for people to change the values;
Determine what values are to be changed;
- size of the heart shape
- color ( actually opacity )
- speed ( actually the angle added every frame )
- stroke ( actually one coefficient affecting the height and width of every ellipse )
- degreeA ( the distance of two highest point )
- degreeB ( the degree of folding)
Create basic heart shape with sin() and cos() function;
Creating Process:
- test with the slider and basic heart curve with different sizes:
- Apply aesthetic color and test with circle element:
- Add more sliders to play with different attributes:
- Try different stroke size, applying another sin() and cos() here to make more fun:
- Manipulating the stroke with sin(size)*cos(opacity), etc. :
- Want to create different heart curves so that this DIY canva can be more educative for people to vividly observe how the heart curve function’s every sin and cos’ s amplifier changes the heart shape:
- Final polishing.
Final Documentation:
Leave a Reply