-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChallenge 1.js
81 lines (62 loc) · 1.63 KB
/
Challenge 1.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
function setup() {
createCanvas(800, 500);
background(255);
}
function draw() {
//Need to make arcs around corresponding colours of ellipses
//Yellow arc
noFill();
//Setting up colour and weight
stroke(220, 242, 53);
strokeWeight(10);
//Angle is in radians
arc(width/2, height/2, 200, 200, 3.14159, 6);
//Corresponding ellipse
noStroke();
fill(220, 242, 53);
ellipse(width/2, height/2, 5, 5);
//Blue arc
noFill();
//Setting up colour and weight
stroke(53, 154, 242);
strokeWeight(5);
//Arc is 15 off from the original
arc(width/2, height/2 - 15, 200, 200, 3.3, 6.28);
//Blue ellipse
noStroke();
fill(53, 154, 242);
ellipse(width/2, height/2 - 15, 5, 5);
//Red arc
noFill();
//Setting up colour and weight
stroke(242, 53, 53);
strokeWeight(10);
//Arc is ~40 off from the original
arc(width/2, height/2 - 40, 230, 230, 3.1, 6.5);
//Red ellipse
noStroke();
fill(242, 53, 53);
ellipse(width/2, height/2 - 40, 5, 5);
//Green arc
noFill();
//Setting up colour and weight
stroke(53, 242, 119);
strokeWeight(10);
//Green is ~45 off from the original
arc(width/2, height/2 - 45, 240, 240, 2.6, 6.6);
//Green ellipse
noStroke();
fill(53, 242, 119);
ellipse(width/2, height/2 - 45, 5, 5);
//Purple arc (Should be rendered last because its on top of everything)
noFill();
//Setting up colour and weight
stroke(167, 53, 242);
strokeWeight(3);
//Arc is ~25 off from the original and spaced out more
arc(width/2, height/2 - 25, 250, 250, 3.1, 6.5);
//Purple ellipse
noStroke();
fill(167, 53, 242);
ellipse(width/2, height/2 - 25, 5, 5);
}