| | |
3d cube + c#.net
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Feb 2008
Posts: 5
Reputation:
Solved Threads: 0
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
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
•
•
Join Date: Aug 2008
Posts: 1,735
Reputation:
Solved Threads: 186
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.
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.
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
You can also use DirectX SDK
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
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.
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.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Make love, no war. Cave ab homine unius libri.
Danny
•
•
Join Date: Jul 2008
Posts: 49
Reputation:
Solved Threads: 7
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.
![]() |
Similar Threads
- Access to AS2005 Cube with C# (C#)
- How do I place images on a rotating divided cube using Javascript? (JavaScript / DHTML / AJAX)
- Super slow computer PLEASE HELP (Viruses, Spyware and other Nasties)
- Yet another blown monitor (Monitors, Displays and Video Cards)
- KDS Monitor-Degaussing problem (Monitors, Displays and Video Cards)
- Copy Files and Folders to CDs (Windows tips 'n' tweaks)
- How to open ports in Panther (OS X)
Other Threads in the C# Forum
- Previous Thread: Help regarding versioning
- Next Thread: output based on serial port input
| Thread Tools | Search this Thread |
.net access ado.net algorithm alignment array barchart bitmap box broadcast buttons c# c#gridviewcolumn check checkbox client color combobox communication control conversion csharp custom database datagrid datagridview dataset datetime degrees development draganddrop drawing elevated encryption enum event excel file focus forloop form format forms function gdi+ hospitalmanagementsystem httpwebrequest image index input install java label list listbox login mandelbrot math mouseclick mysql operator path photoshop picturebox pixelinversion plotting pointer post programming radians read regex remote remoting richtextbox serialization server sleep socket sql statistics stream string stringformatting sun table text textbox thread time timer update usercontrol validation visualstudio webbrowser windows winforms wpf xml






