Class IterativeTutteLayout

java.lang.Object
IterativeTutteLayout

public class IterativeTutteLayout extends Object
Implementation of the planar (2D) Tutte barycentric method: computation based on iterative relaxation
Version:
2019
Author:
Luca Castelli Aleardi, Ecole Polytechnique
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    boolean[]
    says whether a vertex belongs to the exterior boundary
    Jcg.polyhedron.Polyhedron_3<Jcg.geometry.Point_3>
    input mesh to draw (with 'n' vertices)
    int
    number of vertices
    int
    number 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

    Constructors
    Constructor
    Description
    IterativeTutteLayout(Jcg.polyhedron.Polyhedron_3<Jcg.geometry.Point_3> mesh, int faceIndex)
    Initialize the class fields
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Perform one iteration iterative barycentric method
    void
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • n

      public int n
      number of vertices
    • mesh

      public Jcg.polyhedron.Polyhedron_3<Jcg.geometry.Point_3> mesh
      input mesh to draw (with 'n' vertices)
    • isOnBoundary

      public boolean[] isOnBoundary
      says whether a vertex belongs to the exterior boundary
    • points

      public Jcg.geometry.Point_2[] points
      2D positions of the vertices of the mesh giving the layout (to be computed)
    • nBoundaryVertices

      public int nBoundaryVertices
      number 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