Finding 2d coordinates of 3d points

Advanced game related topics
paulr
User
User
Posts: 70
Joined: Sat Sep 27, 2003 2:53 pm

Finding 2d coordinates of 3d points

Post by paulr »

Hi,

Is there any way of getting the 2d screen coordinates of a 3d world point?

It would need to take into account the camera angle, position, and field of vision, so could be tricky.

Cheers,
Paul
LarsG
Enthusiast
Enthusiast
Posts: 713
Joined: Mon Jun 02, 2003 1:06 pm
Location: Norway
Contact:

Post by LarsG »

some links..:
(oh.. btw: I just googled..)

- old qbasic one.. the basic setup
http://qbasicnews.com/tutorials/tutor8.txt

- a little tutorial
http://www.devmaster.net/articles/softw ... /part1.php

- some nice resources:
http://www.extremetech.com/resource_cen ... 178,00.asp

- one of which is this article:
http://www.geocities.com/SiliconValley/2151/math3d.html

- don't know if this will help you but:
http://www.fastgraph.com/tutorial/appendix1.html

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
paulr
User
User
Posts: 70
Joined: Sat Sep 27, 2003 2:53 pm

Post by paulr »

Sorry, I didn't explain myself very well... the sites you mentioned are all about the maths of projecting 3D points onto the screen. I was hoping for something integrated with the DirectX rendering commands, so that you could give it a 3D point, and get back it's position on the screen, taking nto account all the camera position and orientation variables that the rendering engine is currently using.

So for example, you could draw a 2D targetting box around a spaceship as it flies around in 3D space, for a head-up display. You get me?

Cheers anyway,

Paul
Post Reply