Processing8 Trans
/*--Transform--*/
float size = 40.0;
void setup()
{
void draw()
{
float a = 0.0;
float s = 0.0;
void setup()
{
void draw()
{
void setup()
{
float angle;
float cosine;
float jitter;
void draw()
{
float x, y;
float size = 40.0;
void setup()
{
size(200,200); noStroke(); frameRate(30);}
void draw()
{
background(102); x = x + 0.8; if (x > width + size) { x = -size; } translate(x, height/2-size/2); fill(255); rect(-size/2, -size/2, size, size); // Transforms accumulate. // Notice how this rect moves twice // as fast as the other, but it has // the same parameter for the x-axis value translate(x, size); fill(0); rect(-size/2, -size/2, size, size);}
float a = 0.0;
float s = 0.0;
void setup()
{
size(200,200); noStroke(); rectMode(CENTER); frameRate(30);}
void draw()
{
background(102); a = a + 0.04; s = cos(a)*2; translate(width/2, height/2); scale(s); fill(51); rect(0, 0, 50, 50); translate(75, 0); fill(255); scale(s); rect(0, 0, 50, 50);}
void setup()
{
size(200,200); noStroke(); fill(255); frameRate(30);}
float angle;
float cosine;
float jitter;
void draw()
{
background(102); if(second()%2 == 0){ jitter = (random(-0.1, 0.1)); } angle = angle + jitter; cosine = cos(angle); translate(width/2, height/2); rotate(cosine); rectMode(CENTER); rect(0, 0, 115, 115);}
2006年11月18日(土) 10:37:33 Modified by ID:hElD8hu5PA