#Graphics
4 messages in this thread
Does anybody know anything about the Painter's algorithm (the one used to
generate plots of two-variable functions with hidden lines removed…)? I
wrote an improved version of it: the modified algorithm not only removes
hidden lines, but also shows the orientation of the surface (that means
that you can see the "top" and the "bottom" of the surface in different
colors). Could you please tell me if it is something new or I just
reinvented the wheel?
P.S.: if you want to see the program, and have an IBM or compatible with
any adapter, just tell me.
76645,63,
I've recently written a crude version of Painter's algorithm as part of a
3d perspective modeling program (using QC). In concept, it simply sorts
shapes in an array by their back plane, then fills them from back to front
to build up a 3d image. I'd like to see your implementation and I'll
gladly send you my code (it's too much to post here, about 44k of C and
some .ASM for the plotting). I wrote and compiled specifically for a 286,
EGA, and a co-processor, but it could be adapted. My real interest is in
developing a PC implementation for ray tracing of architectural 'electronic
models' and I have a long way to go.
(To the SL: I'm new around here and don't know the criteria for the
library, but I'd be glad to upload if there is any general interest in this
sort of stuff. The code works well but is FAR from professional as I've
just learned C and a little Assembly this past year.)
Lowell Warren
You may upload to DL 5. Glad to have it.
Tom G.
Tom,
I've uploaded the following to DL 5:
3DPM_E.ARC – Executable code, user instructions, and sample files;
ready to run on 286/EGA/Co-processor
3DPM.ARC – Source code in C and Assembly, nmake file, and sample
files; can be adapted somewhat to other hardware with compile
switches (remove /G2 for other than 286, remove /FPi87 if no 80287
Let me know if there are any problems and I would welcome user comments
and/or code and performance improvements.
Thanks, Lowell Warren