|
Author |
Topic: Moiré example (Read 566 times) |
|
Dimitre
|
Moiré example
« on: Nov 14th, 2002, 2:40pm » |
|
Code:// moiré 0.3 // by dimitre // the two first variables determines the dimensions of the grids (aresta) // and espace between points (esp) int aresta=50; int esp=4; int width = 270; int height = 270; float a; int x, y; int raio=1; int meio=esp*aresta/2; void setup() { size(width, height); } void loop() { a += 0.01; translate (width/2, height/2); rotateZ(a); for (y = 0; y < aresta; y++) for (x = 0; x < aresta; x++) ellipse (x*esp - meio, y*esp - meio, raio, raio); rotateZ(-2*a); for (y = 0; y < aresta; y++) for (x = 0; x < aresta; x++) point (x*esp - meio, y*esp - meio); } |
|
|
« Last Edit: Jun 23rd, 2004, 4:59pm by Dimitre » |
|
|
|
|
|