how to use gdi or gdi+ draw a cube and rotate it ?

Started by
7 comments, last by math3d 17 years, 6 months ago
--------------begin hi---------------- how to use gdi or gdi+ draw a cube and rotate it ? who can help me ? i hope use 3d math class. who can give some help .write a simple demo? --------------e n d hi---------------- only use gdi or gdi+ please help me.thanks very very much.
Advertisement
this might help: http://www.kirupa.com/developer/actionscript/rotation_center.htm
thanks,but i don't like flash.
i hope use c or c++ and gdi or gdi+
I realize that, however you could probally adapt the math and formulas to c++...
If you are gonne be satisfied with orthogonal view and wireframe filling then you simply have to calculate rotation matrice and multiply it with the position vectors of your vertices, and ignore the Z value to draw on your canvas :) "3d Transformation matrices" would be a good start for searching.
if anybody give me a simple demo example,it is best.i wanna very very thanks.
i'm a newbie.please give me some help.thanks a lot.
Hi. I found the following link, which contains C# code using GDC+ to draw a 3D cube. I make no promises that the code is good. No, it is not C++, but hopefully you can adapt it yourself.

Rotating a 3D Cube and Sphere with GDI+

Now...although I've provided a link to someone's example code, I do highly recommend that you go an learn about 3D projection matrices, and the 3D graphics pipeline yourself. If you hope to do any serious 3D programming, you will need to truly understand the underlying math and geometry.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
Having someone hand you a solution is not the best way to learn. Providing you with an "example" that you can directly use in your project without truely understanding it, will do you nothing.

All this would show is that you have the abillity to steal other peoples work.

Learn how to do things yourself, it is the only way that you will learn!
thanks you all,you are right,i will try my best to lean .
thanks again. i see.

This topic is closed to new replies.

Advertisement