473,513 Members | 2,552 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Xah's Edu Corner: Introduction to 3D Graphics Programing

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 utilities that allows you to view them
with live rotation in a web browser. Also, it includes a introductory
tutorial to POV-Ray.

Once you understand any one of these pages, you can use your favorite
programing language to start doing 3D Graphics Programing.

In the coming months, i will also introduce the .obj format that are
used by many geometric modeling programs. And, a tutorial on how to use
Python (or Perl, lisp) to do 3D Graphics programing, by setting up
functions that spits out any of 3D-Geometry Formats (such as
Mathematica Graphics or POV-Ray or .inc).

These are the imminent plans for the coming weeks. Other potential
subjects are introduction or tutorials on various utilities or
programing lang libraries that does conversion between different 3D
graphics formats, dedicated tutorial on how to generate mathematical
surfaces, more elaborate study on POV-Ray's abilities and sample cases,
etc.

The focus of these pages, will be 3D-Graphics programing with the goal
of Algorithmic Mathematical Art.
(see
http://xahlee.org/Periodic_dosage_di...aci_larcu.html )

In particular, we focus on creating geometric objects and their
arrangement that are esthetic in a mathematical way. (for example,
regular tilings in 3D, nested structures in 3D, symmetric structures in
3D, elaborate 3D maze tunnels, beehive sculpting, regular polyhedrons
and their decorations, projection and slices of higher dimensional
symmetries, 3D-manifolds ... etc.) This mathematical esthetic is
opposed to, for example, rendering techniques or technologies (e.g.
fogs, sceneries, fast algorithms...etc) that are quite common in
computer graphics literatures.

Xah
xa*@xahlee.org
http://xahlee.org/

Dec 23 '06 #1
12 3568
Xah Lee wrote:
Of Interest:
to which of comp.lang.perl.misc, comp.lang.python, comp.lang.lisp,
comp.lang.java.programmer, comp.lang.functional ?
Dec 23 '06 #2
Xah Lee wrote:
Introduction to 3D Graphics Programing
http://xahlee.org/3d/index.html
You will probably find it more rewarding to use a more modern graphics
system, such as OpenGL or DirectX, with a suitable programming language
rather than Mathematica's. I would recommend any of OCaml, F#, Haskell,
Lisp, Scheme, Python or Ruby for graphics, you can do much more
sophisticated, animated, real time visualisations than you can with
Mathematica's primitives.

There are lots of great web pages out there. I've written some 2D and 3D
graphics examples in OCaml:

http://www.ffconsultancy.com/product.../visualisation
http://www.ffconsultancy.com/free/ray_tracer
http://www.ffconsultancy.com/free/fractal
http://www.ffconsultancy.com/free/maze

and more recently F#:

http://www.ffconsultancy.com/dotnet/fsharp

I was very impressed with the tutorial videos on VPython at ShowMeDo:

http://showmedo.com/videos/series?na...nVPythonSeries

For an introduction to OpenGL, look no further than the NeHe tutorials at
GameDev:

http://nehe.gamedev.net

One of our future products at FF Consultancy is a suite of extensions for
the F# interactive mode that allows you to visualise 2D and 3D graphics in
real time with simplicity rivalling Mathematica but the sophistication and
performance of DirectX, whilst also having the power of the F# programming
language and .NET to analyse your data.

--
Dr Jon D Harrop, Flying Frog Consultancy
Objective CAML for Scientists
http://www.ffconsultancy.com/product...ex.html?usenet
Dec 23 '06 #3
Boris Borcic wrote:
Xah Lee wrote:
>Of Interest:

to which of comp.lang.perl.misc, comp.lang.python, comp.lang.lisp,
comp.lang.java.programmer, comp.lang.functional ?
You must be new. Otherwise you would be familiar with this troll already.

jue
Dec 23 '06 #4
Dear Jon Harrop,

Thanks for the informative reply.

I don't know OpenGL, but i think it is a low-level crap, and have done
the industry huge irreparable damage the same way unix has.

This wikipedia excerpt from
http://en.wikipedia.org/wiki/QuickDraw_3D
summarize my sentiment:

«Most 3D toolkits concentrate on the lowest levels of the 3D rendering
pipeline...

For instance, the OpenGL system consists primarily of a system for
describing geometry in various ways...

Higher-level concepts of the 3D world are generally not included in
low-level libraries...

To add to the problems, OpenGL was not truly low-level..
»

Note this:

«
TODAY THERE REMAINS NO STANDARD HIGH-LEVEL API FOR 3D GRAPHICS. Several
attempts have been made, including OpenGL++ and the SGI/Microsoft
Fahrenheit graphics API, but none of these have made it to production.
»

----------

As a practical example of its low-level problem, i looked at your basic
OpenGL tutorial, the minimal program
(http://www.ffconsultancy.com/product...sualisation/):

let () =
let argv' = Glut.init Sys.argv in
ignore (Glut.createWindow ~title:"OpenGL Demo");
GlClear.color (0.1, 0.3, 0.1);
Glut.displayFunc ~cb:(fun () -GlClear.clear [ `color ]; Gl.flush
());
Glut.mainLoop ()

Immediately, a extremely intelligent alien who understand advanced
programing and geometry in 3D and higher dimensions, but who is not
familiar with OpenGL per se, would be facing 6 lines, almost all of it
are irrelevant to geometry or the mathematics of programing,
but are extraneous concepts created by the system itself . (the
exceptions are the “color”, and “clear”)

This is in contrast to the Mathematica system or its graphics. For
example:
http://xahlee.org/3d/mma.html e.g.

Graphics3D[{
Cuboid[{0, 0, 0}],
Point[{1.5, 1.5,0}],
Polygon[{{2, 2, 1}, {2, 1, 1}, {1, 2, 1}}]
}]

Even if you don't know nothing about Mathematica or never coded a
single line of 3d graphics application, the lines above are all very
meaningful, as they are inalienable concepts of geometry, not something
extraneous as most imperative languages or systems or unix forces upon
its users.

------------

Note that the above sentiment about OpenGL, is just my sentiment on the
overall situation of graphics programing. (and in general the low-level
garbage situation applies to almost all imperative languages and vast
majority of protocols in the industry.) I don't particular know OpenGL
as a low-level graphic system is a good one or not. (but it is probably
correct to assume that Microsoft's Direct3D is far more better designed
system at the same level)

------------

Regarding VisualPython... i saw a demo in 2002 by a professor
friend. I think it is good. Though, why is its licensing not GPL or
otherwise Open Source? That's kinda odd since Pyhton is.

Thanks for your links and tutorials. I find them useful.

----

What i'm looking for, is a system that allows one to easily to graphics
programing. By graphics programing, i mean 3d geometric shapes
manipulation, as opposed to rendering or implementing CAD systems or
how to write photoshop filters or the science of realistic rendering
etc as most people are thinking of when hearing the term computer
graphics programing.

So far as i know, Mathematica is the platform that allows one to do
graphics programing. But, i think Flash probably is another platform
that does it. And i think VisualPython is also.

I'm interested in other platforms that allows one to do this.

Xah
xa*@xahlee.org
http://xahlee.org/
Jon Harrop wrote:
Xah Lee wrote:
Introduction to 3D Graphics Programing
http://xahlee.org/3d/index.html

You will probably find it more rewarding to use a more modern graphics
system, such as OpenGL or DirectX, with a suitable programming language
rather than Mathematica's. I would recommend any of OCaml, F#, Haskell,
Lisp, Scheme, Python or Ruby for graphics, you can do much more
sophisticated, animated, real time visualisations than you can with
Mathematica's primitives.

There are lots of great web pages out there. I've written some 2D and 3D
graphics examples in OCaml:

http://www.ffconsultancy.com/product.../visualisation
http://www.ffconsultancy.com/free/ray_tracer
http://www.ffconsultancy.com/free/fractal
http://www.ffconsultancy.com/free/maze

and more recently F#:

http://www.ffconsultancy.com/dotnet/fsharp

I was very impressed with the tutorial videos on VPython at ShowMeDo:

http://showmedo.com/videos/series?na...nVPythonSeries

For an introduction to OpenGL, look no further than the NeHe tutorials at
GameDev:

http://nehe.gamedev.net

One of our future products at FF Consultancy is a suite of extensions for
the F# interactive mode that allows you to visualise 2D and 3D graphics in
real time with simplicity rivalling Mathematica but the sophistication and
performance of DirectX, whilst also having the power of the F# programming
language and .NET to analyse your data.

--
Dr Jon D Harrop, Flying Frog Consultancy
Objective CAML for Scientists
http://www.ffconsultancy.com/product...ex.html?usenet
Dec 27 '06 #5
Xah Lee wrote:
Dear Jon Harrop,

Thanks for the informative reply.

I don't know OpenGL, but i think it is a low-level crap, and have done
the industry huge irreparable damage the same way unix has.
OpenGL is low level, that's right, but it is not crap. OpenGL is
hardware independent, and is a true multiplatform standard. The
difference between OpenGL and higher level libraries, like OpenInventor,
it is similar to the difference between a low-level programming language
like C and a higher level object-oriented language, IMHO.
I don't particular know OpenGL
as a low-level graphic system is a good one or not. (but it is probably
correct to assume that Microsoft's Direct3D is far more better designed
system at the same level)
Direct3D it is lower level than OpenGL, and usually needs more
instructions than OpenGL to do the same things.

Dec 27 '06 #6

Xah Lee wrote:
Regarding VisualPython... i saw a demo in 2002 by a professor
friend. I think it is good. Though, why is its licensing not GPL or
otherwise Open Source? That's kinda odd since Pyhton is.
You are confusing VPython with Activestate's Visual Python IDE plugin
for Visual Studio.
>From VPython's home page in very bold font - "VPython is free and
open-source"
http://www.vpython.org/

Dec 27 '06 #7
["Followup-To:" header set, but it's best not to followup at all.]

On 2006-12-27, Raff <CA**************@hotmail.itwrote:
Xah Lee wrote:
>I don't know OpenGL, but i think it is a low-level crap, and have done
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^
>the industry huge irreparable damage the same way unix has.

OpenGL is low level, that's right, but it is not crap.
Whether it is or not, Xah doesn't know and doesn't care, as he is
a troll (and anyone who would say "I don't know X but it's crap" is
definitely either clueless or trolling). Please don't pay attention
to his rants.

--keith

--
kk************@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

Dec 27 '06 #8
Here's their license:
http://www.vpython.org/webdoc/visual/license.txt

I read it wrong before.
Thanks for correction.

This is superb! I'll be looking into vpython!

Xah

Ravi Teja wrote:
Xah Lee wrote:
Regarding VisualPython... i saw a demo in 2002 by a professor
friend. I think it is good. Though, why is its licensing not GPL or
otherwise Open Source? That's kinda odd since Pyhton is.

You are confusing VPython with Activestate's Visual Python IDE plugin
for Visual Studio.
From VPython's home page in very bold font - "VPython is free and
open-source"
http://www.vpython.org/
Dec 27 '06 #9
Xah Lee wrote:
Here's their license:
http://www.vpython.org/webdoc/visual/license.txt

I read it wrong before.
Thanks for correction.

This is superb! I'll be looking into vpython!

Xah
Of course it does what it does by resort to OpenGL and C++, so is part
of the problem ;)

I am looking forward to your tutorial efforts, and hoping those efforts
can be accessed without exposure to too much polemics. Though if that
is the price of admission, that is the price of admission.

BTW, VPython is most of the way through a 4.xxx release which provides
some nice additional functionality to the 3.xx series core - like
transparency and texturing. Problem being the the lead developer has
graduated and moved on, and the NSF funding that had supported the
effort has run out.

And the core folks around the project are either science educators or
Python folks - there is little C++ expertise currently involved with
the project.

The project is looking for help.

Anyone willing to jump in should perhaps reply here or at:
vi****************@lists.sourceforge.net

Art

Jan 8 '07 #10
hg
Xah Lee wrote:
I don't know OpenGL, but i think it is a low-level crap, and have done
the industry huge irreparable damage the same way unix has.
So you _are_ psychic ! is the end of the world be in 2007 ?


Jan 9 '07 #11
aj******@optonline.com wrote:
And the core folks around the project are either science educators or
Python folks - there is little C++ expertise currently involved with
the project.

The project is looking for help.

Anyone willing to jump in should perhaps reply here or at:
[snip address]

I see lots of mentions of C++ and Python, but not Java, so suggesting
that anyone reply "here" (i.e. comp.lang.java.programmer) seems
questionable to me.

And what the hell is wrong with my goddam newsserver? Again it
complained that a header was missing (which either should have been
there to start with or not been an error) and then when I added it that
the message was a duplicate (it was a duplicate only if the previous try
had succeeded, but it claimed the previous try had failed).

I'm thinking of ditching aioe. Anyone know of any other public, free
newsservers that permit posting as well as reading? A whole lot of Web
research has failed to turn up any besides aioe. Mind you, I found a lot
of high quality free ones that permit reading only (some with binaries!
not that I need 'em) and at least one that calls itself "free" and says
it permits posting but actually charges an "account setup fee" -- where
are truth in advertising laws when you need them? "Free" doesn't mean
"No monthly payments" or "No recurring payments", it means FREE, as in
NO PAYMENTS AT ALL, MORONS ... :P
Jan 10 '07 #12
Xah Lee wrote in 2006-12-22:
Of Interest:

Introduction to 3D Graphics Programing
http://xahlee.org/3d/index.html
Folks, i have expanded my tutorial to several pages in the past nearly
two months, and thank you very much for those who have given
encouragement.

I had plans to write pages that actually contained Python or Perl and
elisp code to demonstrate the mingled use of common languages with
POV-RAY and other tools for doing algorithmic mathematical art...

However, i'm posting now for one in-credible discovery that amazed me,
and believe it is a revolutionary both with respect to technology, as
well as its social impact.

Following is my brief introduction. The web version is at:
Introduction to Second Life
http://xahlee.org/sl/sl.html

-------

Introduction to Second Life

Xah Lee, 2007-01-09

above: A screenshot of a location in Second Life.

This place is called “The Future”, it is a place built by Henry
Segerman ↗ built.

Second Life is a online virtual world with 2 million accounts as of
2006-12, and reportedly 10 thousand users logged in at any moment.
Basically, you operate a software that is a 3D world much like 3D
games, but everything in the “game” is built by users, and you can
interact with other users, including buying and selling virtual land
with real money. What people do inside Second Life is entirely up to
them (as in real life). And, as it happens, what people do mostly in
Second Life are pretty much what people do in real life. The major
activities are: sex, shopping, socializing, dancing.

My mathematician friend Henry Segerman introduced me to 2nd life. (also
because it appeared in Time Mag in 2006-12.) Henry has a 2nd life page
that contains many math objects made in Second Life:
http://www.stanford.edu/~segerman/2ndlife.html.

Part of my interest in Second Life is to build geometric models. (See
Introduction to 3D Graphics Programing) I have for the past couple
years sought for a software platform/system where i can build 3D
objects, with abilities to do interactive adjustment (such as moving a
slide to change a surface's parameter), dynamic rotation (viewing from
different angles), animations (such as morphing that shows geometric
processes), and most of all, walk-thru in it as if it is a building.

As far as my experiences goes, no software platform for 3D graphics are
close to the ideal of what i need to do. They lack one feature or the
other, or otherwise requires the programer to be a specialist with
years of dedication in learning the tool. For example, Mathematica↗
has great collection of math functions but no dynamic graphics.
POV-RAY↗ and 3D-modelers like AutoCAD↗ can do great in building 3D
objects but they are not designed for interactivity, animations, or
walk-thru. Java the programming language↗ allows one to write applets
that does rotation and interactive manipulation but programing in Java
is extremely unnecessarily complex and yet it is still not possible to
do walk-thrus. The one class of platform that does all these, is 3D
game engines. But alas, they take a dedicated game programing
specialist to be able to use it. Second Life changed all this.

(Note: Just for completness, my requirement for a 3D-graphics
programing software system is this: • easy to use for average
programers or scientists. • Easy to build geometry models, such as
basic shapes like spheres and blocks, as well as surfaces or meshes of
triangles. • designed for interactivity. That is, the programer can
easily build buttons and sliders that changes parameters and have the
object reflect these changes visually right away. • the user can
easily change viewing angles or rotate the object. • The programer
can easily do animations. For example, morph a sphere into a cube, or a
bunch of spheres flying in space as a swarm of flies. • The ability
to do walk-thru (or fly-thru). For example, if i build a fancy 3D-maze
or architecture, i should be able to — say — become a ant, and walk
inside the object, so as to view the object from inside and as well as
getting the real experience of perceiving such a building. (Before my
discover of Second Life, the platform that i was considering nearly
ideal and preparing to learn, are VPython↗ and Macromedia Flash↗ (i
do still plan to learn these technologies) ))

Second Life is not just the answer to my mathematical fantasies, but
because of its Real-World nature, being run and build by real people,
and with scarily real money market of the virtual dollars it uses, is
nothing but a technological revolution with great social impact. It is
essentially the virtual-3D-world-wide-web dream of VRML↗ envisioned
around 1995.

Anshe Chung↗ is famouly known for being the first to become a (real
world) millionaire by selling entirely virtual items and virtual
services inside Second Life.

For a encyclopedic introduction, see: Second Life↗

Here are some articles about Second Life. (note that there are a lot
linked at the bottom of the Wikipedia article.)

* Time Mag: “My So-Called Second Life”, By Joel Stein,
20061216.↗
* businessWeek online: INSIDE INNOVATION — IN SIDE. Second Life
Lessons. By Reena Jana and Aili McConnon. 2006-11-27.↗

2007-01-21, Addendum

Recently i heard of Entropia Universe↗. I haven't taken a closer look
but i think it is a competitor to Second Life.

Note that Second Life may not be and is probably not the first virtual
world. And, when virtual world like Second Life becomes household
activity as the internet is today, it will probably not be known as
Second Life or run by one single company, but diverse companies with
servers all over the world, where there is a unified virtual world all
the world's people can be in. (This situation may be likened to the
internet circa 1995. Or, perhaps also similar when telephone was in its
pioneering days.)

----

Xah
xa*@xahlee.org
http://xahlee.org/

Jan 22 '07 #13

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

Similar topics

9
1587
by: Xah Lee | last post by:
Dear Joe, It is well known that you are an avid hater of Microsoft, from their technologies to their leader to their business practices. I have now and then seen your impassioned expression of this hatred, scattered among your newsgroup posts. Personally, i have an inherent distrust toward big organizations. This applies to Microsoft....
102
6942
by: Xah Lee | last post by:
i had the pleasure to read the PHP's manual today. http://www.php.net/manual/en/ although Pretty Home Page is another criminal hack of the unix lineage, but if we are here to judge the quality of its documentation, it is a impeccability. it has or possesses properties of:
23
3587
by: Xah Lee | last post by:
The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee, 2006-03-15 Let me summarize: The LISP notation, is a functional notation, and is not a so-called pre-fix notation or algebraic notation. Algebraic notations have the concept of operators, meaning, symbols placed around arguments. In...
62
3834
by: Xah Lee | last post by:
Criticism versus Constructive Criticism Xah Lee, 2003-01 A lot intelligent people are rather confused about criticism, especially in our “free-speech” free-for-all internet age. When they say “constructive criticisms are welcome” they mostly mean “bitching and complaints not welcome”. Rarely do people actually mean that...
0
7270
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main...
0
7178
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7397
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7543
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5704
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4759
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3255
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
473
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.