Class ParticleSphereCSA

All Implemented Interfaces:
Shape

public class ParticleSphereCSA extends ParticleSphere
This class uses surface area and circumference to position particles, as opposed to ParticleSphere which uses the Sunflower Seed Arrangement

This class's sphere looks worse, but is much less chaotic and easier to color with secondary particles.
  • Field Details

    • cirTracker

      protected final List<Double> cirTracker
    • circleFrequency

      protected int circleFrequency
    • surfaceArea

      protected double surfaceArea
    • recalculate

      protected boolean recalculate
  • Constructor Details

    • ParticleSphereCSA

      public ParticleSphereCSA(Particle particle, LocationSafe center, double xRadius, double yRadius, double zRadius, double pitch, double yaw, double roll, int circleFrequency, int particleFrequency)
      Note: if circleFrequency is too high it can cause the sphere to look weird, if that's why you're looking at this then I'd suggest lowering it.
      See Also:
    • ParticleSphereCSA

      public ParticleSphereCSA(Particle particle, LocationSafe center, double radius, double pitch, double yaw, double roll, int circleFrequency, int particleFrequency)
      Note: if circleFrequency is too high it can cause the sphere to look weird, if that's why you're looking at this then I'd suggest lowering it.
      See Also:
    • ParticleSphereCSA

      public ParticleSphereCSA(Particle particle, LocationSafe center, double xRadius, double yRadius, double zRadius, int circleFrequency, int particleFrequency)
      Note: if circleFrequency is too high it can cause the sphere to look weird, if that's why you're looking at this then I'd suggest lowering it.
      See Also:
    • ParticleSphereCSA

      public ParticleSphereCSA(Particle particle, LocationSafe center, double radius, int circleFrequency, int particleFrequency)
      Note: if circleFrequency is too high it can cause the sphere to look weird, if that's why you're looking at this then I'd suggest lowering it.
      See Also:
    • ParticleSphereCSA

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

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

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

    • display

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

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

      protected ParticleShaper cloneConstructor()
      Overrides:
      cloneConstructor in class ParticleSphere
    • recalcCircumferenceAndArea

      protected void recalcCircumferenceAndArea()
    • setXRadius

      public void setXRadius(double xRadius)
      Overrides:
      setXRadius in class ParticleCircle
    • setZRadius

      public void setZRadius(double zRadius)
      Overrides:
      setZRadius in class ParticleCircle
    • setLimit

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

      public void setCircleFrequency(int circleFrequency)
      Parameters:
      circleFrequency - amount of circles in the sphere
    • getCircleFrequency

      public int getCircleFrequency()
      Returns:
      amount of circles in the sphere