2009
10.09
10.09
Some pretty ugly stuff, this:
ArrayList displays; float currentAngle = 0; float currentX = 200; float tempX = currentX; float currentY = 150; float tempY = currentY; WormThing w1 = new WormThing(250,400,0); WormThing w2 = new WormThing(250,400,180); class MouseDisplay { float x,y; boolean alive; private int telomere; float rotation_angle; float rotation_speed; MouseDisplay(float x_, float y_, int size_) { x = x_; y = y_; alive = true; telomere = size_; rotation_angle = 45; rotation_speed = 10; } void show() { x = x+cos(radians(rotation_angle)) * rotation_speed; y = y+sin(radians(rotation_angle)) * rotation_speed; rotation_angle -= 10; ellipse( x,y, telomere, telomere); telomere--; if (telomere == 0) { alive = false; } } } class WormThing { float angle; float x; float y; WormThing(float x_, float y_, float angle_) { x = x_; y = y_; angle = angle_; } void execute() { angle += 5; x += cos(radians(angle)) * 15; y += sin(radians(angle)) * 15; for (int i = 1; i < 5; i++) { MouseDisplay d = new MouseDisplay(x+random(-10,10), y+random(-10,10), 100); if (displays.size() < 250) { displays.add(d); } } } } void setup() { size(600,800); frameRate(30); stroke(90, 60, 50); smooth(); displays = new ArrayList(); } void draw() { w1.execute(); w2.execute(); background(167, 159, 148); for (int i = 0; i < displays.size(); i++) { MouseDisplay m = (MouseDisplay) displays.get(i); m.show(); if (m.alive == false) { displays.remove(i); } } print(displays.size()+"\n"); }
It doesn’t make me sick. It does look a bit intestinal, though
.