473,378 Members | 1,555 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to build the 3D-graphic in VB .NET?

Hello. Inform, please, on what site it is possible to find materials on
construction of the three-dimensional graphic of function z=f(x,y) with the
help of Visual Basic .NET and GDI+?

Beforehand many thanks for your answer. Best regards, Dr. V.A. Zharkov.
Moscow, Russia.

Nov 20 '05 #1
12 16349
Dr Zharkov,

3D graphics is a large and complex subject. There are any number of ways to
perform what you ask - using GDI, Win32, DirectX, OpenGL (you see my point).
You need to read about matrix math and vector math because, unless you use
DirectX or OpenGL, GDI+ will only see what you throw at it in terms of x,
y - GDI is a 2D rendering library. But ultimately, all 3D graphics
libraries transform down to 2D after projection.

My recommendation is to using DirectX 9, which gives you a set of classes
and methods to help out with common 3D graphics operations. Of course, this
will require a lot of reading :p

"Dr. Zharkov" <va************@mtu-net.ru> wrote in message
news:Ou**************@TK2MSFTNGP10.phx.gbl...
Hello. Inform, please, on what site it is possible to find materials on
construction of the three-dimensional graphic of function z=f(x,y) with the help of Visual Basic .NET and GDI+?

Beforehand many thanks for your answer. Best regards, Dr. V.A. Zharkov.
Moscow, Russia.

Nov 20 '05 #2
Hi Robin,

Lol. I think Dr. Zharkov might know a little bit about maths! ;-))

Regards,
Fergus
Nov 20 '05 #3
I have no idea who Dr Zharkov is, only that the question perhaps required a
somewhat patronising answer! I haven't tried using D3D in .NET yet - but
either way, if one knows about mathematics, it won't be too difficult to
pick up the basics of 3D projection and transformation.

"Fergus Cooney" <fi******@tesco.net> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Robin,

Lol. I think Dr. Zharkov might know a little bit about maths! ;-))

Regards,
Fergus

Nov 20 '05 #4
Mr. Robin Tucker.
1. Thanks for your answer and recommendation.
2. On a site http://codeguru.earthweb.com/opengl/OG.html there is article
"Function graphics in 3D"of the Russian scientist Alexander Chernosvitov
about construction of the three-dimensional diagrams of functions with the
help of Visual C++ 6.0 and OpenGL. Mister Chernosvitov has issued in Russia
the book about construction of the three-dimensional diagrams of functions
with the help of Visual C++ .NET and OpenGL. In Russia and other countries
are issued the books with the theory and programs about construction on
building the 3D-graphics of functions with the help of Visual C++ 6.0 and
GDI.
3. Inform, please, to me about articles and books on building the 3D-graphic
of function z=f(x,y) with the help of Visual Basic .NET, Visual C# .NET or
Visual C++ .NET and GDI+.
Beforehand many thanks for your answer. Best regards, Dr. V.A. Zharkov.
Moscow, Russia.

Nov 20 '05 #5
Ok, you won't find a book on using GDI+ to perform 3D graphics. It just
isn't done that way. There are lots of books available on using DirectX.

There are many examples, here:

http://www.c-sharpcorner.com/Directx.asp

You can post questions/get answers from the forums here:

www.flipcode.com

www.gamedev.net

and of course, if you want to proceed with DirectX and C#, you will using
Managed DirectX. There are tutorials here for this:
http://staff.develop.com/candera/web...egraphics.html.
Basically, you are using Interop services to utilize the D3D COM interfaces.

If you are new to 3D graphics, the 3d graphics bible is of course
http://www.amazon.com/exec/obidos/tg...30557?v=glance,
by foley and van-dam. Perhaps not such a practical book, but provides
familiarity with all aspects of CG in use today.

There are many, many tutorials on the internet related to 3D graphics and I
have to admit I have found them to be more useful than most books. A google
search for "D3D C#" or "DirectX C#" will return many results.

