Hi!! I have got points like this (in a file): X=2,923, Y=-0,232,
Z=7,890.
In Java 3D, points must be between -1 and 1 (in a intervalo [-1,1]).
How do you change this points to intervale [-1,1] ????
Regards!
Andrew Thompson - 10 Apr 2007 12:52 GMT
>Hi!! I have got points like this (in a file): X=2,923, Y=-0,232,
>Z=7,890.
>
>In Java 3D, points must be between -1 and 1 (in a intervalo [-1,1]).
>How do you change this points to intervale [-1,1] ????
1) Calculate what maximum scale is required to
include all points.
- find xMax.absoluteValue, yMax.absVal and zMax.absVal
- use the largest of the three - call it scaleMax
- if you want some 'space' around the object, add 10%
to scaleMax.
2) Scale the vaules to fall between -1 & 1 by
- divide every value by scaleMax
As an aside, please fix that sticky '?' key. One
question mark is enough.

Signature
Andrew Thompson
http://www.athompson.info/andrew/