-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
4,222 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
|
||
var w, h | ||
var cnv | ||
var x, y | ||
var xoff, yoff | ||
var step, stepx, stepy | ||
|
||
function setup() { | ||
w = windowWidth | ||
h = windowHeight | ||
cnv = createCanvas(w, h); | ||
//centerCanvas(); | ||
colorMode(HSB, 360, 100, 100, 250); | ||
noFill(); | ||
background(0, 0, 0) | ||
init(left,w*0.25) | ||
init(right,w*0.75) | ||
} | ||
|
||
function centerCanvas() { | ||
var x = (windowWidth - w) / 2; | ||
var y = (windowHeight - h) / 2; | ||
cnv.position(x, y); | ||
} | ||
|
||
var right = [] | ||
var left = [] | ||
function init(side,cx){ | ||
var sidew, sideh,y | ||
sidew=w*0.5 | ||
sideh=random(0.01,0.07)*h | ||
y=sideh*0.5 | ||
while(y<h){ | ||
side.push({x1:cx-sidew*0.5,y1:y-sideh*0.5, | ||
x2:cx+sidew*0.5,y2:y-sideh*0.5, | ||
x3:cx+sidew*0.5,y3:y+sideh*0.5, | ||
x4:cx-sidew*0.5,y4:y+sideh*0.5, | ||
}) | ||
y+=sideh*0.5 | ||
sideh=random(0.01,0.07)*h | ||
y+=sideh*0.5 | ||
} | ||
} | ||
|
||
function drawside(side){ | ||
noStroke() | ||
for(i=0;i<side.length;i++){ | ||
var cur=side[i] | ||
if(random()<0.5){fill(0,0,0)} | ||
else{fill(0,0,100)} | ||
quad(cur.x1,cur.y1,cur.x2,cur.y2,cur.x3,cur.y3,cur.x4,cur.y4) | ||
} | ||
} | ||
|
||
function draw() { | ||
console.log(left.length) | ||
background(0, 0, 0) | ||
//drawside(left) | ||
//drawside(right) | ||
//column(w*0.75) | ||
//noLoop() | ||
|
||
ikeda(w*0.25,h*0.5) | ||
ikeda(w*0.75,h*0.5) | ||
} | ||
|
||
|
||
|
||
function ikeda(cx,cy){ | ||
var cx,cy,xoff,yoff,ikedawidth,ikedaheight | ||
xoff=w*0.25 | ||
yoff=h*random(0.001,0.1) | ||
ikedawidth=2*xoff | ||
ikedaheight=2*yoff | ||
fill(0,0,100) | ||
if(random()<0.1){fill(0,0,0)} | ||
rect(cx-xoff,cy-yoff,ikedawidth,ikedaheight) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
begin: | | ||
G21 ; Set Units to Millimeters | ||
G17 ; Set Plane Selection to XY | ||
G90 ; Set Absolute Positioning | ||
F2500 ; Set Speed to 2500 mm/min | ||
G00 Z0 ; pen up | ||
G00 X0 Y0 ; go to 0,0 | ||
end: | | ||
G0Z0 ; pen up | ||
G00 X0 Y0 Z0 | ||
toolon: | | ||
G0Z6 ; pen down on paper | ||
tooloff: | | ||
G0Z0 ; pen up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<html> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.min.js"></script> | ||
<style> | ||
body { | ||
padding: 0; | ||
margin: 0; | ||
} | ||
</style> | ||
<style type="text/css"> | ||
.credits { | ||
position: absolute; | ||
text-align: left; | ||
bottom: 8px; | ||
width: 100%; | ||
color: #FFFFFF; | ||
font-family: monospace; | ||
margin-left: 12px; | ||
font-size: 14px | ||
} | ||
</style> | ||
<style type="text/css"> | ||
.sourcecode { | ||
position: absolute; | ||
text-align: left; | ||
bottom: 38px; | ||
width: 100%; | ||
color: #FFFFFF; | ||
font-family: monospace; | ||
margin-left: 12px; | ||
font-size: 10px | ||
} | ||
</style> | ||
|
||
</head> | ||
|
||
<body style="background-color:#000000;"> | ||
|
||
<div class="sourcecode"> | ||
<pre id="fileDisplayArea"></pre> | ||
</div> | ||
|
||
<div class="credits"> | ||
</div> | ||
|
||
<script> | ||
// credits:<br>@al.my.re; p5.js | ||
|
||
window.onload = function () { | ||
var fileDisplayArea = document.getElementById('fileDisplayArea'); | ||
fetch("frenchcodemo.js") | ||
.then((res) => res.text()) | ||
.then((text) => { | ||
// fileDisplayArea.innerText = text; | ||
}) | ||
.catch((e) => console.error(e)); | ||
} | ||
|
||
</script> | ||
|
||
<script src="midirodemo1.js"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
var w, h | ||
var cnv | ||
|
||
function setup() { | ||
w = 800 | ||
h = 800 | ||
cnv = createCanvas(w, h); | ||
centerCanvas(); | ||
colorMode(HSB, 360, 100, 100, 250); | ||
noLoop() | ||
} | ||
|
||
function centerCanvas() { | ||
var x = (windowWidth - 800) / 2; | ||
var y = (windowHeight - 800) / 2; | ||
cnv.position(x, y); | ||
} | ||
|
||
function draw() { | ||
var cx = w * 0.5 | ||
var cy = h * 0.5 | ||
var vera = w * 0.4 | ||
var molnar = 21 | ||
var density = 38 | ||
var color = true | ||
for (vera = w * 0.5; vera > 0; vera -= density) { | ||
if (color) { fill(50, 100, 100); color = false } | ||
else { fill(0, 0, 0,); color = true } | ||
quad(cx - vera + random(-molnar, molnar), cy - vera + random(-molnar, molnar), | ||
cx + vera + random(-molnar, molnar), cy - vera + random(-molnar, molnar), | ||
cx + vera + random(-molnar, molnar), cy + vera + random(-molnar, molnar), | ||
cx - vera + random(-molnar, molnar), cy + vera + random(-molnar, molnar)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<html> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.min.js"></script> | ||
<style> | ||
body { | ||
padding: 0; | ||
margin: 0; | ||
} | ||
</style> | ||
<style type="text/css"> | ||
.credits { | ||
position: absolute; | ||
text-align: left; | ||
bottom: 8px; | ||
width: 100%; | ||
color: #FFFFFF; | ||
font-family: monospace; | ||
margin-left: 12px; | ||
font-size: 14px | ||
} | ||
</style> | ||
<style type="text/css"> | ||
.sourcecode { | ||
position: absolute; | ||
text-align: left; | ||
bottom: 38px; | ||
width: 100%; | ||
color: #FFFFFF; | ||
font-family: monospace; | ||
margin-left: 12px; | ||
font-size: 10px | ||
} | ||
</style> | ||
|
||
</head> | ||
|
||
<body style="background-color:#000000;"> | ||
|
||
<div class="sourcecode"> | ||
<pre id="fileDisplayArea"></pre> | ||
</div> | ||
|
||
<div class="credits"> | ||
</div> | ||
|
||
|
||
<script src="midirodemo2.js"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
var w, h | ||
var cnv | ||
var x, y | ||
var xoff, yoff | ||
var step, stepx, stepy | ||
|
||
function setup() { | ||
w = windowWidth | ||
h = windowHeight | ||
cnv = createCanvas(w, h); | ||
//centerCanvas(); | ||
colorMode(HSB, 360, 100, 100, 250); | ||
noFill(); | ||
background(0, 0, 0) | ||
} | ||
|
||
function centerCanvas() { | ||
var x = (windowWidth - w) / 2; | ||
var y = (windowHeight - h) / 2; | ||
cnv.position(x, y); | ||
} | ||
|
||
function draw() { | ||
background(0, 0, 0) | ||
ikeda(w * 0.3, h * 0.5) | ||
ikeda(w * 0.7, h * 0.5) | ||
noLoop() | ||
} | ||
|
||
function ikeda(cx, cy) { | ||
var xoff, yoff, xwid, yhei | ||
|
||
} |
Oops, something went wrong.