diff --git a/app/src/main/java/com/quaap/computationaldemonology/Drawgorythm.java b/app/src/main/java/com/quaap/computationaldemonology/Drawgorythm.java index 7f33cc0..067bc88 100644 --- a/app/src/main/java/com/quaap/computationaldemonology/Drawgorythm.java +++ b/app/src/main/java/com/quaap/computationaldemonology/Drawgorythm.java @@ -99,23 +99,47 @@ public void doDraw(final Canvas canvas, final long ticks) { class BarbedRing extends Ring { + double size = 2; + double speed = 40; + double modsize = size; + double dsize = .1; + public void doDraw(final Canvas canvas, final long ticks) { - for (long j=0; j15) size=15; + if (size<1) size=1; + modsize = size; + dsize = .1; + } - rad += .001; + modsize += dsize; + dsize += (size - modsize)/size/10; + + + if (mTouchDX!=0) { + speed+= Math.signum(mTouchDX)/5; + if (speed>60) speed=60; + if (speed<4) speed=4; } + + rad = 0; + do { + + + float x = (float) (r * Math.sin(rad)); + float y = (float) (r * Math.cos(rad)); + double rnd = Math.random(); + int sizex = (int) (modsize*rnd * r / 10 * Math.cos(rad * speed)) + 1; + int sizey = (int) (modsize*rnd * r / 10 * Math.sin(rad * speed)) + 1; + canvas.drawLine(mCenterX + x, mCenterY + y, mCenterX + x + sizex, mCenterY + y + sizey, mForeground); + + + rad += .005; + } while (rad