|
Java API by Zvi Har’El |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkaleido.Polyhedron
public class Polyhedron
The class Polyhedron contains the fields which describe a
uniform polyhedron and its duals and the method necessary to compute them
from the basic input, which is the Wythoff symbol of the polyhedron.
| Field Summary | |
|---|---|
(package private) int[][] |
adj
The vertex-vertex adjacency matrix. |
(package private) boolean[] |
anti
A boolean array of length E. |
(package private) static double |
BIG_EPSILON
The minimum difference in the coordinates between two distinct vertices. |
(package private) String |
config
The printable vertex configuration. |
private int |
cx
|
private int |
cy
|
(package private) int |
D
The density of the polyhedron. |
(package private) static double |
DBL_EPSILON
The difference between 1.0 and the minimum
double greater than 1.0. |
(package private) boolean |
drawn
|
(package private) String |
dual
The dual name, standard or manifuctured. |
(package private) int[][] |
e
The edge list. |
(package private) int |
E
The edge count. |
(package private) int |
even
Marks the removed face in a polyhedron of type pqr|, where
one of the rationals has an even denominator. |
(package private) Vector3D[] |
f
The face coordinates. |
(package private) int |
F
The face count. |
(package private) int[] |
Fi
The face counts by type. |
(package private) int[] |
firstrot
Temporary storage for vertex generation. |
(package private) int[] |
ftype
The face types. |
(package private) int |
g
The order of the symmetry group of the polyhedron. |
(package private) double |
gon
The type of the polygon serving as a base for a dihedral polyhedron. |
(package private) boolean |
hemi
Marks polyhedra of a “hemi” type. |
(package private) int[][] |
incid
The vertex-face incidence matrix. |
(package private) int |
index
The index of the polyhedron in the standard list. |
(package private) int |
K
The type of the symmetry group of the polyhedron. |
(package private) double[] |
m
The number of faces at a vertex of each type. |
(package private) int |
M
The vertex valency. |
(package private) double |
minr
The smallest nonzero inradius of the polyhedron. |
(package private) double[] |
n
The number of sides of a face of each type. |
(package private) int |
N
The number of faces types. |
(package private) String |
name
The polyhedron name, standard or manifuctured. |
private Vector3D[] |
newv
|
private Vector3D[] |
oldv
|
(package private) boolean |
onesided
Marks one-sided, i.e., non-oriantable, polyhedra. |
(package private) Rational[] |
p
The four elements of the Wythoff formula, with the vertical bar represented by a zero. |
private int |
radius
|
(package private) int[] |
rot
The vertex configuration. |
(package private) boolean[] |
snub
Marks the snub triangles in the vertex configuration. |
(package private) Vector3D[] |
v
The vertex coordinates. |
(package private) int |
V
The vertex count. |
(package private) String |
wythoff
The printable Wythoff symbol. |
(package private) double[] |
γ
The fundamental angles in radians. |
(package private) int |
χ
Euler characteristic of the polyhedron. |
| Constructor Summary | |
|---|---|
Polyhedron(int i)
|
|
Polyhedron(String s)
|
|
| Method Summary | |
|---|---|
(package private) void |
configuration()
Generate a printable vertex configuration symbol. |
(package private) void |
count()
Compute edge and face counts, and update D and χ. |
(package private) void |
decompose()
Decompose Schwarz triangle into N right triangles and compute the vertex count V and the vertex valency M. |
(package private) void |
dihedral(double gon,
String name,
String dual)
|
(package private) void |
draw(Scope applet,
Graphics g,
Vector3D a,
Vector3D b,
boolean pen)
|
(package private) void |
edgelist(boolean uniform)
Computes edge list of the polyhedron or its dual. |
(package private) void |
exceptions()
Handle the exceptional cases which need postprocessing. |
(package private) void |
faces()
Compute polyhedron faces (dual vertices) and incidence matrices. |
(package private) void |
guessname()
Get the polyhedron name, using standard list or guesswork. |
(package private) static int |
mod(int i,
int j)
compute the mathematical modulus function. |
(package private) void |
moebius()
Using Wythoff symbol (p|qr, pq|r, pqr| or |pqr), find the Moebius triangle (2 3 K) (or (2 2 n)) of the Schwarz triangle (pqr), the order g of its symmetry group, its Euler characteristic χ, and its covering density D. |
(package private) void |
newton()
Solve the fundamental right spherical triangles. |
(package private) void |
paint(Scope applet,
Graphics g,
double angle,
boolean uniform)
Draw a polyhedron. |
(package private) void |
parse(String s)
Parse input symbol: Wythoff symbol or an index to Uniform.list. |
(package private) static Object |
resize(Object o,
int l)
Resize an array. |
(package private) void |
vertices()
Compute polyhedron vertices and vertex adjecency lists. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
int index
Uniform.listRational[] p
Uniform.Entry.wythoff,
parse(java.lang.String)int M
int N
int V
int E
int F
int χ
V - E + F = χ. It is two for convex polyhedra.
int D
int g
moebius()int K
boolean hemi
decompose()boolean onesided
decompose()boolean[] snub
M
boolean[] anti
boolean array of length E. It is not
null only for the duals of the uniform polyhedra of the
“hemi” type, which have ideal vertices.
edgelist(boolean)double gon
double minr
double[] γ
N.
double[] m
N.
double[] n
N.
int even
pqr|, where
one of the rationals has an even denominator.
decompose()int[] Fi
N.
int[] firstrot
V.
int[] ftype
F.
int[] rot
M with elements in
the range 0..N-1.
int[][] adj
M x V matrix with
elements in the range 0..V-1.
int[][] e
E matrix.
int[][] incid
M x V matrix with
elements in the range 0..F-1.
String config
String name
String dual
String wythoff
Vector3D[] f
F.
Vector3D[] v
V.
static final double DBL_EPSILON
1.0 and the minimum
double greater than 1.0. The exact value is
2^-52, approximately 2.2204460492503131e-16.
static final double BIG_EPSILON
boolean drawn
private int cx
private int cy
private int radius
private Vector3D[] oldv
private Vector3D[] newv
| Constructor Detail |
|---|
Polyhedron(int i)
Polyhedron(String s)
| Method Detail |
|---|
void parse(String s)
Uniform.list. The symbol is a # followed by a number, or a three
fractions and a bar in some order. We allow no bars only if it
result from the input symbol #80.
void moebius()
g is the number of copies of (2 3 K) covering the sphere, i.e.,
g * π * (1/2 + 1/3 + 1/K - 1) = 4 * π
D is the number of times g copies of (pqr) cover the sphere, i.e.
D * 4 * π = g * π * (1/p + 1/q + 1/r - 1)
χ is V - E + F, where F = g is the number of triangles, E = 3*g/2
is the number of triangle edges, and V = Vp+ Vq+ Vr, with Vp =
g/(2*np) being the number of vertices with angle π/p (np is the
numerator of p).
void decompose()
void guessname()
void dihedral(double gon,
String name,
String dual)
void newton()
void exceptions()
void count()
void configuration()
void vertices()
void faces()
void edgelist(boolean uniform)
void paint(Scope applet,
Graphics g,
double angle,
boolean uniform)
void draw(Scope applet,
Graphics g,
Vector3D a,
Vector3D b,
boolean pen)
static int mod(int i,
int j)
static Object resize(Object o,
int l)
|
Java API by Zvi Har’El |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||