This is a general graphics question but there really is a J3D aspect to it: Namely how does _JAVA3D_ convert the point??? This is something I'm investigating right now. Here is what I've come up with, take it with a grain of salt as I'm still working out the code. I'm eager to hear other people's responses, as I'm unsure of the sublteties myself. Anyway, here's what I do:
- take the (x,y,z) point, transform it to (x',y',z') by the view and projection matrices (if in compatibility mode, this is easy, if not, well I'm working on that) - find the point of intersection between the line L and the plane P, where L is formed between (x',y',z') and (0,0,0), and P is the plane z -1 - calculate the image plate dimensions - if that point of intersection is in the image plate, it should appear on your screen. Convert the line/plane intersection to screen coordinates with(0,0) in upper left corner. (I use java's AffineTransform) I have code to do all this but my results are slightly off. I have a point that is rendered by J3D on the edge of the screen but by my calculations should be about 6 pixels below the edge therefore not rendered. There's a subtlety here that I'm missing. I think J3D does an additional small transform, but I have no way of knowing other than that my math and code are triple-checked but my results are still different from J3D's. Anybody else have some thoughts? -----Original Message----- From: Dola Woolfe [mailto:[EMAIL PROTECTED] Sent: Sunday, June 15, 2003 3:08 AM To: [EMAIL PROTECTED] Subject: [JAVA3D] projection coordinates Hi, Can I find the (i, j) coordinates on the screen of a point with (x, y, z) coordinates in real space? Thanks! Dola __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com =========================================================================== 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".
