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

Xah Lee xah at xahlee.org
Wed Dec 27 03:33:19 EST 2006


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/products/ocaml_for_scientists/visualisation/):

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
  xah at xahlee.orghttp://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/products/ocaml_for_scientists/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?name=pythonThompsonVPythonSeries
>
> 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/products/ocaml_for_scientists/index.html?usenet




More information about the Python-list mailing list