|
 |
On 10/23/25 09:51, Bald Eagle wrote:
> "Bald Eagle" <cre### [at] netscape net> wrote:
>> William F Pokorny <ano### [at] anonymous org> wrote:
>>
>>> 1) I cannot find 'D = ray.Direction;' in my yuqk code? Where and in what
>>> version of source code are you seeing this?
>>
>> Right because that line is not explicitly there.
>> D is implicitly defined as the ray direction.
>>
>> Then in line 256 we do: len = D.length();
>>
>> Which is why we need to get rid of the y component for reasons explained.
>>
>> So really what we need is an extra line that REdefines the _projected_ ray
>> direction as D = <D.x, 0, D.y> before that length and normalization take place.
>>
>> - BW
>
> https://news.povray.org/web.68e8688f251da1bc1f9dae3025979125%40news.povray.org
>
> "2. The issue (*) above was a result of the ray direction being used as-is.
> When I had an angled ray, the length was too large, and overly shortened my
> perpendicular vector.
> When I only used the ray projection onto the xz plane, all of my perpendicular
> vectors were of the proper length."
>
Thanks Bill.
I think the normalization - including y - is necessary for other reasons
like the generation of the polynomials, but I also believe I see your
point about what is needed for the initial bounding cylinder check,
specifically. I'll try with branch-off code which drops the 'y'
component for the initial cylinder test only.
Aside: I'd make a moderate bet this tangled with the issues I had in
some rotation about x tests where parts (partial segments/intervals) of
the sor would drop out. IIRC, those tests included negative on curve
(between end control points, points). We'll see.
Bill P.
Post a reply to this message
|
 |
|
 |
"Bald Eagle" <cre### [at] netscape net> 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
|
 |