|
![](/i/fill.gif) |
In article <40362976$1@news.povray.org>,
"Dan P" <dan### [at] yahoo com> 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] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tag povray org>
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |