Add starter code

This commit is contained in:
Lev
2021-07-16 00:08:06 -05:00
parent b093e30ccd
commit 03bc06cefd
3 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script src="p5.min.js"></script>
<script src="sketch.js"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,30 @@
let d = 8
let n = 5;
let sliderk;
function setup()
{
createCanvas(500, 500);
angleMode(DEGREES);
sliderd = createSlider(1, 10, 5);
slidern = createSlider(1, 10, 5);
background(0);
}
function draw()
{
background(0);
translate(width/2, height/2);
stroke(255);
noFill();
beginShape();
for(let a = 0; a < 360; a++)
{
let r = 150;
let x = r * cos(a);
let y = r * sin(a);
vertex(x, y);
}
endShape(CLOSE);
}