C# GDI+ 3D sphere with texture

EFileTahi-A

Contributor
Joined
Aug 8, 2004
Location
Portugal / Barreiro
I would like to implement a 3D sphere to play an animated rotating planet for my game but using GDI+ ONLY. Since my math skills are next to zero, I definitely need to see an example. The problem is that I can't find any on the web.

Is this too hard to be done with a texture? What about a an opaque wireframe version divided with vertical and horizontal circular lines?
 

snarfblam

Ultimate Contributor
Joined
Jun 10, 2003
Location
USA
GDI+ lacks the ability to distort images the way you would need to in order to draw textured 3D graphics with perspective. The wire-frame probably wouldn't be too difficult if you know the mathematics involved. You could either precalculate the vertices and rotate them using a matrix or calculate the rotated vertices on the fly. Then it's just a matter of connecting the dots.

So how do you calculate the vertices? I don't know. I could sit down and work it out, but it would probably be simpler to find somebody who already knows, and who can give you an optimal solution.
 
Top Bottom