Skip to content

Commit

Permalink
Hausaufgabe FH-Potsdam#1
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Esbach committed Nov 3, 2022
1 parent 250dfa0 commit a0d09b5
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
14 changes: 14 additions & 0 deletions code/task-01/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sketch1</title>
<link rel="stylesheet" type="text/css" href="/libraries/p5js/p5.css">
</head>
<body>
<script src="/libraries/p5js/p5.min.js"></script>
<script src="/libraries/p5js/libraries/p5.svg.js"></script>
<script src="sketch.js"></script>
</body>
</html>
65 changes: 65 additions & 0 deletions code/task-01/sketch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
function preload(){
// preload assets
}

function setup() {
createCanvas(400, 400);
}

function draw() {
background(250);

noStroke();

fill('#D1D1D1'); //grau
arc(
200, 200,
200, 200,
Math.PI / 180 * -160,
Math.PI / 180 * 0,
CHORD
);

fill('#3B3561'); //blauviolet
arc(
200, 200,
80, 80,
Math.PI / 180 * -144,
Math.PI / 180 * -16,
CHORD
);

fill('#51A3A3'); //türkis
rect(160, 50, 40, 300);

fill('#3B3561'); //blauviolet
arc(
200, 200,
200, 200,
Math.PI / 180 * 0,
Math.PI / 180 * -160,
CHORD
);

fill('#D1D1D1'); //grau
arc(
200, 200,
80, 80,
Math.PI / 180 * -16,
Math.PI / 180 * -144,
CHORD
);

fill('#EAD94C'); //gelb
circle(270, 270, 80)

fill('#DD7373'); //rosa
square(290, 20, 40);

stroke('#DD7373'); //rosa
strokeWeight(3);
line(70, 225, 200, 225);
line(50, 245, 180, 245);
line(70, 265, 200, 265);

}

0 comments on commit a0d09b5

Please sign in to comment.