Class SphereGeneration
java.lang.Object
Jcg.meshgeneration.SphereGeneration
Generate a spherical mesh, performing the recursive subdivision of an icosahedron
- Author:
- Luca Castelli Aleardi (Ecole Polytechnique, 2019)
-
Field Summary
FieldsModifier and TypeFieldDescriptionthe generated mesh to output -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleapprox(double x, int prec) private Point_3Compute the midpoint of the given the half-edge 'h'Compute all new edge points and store the result in an HashMapvoidrun(int iterations) The main method performing the subdivision processprivate voidrunOnce()The main method performing the subdivision processprivate voidsplitEdges(HashMap<Halfedge<Point_3>, Point_3> edgePoints) Splits all edges by inserting a new vertexprivate voidsubdivideFace(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
-
Field Details
-
polyhedron3D
the generated mesh to output -
originalVertices
-
-
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
-
subdivideFace
-
computeEdgePoint
-
computeEdgePoints
-
approx
public static double approx(double x, int prec)
-