@Override public void onRun() { Location location = getLocation(); location.add(RandomUtils.getRandomCircleVector().multiply(RandomUtils.random.nextDouble() * 0.6d)); location.add(0, RandomUtils.random.nextFloat() * 2, 0); display(particle, location); }
@Override public void onRun() { Location location = getLocation(); for (int i = 0; i < 20; i++) { location.add(RandomUtils.getRandomCircleVector().multiply(RandomUtils.random.nextDouble() * 0.6d)); location.add(0, RandomUtils.random.nextFloat() * 2, 0); display(particle, location); } }
@Override public void onRun() { Location location = getLocation(); for (int i = 0; i < 10; i++) { Vector v = RandomUtils.getRandomCircleVector().multiply(RandomUtils.random.nextDouble() * 0.6d); v.setY(RandomUtils.random.nextFloat() * 1.8); location.add(v); display(particle, location); location.subtract(v); } }
@Override public void onRun() { Location location = getLocation(); for (int i = 1; i <= strands; i++) { double angle = 2 * i * Math.PI / strands + rotation; for (int j = 1; j <= particlesStrand; j++) { float ratio = (float) j / particlesStrand; double x, y, z; x = Math.cos(angle) * radius * ratio; y = Math.sin(Math.PI * j / particlesStrand) * height; z = Math.sin(angle) * radius * ratio; location.add(x, y, z); display(particle, location); location.subtract(x, y, z); } } for (int i = 0; i < particlesSpout; i++) { Vector v = RandomUtils.getRandomCircleVector().multiply(RandomUtils.random.nextFloat() * radius * radiusSpout); v.setY(RandomUtils.random.nextFloat() * heightSpout); location.add(v); display(particle, location); location.subtract(v); } }
@Override public void onRun() { Location location = getLocation(); location.add(0, yOffset, 0); for (int i = 0; i < 50; i++) { Vector v = RandomUtils.getRandomCircleVector().multiply(RandomUtils.random.nextDouble() * cloudSize); display(cloudParticle, location.add(v), cloudColor, 0, 7); location.subtract(v); } Location l = location.add(0, .2, 0); for (int i = 0; i < 15; i++) { int r = RandomUtils.random.nextInt(2); double x = RandomUtils.random.nextDouble() * particleRadius; double z = RandomUtils.random.nextDouble() * particleRadius; l.add(x, 0, z); if (r != 1) { display(mainParticle, l); } l.subtract(x, 0, z); l.subtract(x, 0, z); if (r != 1) { display(mainParticle, l); } l.add(x, 0, z); } }
Vector v = RandomUtils.getRandomCircleVector().multiply(radius); if (r.nextFloat() <= sideRatio) {
@Override public void onRun() { Location l = getLocation().add(0, yOffset, 0); for (int i = 0; i < (100 * cloudSize); i++) { Vector v = RandomUtils.getRandomCircleVector().multiply(RandomUtils.random.nextDouble() * cloudSize); if (showCloud) { display(cloudParticle, l.add(v), cloudColor, 0, 7); l.subtract(v); } } Location t = l.clone().add(0, .2, 0); double r = .45 * (maxTornadoRadius * (2.35 / tornadoHeight)); for (double y = 0; y < tornadoHeight; y += distance) { double fr = r * y; if (fr > maxTornadoRadius) { fr = maxTornadoRadius; } for (Vector v : createCircle(y, fr)) { if (showTornado) { display(tornadoParticle, t.add(v), tornadoColor); t.subtract(v); step++; } } } l.subtract(0, yOffset, 0); }