Class IterativeTutteLayout
java.lang.Object
IterativeTutteLayout
Implementation of the planar (2D) Tutte barycentric method: computation based on iterative relaxation
- Version:
- 2019
- Author:
- Luca Castelli Aleardi, Ecole Polytechnique
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean[]says whether a vertex belongs to the exterior boundaryJcg.polyhedron.Polyhedron_3<Jcg.geometry.Point_3> input mesh to draw (with 'n' vertices)intnumber of verticesintnumber of the boundary vertices of the graph (on the outer cycle)Jcg.geometry.Point_2[]2D positions of the vertices of the mesh giving the layout (to be computed) -
Constructor Summary
ConstructorsConstructorDescriptionIterativeTutteLayout(Jcg.polyhedron.Polyhedron_3<Jcg.geometry.Point_3> mesh, int faceIndex) Initialize the class fields -
Method Summary
Modifier and TypeMethodDescriptionvoidPerform one iteration iterative barycentric methodvoidMap each vertex (in the 3D mesh) to the 2D coordinates corresponding to a planar 2D layout Each vertex v is assigned the coordinates (x, y, 0.), where 'x' and 'y' are the planar coordinates
-
Field Details
-
n
public int nnumber of vertices -
mesh
public Jcg.polyhedron.Polyhedron_3<Jcg.geometry.Point_3> meshinput mesh to draw (with 'n' vertices) -
isOnBoundary
public boolean[] isOnBoundarysays whether a vertex belongs to the exterior boundary -
points
public Jcg.geometry.Point_2[] points2D positions of the vertices of the mesh giving the layout (to be computed) -
nBoundaryVertices
public int nBoundaryVerticesnumber of the boundary vertices of the graph (on the outer cycle)
-
-
Constructor Details
-
IterativeTutteLayout
public IterativeTutteLayout(Jcg.polyhedron.Polyhedron_3<Jcg.geometry.Point_3> mesh, int faceIndex) Initialize the class fields
-
-
Method Details
-
oneIteration
public void oneIteration()Perform one iteration iterative barycentric method -
projectVertices
public void projectVertices()Map each vertex (in the 3D mesh) to the 2D coordinates corresponding to a planar 2D layout Each vertex v is assigned the coordinates (x, y, 0.), where 'x' and 'y' are the planar coordinates
-