Ok, I have a somewhat unusual maths requirement (well unusual to me anyway).
Say I have a 3x3 matrix, each with a value (0...255). Assuming
this represents the surface of a physical object (and I know that the
center box is not zero), I want to get the surface vector in order to
be able to work with the "slope" of this surface. Clear?
Example
0 0 0
2 2 2
2 2 2 Must give a normal of zero,
2 0 0
2 2 0
2 2 2 Should give normal of -1.
0 0 2
0 2 2
2 2 2 should give a normal of 1
And so on. The hope is that through the weighting of the boxes (a
larger number carries more weight in the calculation) I can simulate
more than just 8 directions.
Also, the output (plus/minus and so on) is flexible, I simply must be
able to correlate this to a surface normal (always pointing up).
I've tried placing artificial points on an XY plane in each of the 8
directions with the distance in the given direction defined by the
respective number within the matrix. This is half-satisfactory as
it seems to bear SOME resemblance to a logical answer, but it's not
quite there.
Can anyone help me?
Perhaps it's better if I ask if anyone can understand me?
Looking forward to any help
Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)