From 0a931362cacd4ff74e180bd09114226dfa5f6307 Mon Sep 17 00:00:00 2001 From: Philipp Kramer Date: Mon, 2 Dec 2019 17:05:02 +0100 Subject: [PATCH] working tree with 27 cubes --- wuerfelbaum.pde | 136 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 wuerfelbaum.pde diff --git a/wuerfelbaum.pde b/wuerfelbaum.pde new file mode 100644 index 0000000..88146af --- /dev/null +++ b/wuerfelbaum.pde @@ -0,0 +1,136 @@ +import processing.serial.*; + +static int FRAMERATE=20; + +int fadetime=1000/FRAMERATE /10 *4; //fadetime in centiseconds SMOOOOTH + +Serial sPort; + +//int boxnum = 1+2+3+4+5+6+7; +int boxnum=50; +color box[] = new color[boxnum]; +int boxid[] = new int[boxnum]; + +int MAXTREEWIDTH=7; +int MAXTREEHEIGHT=7; +int boxiTree[][] = new int[MAXTREEWIDTH][MAXTREEHEIGHT]; +color colorTree[][] = new int[MAXTREEWIDTH][MAXTREEHEIGHT]; + + +float testcolorhue=0; + +float time=0; + +void setup() { + size(200, 200); + frameRate(FRAMERATE); + + /*for (int i=0;i