[comp.graphics] surface plotting code

unhd (Roger Gonzalez ) (10/21/90)

I'm looking for some code that will (on a PC, preferably, but I will port)

- do a surface mesh from any orientation, reasonably optimized, with or
  without hlr.
- draw a path traveled in 3-space above it.  

I already wrote some quickie code to do it, but its slow and warty. 
Since I know that its been done a jillion times already, I am going to
be lazy and try to leach off the net-minds.  I'll take subsets of what I
asked for as well, and if you happen to have a fractal landscape 
generator that feeds your routines, all the better (I'm still running
my C-port of a BASIC fractal program from Scientific American years ago!)
The generator should be easily excised, since this will be used for real
data as well as simulation.

Please mail directly to me, and also any "me too"s, so as to cut down on the
bandwidth that tripe like this generates. :-)

-Roger

-- 
"The question of whether a computer can think is no more interesting
 than the question of whether a submarine can swim" - Edsgar W. Dijkstra 
rg@unhd.unh.edu               |  UNH Marine Systems Engineering Laboratory
r_gonzalez@unhh.bitnet        |  Durham, NH  03824-3525

unhd (Roger Gonzalez ) (10/24/90)

I have received 30 "me too"s in regards to my request for surface plotting
code, but no code or pointers about where to find it.  If you have what I
need, don't be shy.. you'll make 31 people very happy!

Thanks,
Roger


-- 
"The question of whether a computer can think is no more interesting
 than the question of whether a submarine can swim" - Edsgar W. Dijkstra 
rg@unhd.unh.edu               |  UNH Marine Systems Engineering Laboratory
r_gonzalez@unhh.bitnet        |  Durham, NH  03824-3525

landheim@bbn.com (Greg Landheim) (10/26/90)

In article <1990Oct21.155411.21230@uunet!unhd> rg@unhd.UUCP (Roger Gonzalez ) writes:
>
>I'm looking for some code that will (on a PC, preferably, but I will port)
>
>- do a surface mesh from any orientation, reasonably optimized, with or
>  without hlr.
>- draw a path traveled in 3-space above it.  
>
>I already wrote some quickie code to do it, but its slow and warty. 
>Since I know that its been done a jillion times already, I am going to
>be lazy and try to leach off the net-minds.  I'll take subsets of what I
>asked for as well, and if you happen to have a fractal landscape 
>generator that feeds your routines, all the better.

I published two articles in the now-defunct Micro Cornucopia magazine last
year which described an implementation of a 3-D surface plot routine, with
hidden line removal.  The surface can be viewed from any horizontal angle
from 0 to 360 degrees, and vertical angles (above or below the X-Y plane) of
-90 to +90 degrees).  A bounding box can (optionally) be drawn around
the surface.

The source code was written for the PC in Turbo C 2.0 with the ANSI
compatibility switch on.  It included a driver to direct the output to a
standard IBM printer in both portrait and landscape modes.  The demo
surface generator used the Mandelbrot set, and the demo program allowed the
user to specify the Mandelbrot set region to generate, and choose whether
to output to the printer or the CRT.

The code is portable.  I had little difficulty moving the demo program
to a Unix X-Window environment.  I think it took about an hour to do a quick
and dirty port.  Mostly, I had to get rid of all the function prototypes.

The magazine published most, but not all, of the source.  The complete source
was available by mail or modem.  But they are no longer in business.

I make no claims to efficiency or speed for these routines, but they have
proved highly reliable through a lot of use.  (Oh, yeah, they also contain
code for scalable, rotatable character strings).  I don't even claim
good coding style.  But they are public domain, with no restrictions except
not to blame me if you use them and something goes wrong.  I wrote them
specifically to give away, so other people could look at nice threed pictures
with just one call to a function.

Periodically, I get requests, usually by mail, for the source.  I would like
to make the entire contents of the disk I sent to Micro C available, but
don't know where to put it.  If someone will assume responsibility for
putting it in the appropriate places, both Compuserve and some ftp site
would be nice, I will send them the entire source disk.  I'll also try
to contact someone at Micro C and see if it's ok to include the text of
the article.

Greg Landheim

ritter@versatc.versatec.COM (Jack Ritter) (10/27/90)

> I have received 30 "me too"s in regards to my request for surface plotting
> code, but no code or pointers about where to find it.  If you have what I
> need, don't be shy.. you'll make 31 people very happy!
> 

A nice surface plotting package is provided by NASA. It does
all kinds of things: grid, 2d, 3d, volumetric. You have to send
them a tar tape which they will return with SW, plus a manual.
CANT be distributed!!!
contact:

  Larry Pierce
  MS T45-2
  NASA Ames Research Center
  Moffett Field, CA 94035
  (415)604-4492
  pierce%prandtl@ames.arc.nasa.gov

  I hope this won't wont turn Larry into a thing that hates.

-- 
   Versatec, Inc.
   Jack Ritter, M.S. 1-7
   2710 Walsh Ave.
   P.O. Box 58091
   Santa Clara, CA 95052-8091
   (408)982-4332, or (408)988-2800 X 5743
   UUNET:  {ames,apple,sun,pyramid}!versatc!ritter

   --( / __ - .. ((  /
   / / -- ) . \ \ // . (
	/ ** ) // _*_ // * ..
	) (( . \ / . * ) //