Package org.jwildfire.create.eden.primitive

Examples of org.jwildfire.create.eden.primitive.Torus


        if (q[i][j] != 0) {
          double dx = i - (width - 1) * 0.5;
          double dy = j - (height - 1) * 0.5;
          double r = Math.sqrt(dx * dx + dy * dy) / maxR + MathLib.EPSILON;
          double size = minSize + (maxSize - minSize) * r;
          Torus sphere = new Torus();
          sphere.getPosition().setValue(dx * gridSize + xOffset, dy * gridSize + yOffset, zOffset);
          sphere.getSize().setValue(size);
          sphere.getRotate().setValue(90 + Math.random() * 12.0 - 6.0, Math.random() * 12.0 - 6.0, Math.random() * 12.0 - 6.0);
          pScene.addObject(sphere);
        }
      }
    }

View Full Code Here


      size.setX(size.getX() + deltaSize.getX());
      size.setY(size.getY() + deltaSize.getY());
      size.setZ(size.getZ() + deltaSize.getZ());
      //      System.out.println("  SIZE " + size.getX() + " " + size.getY() + " " + size.getZ());

      Torus box = new Torus();
      box.getPosition().assign(position);
      box.getSize().assign(size);
      box.getRotate().assign(rotate);
      scene.addObject(box);

      deltaRotate.setZ(deltaRotate.getZ() - 0.1 * (0.5 + Math.random()));
    }
View Full Code Here

TOP

Related Classes of org.jwildfire.create.eden.primitive.Torus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.