• fullscreen
  • kandinsky.pde
  • void setup()
    {
      size(600, 600);
      colorMode(RGB, 100);
      noLoop();
      noStroke();
    }
    
    color cr=color(255, 0, 0, 50);
    color cg=color(0, 255, 0, 50);
    color cb=color(0, 0, 255, 50);
    color cy=color(255, 255, 0, 50);
    color co=color(250, 96, 0, 50);
    color cc=color(0, 227, 255, 50);
    color cp=color(215, 0, 245, 50);
    color[] colors = {
      cr, cg, cb, cy, co, cc, cp
    };
    color c1=(colors[int(random(0, 7))]);
    color c2=(colors[int(random(0, 7))]);
    color c3=(colors[int(random(0, 7))]);
    color c4=(colors[int(random(0, 7))]);
    void draw()
    {
      for (int i=0; i<width/2; i+=80)
      {
        fill(c1);
        triangle(width/2, width/2, width/2+80+i, width/2, width/2, width/2-80-i);
        fill(c2);
        triangle(width/2, width/2, width/2+80+i, width/2, width/2, width/2+80+i);
        fill(c3);
        triangle(width/2, width/2, width/2, width/2+80+i, width/2-80-i, width/2);
        fill(c4);
        triangle(width/2, width/2, width/2-80-i, width/2, width/2, width/2-80-i);
      }
    }
    
    

    code

    tweaks (0)

    about this sketch

    This sketch is running as Java applet, exported from Processing.

    license

    advertisement

    Ioana Enea

    Group 14 sketch 2

    Add to Faves Me Likey@!
    You must login/register to add this sketch to your favorites.

    We've divided the working space into quadrants and each quadrant in triangles. The colours of each quadrant are randomly selected.

    Philip Todd
    6 Oct 2011
    I am pretty happy with the result of this sketch. I experimented how to work colour into this. Although it didn't turn out quite how I wanted. I was wanting each triangle to be to be a diifferent colour rather than the whole quadrant. However, I still feel this makes a good sketch.
    chris martin
    7 Oct 2011
    This is strong response to the brief, I like the geometric patterns and the use of arrays to manage multiple colours.

    The programs simplicity didn't give you the opportunity to demonstrate all of the skills cover in the weeks class.

    good pass
    You need to login/register to comment.