943,643 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 6913
  • C# RSS
Dec 31st, 2008
0

3d cube + c#.net

Expand Post »
Hello,

I am creating a windows application to draw 3d cubes. I am preferring to give all the details of the cube in the code itself i.e. dimensions, colour etc.. Suppose there will be two cubes, say with different dimensions and we provide the details with the manner that is mentioned above. This cube will appear whenever I click on the specified button.

I have gone through OPENGL framework to draw this. I could have used that if it would be free to use. However, I searched through web, but unfortunately there are very few information available regarding drawing cube in C#.net.

Any one please provide me a link or some idea about how to draw the cube.


Thanks,
Rajesh
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rajeshswain is offline Offline
5 posts
since Feb 2008
Dec 31st, 2008
0

Re: 3d cube + c#.net

openGL is freee to use, there is no runtime or development costs that Im aware of. You could also look at XNA which while aimed at gaiming is also a framework for drawing like that.

However, drawing a 3d cube in c# in general would be the same as asking how to draw it on paper, its the same for any language, you need the maths to work out the angles, lengths etc.
Reputation Points: 196
Solved Threads: 190
Posting Virtuoso
LizR is offline Offline
1,735 posts
since Aug 2008
Dec 31st, 2008
0

Re: 3d cube + c#.net

You can also use DirectX SDK
Featured Poster
Reputation Points: 480
Solved Threads: 276
Postaholic
Ramy Mahrous is offline Offline
2,189 posts
since Aug 2006
Dec 31st, 2008
0

Re: 3d cube + c#.net

3D is a world of it's own.
I suggest first reading "3D programming for windows" from Charles Petzold.
Learn about the math needed(quaternions ! fun!)
Learn about projections, light, shade, viewports, rotation etc.
Mostly with XAML code but also C# code.
Very good book.
Reputation Points: 2023
Solved Threads: 644
Senior Poster
ddanbe is offline Offline
3,736 posts
since Oct 2008
Dec 31st, 2008
0

Re: 3d cube + c#.net

Yha ,, 3D programming for windows " is kinda good
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Secret- is offline Offline
18 posts
since Dec 2008
Jan 1st, 2009
0

Re: 3d cube + c#.net

Draw the cube on a piece of paper. Determine x,y,z for each vertex and write them all down. Then using open GL create your viewing volume and using triangles or another primitive shape map your points in clock-wise direction. This will require some knowledge about OpenGL. You can do all of this with XNA in about 10 lines of code.
Reputation Points: 31
Solved Threads: 7
Light Poster
iDeveloper is offline Offline
49 posts
since Jul 2008
Mar 25th, 2010
0

Need help with Directx

You can also use DirectX SDK
can you help me i need to draw a cube and sphere with directx
Reputation Points: 10
Solved Threads: 0
Newbie Poster
superbokey is offline Offline
2 posts
since Mar 2010
Mar 25th, 2010
-1

Need help with Directx

You can also use DirectX SDK
i'm using C# 2008 with directx9
Reputation Points: 10
Solved Threads: 0
Newbie Poster
superbokey is offline Offline
2 posts
since Mar 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: Adding Functionality like run
Next Thread in C# Forum Timeline: bit reverse an integer





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC