mirror of
https://github.com/processing/processing4.git
synced 2026-02-11 17:40:48 +01:00
22 lines
350 B
Plaintext
22 lines
350 B
Plaintext
// Recursive Tree (w/ ArrayList)
|
|
// Daniel Shiffman <http://www.shiffman.net>
|
|
// Nature of Code, Chapter 8
|
|
|
|
// A class for a leaf that gets placed at the end of
|
|
// the last branches
|
|
|
|
class Leaf {
|
|
PVector loc;
|
|
|
|
Leaf(PVector l) {
|
|
loc = l.get();
|
|
}
|
|
|
|
void display() {
|
|
noStroke();
|
|
fill(50,100);
|
|
ellipse(loc.x,loc.y,4,4);
|
|
}
|
|
}
|
|
|