1. 3D Polygon Engine Classes

------ =_NextPart_000_01BE865F.70C31200


Well, I've been sitting on these long enough; I think I've optimized them
as much as possible without obscuring the code.

Attatched is a collection of Quartz classes that allow you to create,
manipulate and display 3-dimensional objects on screen (graphics mode 19).
You may want to take note that this is not a very advanced package; it
uses the built-in polygon() routine (so you only get simple, flat-colored
polygons) and the polygons are individually displayed with a simple
sorting algorithm (meaning the image won't always be completely accurate.)

Both the Polygon class (qpolygon.e) and the PolyObject class (qpolyobj.e)
build on the Vertex class (qvertex.e). Also included are two programs,
polygons.ex and polyman.ex, demonstrating the classes. Polyman.ex "cheats"
somewhat by calling graphics mode 13... fewer colors than mode 19, but the
same resolution, and allows the use of video paging to avoid flicker (also
demonstrated). Finally, the latest version of Quartz, and the include file
needed to sort the polygons (mod_sort.e) are included.

I'm releasing this in the hope that someone might find a small use for it,
despite the lack of speed. Possibly still images, or 3D animations for a
simple, not-very-fast application. If desired, the classes can be used,
then the Quartz wrappings can be removed once everything is running
smoothly... I've found that this almost doubles the speed of polyman.ex.
And of course if you improve on it, then that's always good too. blink

I'm still trying to work on a better package, using a z-buffer for a 100%
accurate image (and possibly textures); but to be honest I've given up
hope of having it achieve any useful speed without resorting to extensive
machine code. Mark's earlier 3D demonstration was quite impressive, but it
took over 3 seconds to render one image on my 233MHz Pentium II--and it
seems almost completely optimized (I couldn't squeeze more than a 15%
speed increase out of it...)

Anyone know of any good web sites offering tutorials on the basics of
machine-code programming? smile

Rod Jackson


------ =_NextPart_000_01BE865F.70C31200

new topic     » topic index » view message » categorize

2. Re: 3D Polygon Engine Classes

Forgot to mention... the classes require graphics.e to work.

----------
From:   Roderick Jackson[SMTP:rjackson at csiweb.com]
Sent:   Wednesday, April 14, 1999 10:13 AM
To:     EUPHORIA at LISTSERV.MUOHIO.EDU
Subject:        3D Polygon Engine Classes

Well, I've been sitting on these long enough; I think I've optimized them
as much as possible without obscuring the code.

<snip>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu