 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Sun Apr 08, 2007 10:47 pm Post subject: Points to intervale [-1,1] |
|
|
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! |
|
| Back to top |
|
 |
Tim Hemig Guest
|
Posted: Tue Apr 10, 2007 8:08 pm Post subject: Re: Points to intervale [-1,1] |
|
|
Misterysword (AT) hotmail (DOT) com wrote:
| Quote: | 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 have 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 |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Apr 12, 2007 3:56 pm Post subject: Re: Points to intervale [-1,1] |
|
|
thanks you! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|