pol_recip - polar reciprocals (duals)
pol_recip [options] [input_file]
Read a file in OFF format and make a polar reciprocal from the face planes.
- input_file
- input file in OFF format, or if not given the program reads from standard input
- -h
- program help
- -c <cent>
- reciprocation centre (default: E)
- X,Y,Z - centre with these coordinates
- C - use centroid
- M - mid-sphere (approximate)
- e - edge balanced
- E - edge balanced with inversion
- v - vert/face balanced
- V - vert/face balanced with inversion
- a - v/f/e balanced
- A - v/f/e balanced with inversion
- -C <init>
- initial value for a centre calculation, in form 'X,Y,Z',
or C to use centroid (default), M to calculate approx mid-sphere
- -r <rad>
- reciprocation radius (default: calculated)
- radius value - use this value as the radius
- v - nearest vertex distance
- V - furthest vertex distance
- e - nearest edge distance
- E - furthest edge distance
- f - nearest face distance
- F - furthest face distance
- X - topological dual using face centroids for dual vertices
or a comma separated list of vertex indices (starting from 0)
and the distance is to the space containing those vertices
- -R <rad>
- initial value for a radius calculation (default: calculated)
- -I <dist>
- maximum distance to project any normal or infinite dual vertex
(default: 1e15), if 0 then use actual distances and delete
infinite points
- -n <iters>
- maximum number of iterations used in calculation default values
for reciprocation sphere (default: 100000)
- -l <lim>
- minimum distance change to terminate calculation of default values
for reciprocation sphere, as negative exponent 1e-lim
(default: 13 giving 1e-13)
- -o <file>
- write output to file, if this option is not used
the program writes to standard output
Make a reciprocal pair. Make the dual of a cuboctahedron, a rhombic
dodecahedron, and then make the dual of that. The final output is
the same as the original cuboctahedron.
pol_recip -o rh_dodec.off cuboct.off
pol_recip -o orig_cuboct.off rh_dodec.off
Make a cube whose vertices are the mid-points of an octahedron's faces
pol_recip -o cube.off -R f octahedron.off
A polyhedron has a face made of vertices with indexes 0, 2, 4.
Make a dual which has a vertex in the plane of this face
pol_recip -o dual.off -R 0,2,4 poly.off
A dual of a convex polyhedron is normally made with the centre of
reciprocation at the polyhedron centre and the radius to just touch
the edges.
Some polyhedra have faces passing through their natural centre. This
causes a problem when making a dual because the vertex which is dual
to this face should be infinitely far away. pol_recip allows these
vertices to be included by placing them at a specified (probably very large)
distance normal to the face. Any programs dealing with these distant vertices
(e.g. povray) can interpret these distant vertices accordingly.
The default reciprocation centre and radius are found by the following
algorithm. It aims to find a reciprocation sphere that is balanced,
in the sense that the polyhedron and its dual have the same relationship
with the sphere.
centre = centroid of vertices of base polyhedron
radius = average distance from centre to edges
LOOP:
dual = polar reciprocal of base, using centre and radius
invert dual in centre point
edge_centroid = centroid of the nearest points to the centre
on the base's edges and duals edges
radius_sum_base = sum of distances from the centre to the nearest
point to the centre on the base's edges
radius_sum_dual = sum of distances from the centre to the nearest
point to the centre on the dual's edges
if loop count is even:
centre = 0.9*centre + 0.1*edge_centroid
if loop count is odd:
radius = radius * sqrt(rad_sum_g/rad_sum_d)
finish loop if change in centre and radius are small enough
The aim is that this will be a similar reciprocation method.
That is to say
- It will be reciprocal - it will always reciprocate a polyhedron
into the same polyhedron dual, and it will always reciprocate the dual
into the original polyhedron
- It will respect similarity - similar polyhedra will have similar
dual-pairs and similar duals
The default method above tends to reciprocate in the midsphere, if
it exists.
The other available balanced reciprocation methods use the centroid
of combined face near-points and vertex offsets, or the centroid
of the near-points of all three elements combined. For all three
cases the dual may be inverted in the reciprocation centre before
the centroid calculation.
-R e may select a sphere suitable for self-duality.
-R v and -R V may always give the same results.
Next:
geodesic - geodesic spheres
Up:
Programs and Documentation
|