+ super();
+ drawit(len);
+
+ }
+ void drawit(int len)
+ {
+ for(int i = 0; i < len ;i++)
+ {
+ graphicBuffer.add(lx.hsb(0,255,255));
+ }
+ }
+};
+
+class RedsGranim extends Granim
+{
+ RedsGranim()
+ {
+ super();
+ addGraphic("myreds", new RedsGraphic(10));
+ }
+ RedsGranim(int len)
+ {
+ super();
+ addGraphic("myreds", new RedsGraphic(len));
+ }
+ public float count = 0.0;
+ public void update()
+ {
+ Graphic g=getGraphicByName("myreds");
+ g.position = Math.round(sin(count)*20)+100;
+ count+= 0.1;
+ if(count>Math.PI*2)
+ {
+ count=0;
+ }
+ super.update();
+ }
+
+};
+
+class RandomsGranim extends Granim
+{
+ private int _len =0 ;
+ RandomsGranim()
+ {
+ super();
+ _len =100;
+ addGraphic("myrandoms", makeGraphic(_len));
+ }
+ RandomsGranim(int len)
+ {
+ super();
+ _len=len;
+ addGraphic("myrandoms", makeGraphic(len));
+ }
+ int colorLid=0;
+ public Graphic makeGraphic(int len)
+ {
+
+ int[] colors= new int[len];
+ for(int i =0;i<len;i++)
+ {
+ colors[i]=(int) Math.round(Math.random()*80)+colorLid;
+
+ }
+ colorLid+=4;
+ return new ColorDotsGraphic(colors);
+ }
+ private int count =1;
+ private int instanceCount =0;
+ public void update()
+ {
+
+ if(instanceCount<90 && count % 20==0)
+ {
+ instanceCount++;
+ Graphic h=addGraphic("myrandoms_"+instanceCount, makeGraphic(_len));
+ h.position = instanceCount*(_len+100);
+ //println("one more " + instanceCount+" at "+h.position);
+ count=0;
+ changed = true;
+ }
+ count++;
+ super.update();
+ }
+
+};
+
+
+class ColorDotsGraphic extends Graphic
+{
+ ColorDotsGraphic(int[] colorSequence)
+ {
+ super();
+ for (int colorVal : colorSequence)