- Apply lifespan and lifeReduction in class Particle and draw a quad in it by using (this.x1, this.y1, this.x2, this.y2, this.x3, this.y3, this.x4, this.y4) and then multiply the x and y positions by lifespan.
- In class PSystem assign rotSpeed and also x1, y1, x2, y2, x3, y3, x4, y4 to constructor(). Add this.scl to change the size of the quad. By using push new Particles, I made two quads that are symmetrical to each other by the y-axis whose positions are (this.x1, this.y1, this.x2, this.y2, this.x3, this.y3, this.x4, this.y4) and (-this.x1, this.y1, -this.x2, this.y2, -this.x3, this.y3, -this.x4, this.y4).
- In function setup() I made four pair of quads that would together form a snowflake-like pattern through defining the values in pushing new PSystem. Also, assign these four groups with different rotSpeed.
- Then change the color of each pair of quads randomly through changing color in class PSystem.
- Adjust some of the values( eg. rotSpeed, color values, scale) to make better visual effects.
- Played with this.acc in the constructor under class Particle and got two interesting versions.
Pinwheel: (the effect in this video is a bit different —- quad of the same color should appear in even number instead of odd number, from the original because the computer would get a bit stuck when doing screen-recording and the speed is arranged to be about 2 times faster than the original because of the size limit of uploading videos)
Flower Dance: (the speed of this video is arranged to be about 2 times faster than the original because of the size limit of uploading videos)