summaryrefslogtreecommitdiff
path: root/Year_2
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2021-02-13 00:49:59 +0100
committerSanto Cariotti <santo@dcariotti.me>2021-02-13 00:49:59 +0100
commitd9727335c55a289a0ceeafc6b6aebc1c6e9d1e65 (patch)
tree8102fa4a368b756b00f593ad176d31dbba635064 /Year_2
parent7f14bd95502a017500a4e1f3e7767ee68b1c55e5 (diff)
i&m: add purple circles exercise
Diffstat (limited to 'Year_2')
-rw-r--r--Year_2/IandM/purple_circles/README.md1
-rw-r--r--Year_2/IandM/purple_circles/image.jpgbin0 -> 6166 bytes
-rw-r--r--Year_2/IandM/purple_circles/purple_circles.pde12
3 files changed, 13 insertions, 0 deletions
diff --git a/Year_2/IandM/purple_circles/README.md b/Year_2/IandM/purple_circles/README.md
new file mode 100644
index 0000000..285ee03
--- /dev/null
+++ b/Year_2/IandM/purple_circles/README.md
@@ -0,0 +1 @@
+![image](image.jpg)
diff --git a/Year_2/IandM/purple_circles/image.jpg b/Year_2/IandM/purple_circles/image.jpg
new file mode 100644
index 0000000..6234383
--- /dev/null
+++ b/Year_2/IandM/purple_circles/image.jpg
Binary files differ
diff --git a/Year_2/IandM/purple_circles/purple_circles.pde b/Year_2/IandM/purple_circles/purple_circles.pde
new file mode 100644
index 0000000..a892581
--- /dev/null
+++ b/Year_2/IandM/purple_circles/purple_circles.pde
@@ -0,0 +1,12 @@
+size(1000, 400);
+background(255);
+fill(255);
+
+stroke(255, 0, 255);
+strokeWeight(7);
+
+ellipseMode(CORNER);
+
+for (int i = 70, s = 100; i < width-50 && s > 0; i+=150, s-=15) {
+ ellipse(i, height/2-(s/2), s, s);
+}