Skip to content

Commit

Permalink
-°-+><+-°-
Browse files Browse the repository at this point in the history
  • Loading branch information
bbaudry committed Apr 3, 2024
1 parent b3e2c7f commit 4e92959
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion p5-experiments/plottable/plottableframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//w=96*8.5=816
//h=96*11=1056

var echelle = 0.5
var echelle = 1
var w = 1122 * echelle
var h = 1587 * echelle
var rightmargin = 0.95 * w
Expand Down
17 changes: 11 additions & 6 deletions p5-experiments/plottable/squigglelines001.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,21 @@ function frames() {

function squiggleline(y) {
var px, py, cpx1, cpy1, cpx2, cpy2, px1, py1
var ratio = 0.04
var sqiwidlarge = (rightmargin - leftmargin) * ratio
var sqiwidsmall = (rightmargin - leftmargin) * ratio * 0.08
var ratio, sqiwidlarge, sqiwidsmall
var sqighi = 0.02 * h
var sqiglo = 0.005 * h
var yamplitude = 40
ratio = 0.02 + random() * 0.02
sqiwidlarge = (rightmargin - leftmargin) * ratio
sqiwidsmall = (rightmargin - leftmargin) * ratio * 0.08
beginShape();
px = leftmargin
py = y
px = leftmargin + sqiwidlarge
vertex(px, py);
for (var i = 0; i < 9; i++) {
for (var i = 0; i < 39; i++) {
while (px < rightmargin - sqiwidlarge && right) {
// ellipse(px,py,5,5)
cpx2 = px + 15 * noise(xoff) - 30; xoff += xinc
cpx2 = px + 5 * noise(xoff) - 10; xoff += xinc
cpy2 = y - sqighi
px += sqiwidlarge
py = y
Expand Down Expand Up @@ -118,6 +119,10 @@ function squiggleline(y) {
y += yamplitude * 0.5 - random() * yamplitude; yoff += yinc
}
right = true
ratio = 0.01 + random()*0.03
sqiwidlarge = (rightmargin - leftmargin) * ratio
sqiwidsmall = (rightmargin - leftmargin) * ratio * 0.08
px = leftmargin + sqiwidlarge
}
endShape()
}

0 comments on commit 4e92959

Please sign in to comment.