Click to See Complete Forum and Search --> : what is the best way to use GDI


Stepan Hlava
March 31st, 1999, 03:44 AM
I made my program in C++ Builder 3 ,It can move human body ,it is for our dance group ,All is ok ,I use 3D view ,but only by lines ,I want to put on this lines colored polygons or textured polygons around each piece of the body.it makes about 100 polygons for one body.if I use 10 or 15 bodies it makes 1500 polygons.

what can i use for transforming from 3D to 2D(screen) in my program.

I'm using >>>

X=-Jx*cos(alfa)*Xb+Jy*cos(beta)*Yb

Y=-Jx*sin(alfa)*Xb-Jy*sin(beta)*Yb+Jz*Zb


>>

X -> X axis on screen

Y -> Y axis on screen

Jx,Jy,Jz - zoom X,Y,Z

Xb -> 3d points X axis

Yb -> 3d points Y axis

Zb -> 3d points Z axis


is it posible find simplier function for this?

Remek Zajac
March 31st, 1999, 07:12 AM
I think explaining this on the Board might be useless, since everyone

can find this book:

"Introduction To Computer Graphics"

J.D.Foley, A.van Dam, S.J.Feiner, J.F.Hughes, R.L.Philips

Addison-Wesley Publishing Co. Inc. 1994,1990

And lots of local reeditions (Poland has one, So Czech Rep. should do aswell). This is sort of a bible.

You'll find the most generic and fast solutions there.

Chapter 6.


good luck

Rem

Stepan Hlava
April 1st, 1999, 12:24 AM
HMMMM , Thanks


but I wrote it there cause I want to know it by this way , I have a book with this problems , but i want to know if is there better way how can I display the object in 3D to Screen

Tom Puverle
June 2nd, 2001, 09:04 AM
Just a few things:

1) The GDI is painfully slow for graphics. Use a graphics API like DX or OGL.

2) Your formula is not a proper projection. It's "fake" 3D.

Tom