Add Initial commit

This commit is contained in:
Lev
2021-07-17 12:40:10 -05:00
parent e4357a933e
commit edccc2ca50
5 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>graphicsProgramming - Coursera</title>
<script src="libraries/p5.min.js" type="text/javascript"></script>
<script src="libraries/p5.sound.min.js" type="text/javascript"></script>
<script src="sketch.js" type="text/javascript"></script>
<style> body {padding: 0; margin: 0;} canvas {vertical-align: top;} </style>
</head>
<body>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,26 @@
function setup() {
createCanvas(550,550);
background(0);
angleMode(DEGREES);
}
/////////////////////////////////////////////////
function draw() {
background(0);
noStroke();
fill(255,0,255);
translate(width/2,height/2);
//ADDITIVE SYNTHESIS IN A CIRCLE
var radius = 150;
beginShape();
for (var theta=0; theta<360; theta+=1){
var wave1 = 0;// your sine code here
var wave2 = 0;// your noise code here
var r = radius + wave1 + wave2;
var x = cos(theta) * r;
var y = sin(theta) * r;
vertex(x,y);
}
endShape(CLOSE);
}