Points to intervale [-1,1]
3 Message(s) by 2 Author(s) originally posted in 3d java
| From: Misterysword |
Date: Sunday, April 08, 2007
|
Hi!! I have got
point s 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!
| From: Tim Hemig |
Date: Tuesday, April 10, 2007
|
wrote in message:
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] ????
I think you've to figure out, what dimensions your points have, so what is
your maximum in each dimension. After that you can normalize (word
correct?) the point into the intervall of [-1,1] where 1 (-1) is the
relative maximum.
depends also on the position of your figure. if it should be shown in center
with best fit, you can take the one biggest absolute value of x,y or z and
divide all coordinates with that scalar.
Greetings
Tim
| From: Misterysword |
Date: Thursday, April 12, 2007
|
thanks you!
Next Message: any help