POV-Ray : Newsgroups : povray.documentation.inbuilt : SOR documentation Server Time
24 Oct 2025 23:19:48 EDT (-0400)
  SOR documentation (Message 65 to 67 of 67)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Bald Eagle
Subject: Re: SOR documentation
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

From: Bald Eagle
Subject: Re: SOR documentation
Date: 24 Oct 2025 22:35:00
Message: <web.68fc36a5251da1bc1f9dae3025979125@news.povray.org>
Just briefly scanning this over (as I was up late making rapid-fire changes) and
I noticed that the parser allowed and didn't complain about:

#local in2 = #local Result = {EcResult [2], EcResult [4]};

So who know what other wacky constructs it will let slip through.

Anyway, fixing 2 such statements allowed me to render this stunning grey
rectangle, which I'm assuming must be my cylinder.

- BW


Post a reply to this message


Attachments:
Download 'sdl_raytracer cylinder test.png' (2 KB)

Preview of image 'sdl_raytracer cylinder test.png'
sdl_raytracer cylinder test.png


 

From: Bald Eagle
Subject: Re: SOR documentation
Date: 24 Oct 2025 22:45:00
Message: <web.68fc396d251da1bc1f9dae3025979125@news.povray.org>
Seeing how exciting that last post was, let me now slay you with a diagram of
what's going on in that paper.


Post a reply to this message


Attachments:
Download 'graphicsgemslinecylinderintersection.png' (195 KB)

Preview of image 'graphicsgemslinecylinderintersection.png'
graphicsgemslinecylinderintersection.png


 

<<< Previous 10 Messages Goto Initial 10 Messages

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