Files
processing4/java/examples/Basics/Objects/CompositeObjects/CompositeObjects.pde
Casey Reas 5b0214704c
2011-09-18 06:31:29 +00:00

24 lines
466 B
Plaintext

/**
* Composite Objects
*
* An object can include several other objects. Creating such composite objects
* is a good way to use the principles of modularity and build higher levels of
* abstraction within a program.
*/
EggRing er1, er2;
void setup() {
size(640, 360);
er1 = new EggRing(width*0.45, height*0.5, 0.1, 120);
er2 = new EggRing(width*0.65, height*0.8, 0.05, 180);
}
void draw() {
background(0);
er1.transmit();
er2.transmit();
}