Now finally, if you want to perform 3D graphics with GDI+, which is itself a
2D API, you need to write your own transformation methods. This will
involve the creation of a 3x3 or 4x4 matrix class, a vector/vertex class
and, well, basically, don't bother - you don't need to do this if you use
D3D.

The only thing I might ask is whether you already have knowledge of 3D
Computer Graphics. If not, some of the concepts involved in using D3D will
be difficult for a beginner. If you do, then I guess all you need to know
is how the interop works with D3D Com. Its fairly basic stuff.

I hope this is helpful.
"Dr. Zharkov" <va************@mtu-net.ru> wrote in message
news:O3**************@TK2MSFTNGP11.phx.gbl...
Mr. Robin Tucker.
1. Thanks for your answer and recommendation.
2. On a site http://codeguru.earthweb.com/opengl/OG.html there is article
"Function graphics in 3D"of the Russian scientist Alexander Chernosvitov
about construction of the three-dimensional diagrams of functions with the
help of Visual C++ 6.0 and OpenGL. Mister Chernosvitov has issued in Russia the book about construction of the three-dimensional diagrams of functions
with the help of Visual C++ .NET and OpenGL. In Russia and other countries
are issued the books with the theory and programs about construction on
building the 3D-graphics of functions with the help of Visual C++ 6.0 and
GDI.
3. Inform, please, to me about articles and books on building the 3D-graphic of function z=f(x,y) with the help of Visual Basic .NET, Visual C# .NET or
Visual C++ .NET and GDI+.
Beforehand many thanks for your answer. Best regards, Dr. V.A. Zharkov.
Moscow, Russia.

Nov 20 '05 #6
Oh, and I forgot to add the newsgroup for managed directx:

microsoft.public.win32.programmer.directx.managed
"Dr. Zharkov" <va************@mtu-net.ru> wrote in message
news:O3**************@TK2MSFTNGP11.phx.gbl...
Mr. Robin Tucker.
1. Thanks for your answer and recommendation.
2. On a site http://codeguru.earthweb.com/opengl/OG.html there is article
"Function graphics in 3D"of the Russian scientist Alexander Chernosvitov
about construction of the three-dimensional diagrams of functions with the
help of Visual C++ 6.0 and OpenGL. Mister Chernosvitov has issued in Russia the book about construction of the three-dimensional diagrams of functions
with the help of Visual C++ .NET and OpenGL. In Russia and other countries
are issued the books with the theory and programs about construction on
building the 3D-graphics of functions with the help of Visual C++ 6.0 and
GDI.
3. Inform, please, to me about articles and books on building the 3D-graphic of function z=f(x,y) with the help of Visual Basic .NET, Visual C# .NET or
Visual C++ .NET and GDI+.
Beforehand many thanks for your answer. Best regards, Dr. V.A. Zharkov.
Moscow, Russia.

Nov 20 '05 #7
Mr. Robin Tucker.
1. Thanks for a plenty of the references, but these references do not give
the answer to a question of the given theme: How to build the 3D-graphic in
VB .NET?
2. For building the 3D - graphics, I want to use only GDI+ and Visual Studio
..NET 2003 (without use DirectX).
3. In "amazon" are sold the two books on GDI+:
Symmonds N. GDI+ Programming in C# and VB .NET". APress, 2002. - 576 p.
Aitken P.G. .NET Graphics and Printing: A Comprehensive Tutorial and
Reference for Developers. Optimax Pub, 2003. - 576 p.
Both these publishing houses on the sites do not give the information on,
whether there is in these books a program for building the 3D - graphics.
If you have such information, whether inform, please, there is in these
books a program for building the 3D - graphics?

4. Inform, please, to me about articles and books with program for building
the 3D-graphics of function z=f(x,y) with the help of Visual Basic .NET,
Visual C# .NET or Visual C++ .NET and GDI+ (without use DirectX).

Beforehand many thanks for your answer. Best regards, Dr. V.A. Zharkov.
Moscow, Russia.

Nov 20 '05 #8
Ok Doc,

Heres the low down. What you are looking for is a "Software" rendering
engine. So you are looking for a general book on 3D computer graphics.
Here are a few things you might like to read-up on:

