Class SphereGeneration

java.lang.Object
Jcg.meshgeneration.SphereGeneration

public class SphereGeneration extends Object
Generate a spherical mesh, performing the recursive subdivision of an icosahedron
Author:
Luca Castelli Aleardi (Ecole Polytechnique, 2019)
  • Field Details

  • Constructor Details

    • SphereGeneration

      public SphereGeneration()
  • Method Details

    • run

      public void run(int iterations)
      The main method performing the subdivision process
    • runOnce

      private void runOnce()
      The main method performing the subdivision process
    • splitEdges

      private void splitEdges(HashMap<Halfedge<Point_3>,Point_3> edgePoints)
      Splits all edges by inserting a new vertex
    • subdivideFace

      private void subdivideFace(Face<Point_3> f)
      Perform the subdivision of a face into 4 triangular sub-faces Edges must already be split: the face has degree 3+3
    • computeEdgePoint

      private Point_3 computeEdgePoint(Halfedge<Point_3> h)
      Compute the midpoint of the given the half-edge 'h'
    • computeEdgePoints

      private HashMap<Halfedge<Point_3>,Point_3> computeEdgePoints()
      Compute all new edge points and store the result in an HashMap
    • approx

      public static double approx(double x, int prec)