POV-Ray : Newsgroups : povray.documentation.inbuilt : SOR documentation : Re: SOR documentation Server Time
24 Oct 2025 18:32:55 EDT (-0400)
  Re: SOR documentation  
From: Bald Eagle
Date: 24 Oct 2025 08:50:00
Message: <web.68fb750b251da1bc7f81dbac25979125@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
once I fix the issue with the end caps, then I
> > will begin to run some comprehensive tests. (*)
>
> Well, that took way longer than it should have.

The issues here were that it was unclear how and when each function should be
called, and in what order.
There were some issues with the signs of normals and dot products.
And then there was the issue with hits on the end cap that should have replaced
the hit on the infinite cylinder.
And clipping of the edge between the cylinder end cap was leaving residual hits.
So there were 4 places that I needed to add code to undef the results of the
infinite cylinder intersection test.

After that, I kinda needed to write a 3rd macro to take everything and assemble
the output of the 2 macros.

A cautionary tale here is that you have the math and geometry, the code that you
write to do it all, and then the code that you write to interpret and visualize
the result.
Don't go chasing bugs in the first two parts, if the problem is in the third
part.

> However, now I just have to debug the function call and subsequent calculations,
> and I'm hoping to get an actual homemade render soon.

That might not get done until the weekend, when I have another 5 straight hours
to scroll back and forth through the code, inventing new expletives until I
finally get something to work.

Stage One is where all of the things in the code get pondered and picked at.
Even if it's the code I wrote myself.

Stage Two is where a "sense" of deeper understanding starts to occur, and one
starts to gain traction, where the parts of the code that really matter start to
be modified and manipulated in a such a way that you can tell that that's where
much of the solution lies.

Stage Three is where you're probably on the edge of giving up, and just make the
decision to spend another 1-2h just trying to push ahead.  Weird things happen.
It seems like code gets edited and restored in an unproductive circle, yet
somehow something happens that nudges it forward.  Then some key debugging
output coupled with new tests and sections of code finally lead you down the
path to success.

Stage Three is where it ALL happens.  DO IT.

- BE


Post a reply to this message

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