Vector Math
Matrix Math
Frustum Clipping
Backface Culling
Z Buffer
BSP Trees
Texture Mapping
Clip Planes

Dave Eberly is something of an expert on this. He posts on
comp.graphics.algorithms quite frequently, has written a few books and
releases his source code free of charge (its all C++).

http://www.magic-software.com/Books.html

What you are looking for is basic principles, from which you can of course
implement with whatever platform you desire - .NET or not. The only GDI+
functions you will use are drawing methods (clear window, draw line, draw
polygon/triangle). The rest you will have to implement yourself (matrix
transforms, perspective correction, frustum clipping, model representation).

So for example, with VB.NET, you will create a vector class:

public class Vector

public x, y, z As Double

' Some methods to operate on vectors

public function DotProduct ( Another As Vector ) as Double
return ( x * Vector.x + y * Vector.y + z * Vector.z )
end sub

public sub Normalize ()
Dim Length As Double = sqrt ( x * x + y* y + z * z )

if Length <> 0 then
x /= Length
y /= Length
z / = Length
end if
end sub

end class
As I say, you are looking for first principles - if you wish to use GDI+,
you will have to implement these yourself. You won't be able to perform
real-time texture mapping or z-buffering with GDI+, although you could
implement it yourself in software (it will be VERY slow however and you will
need to implement your own triangle scan convertor! This is a big job). A
few enthusiasts spend time writing and optimising their own software
rendering engines with advanced features (some of them are actually very
good), but 99.999% of people use either DirectX or OpenGL for real time
rendering. Of course, if you are talking about Ray Tracing, software
rendering is the way to go at present, but thats a different story
altogether!

"Dr. Zharkov" <va************@mtu-net.ru> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Mr. Robin Tucker.
1. Thanks for a plenty of the references, but these references do not give
the answer to a question of the given theme: How to build the 3D-graphic in VB .NET?
2. For building the 3D - graphics, I want to use only GDI+ and Visual Studio .NET 2003 (without use DirectX).
3. In "amazon" are sold the two books on GDI+:
Symmonds N. GDI+ Programming in C# and VB .NET". APress, 2002. - 576 p.
Aitken P.G. .NET Graphics and Printing: A Comprehensive Tutorial and
Reference for Developers. Optimax Pub, 2003. - 576 p.
Both these publishing houses on the sites do not give the information on,
whether there is in these books a program for building the 3D - graphics.
If you have such information, whether inform, please, there is in these
books a program for building the 3D - graphics?

4. Inform, please, to me about articles and books with program for building the 3D-graphics of function z=f(x,y) with the help of Visual Basic .NET,
Visual C# .NET or Visual C++ .NET and GDI+ (without use DirectX).

Beforehand many thanks for your answer. Best regards, Dr. V.A. Zharkov.
Moscow, Russia.

Nov 20 '05 #9
Mr. Robin Tucker.
1. Many thanks for your very valuable advice.
2. On a site http://www.magic-software.com/Books.html I have looked the
book, recommended you: Schneider P.J. and Eberly D.H. Geometric Tools for
Computer Graphics. Morgan Kaufmann, 2002. - 1056 p.
In this book are given the small slices of the program on a pseudo-code, and
the program of construction of 3D - graphics is absent.
3. In the previous answer you have written: "A few enthusiasts spend time
writing and optimizing their own software rendering engines with advanced
features (some of them are actually very good):"

How to find the programs of these enthusiasts on building the 3D - graphics
of function z=f (x, y) and only for Visual Studio .NET (without use DirectX,
OpenGL, MathCAD, MatLab, Maple and similar packages)?

Beforehand many thanks for your answer. Best regards, Dr. V.A. Zharkov.
Moscow, Russia.

Nov 20 '05 #10
No, most of these enthusiasts write in basic vanilla C++ and use x86
assembly to optimise their code. They are attempting to get high quality 3D
engines using the power of todays CPUs, without using the GPU.

