Re: [JAVA3D] Curve Fitting

2003-09-11 Thread Tolga Can
I have used Java AppLib package for a similar purpose. Here is the link: http://www.sscc.ru/matso/rozhenko/applib/ -tolga > > > Hello All, > I have a 3 dimensional curve which is > effectively a collection of straight lines. I want to fit a 3d spline on > this(I w

[JAVA3D] Curve Fitting

2003-09-11 Thread Shyam Prakash
Hello All,     I have a 3 dimensional curve which is effectively a collection of straight lines. I want to fit a 3d spline on this(I want to create a smooth curve). Does anybody know where to find a curve fitting algorithm for this? Any suggestions will be of great help

[JAVA3D] lighting effects bleeding through

2003-09-11 Thread Glenn Pinkerton
Hello everyone, My apologies for the previous post. The problem was purely pilot error. I had put the lighting into each BranchGroup object (for each surface) and therefore the total intensity of the light source was being changed as surfaces were added and removed. Putting the lighting into a B

[JAVA3D] lighting effects bleeding through to other surfaces

2003-09-11 Thread Glenn Pinkerton
Hello, I am drawing several surfaces which are offset from each other in the y direction. The surfaces represent layers in the earth, and they do have relief on them. All surfaces use the same material properties and all surfaces are illuminated by the same directional lighting, which comes from

Re: [JAVA3D] Antwort: Re: [JAVA3D] AW: [JAVA3D] Determining the triangles lying on a plane

2003-09-11 Thread N. Vaidya
If P is any point on your plane, n is the plane normal, and V_i is the ith vertex of your candidate triangle, then if (V_i - P) . n = 0 for all i, then your triangle lies on that plane. The point P fixes your reference plane from among the infinite parallel planes that all have the same normal n.

Re: [JAVA3D] Antwort: Re: [JAVA3D] Antwort: Re: [JAVA3D] AW: [JAVA3D] Determining the triangles lying on a plane

2003-09-11 Thread Shyam Prakash
Thanks. It sounds feasible.   --Shyam   -Original Message- From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED] On Behalf Of George Perera Sent: Thursday, September 11, 2003 6:23 PM To: [EMAIL PROTECTED] Subject: [JAVA3D] Antwort: Re: [JAVA3D] Antwort: Re: [JAVA3D] AW

[JAVA3D] Antwort: Re: [JAVA3D] Antwort: Re: [JAVA3D] AW: [JAVA3D] Determining the triangles lying on a plane

2003-09-11 Thread George Perera
Hello Shyam ! Thanks for your remarks. To vercome this problem check in addition to the "angle" test,  whether  (at least ) one point of the triangle lies on or very close to the reference plane. Regards, George --

Re: [JAVA3D] Working whit byte problem

2003-09-11 Thread Auguste Genovesio
right Rob Nugent wrote: It doesn't seem to be necessary to use the cast in the last of these. E.G. the following works: byte b = -10; int i = b & 0xff; System.out.println(i); I'm guessing because the bit-operations work on and return ints. Rob Auguste Genovesio wrote

Re: [JAVA3D] Working whit byte problem

2003-09-11 Thread Rob Nugent
It doesn't seem to be necessary to use the cast in the last of these. E.G. the following works: byte b = -10; int i = b & 0xff; System.out.println(i); I'm guessing because the bit-operations work on and return ints. Rob Auguste Genovesio wrote: int i byte b b = (byte) i;

Re: [JAVA3D] Working whit byte problem

2003-09-11 Thread Auguste Genovesio
int i byte b b = (byte) i; // convert int to byte i = (int) b; // convert byte to int, b=-10-> int = -10 i = (int) (b & 0xff) // unsigne b and convert it to int , b=-10 -> int = 245 ok ? hterrolle wrote: I think i find my way using the ByteArrayOutputStream.class. it

Re: [JAVA3D] Working whit byte problem

