Skip to content

Commit

Permalink
Site updated at: 2016-02-03 00:22:53 UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
jahpd committed Feb 3, 2016
1 parent 81dc0e4 commit e5a4894
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions processing/klee-exerccios-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,27 @@ <h1 class="post-title">Klee Exercícios (2)</h1>
<p>Enquanto não existir atualizações, jogo um sketch;</p>

<div class="example" id="abstratoum">abstratoum <pre><code class="language-javascript">

function _(x){return random(x);}
function rx(){return _(width);}
function ry(){return _(height);}
function rc(){return _(255);}
createCanvas(480, 360);
background(255);
var i, r,g,b,x,y;
var _r,_g,_b,_x,_y;
for(i=0; i &lt; 20; i++) {
r = rc(); g = rc(); b = rc();
x = rx(); y = ry();
stroke(max(_r||0,r),max(_g||0,g),max(_b||0,b));
bezier(x,y,rx(),ry(),rx(),ry(),_x||width/2,_y||height/2);
_x = x; _y = y; _r = r; _g = g; _b = b;
function setup(){
createCanvas(480, 360);
frameRate(0.5);
}
function draw(){
background(0);
var i, r,g,b,x,y;
var _r,_g,_b,_x,_y;
for(i=0; i &lt; 20; i++) {
r = rc(); g = rc(); b = rc();
x = rx(); y = ry();
stroke(max(_r||0,r),max(_g||0,g),max(_b||0,b));
fill(0);
bezier(x,y,rx(),ry(),rx(),ry(),_x||width/2,_y||height/2);
_x = x; _y = y; _r = r; _g = g; _b = b;
}
}
</code></pre></div>

Expand Down

0 comments on commit e5a4894

Please sign in to comment.