Re: object -> direct (colors) [message #13396 is a reply to message #13386] |
Thu, 05 November 1998 00:00   |
steinhh
Messages: 260 Registered: June 1994
|
Senior Member |
|
|
In article <71qe72$q5o$1@nnrp1.dejanews.com> seanosea@my-dejanews.com writes:
[..snip..]
> ruminative PostScript :)
> I don't know much about the relative utility of Object and Direct
> Gx--but Object certainly seems to me more conceptually elegant.
> (This won't convince anyone who just wants to get things *done*, of
> course.) Dividing more complex things into simpler things along their
> natural lines is a very fun thing to ponder, and to implement, and
> to use. Reminds me of an old saying by Plato: metaphysics is the job
> of cutting the beast of reality by the joints.
I do agree that for 3D graphics, OG seems more conceptually elegant -
at least at first glance.
However, OG vs DG is really only about how things are *drawn*, not how
things are grouped/stored. There's nothing's stopping you from doing DG
with identical concepts. You could do DG using objects and object
hierarchies, even using the OG object classes themselves.
The only thing that would be different is in how things get drawn -
instead of using a destination object's draw method, you extract the
idlgrview properties like the viewplane rectangle, projection and eye
("perspective" in DG) to build the initial T3D transformation. Then,
for each object in the hierarchy (traverse it), find the 3D data
points, find the CTM (current transformation matrix), for that object
and plot it using a combination of the CTM and the initial T3D
"viewing" transformation. Ok, there is some tinkering to be done, but
that's what I'm hoping that RSI could provide as a compensation for not
having *line* drawings at all in PostScript for OG.
Another thing is that object orientation is not an attribute of a
programming language, but an attribute of the concepts that guide the
programmer! An array of points representing an arc is just as much an
"object" as an idlgrpolyline object describing the same object. That
said, the syntactic features of a language can be *very* powerful in
guiding the concepts of a programmer into a good OO style!
So, OG gives you really sharp knives for "cutting the beast of reality
by the joints". Sharp knives, but unfortunately not so sharp
*rendering* :-)
Regards,
Stein Vidar
|
|
|