Artists
Translations
RP_harmonicStory
Translated by
Alexandre Rivaux
Based on:
Harmonic Story
by
Jean Claude Marquette
Category:
direct
Play
Stop
/* Part of the ReCode Project (http://recodeproject.com) Based on "Harmonic Story" by Jean Claude Marquette Originally published in "Computer Graphics and Art" v1n2, 1976 Copyright (c) 2013 Alexandre Rivaux - OSI/MIT license (http://recodeproject/license). */ let myPattern; let nbPattern; function setup() { createCanvas( 500, 500); background(140); rotate(radians(-1)); //rotation de -0.01 radian pour etre calé avec la création originale nbPattern = 2; myPattern = new Array(nbPattern); for(let i=0; i
this.x.length-3) { fill(this.greyLevel); } if(i==this.x.length-3) { noFill(); } } rect( i*this.tailleRect, j*this.tailleRect, this.tailleRect+1, this.tailleRect+1 ); /* Ici pour éviter l'impression de bordure pour chacun des carrés du à la rotation. nous faisons des carrés plus grand de 1 pixel que la grille de sorte à ce qu'il débordent les un sur les autres. */ } } pop(); } //update function update() { this.posX = this.x[Math.trunc(random(1, this.x.length-2))]; this.posY = this.y[Math.trunc(random(1, this.y.length-2))]; this.display(); } }