Interstellar Overdrive.

Some interesting shapes made with my Accidental Programming method.

Some interesting shapes made with my Accidental Programming method.

Some interesting shapes made with my Accidental Programming method.


Description of this creative coding.

Creative coding work made with Processing.

My 'Accidental Programming Method' worked!
When I was playing around Indian Ink Splashes, it created some interesting shapes like this.

Some interesting shape made with code.

It was so interesting to me! I improved it to make the shapes clearly.

Processing code example.

Please feel free to use this code, if you like it.
To see other works based on my code is my pleasure. And my honor.


// Interstellar Overdrive.
// Processing 3.2.1
// 2017.12.24

int centx;
int centy;
float colorBase;
float rotationBase;
float sizeBase;
float cxnoiseDivBase;
float cynoiseBase;
float csnoiseBase;

void setup() {
  
  size(900, 900);
  colorMode(HSB, 360, 100, 100, 100);
  smooth();
  //  noLoop();
  noStroke();

  centx = width / 2;
  centy = height / 2;
  colorBase = random(0.0, 360.0);
  rotationBase = random(0.0, 90.0);
  sizeBase = 20.0;
  cxnoiseDivBase = map(random(1.0), 0.0, 1.0, 0.00005, 0.00025);
  cynoiseBase = map(random(1.0), 0.0, 1.0, 0.0, 360.0);
  csnoiseBase = map(random(1.0), 0.0, 1.0, 0.0, 360.0);
  
}

void draw() {

  background(0, 0, 90, 100);
  translate(centx, centy);

  rotationBase -= 0.08;
  cxnoiseDivBase += 0.0000003; // wave
  cynoiseBase += 0.00002; // roll
  csnoiseBase += 0.00005; // blink

  float radiusBase = 15.0;
  float cxnoise = 0.0;
  float cynoise = cynoiseBase;
  float csnoise = csnoiseBase;
  float cxnoiseDiv = cxnoiseDivBase;
  float cynoiseDiv = 0.01;
  float csnoiseDiv = 0.005;
  int iangleMax = 360 * 68;

  canvasRotation(rotationBase);
  
  for (int iangle = 0; iangle <= iangleMax; ++iangle) {

    if (radiusBase > width * 0.6) {
      break;
    }
    radiusBase += radiusBase * 0.00015;
          
    float ang = iangle * 0.1;
    float radius = radiusBase * map(customNoise(cxnoise) + customNoise(cynoise), -2.0, 2.0, 1.0, 1.6);
    float ePtX = map(cos(radians(ang)), -1.0, 1.0, -radius, radius);
    float ePtY = map(sin(radians(ang)), -1.0, 1.0, -radius, radius);
    float eSiz = (2.0 + abs(customNoise(csnoise)) * sizeBase) * map(iangle, 0.0, iangleMax, 0.01, 1.0);
    float eAlp = 100.0 - abs(customNoise(csnoise)) * 100.0;

    fill(colorBase, 60, 40, eAlp);
    ellipse(ePtX, ePtY, eSiz, eSiz);

    cxnoise += cxnoiseDiv;
    cynoise += cynoiseDiv;
    csnoise += csnoiseDiv;

  }

  saveFrame("frames/mo####.png");
  if (frameCount > 540) {
    exit ();
  }
  
}

float customNoise(float value) {
  return pow(sin(value), 3) * cos(pow(value, 2));
}

void canvasRotation(float degrees) {
  rotate(radians(degrees));
}

/*
Copyright (C) 2017- 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 
*/



No comments :

Post a Comment