Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

help 2d 2 3d

gopoogopoo Member Posts: 74
can anyone told me what is the best way to draw 3d object on 2d screen ?
it is very important for me?
i use borland c++.



Comments

  • gautamgautam Member Posts: 642
    Actually its not the compiler which is a problem, its how you think that can change the whole situation.

    Whether 2d or 3d, you will still only have the 2d environment. Two ways to do it, isometry or make use opengl/direct3d stuff directly which does all the calclutation of perspective etc for you.

    I suggest the opengl/direct3d stuff.

  • SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
    : Actually its not the compiler which is a problem, its how you think that can change the whole situation.
    :
    : Whether 2d or 3d, you will still only have the 2d environment. Two ways to do it, isometry or make use opengl/direct3d stuff directly which does all the calclutation of perspective etc for you.
    :
    : I suggest the opengl/direct3d stuff.
    :
    Yeah! Go OpenGL!! I ahd spent a month toying with D3D and gotten nowhere when I was directed to an OpenGL site. In less then thirty minutes I had created some basic 3D objects, rotated, zoomed, colored, even blended them. In just under four hours I had a 3D engine working. I recomend OpenGL to anybody who wants to get started in 3D accelerated graphics programing. OpenGL also blends and looks better than D3D, but is slightly more GPU/CPU intensive.

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]


  • programmeurkeprogrammeurke Member Posts: 19
    if those others weren't the answer to your question, maybe this is:
    x_screen = half_of_the_screen + x_coordinate * SCALE / z_coordinate
    so the x-coordinate is the half of the screen (so you draw to the center and the center is (0,0,0))
    +
    the coordinate of your X * SCALE (a DEFINEd number, like 256) / the coordinate of your Z
    [green][b][size=5]P[/size][size=4]ro[/size][size=3]g[/size][size=2]r[/size][size=1]amm[/size][size=2]e[/size][size=3]u[/size][size=4]rk[/size][size=5]e[/size][/b][/green]

Sign In or Register to comment.