From d9727335c55a289a0ceeafc6b6aebc1c6e9d1e65 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sat, 13 Feb 2021 00:49:59 +0100 Subject: i&m: add purple circles exercise --- Year_2/IandM/purple_circles/README.md | 1 + Year_2/IandM/purple_circles/image.jpg | Bin 0 -> 6166 bytes Year_2/IandM/purple_circles/purple_circles.pde | 12 ++++++++++++ 3 files changed, 13 insertions(+) create mode 100644 Year_2/IandM/purple_circles/README.md create mode 100644 Year_2/IandM/purple_circles/image.jpg create mode 100644 Year_2/IandM/purple_circles/purple_circles.pde (limited to 'Year_2') 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 Binary files /dev/null and b/Year_2/IandM/purple_circles/image.jpg 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); +} -- cgit v1.2.3-18-g5258