Skip to content

Commit

Permalink
Hausaufgabe FH-Potsdam#1
Browse files Browse the repository at this point in the history
  • Loading branch information
Anja Linke authored and Anja Linke committed Nov 8, 2022
1 parent f9eb62f commit 53f20ae
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 3 deletions.
59 changes: 56 additions & 3 deletions code/example/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,62 @@ function preload(){
}

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

function draw() {
background(100);
}
background ("#ffd1dc");


fill (150, 0, 50, 100);
square (50, 50, 300);
circle (200, 200, 300);

fill (5, 6, 13);
circle (200, 200, 200);

fill (80, 0, 40, 100)
rect (75, 150, 250, 100)


stroke ('red');

fill (100, 0, 50);
circle (200, 200, 100);
line (200, 150, 200, 250);
fill (240);
ellipse (200, 200, 100, 50);
fill (60, 10, 90)
circle (200, 200, 50);
fill (100, 0, 150);
circle (200, 200, 30);
fill (0);
circle (200, 200, 10);
fill (255);


stroke (0);

line (400, 0, 350, 200);
line (350, 200, 400, 400);
line (400, 400, 200, 350);
line (200, 350, 0, 400);
line (0, 400, 50, 200);
line (50, 200, 0, 0);
line (0, 0, 200, 50);
line (200, 50, 400, 0);

point (200, 25);
point (375, 200);
point (200, 375);
point (25, 200);

line (200, 0, 400, 200);
line (400, 200, 200, 400);
line (200, 400, 0, 200);
line (0, 200, 200, 0);
line (230, 0, 400, 170);
line (400, 230, 230, 400);
line (170, 400, 0, 230);
line (0, 170, 170, 0);
}
14 changes: 14 additions & 0 deletions code/example/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>
11 changes: 11 additions & 0 deletions code/example/task-01/sketch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
function preload(){
// preload assets
}

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

function draw() {
background(100);
}

0 comments on commit 53f20ae

Please sign in to comment.