[plt-scheme] 3-D graphics

From: Richard Cleis (rcleis at mac.com)
Date: Fri Mar 27 01:24:25 EDT 2009

On Mar 26, 2009, at 11:20 AM, Stephen Bloch wrote:

>
> On Mar 26, 2009, at 11:34 AM, Noel Welsh wrote:
>
>>> I'd like to write (or, even better, get somebody else to
>>> write!) a beginner-friendly, functional front end for it that allows
>>> first-semester students to build 3-D animations, with not much more
>>> difficulty than the 2-D animations we do with world, sb-world, or  
>>> universe.
>>> Is anybody working on this sort of thing?
>>
>> Not that I know of, but a basic system shouldn't be too hard. Of
>> course cranking up the rendering performance and realism requires a
>> lot of work and some decisions about what types of objects and
>> environments you support.
>
> Performance would be nice, of course, but a higher priority for me  
> is a beginner-friendly API.

I made an OpenGL API that intentionally mimics World in most ways.   
Performance is not an issue when OpenGL is used simply and 'properly',  
because the graphics processors are doing nearly all of the work.  CPU  
usage is high only during the formation and delivery of object  
vertices, then it disappears because animation is achieved with  
manipulating matrices in the GPU rather than repeatedly streaming the  
same vertices to gradually different places on the screen.

The API is based on a simple concept: graphics functions consume then  
produce graphics functions that can be consumed by graphics  
functions.  This allows chains of graphics to be broken up arbitrarily  
(though the intention is to break them up sensibly) and assigned to  
variables that are graphics functions.  I find the concept intriguing  
and useful, but others may not agree.

Oddly, graphics processing is very functional, yet procedural  
languages are used to teach it.  In a nutshell, matrices operate on  
matrices operate ... . In between some of the stages, drawing takes  
place; the rightmost argument is the beginning of the scene.  Years  
ago, I gave up learning OpenGL because it was so tedious.  Now that I  
am enlightened by FP, I understand and enjoy graphics programming so  
much more that I wrote an API just for the fun of it.

rac

>
>
>
> Stephen Bloch
> sbloch at adelphi.edu
>
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme



Posted on the users mailing list.