Skip to content

Commit

Permalink
-[-[><]-]-
Browse files Browse the repository at this point in the history
  • Loading branch information
bbaudry committed Jul 20, 2024
1 parent 3790ae9 commit 33975bd
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions p5-experiments/plottable/summer005.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ function drawpostcard(x, y) {
}
function onepiece(){
alea = []
punch2()
punch()
}

function punch(){
stroke(0, 0, 0)
var xoff,yoff,i,j
var xoff,yoff,i,j,yinc
yinc=1+random()
xoff=floor(actualwidth*0.01)
i=leftmargin
while(i<rightmargin-xoff){
Expand Down Expand Up @@ -65,16 +66,16 @@ function punch(){
}
}

var xoff=0.0
var offset=0.0
var xinc=0.01
function punch2(){
stroke(0, 0, 0)
var xoff,yoff,i,j,yratio,plein
var xoff,yoff,i,j,plein
xoff=floor(actualwidth*0.01)
i=leftmargin
while(i<rightmargin-xoff){
j=bottommargin
yoff=noise(xoff)*11;xoff+=xinc; alea.push(yoff)
yoff=noise(offset)*11;offset+=xinc; alea.push(yoff)
while(j>topmargin-yoff){
plein=random();alea.push(plein)
if(plein<0.11){
Expand All @@ -90,7 +91,7 @@ function punch2(){
}
}
j-=yoff
yoff=noise(xoff)*11;xoff+=xinc; alea.push(yoff)
yoff=noise(offset)*11;offset+=xinc; alea.push(yoff)
}
xoff++
i+=xoff
Expand Down

0 comments on commit 33975bd

Please sign in to comment.