A sketch of an algorithm for the Steinitz representation for a planar graph
Our goal is to arrange vertices so that each vertex is associated with a circle on a sphere in a way that
two vertices are adjacent if and only if the associated circles are
tangent to each other.
(An alternative description of the Steinitz representation is
to represent the graph as a polytope that wraps around a sphere
in a way that every edge is tangent to the sphere.)
A picture of
a Steinitz representation
An outline of the algorithm
-
Input: a drawing of a planar graph in the plane
-
Output: computing the radius of discs associated with vertices and the radius of the sphere.
-
Triangulate the planar drawing by adding edges if necessary.
The resulting drawing has all faces being triangles.
-
Step 0: Initialization:
-
For each vertex v, do the following:
If its degree dv is at most 5,
assign weight 1/2 to each vertex v
i.e.,
set
ri = 1/2.
Otherwise, set
ri = dv/10.
-
Compute Rv (i.e., the radius of the ball that fits at the cone formed at v).
-
Set R = average Rv.
-
Step i:
Compute, for each vertex v,
angles at
v
in faces incident to
v.
Hint: For a triangle of three sides a, b, c with angles t between a and b, the formula to
determine t is
cos t = (a2 +
b2 -
c2)/(2 a b)
Compute
the sum
sv of angles φ .
-
If, for all v,
| sv - 2 π | < 0.0001,
stop and we have our
ri.
(Here π = pi = 180 degrees.)
If, for some v,
sv < 2 π - 0.0001,
set
new ri =
old ri + 0.0001
If, for some v,
sv > 2 π + 0.0001,
set
new ri =
old ri - 0.0001
Repeat Step i.
-
Layout the disc representation using
rv and R.