.NET Framework - How to draw a 3D chart

Asked By Haipin on 13-Aug-07 04:56 PM
Hello,

We have a 3D chart that created in CsGL(it is built on top of the OpGL). We
are recreate it use .Net graphics component. We create point with x, y and
coordinates and call GL.glVertex3fv(points). How can I do the similar thing
using System.Draw.Graphics? All of the draw function in Graphics are only for
2D. Non of them takes Z coordinate.

Thanks for any information,




Kevin Spencer replied on 14-Aug-07 08:02 AM
Use Microsoft Managed DirectX 9 or Microsoft XNA.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
Haipin replied on 15-Aug-07 12:44 AM
Thank you Kevin.

If I could find a way to let the 3D (it is really a 2D but look like 3D)
rotate on its Y axis I don't need  use Microsoft Managed DirectX 9 or
Microsoft XNA.

In order to run the application tha is created by using Microsoft Managed
DirectX 9 or Microsoft XNA the cleit has to install Microsoft Managed DirectX
9 or Microsoft XNA?

Is there a free version of XNA?
Haiping
Kevin Spencer replied on 15-Aug-07 09:17 AM
Hi Haiping,

Microsoft DirectX is supported by recent versions of Windows. Managed
DirectX requires the .Net platform, just like any other .Net software.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
Haipin replied on 15-Aug-07 10:22 AM
If we use DirectX 9 in our Library we have to buy it or can use the free
version? I do not see there is any free version of XNA.

Thank you,
Kevin Spencer replied on 15-Aug-07 01:59 PM
DirectX9 is already installed, but you can ensure that the latest version is
installed by adding the DirectX redistributable to your app. See
http://www.microsoft.com/downloads/details.aspx?FamilyID=cb7397f3-0949-487b-9247-8fee451bf952&DisplayLang=en
to get it.

XNA requires the .Net Platform 2.0, which is likely to be installed, but the
Framework can also be installed from the redistributable
(http://msdn2.microsoft.com/en-us/netframework/aa731542.aspx). There is also
a free XNA Framework redistributable:
http://www.microsoft.com/downloads/details.aspx?FamilyId=A7DA4763-6807-4BD5-8D18-18C60C437F93&displaylang=en.

You would need XNA Game Studio Express to create XNA, but that is free also.
You can find it, and any other XNA or DirectX information you need at
http://msdn2.microsoft.com/en-us/xna/default.aspx

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
Haipin replied on 15-Aug-07 02:30 PM
I just checked my computer. I do not have DirectX 9. I only have DirectX 8 For
Visual Basic Type Library.

We are using  .Net Platform 2.0.

Thank you for the info.
Haiping
Haipin replied on 15-Aug-07 04:24 PM
Hi Kevin,

I am going to give XNA a try. I installed XNA. But I could not instll the
xnagse_setup.mis, I believe this is XNA Game studio Express. It asks me to
Install the Visual C# 2005 Express Edition SP 1. But I cannot install the
SP1. The window INstaller says "The upgrade patch cannnot be installed by the
Windows installer service because the program to be usgraded may be missing,
or the updrade patch may update a different version of the program. ...". I
don't understand this error. I user VS 2005.

Thank you,
Kevin Spencer replied on 16-Aug-07 08:43 AM
Hi Haiping,

You need to read the instructions better! Note that Visual C# 2005 Express
Edition is required for XNA Game Studio Express. It is also free, and there
is a link to download it on the page references I gave you. It will run
alongside Visual Studio 2005 without any problems. I know, because I have
both on my machines.

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
Haipin replied on 16-Aug-07 08:45 PM
I wish I can just update my previous message. The previous error caused by
that  I don't have C# 2005 Express on my computer. I cannot install the
Visual C# 2005 Express. It  conplains about BIT setting. I checkec it. It is
right.  It is started and the type is manual.
Haipin replied on 16-Aug-07 08:51 PM
Yes, you are right. I installed every thing on my home computer. they work
fine.
Thank you,