-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have a grid of intensity values which I am displaying using Color/ColorMap:

        8.0 +  0.0     0.0     0.0     0.0     0.0
            |
        7.5 +  0.0     1.0     0.0     1.0     1.0
            |
        7.0 +  1.0     2.0     1.0     2.0     1.0
    |       |
    y   6.5 +  0.0     1.0     2.0     2.0     2.0
    |       |
        6.0 +  1.0     2.0     2.0     3.0     2.0
            |
        5.5 +  2.0     3.0     3.0     4.0     3.0
            |
        5.0 +  2.0     3.0     4.0     5.0     4.0
            |
            +---+-------+-------+-------+-------+
               1.0     1.25    1.5     1.75    2.0
                              - x -

As you can see, the x positions range linearly from 1.0 to 2.0. The y positions range linearly from 5.0 to 8.0.

When I use a Pick, I can extract the "closest vertex" which would give me an x/y position coordinate (e.g., {1.25 6.5}).

How do I translate this into a zero-based index into each of the x/y positions (e.g., {1.0 5.0} -> {0 0} or {1.25 6.5} -> {1 3})?

Any help is greatly appreciated.

    -- Matt

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)

iD8DBQFCeRc7nLpDzL5I7l8RAqINAJ9XzMwCvk5rPoiHEfU89ig/kerTmQCfV/TB
W9nPLdjZr8NeCMsY1PQ7IQc=
=B9xA
-----END PGP SIGNATURE-----

Reply via email to