Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SIMPLE 3D rendering in C#

Tags:

c#

3d

I am a visual person, if I can visualize something it often makes more sense to me.

Is there a simple way to render data in 3D to use for simple visualizations? What I effectively would like to do is the following:

I have a 3 dimensional Array of Int32's:

Int32[,,] data = new Int32[256,256,256];

I fill this array with data, and would basically want to now render this in a 3D space. X, Y and Z and place a dot where the data is greater than 0. Basic

Being able to change the viewing angle would be a bonus, but not essential.

I have not looked into 3D rendering enough to make use of any of the real 3D engines out there, so the simpler the better.

Any help, pointers would be nice.

Thanks

like image 990
Gineer Avatar asked Nov 30 '09 13:11

Gineer


2 Answers

WPF (Windows Presentation Foundation, included in .net 3.5) makes 3D rendering quite easy (or at least easier than it was before). Have a look at the following tutorial:

http://www.kindohm.com/technical/WPF3DTutorial.htm -- original link is dead, but the article can still be found at archive.org, http://web.archive.org/web/20131122141342/http://kindohm.com/technical/WPF3DTutorial.htm

It shows how to create a small 3D viewport and position simple elements inside.

like image 58
Heinzi Avatar answered Oct 01 '22 17:10

Heinzi


Microsoft .Net Chart Control - download here. It's like using the 3D charting in Excel.

like image 27
Ankur Goel Avatar answered Oct 01 '22 16:10

Ankur Goel