CS 151 | Information Technology | Spring 2019 | |
Simple Animation in ProcessingProcessing allows one to create a simple animation. Example AnimationProcessing Code// Simple scrolling text int x = 0; // stuff that happens once at program start void setup() { size(600,600); } // Happens 30 times every second! void draw() { background(200,255,225); //rect(x,300,20,20); textSize(36); fill(0); text("Hello, World!", x, 300); text("Hello, World!", x-600, 300); // left hand side of = is a location // right hand side is a value; x = x + 2; // increment x by 1 if (x >= 600) x = 0; // reset x to 0 if it is too large } ProjectAnimate your face from project 1 to do something entertaining that will impress your friends! DeliverablesSend me your .pde file. References
Copyright © 2019, David A. Reimann. All rights reserved. |