Class ParticleSphere

All Implemented Interfaces:
Shape
Direct Known Subclasses:
ParticleSphereCSA

public class ParticleSphere extends ParticleCircle
This class uses the Sunflower Seed Arrangement to form a sphere, as opposed to ParticleSphereCSA which uses surface area and circumference.

Using the sunflower seed arrangement uses almost the same processing power, but makes the sphere look much prettier and makes it so you don't have to worry about CircleFrequency.
however, using this makes it much harder to color the sphere with secondary particles, because the points are drawn pretty chaotically.

TLDR: Use this class if you just want a normal sphere or ellipsoid, otherwise use ParticleSphereCSA.
  • Field Details

    • yRadius

      protected double yRadius
  • Constructor Details

    • ParticleSphere

      public ParticleSphere(Particle particle, LocationSafe center, double xRadius, double yRadius, double zRadius, double pitch, double yaw, double roll, int particleFrequency)
      See Also:
    • ParticleSphere

      public ParticleSphere(Particle particle, LocationSafe center, double radius, double pitch, double yaw, double roll, int particleFrequency)
      See Also:
    • ParticleSphere

      public ParticleSphere(Particle particle, LocationSafe center, double xRadius, double yRadius, double zRadius, int particleFrequency)
      See Also:
    • ParticleSphere

      public ParticleSphere(Particle particle, LocationSafe center, double radius, int particleFrequency)
      See Also:
    • ParticleSphere

      public ParticleSphere(Particle particle, LocationSafe center, double radius)
      See Also:
  • Method Details

    • display

      public void display()
      Specified by:
      display in interface Shape
      Overrides:
      display in class ParticleCircle
    • clone

      public ParticleSphere clone()
      Specified by:
      clone in interface Shape
      Overrides:
      clone in class ParticleCircle
    • cloneConstructor

      protected ParticleShaper cloneConstructor()
      Overrides:
      cloneConstructor in class ParticleCircle
    • scale

      public void scale(double x, double y, double z)
      Description copied from interface: Shape
      Rescales this shape such that a shape with the xyz radiuses of 4, 3, 4, resized by 1.25, 1.25, 1.25, would have its radiuses become 5, 3.75, 5.
      Specified by:
      scale in interface Shape
      Overrides:
      scale in class ParticleCircle
      Parameters:
      x - x scale
      y - y scale
      z - z scale
    • setLimit

      public ParticleSphere setLimit(double limit)
      Overrides:
      setLimit in class ParticleCircle
      Parameters:
      limit - percentage of the shape that should generate, such that 0 would be the entire shape and 50 would be half the shape.
    • setLimitInverse

      public ParticleSphere setLimitInverse(boolean limitInverse)
      Overrides:
      setLimitInverse in class ParticleCircle
      Parameters:
      limitInverse - determines if the limit cuts off at the top or bottom. default false (top)
    • setYRadius

      public void setYRadius(double yRadius)
    • getYRadius

      public double getYRadius()