https://editor.p5js.org/yuxuanqi9817/full/g-4RR1-h2

https://www.youtube.com/embed/zU_yR5_1m_w

For the midterm sketch I combined some of my past assignments into a new sketch, using the gun shape shooting bullets to form a new pattern. Basically there are two parts: the grid pattern formed by the basic unit of the gun shape constructed from the three rectangles, and the shooting bullets. First I created these functions draw the basic shape and making the bullets move and bounce. Then I used a nested for loop to create the pattern with ten columns based on the first unit. The length of each rectangle is slightly changing every time draw is run. The stroke color of the rectangles is also changing as the mouse moves — it becomes dark blue on the top left corner, pink/purple on the top right corner, green on the bottom left corner and yellow on the bottom right corner. As you drag the mouse on the canvas the bullets appear at the position of the mouse and they become larger as the mouse moves towards the bottom right corner.

Programing concepts using: functions, arrays and nested for loops

One thing learned in making this sketch: how to fill an array of shapes with an array of color — use the modulo symbol

Untitled_Artwork.JPG

Some process documentation:

https://www.youtube.com/embed/GADQSkMAk8A

https://www.youtube.com/embed/C9uCkUf4FiA

https://www.youtube.com/embed/2zht5urmo18

Initial sketch

Initial sketch

Worksheet 006