Skip to content

Commit 4143d08

Browse files
committed
Symmetry and Asymmetry and Translate init
1 parent b0001a7 commit 4143d08

16 files changed

Lines changed: 176 additions & 3 deletions

.DS_Store

0 Bytes
Binary file not shown.

_curriculum/02-01_Intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,5 @@ This project will take approximately three to four 45-minute sessions:
137137
### Planning your Lost & Found Project
138138

139139
1. Students exchange written descriptions of their objects with one another.
140-
1. Then, each partner draw the object on paper by using simple shapes (rectangles, squares, circles, ellipsesovals, pointsarcs, lines, etc) and writing down what color each shape should be.
140+
1. Then, each partner sketch out the lost object on paper.
141141
1. After 5 minutes of drawing, students take turns showing their drawing to the other for feedback. Feedback should be minimal and should not add too many complicated elements to the original drawing.

_curriculum/02-03_Lessons.md

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
---
2+
# This is the frontmatter
3+
title: "Lost and Found" # Title and Heading 1
4+
permalink: /lostAndFound-lessons/3 # Give your page a permalink
5+
published: true
6+
7+
gallery: # Below is for including an image gallery
8+
- url: /assets/images/curriculum/Unit-1_Sample-2.gif
9+
image_path: /assets/images/curriculum/Unit-1_Sample-2.gif
10+
alt: "black circle following a mouse"
11+
title: "Digital Drawing Tool Step 1"
12+
- url: /assets/images/curriculum/Unit-1_Sample-3.gif
13+
image_path: /assets/images/curriculum/Unit-1_Sample-3.gif
14+
alt: "cursor drawing a black line made up of a series of translucent circles"
15+
title: "Digital Drawing Tool Step 2"
16+
- url: /assets/images/curriculum/Unit-1_Sample-4.gif
17+
image_path: /assets/images/curriculum/Unit-1_Sample-4.gif
18+
alt: "cursor drawing multiple black arches made up of translucent circles"
19+
title: "Digital Drawing Tool Step 3"
20+
- url: /assets/images/curriculum/Unit-1_Sample-5.gif
21+
image_path: /assets/images/curriculum/Unit-1_Sample-5.gif
22+
alt: "cursor creating a drawing of vertical blue lines and stamping red ellipses"
23+
title: "Digital Drawing Tool Step 4"
24+
---
25+
26+
## Composition
27+
28+
### Grade 6~8
29+
30+
#### A. Symmetry and Asymmetry
31+
32+
![Symmetry and asymmetry]({{ "/assets/images/curriculum/Unit-1_Sample-20.png" | relative_url }})
33+
34+
In composition, symmetry and asymmetry are equally valuable techniques to achieve visual rhythm and harmony.
35+
36+
In the following tutorial, we will use the [lollipop](https://editor.p5js.org/xinemata/sketches/reojWdPOp) sketch as the starting point to draw a wild flower on the sidewalk. The wild flower is going to contain both symmetrical and asymmetrical visual elements.
37+
38+
![Symmetrical cloud sketch]({{ "/assets/images/curriculum/Unit-1_Sample-12.png" | relative_url }})
39+
40+
First, let's turn the lollipop stick into a stem just by adjusting the [fill()](https://p5js.org/reference/p5/fill/) and the [rect()](https://p5js.org/reference/p5/rect/):
41+
42+
```js
43+
//Stem
44+
fill(22, 102, 36);
45+
rect(200, 300, 6, 150);
46+
```
47+
Then, let's turn the lollipop candy into a pistil by adding another [ellipse()](https://p5js.org/reference/p5/ellipse/):
48+
49+
```js
50+
//Pistil
51+
fill(189, 123, 30);
52+
ellipse(200, 200, 50, 50);
53+
54+
fill(43, 26, 1);
55+
ellipse(200, 200, 35, 35);
56+
```
57+
We'll also add a sidewalk for the flower to sit on:
58+
59+
```js
60+
//Ground
61+
fill(120, 130, 127);
62+
rect(200, 365, 400, 75);
63+
```
64+
65+
![Symmetrical cloud sketch]({{ "/assets/images/curriculum/Unit-1_Sample-13.png" | relative_url }})
66+
67+
Let's add two petals to the flower. The petals will stand behind the left and right side of the pistil:
68+
69+
```js
70+
//Petals
71+
fill(230, 196, 28);
72+
ellipse(200 + 30, 200, 50, 40); // offset petal 30 pixel to the right
73+
ellipse(200 - 30, 200, 50, 40); // offset petal 30 pixel to the left
74+
```
75+
76+
Using arithmetic operators such as addition (+) and subtraction (-) allow us to offset one petal 30 pixel to the left, and the other petal 30 pixel to the right, making it easier to create symmetrical drawings.
77+
78+
![Symmetrical cloud sketch]({{ "/assets/images/curriculum/Unit-1_Sample-14.png" | relative_url }})
79+
80+
To add two more petals to the flower, one on the top and one on the bottom of the pistil, we will have to manipulate the Y positions of the ellipses:
81+
82+
```js
83+
//Petals
84+
fill(230, 196, 28);
85+
ellipse(200 + 30, 200, 50, 40); // offset petal 30 pixel to the right
86+
ellipse(200 - 30, 200, 50, 40); // offset petal 30 pixel to the left
87+
ellipse(200, 200 + 30, 40, 50); // offset petal 30 pixel to the bottom
88+
ellipse(200, 200 - 30, 40, 50); // offset petal 30 pixel to the top
89+
```
90+
91+
![Symmetrical cloud sketch]({{ "/assets/images/curriculum/Unit-1_Sample-15.png" | relative_url }})
92+
93+
Voila! Now we have a symmetrical flower with petals perfectly offset from the center of the pistil.
94+
95+
Let's complete this image by adding leaves:
96+
97+
```js
98+
//Stem and leaves
99+
fill(22, 102, 36);
100+
rect(200, 300, 6, 150);
101+
102+
ellipse(200 + 25, 200 + 70, 50, 20); // offset leaf 25 pixel to the right, and 70 pixel to the bottom
103+
ellipse(200 - 25, 200 + 90, 50, 20); // offset leaf 25 pixel to the left, and 90 pixel to the bottom
104+
```
105+
106+
While the leaves are symmetrical on the X-axis, they are asymmetrical on the Y-axis, creating a cascading effect.
107+
108+
**Code Snippet:** [flower example](https://editor.p5js.org/xinemata/sketches/kBGJj4XJH).
109+
{: .notice--info}
110+
111+
### Grade 9~12
112+
113+
<iframe width="560" height="315" src="https://www.youtube.com/embed/maTfm84mLbo?si=Orx71C5hl7owLq78" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipbo a ard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
114+
115+
#### B. Translate
116+
117+
As your p5.js journey unfold, you might find yourself wanting to move or resize a group of shapes all at the same time. This is achievable through features listed under the [Transform](https://p5js.org/reference/#transform) category.
118+
119+
To begin, let's draw a cloud using the [translate()](https://p5js.org/reference/p5/translate/) feature.
120+
121+
![Symmetrical cloud sketch]({{ "/assets/images/curriculum/Unit-1_Sample-11.png" | relative_url }})
122+
123+
By default, the p5.js canvas origin (0, 0) is at the sketch's top-left corner. [translate()](https://p5js.org/reference/p5/translate/) shifts the canvas origin to a different position.
124+
125+
```js
126+
function setup() {
127+
createCanvas(400, 400);
128+
rectMode(CENTER);
129+
noStroke();
130+
}
131+
132+
function draw() {
133+
background(122, 122, 190);
134+
fill(255);
135+
136+
// Shifts canvas origin to the center of the canvas
137+
translate(400 / 2, 400 / 2); // x, y
138+
139+
// The rectangle refers to the new canvas origin to determine X, Y positions
140+
rect(0, 0, 100, 50);
141+
}
142+
143+
```
144+
![Symmetrical cloud sketch]({{ "/assets/images/curriculum/Unit-1_Sample-16.png" | relative_url }})
145+
146+
Now we'll add a bunch of ellipses after the rectangle to create the cloud shape:
147+
148+
```js
149+
ellipse(-80, 0, 70, 70); // offset ellipse 80 pixel to the left
150+
ellipse(80, 0, 70, 70); // offset ellipse 80 pixel to the right
151+
```
152+
![Symmetrical cloud sketch]({{ "/assets/images/curriculum/Unit-1_Sample-17.png" | relative_url }})
153+
154+
```js
155+
ellipse(-40, -40, 70, 70); // offset ellipse 40 pixel to the left, and 40 pixel to the top
156+
ellipse(40, 40, 70, 70); // offset ellipse 40 pixel to the right, and 40 pixel to the bottom
157+
ellipse(-40, 40, 70, 70); // offset ellipse 40 pixel to the left, and 40 pixel to the bottom
158+
ellipse(40, -40, 70, 70); // offset ellipse 40 pixel to the right, and 40 pixel to the top
159+
```
160+
161+
![Symmetrical cloud sketch]({{ "/assets/images/curriculum/Unit-1_Sample-18.png" | relative_url }})
162+
163+
```js
164+
ellipse(0, -50, 70, 70); // offset ellipse 50 pixel to the top
165+
ellipse(0, 50, 70, 70); // offset ellipse 50 pixel to the bottom
166+
```
167+
168+
![Symmetrical cloud sketch]({{ "/assets/images/curriculum/Unit-1_Sample-19.png" | relative_url }})
169+
170+
Great work! Before moving on to draw another shape, make sure that you finish grouping your cloud drawing by sandwitching the code we've written so far in between [push()](https://p5js.org/reference/p5/push/) and [pop()](https://p5js.org/reference/p5/pop/). Doing this will make sure that any new shapes you draw won't get affected by the cloud's custom [translate()](https://p5js.org/reference/p5/translate/) values.
171+
172+
**Code Snippet:** [cloud example](https://editor.p5js.org/xinemata/sketches/deDhLjr2Q).
173+
{: .notice--info}

_data/navigation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ curriculum:
4242
url: /lostAndFound-lessons/1
4343
- title: "Color"
4444
url: /lostAndFound-lessons/2
45-
- title: "Transformation"
46-
url: /lostAndFound-lessons/2
45+
- title: "Composition"
46+
url: /lostAndFound-lessons/3
4747
- title: "Project 2: Mask Generator"
4848
children:
4949
- title: "Introduction"

assets/.DS_Store

0 Bytes
Binary file not shown.

assets/images/.DS_Store

0 Bytes
Binary file not shown.
17.4 KB
Loading
19.7 KB
Loading
16.5 KB
Loading
17.4 KB
Loading

0 commit comments

Comments
 (0)