You won't find a reference for 3D graphics with .NET period. Sorry to say
this. Only by using D3D or GL will you find a book for a beginner. As I
say, you will have to read-up on first principles and implement this in your
own way in whatever language you like (I started learning 3D graphics ages
ago with a book containing "Basic" and "Psuedo-Code" which I implemented in
Borland Turbo C++ 2.0! It was painfull but it worked.

However, I am going to have a go at getting a GDI+ basic 3D rendering engine
going sometime this week; just to demonstrate to you some of the principles
involved. If you are patient, I will post it to this thread.

Just out of curiosity, why do you not wish to use DirectX or OpenGL?

Good luck!
Robin

"Dr. Zharkov" <va************@mtu-net.ru> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
Mr. Robin Tucker.
1. Many thanks for your very valuable advice.
2. On a site http://www.magic-software.com/Books.html I have looked the
book, recommended you: Schneider P.J. and Eberly D.H. Geometric Tools for
Computer Graphics. Morgan Kaufmann, 2002. - 1056 p.
In this book are given the small slices of the program on a pseudo-code, and the program of construction of 3D - graphics is absent.
3. In the previous answer you have written: "A few enthusiasts spend time
writing and optimizing their own software rendering engines with advanced
features (some of them are actually very good):"

How to find the programs of these enthusiasts on building the 3D - graphics of function z=f (x, y) and only for Visual Studio .NET (without use DirectX, OpenGL, MathCAD, MatLab, Maple and similar packages)?

Beforehand many thanks for your answer. Best regards, Dr. V.A. Zharkov.
Moscow, Russia.

Nov 20 '05 #11
Mr. Robin Tucker.
1. Once again many thanks for your very valuable advices.
2. Willingly I answer on your question (Just out of curiosity, why do you
not wish to use DirectX or OpenGL?).
Both DirectX, and OpenGL is the another's closed program ("black box"),
which we can not change, and we can only apply in the limited limits. At me
on a table lay the two books with the programs on construction of a surface
z=f (x, y) in the dialog box of Visual C++ .NET with the help OpenGL (in my
previous letter I have given the reference to one of articles in the
Internet from the book). It is the very complex programs, and that in them
to understand, it is necessary to spend a lot of time for initial study
OpenGL. In the books are constructed beautiful color cubes and surface for
demonstration to the schoolboys. At the decision of my engineering task it
is necessary to present this surface from sheet metal as a grid of finite
elements, to define through a finite element method (FEM) of strains and
stresses in nodes of this surface after treatment of the tool and from nodes
to construct the diagrams of strains and stresses. To construct such
diagrams, it is necessary to spend very many more time for the profound
study OpenGL, and still it is not known, whether the limited opportunities
OpenGL will allow to construct the diagrams at a good engineering level.
Naturally there is a question, what for to spend a lot of time for study
another's and complex OpenGL, when the same time can be spent for
development of the open program in the advanced platform Visual Basic .NET
2003, that I and try to make with your kind help.
3. I will be very grateful to you, if you will send materials on "GDI+ basic
3D rendering engine".
4. If this thread unexpectedly will break, it is possible to you to address
directly, and if it is possible, to what email or with what site?
Beforehand many thanks for your answer. Best regards, Dr. V.A. Zharkov.
Moscow, Russia.

Nov 20 '05 #12
Ok, I think I'm starting to see where you are coming from here. Heres the
problem: you want your students to be able to code this graphics
assignment/s but you don't want them to have to learn a graphics API in
order to do so? There is no solution to this problem unless you develop
yourself a class handling the basics required in order to complete the
assignment and give it to them to fill in the details. I can only give you
suggestions on how to proceed here, because my time is limited! The
solution as I see it is to use an Excel spreadsheet and to use VB scripts in
Excel to modify a 3D graph object in the spreadsheet. Thus you will avoid
any/all consideration of 3D graphics and are able to concentrate on
representation of the data you are studying. If you want anything more
complex, I'm afraid the creation of a .NET GDI+ 3D graphics library usable
by your students will be the next step, but it will be time consuming and
limited in scope.

I imagine you will want a 3D "sheet" and that you will be modifying control
points on the sheet in the graph according to values returned from your
experiments. This is easily achieved in Excel - quite possibly without any
programming at all (create a 3D graph from data in Excel).
Contact me by email (remove caps)
r.*******************@thermoteknixSPAMIDONTWANT.co m
"Dr. Zharkov" <va************@mtu-net.ru> wrote in message
news:en**************@tk2msftngp13.phx.gbl...
Mr. Robin Tucker.
1. Once again many thanks for your very valuable advices.
2. Willingly I answer on your question (Just out of curiosity, why do you
not wish to use DirectX or OpenGL?).
Both DirectX, and OpenGL is the another's closed program ("black box"),
which we can not change, and we can only apply in the limited limits. At me on a table lay the two books with the programs on construction of a surface z=f (x, y) in the dialog box of Visual C++ .NET with the help OpenGL (in my previous letter I have given the reference to one of articles in the
Internet from the book). It is the very complex programs, and that in them
to understand, it is necessary to spend a lot of time for initial study
OpenGL. In the books are constructed beautiful color cubes and surface for
demonstration to the schoolboys. At the decision of my engineering task it
is necessary to present this surface from sheet metal as a grid of finite
elements, to define through a finite element method (FEM) of strains and
stresses in nodes of this surface after treatment of the tool and from nodes to construct the diagrams of strains and stresses. To construct such
diagrams, it is necessary to spend very many more time for the profound
study OpenGL, and still it is not known, whether the limited opportunities
OpenGL will allow to construct the diagrams at a good engineering level.
Naturally there is a question, what for to spend a lot of time for study
another's and complex OpenGL, when the same time can be spent for
development of the open program in the advanced platform Visual Basic .NET
2003, that I and try to make with your kind help.
3. I will be very grateful to you, if you will send materials on "GDI+ basic 3D rendering engine".
4. If this thread unexpectedly will break, it is possible to you to address directly, and if it is possible, to what email or with what site?
Beforehand many thanks for your answer. Best regards, Dr. V.A. Zharkov.
Moscow, Russia.

Nov 20 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: daniel4d2001 | last post by:
Hello I'm using VisualStudio.net 7.1. A simple hello world plugin using 2 Maya api headers (3d animation software). VS compiles a functional debug DLL just fine (found in debug folder) but when...
2
by: NM | last post by:
Hello all, I am supposed to do some mixed programming with c++ and fortran. I was succeeful in exchanging the 2D arrays from fortran to c++ and the other way, but was unable to that same with...
3
by: Dr. Zharkov | last post by:
Hello. Inform, please, how to find the programs on building the 3D-graphics of function z=f (x, y) and only for Visual Studio .NET: Visual C# .NET, Visual Basic .NET or Visual C++ .NET and GDI+...
0
by: Dr. Zharkov | last post by:
Hello. Inform, please, how to find the programs on building the 3D-graphics of function z=f (x, y) and only for Visual Studio .NET: Visual C++ .NET, Visual Basic .NET or Visual C# .NET and GDI+...
0
by: Dr. Zharkov | last post by:
Hello. Inform, please, how to find the programs on building the 3D-graphics of function z=f(x, y) and only for Visual Studio .NET: Visual Basic .NET, Visual C# .NET or Visual C++ .NET and GDI+...
12
by: Xah Lee | last post by:
Of Interest: Introduction to 3D Graphics Programing http://xahlee.org/3d/index.html Currently, this introduction introduces you to the graphics format of Mathematica, and two Java Applet...
4
by: Peter Webb | last post by:
I am writing some visualisation code for 4 dimensional geometric shapes. This is to run in the C# .NET XNA environment, so I am cross posting a maths and C# group. My software runs just fine for...
4
by: Jon Harrop | last post by:
I am writing a 3D graphing component built upon WPF and would like to have 2D vector graphics (e.g. typeset mathematics) as labels laid out from 3D coordinates. For example, a tick on an axis has a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.