2003-09-11 Thread hterrolle
I think i find my way using the ByteArrayOutputStream.class. it look fine working with byte thanks -Message d'origine- De : Auguste Genovesio <[EMAIL PROTECTED]> Ŕ : [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date : jeudi 11 septembre 2003 12:24 Objet : Re: [JAVA3D] Working whit byte problem

Re: [JAVA3D] Working whit byte problem

2003-09-11 Thread hterrolle
thanks do you know how to transform int to byte and byte to int. -Message d'origine- De : Auguste Genovesio <[EMAIL PROTECTED]> Ŕ : [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date : jeudi 11 septembre 2003 12:24 Objet : Re: [JAVA3D] Working whit byte problem >Hi, > >The answer to your problem

Re: [JAVA3D] Antwort: Re: [JAVA3D] AW: [JAVA3D] Determining the triangles lying on a plane

2003-09-11 Thread Shyam Prakash
George,     I believe this alone is not sufficient, there is one more catch. Consider two triangle parallel to each other but lying on two different planes(say with different z- depth). The below said algorithm will fail in this case since the angle between these triangles will be

[JAVA3D] Antwort: Re: [JAVA3D] AW: [JAVA3D] Determining the triangles lying on a plane

2003-09-11 Thread George Perera
Hello Shyam ! you could calculate the angle between the normal to the triangles in question ( one at a time of course) and the normal to your reference plain. If this angle is within the tolerance you set then the triangles are on the "same" plane. regards, George --

Re: [JAVA3D] Working whit byte problem

2003-09-11 Thread "Schäfer, Peter"
  java.lang.System.arraycopy()    is similar to memcpy() java.util.Arrays    contains more Utilities   to concatenate arrays, you have to allocate a new one and copy the contents; just like in C. -Original Message-From: hterrolle [mailto:[EMAIL PROTE

Re: [JAVA3D] Working whit byte problem

2003-09-11 Thread Auguste Genovesio
Hi, The answer to your problem is probably the native static method System.arraycopy() hterrolle wrote: Hi, I know it is not the best place to ask this. But i do not know any other were people answer. I got a problem working with byte type in JAVA. i am use to C. So i like to crete a struc

[JAVA3D] Working whit byte problem

2003-09-11 Thread hterrolle
Hi,   I know it is not the best place to ask this. But i do not know any other were people answer. I got a problem working with byte type in JAVA. i am use to C.   So i like to crete a struc             byte toto                     byte[]  size    = new byte[10];                     byte

Re: [JAVA3D] AW: [JAVA3D] Determining the triangles lying on a plane

2003-09-11 Thread Shyam Prakash
Florin,     As I said, I want to select the triangles that may not lie exactly on a plane but with some tolerance. I don’t know how to relate this problem with Java 3d as I am using this algorithm with a different 3d rendering library(VTK).   Thanks Shyam   -Original Mess

Re: [JAVA3D] Determining the triangles lying on a plane

2003-09-11 Thread Shyam Prakash
Dirk,     Yes you are right that the triangles are rotated in the same plane and not in space. However I am using this algorithm not with Java 3d but another 3d rendering library(VTK). So I am not sure if my code sample will really help you understand the problem.     I

[JAVA3D] AW: [JAVA3D] Determining the triangles lying on a plane

2003-09-11 Thread Florin Herinean
If the angle between the normals of the triangles are not 0 or PI, then the triangles can NEVER be in the same plane. I really don't understand what you want to do !   Cheers,   Florin -Ursprüngliche Nachricht-Von: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED]Im Auft

Re: [JAVA3D] Determining the triangles lying on a plane

2003-09-11 Thread Dirk L. van Krimpen
  Hi Shyam,   I suppose the triangles you want are only rotated in the same plane. So, not rotated in space (otherwise, they would not longer lie in that plane). If that's true you have to build in an extra check to determine which plane it is. For example, if the other plane has a different z-d