POV-Ray : Newsgroups : povray.advanced-users : clutter.mcr and trace() : Re: clutter.mcr and trace() Server Time
27 May 2024 08:43:45 EDT (-0400)
  Re: clutter.mcr and trace()  
From: Bald Eagle
Date: 20 May 2021 19:50:00
Message: <web.60a6f47d584c33991f9dae3025979125@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:

> I give up. I have absolutely no idea what/how clutter works exactly, and
> why trace returns 0. Personally, I guess it is the macro misbehaving as
> the mesh2 is sound. I don't know either why vdot or vlength are used
> within the trace command. An expert is needed here.

My day got completely eaten up yesterday, and today my brain is just - off.

What I did notice is that the code is OLD - 20 years - and it's likely
unfinished.

I say that because the vdot function looks to be testing the angle between the
normal and y, but the result is just never used.  Trace gets invoked, vdot gets
calculated, and then the result is stored in a throwaway variable that gets
overwritten.   Very curious - almost like the author was going to use it, but
simultaneously decided he wasn't...

vlength looks to be getting used as a way to test for the <0, 0, 0> vector.

I like the test scenes so far, and this would be a lovely macro to have
rewritten for clarity, performance, etc.  I can imagine this might find heavy
usage for folks wanting to populate landscape and other scenes.

(Were there example renders?)

So, add that to the To-Do pile for any takers.

I have only made meshes (yes, and messes) not mesh2 objects.  With regard to
that, at first glance, it seems odd to me that given 3 vertices, a normal needs
to be supplied and isn't simply calculated.  But I guess there's involved stuff
with directionality that needs to be unambiguously provided (at this point).


Post a reply to this message

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