Recursive Design Using Processing

in #art6 years ago

SCREENSHOT:
Screenshot_20180602-115216.png

VIDEO CLIP:

DESCRIPTION :
The app draws a circle half the radius of a parent circle on four points on the parent's circumference. One at the top, one at the bottom, one to the right, and one to the left. This continues until the size of the generated circles reach a radius limit. Tapping the top half of your phone screen changes the background color, and tapping the bottom half changes the line color. Hence, it's an interactive program.

NOTE:
I don't really know how much to tell you; so, for the sake of brevity I kept the description short. If you want more info, just post your question on the comments section.

TOOLS:

  1. An Android phone.
  2. APDE (A Processing IDE for Android) or the desktop Processing IDE

SOURCE CODE:
float initialRadius;
int radiusLimit;

void setup() {
initialRadius = 350;
radiusLimit = 20;
}

void draw() {
drawCircle(width/2,height/2, initialRadius);
}

void drawCircle(float x, float y, float radius) {
noFill();
ellipse(x, y, radius, radius);

if(radius > radiusLimit) {
drawCircle(x + radius/2, y, radius/2);
drawCircle(x -radius/2, y, radius/2);
drawCircle(x, y + radius/2, radius/2);
drawCircle(x, y -radius/2, radius/2);
}
}

Coin Marketplace

STEEM 0.18
TRX 0.15
JST 0.029
BTC 62613.64
ETH 2438.01
USDT 1.00
SBD 2.67