• fullscreen
  • centreDots02.pde
  • final int bgShade =  23;
    final int fgShade = 180;
    
    void setup() {
      size(300, 600, P2D);
      
      smooth();
      background(23);
      
      stroke(180,90);
      
      ellipseMode(CENTER);
      
      randomSeed(2);  // So it is the same everytime
      
      int n=13000;
      pushMatrix();
        translate(0, height/2);
        for(float i=0, t, r; i<n; ++i) {  // Repeat n times, and initializing t(Theta) and r(Radius)
          t = random(-HALF_PI, HALF_PI);
          r = random(0, width);
          r = (r*r) / (width);
          r+= (width/3) *sin(PI*r/width);
          point(r*cos(t), r*sin(t));
        }
      popMatrix();
    }
    
    void draw() { }
    

    code

    tweaks (0)

    about this sketch

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

    license

    advertisement

    Dominik Schmid

    Swarm Dots

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

    Creates the illusion of making a circle, while only placing dots.

    Originally called Centre Dots 02

    Fiona Harkins
    15 Nov 2011
    Doing a project with something similar to this and another example, similar to one called Bytes (http://www.openprocessing.org/visuals/?visualID=43199). I'm pretty new to processing. I need to make something very similar to your swarm dots but with moving dots instead of static dots and they can't go any further than the outer circle.

    We are using data from an outside source so need to figure how to make it relate to a table of data too.. Any suggestions on how to help combine the two together?
    You need to login/register to comment.