• fullscreen
  • rainbow_tree_stump.pde
  • //hopefully I have broken this down so far anybody can understand it. also, I
    // am still in the first week of learning processing, so please tell me what
    // I could do better. Thanks!
    
    //circles with random radius/diamater
    void setup(){
    size(700,700);
    background(0);
    smooth();
    frameRate(1);
    }
    //variables. circle is radius of circle, thick is the thickness, c1-3 are the 
    //colors... im not sure what you would call "s". test variable?
    void draw(){
    float circle=0;
    float thick=0;
    float c1=0;
    float c2=0;
    float c3=0;
    int s=0;
    
    
    //how many lines to display
    background(0);
    while (s <= 55)
    {
    //random radius 0-700
    circle=random(700);
    
    //thickness
    thick=random(7);
    
    //color randomness
    c1=random(0);
    c2=random(255);
    c3=random(255);
    
    //actually adding the color
    stroke(c1,c2,c3);
    
    //the thickness
    strokeWeight(thick);
    
    noFill();
    ellipse (width/2,height/2,circle,circle);
    s++;
    }
    }
    

    code

    tweaks (0)

    about this sketch

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

    license

    advertisement


    Brandon Paiz

    Rainbow tree stump

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

    One of my first attempts at something interesting. I have been trying to learn processing for less than a week so any suggestions would be great. Thanks!

    Yes, it is refreshing at 1fps. It is to show you the differences in the circles. A frame rate around 30 does three things:
    1) Gives you seizures
    2) Gives you headaches
    3) Makes the room spin when you look away

    Go ahead, download the code, change the colors and frame rate, mess with variables, etc

    You need to login/register to comment.