POV-Ray : Newsgroups : povray.advanced-users : Object Oriented POV code : Re: Object Oriented POV code Server Time
29 Jul 2024 14:16:22 EDT (-0400)
  Re: Object Oriented POV code  
From: Christopher James Huff
Date: 21 Feb 2004 14:56:53
Message: <cjameshuff-BD8E51.14573421022004@news.povray.org>
In article <40362976$1@news.povray.org>,
 "Dan P" <dan### [at] yahoocom> wrote:

> >   In the same way, adding a new name to the set of existing names requires
> > at most 32 comparisons and other operations.
> 
> 32 comparisons for /one lookup/. Multiply that by, say, 100,000 lookups for
> fur.

And you end up doing 3200000 comparisons, which really won't take long. 
Photon mapping can handle similar searches through millions of photons 
for several lighting calculations per pixel, and still render an image 
with 768K pixels in reasonable time. And that's if it can't figure out 
you're using a type some other way.


> I think everything should have been. It was just a programmer's decision to
> do that, probably because of their C/C++ experience. However, it is
> certainly true that if all primitives were represented by a class, it would
> take more memory, and even though it might only take a slight bit more
> memory, with hundreds of thousands of instances that can show as well so it
> might be a good idea to use primitives in a ray-tracing context anyway.

But we (well, most of us) aren't going to be doing heavy raytracing with 
this language...just specifying a scene for a C++ engine to render. The 
overhead for these things is nothing compared to the overhead of the 
current parser...it could be made much faster and still have the 
flexibility and simplicity of runtime lookups.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.