[Edu-sig] Basic dictionary question

Kirby Urner urnerk at qwest.net
Mon Oct 10 06:56:52 CEST 2005

> Beware:
>      1.999999999999999 and 2.000000000001 likely won't lie in the same
> bin.  You'll need to check neighbors for candidates, unless your fixed
> point stuff reflects an underlying granularity.
> -- Scott David Daniels
> Scott.Daniels at Acm.Org

Thanks for the heads up Scott.

I'm translating a volume 3 cube around in a 3D checkerboard, trying to flag
all kitty-corner mid-edges (my bridge points), but not flagging border-line
edges where the connector tabs shouldn't appear -- some large borg-like
array of icosahedra connected by zig-zag tensed bands (Lanahan's patent

See http://www.4dsolutions.net/satacad/pythonicmath/icosa_in_holder.jpg for
a picture of a unit cell (the array might contain thousands).

So the XYZ tuples of interest are indeed highly distinct and in a regular
grid pattern.  It's just that there're a whole lot of them, and if I could
find a hash key that'd keep only the unique ones unique and ignore floating
point fuzz, I'd be set.  Any pairing/doubling would define a bridge point,
and therefore a green light to render a tab connector.

I think the key is probably to transform the grid by scaling, such that my
mid-edge points of interest get expressed using all integer coordinates.
Even though my actual map is floating point, the isomorphism will work for
pruning, and the tuples'll be easy to manage (so maybe scratch the decimal
type idea for now).

I'll post again when I have more research behind me and either a solution or
concrete frustration in sight -- not before.


More information about the Edu-sig mailing list