Numerous swirl patterns make your eyes dizzy.

Many interesting circles and swirls that was created with creative coding.

 

Description of this artwork.

It's a generative art made with the 'Processing' on Java programming language. It's a revised work of 'Beyond the Universe'.

When I changed the calculation formula to this.


 xCurr += plotDiv * cos((atan2(yPrev * vfldFactorX, yPrev) + TWO_PI * yPrev) * plotMult);
 yCurr += plotDiv * sin((atan2(xPrev * vfldFactorY, xPrev) + TWO_PI * xPrev) * plotMult);


It drew many beautiful circles. I got interested in this. So I tuned shape and color, and it became a good piece of work.







 

The 'Processing' code example (Java)

Please feel free to use it under the terms of the GPL. To see other works based on my code is my pleasure. And my honor.

This code does not display any images on the screen but generates image files in frames directory.




/**
 * Going In Circles.
 * draw many circles with vector field using no noise.
 * 
 * @author @deconbatch
 * @version 0.1
 * Processing 3.2.1
 * created 2019.11.
 */

void setup() {

  size(980, 980);
  colorMode(HSB, 360, 100, 100, 100);
  rectMode(CENTER);
  smooth();
  noStroke();
  noLoop();

}

void draw() {

  int   frmMax   = 3; // draw 3 images
  int   plotMax  = 1000;
  float plotDiv  = 0.001;
  float plotMult = random(0.0, 5.0);
  float initDiv  = 0.02;
  float initHue  = random(360.0);
  float baseBri  = 5.0;
  translate(width * 0.5, height * 0.5);

  for (int frmCnt = 1; frmCnt <= frmMax; frmCnt++) {

    // for different looks
    plotMult %= 5.0;
    plotMult += 1.5;
    initHue += 90.0;

    float frmRatio    = map(frmCnt, 1, frmMax, 0.0, 1.0);
    float vfldFactorX = random(0.5, 2.0);
    float vfldFactorY = random(0.5, 2.0);
    float baseSiz     = random(1.0, 1.5);
    float baseHue     = initHue;

    background(0.0, 0.0, 90.0, 100);
    blendMode(DIFFERENCE);

    pushMatrix();
    rotate(random(TWO_PI));
    for (float xInit = -0.5; xInit <= 0.5; xInit += initDiv) {
      for (float yInit = -0.5; yInit <= 0.5; yInit += initDiv) {
        float xCurr = xInit;
        float yCurr = yInit;
        for (int plotCnt = 0; plotCnt < plotMax; plotCnt++) {
          float plotRatio = map(plotCnt, 0, plotMax, 0.0, 1.0);
          float eHue      = baseHue + plotRatio * 60.0 + floor(((xInit + yInit) * 10000.0) % 4.0) * 10.0;
          float eSat      = map(sin(PI * plotRatio), 0.0, 1.0, 40.0, 80.0);
          float eBri      = baseBri * (1.0 + sin(PI * plotRatio));
          float eSiz      = baseSiz * (1.0 + sin(PI * plotRatio));

          float xPrev = xCurr;
          float yPrev = yCurr;
          xCurr += plotDiv * cos((atan2(yPrev * vfldFactorX, yPrev) + TWO_PI * yPrev) * plotMult);
          yCurr += plotDiv * sin((atan2(xPrev * vfldFactorY, xPrev) + TWO_PI * xPrev) * plotMult);

          fill(eHue % 360.0, eSat, eBri, 100.0);
          ellipse(xCurr * width, yCurr * height, eSiz, eSiz);
        }
      }
    }
    popMatrix();

    casing();
    saveFrame("frames/" + String.format("%04d", frmCnt) + ".png");
  }
  exit();
}

/**
 * casing : draw fancy casing
 */
private void casing() {
  blendMode(BLEND);
  fill(0.0, 0.0, 0.0, 0.0);
  strokeWeight(54.0);
  stroke(0.0, 0.0, 0.0, 100.0);
  rect(0.0, 0.0, width, height);
  strokeWeight(50.0);
  stroke(0.0, 0.0, 100.0, 100.0);
  rect(0.0, 0.0, width, height);
  noStroke();
  noFill();
}


/*
Copyright (C) 2019- deconbatch

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>
*/



 

Yet another example images.


Many interesting circles and swirls that was created with creative coding.

Many interesting circles and swirls that was created with creative coding.

 

Next Post Previous Post
No Comment
Add Comment
comment url