public class WireframeSphere extends AbstractCompositeShape
A wireframe sphere approximation built from rings of connected line segments. The sphere is generated using parametric spherical coordinates, producing a latitude-longitude grid of vertices connected by lines.

The sphere is divided into 20 longitudinal slices and 20 latitudinal rings (using a step of PI / 10 radians). Adjacent vertices within each ring are connected, and corresponding vertices between consecutive rings are also connected, forming a mesh that approximates a sphere surface.

Usage example:


 LineAppearance appearance = new LineAppearance(1, Color.WHITE);
 WireframeSphere sphere = new WireframeSphere(new Point3D(0, 0, 300), 100f, appearance);
 shapeCollection.addShape(sphere);
 
See Also:
  • Constructor Details

    • WireframeSphere

      public WireframeSphere(Point3D location, float radius, LineAppearance lineFactory)
      Constructs a wireframe sphere at the given location with the specified radius. The sphere is approximated by a grid of line segments generated from parametric spherical coordinates.
      Parameters:
      location - the center point of the sphere in 3D space
      radius - the radius of the sphere
      lineFactory - the line appearance (color, width) used for all line segments