Results 1 to 6 of 6

Thread: 3d

  1. #1

    Thread Starter
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755

    Unhappy 3d

    Hi!

    i've asked this before:

    how do i draw a 3d dot on a 2d screen?

    i know camera position and angles and i know the dots position.

    how do i calc where this dot should be plotted?
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

  2. #2
    Lively Member neodatatype's Avatar
    Join Date
    Aug 2002
    Location
    Italy
    Posts
    103

    Re: 3d

    how do i draw a 3d dot on a 2d screen?

    i know camera position and angles and i know the dots position.

    how do i calc where this dot should be plotted?
    I asked for this in other 3D-expert-places and the simplest way to do this is to use these equations:

    Code:
    Xscreen = (X3d * D) / (Z3d + D) + Xcenter
    Yscreen = (Y3d  * D) /( Z3d + D) + Ycenter
    Where D, choosen by you, is the distance between the center of the projection and the viewer.

    Xcenter and YCenter is the center of the screen, where Xcenter is 160 and Ycenter is 100 if you are 320*200 resolution, etc.

    Bye

    P.S.: I don't work with 3D, I just had this infos
    > NeoDataType.net <

    Try my Free .Net Reporting Tool!

  3. #3

    Thread Starter
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    thanks, but i've allready tried this. the problem here is that i dont have the camera angles in the equations...
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

  4. #4
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111

  5. #5

    Thread Starter
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    thanks! i think that'll help me alot!
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

  6. #6

    Thread Starter
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    yeah! i've got all i need

    thanks alot DiGiTaIErRoR
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width