Thierry, Most of what you want to do can be done using vector math.
Take a ray from the eye, through the imageplate (probably at the corners). Then normalize and scale this vector to get the final point in the virtual world. You really need to only do this calculation 3 times to define the plane, or do it 4 times to just get all 4 corners. I would recommend that you checkout Mathworld: http://mathworld.wolfram.com/. There are plenty of good vector equations on there. -mike -----Original Message----- From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED] On Behalf Of Thierry Milard Sent: Friday, August 06, 2004 6:51 AM To: [EMAIL PROTECTED] Subject: [JAVA3D] A simple function that gives 4 points in front of the camera. If someone can help me. Thanks in advance... Just a block of code or an internet link to one could save my day.... Thierry; Paris Suppose I have a 3d scenery working fine. My camera is well known(fov,..), Now ,sometimes I would like to store (for any places and orientation of the camera) 4 points that are equally away from the camera, and perpendiculat to it. I think you all call this a "clipping plane". I would like to write a function that input and output like this: input : - the center of a camera point3d - The orientation of the "glance" (where is this bloody camera looking ? I think Vector3d for [direction axe X, dir axe y, dir axe z] - The fov angle of the camera. - The distance from the pinhole camera center to the clipping plane dist_Cam_Plane output: - 4 points |4 point3d]; Each point3d is one corner of the clipping plane. -------Message original------- De : Discussion list for Java 3D API <mailto:[EMAIL PROTECTED]> Date : 08/05/04 22:29:30 A : [EMAIL PROTECTED] Sujet : Re: [JAVA3D] How to draw lines that are always on top of Canvas3D Esoteric discussion follows. You have been warned! As with many things in Java3D, because the eyepoint is usually fixed, several approaches can have the same effect on a 2D screen. For those of us using Java3D in real 3D (VR) these differences are the real kicker for application portability. The ViewingPlatform in our CAVE located at the front screen, but that's just our choice. As far as I can see (though I may be wrong), attaching the geometry to the camera will have the lines move with the head tracking, but attaching to the PlatformGeometry will make the lines always appear in the same physical place in the VR space (for us, somewhere past the apparent location of the front screen). The ConfiguredUniverse file example in the Java3D-enabled CAVE whitepaper somewhat explains how the View and the "camera" (equivalent to the head tracker device location) differ: // ConfiguredUniverse uses a default view attach policy of NOMINAL_SCREEN, // so the origin of the view platform in coexistence coordinates will be // mapped to wherever we place this point. If head tracking is not enabled, // then the positions of the eyes in coexistence coordinates are also // defined relative to this point. The X, Y, and Z directions of the view // platform are always aligned with that of coexistence coordinates. Does anybody know what exactly is the difference between PlatformGeometry and custom geometry add to the same node that also holds the camera (just slightly displaced of course to meet the near clip plane)? I used the latter and it worked fine. Another option is to set your geometry into you PlatformGeometry. So it will move alongside your câmera. Nice for HUD. See the java3d demo at: ${JAVA_HOME}/demo/java3d/PlatformGeometry/SimpleGeometry.java =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help". ________________________________________________________________ <http://www.incredimail.com/redir.asp?ad_id=312&lang=12> IncrediMail - La messagerie électronique a enfin évolué - Cliquer ici <http://www.incredimail.com/redir.asp?ad_id=312&lang=12> =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".