POV-Ray : Newsgroups : povray.bugreports : inside() is unreliable on lathe : Re: inside() is unreliable on lathe Server Time
9 May 2025 15:35:41 EDT (-0400)
  Re: inside() is unreliable on lathe  
From: William F Pokorny
Date: 4 May 2025 02:15:05
Message: <681705e9$1@news.povray.org>
On 5/3/25 23:47, Cousin Ricky wrote:
> I would rather put the rotation in the macro.  I don't want to mess with
> the object definition.

I woke up a bit ago and decided to take a quick look at the current yuqk 
code for the inside test in the lathe. It is doing a crossing test. 
Inserting some code to dump the counts, I get the following for your 
original scene:

Number of crossings = 0
Number of crossings = 1   <--
Number of crossings = 2
Number of crossings = 1
Number of crossings = 0
Number of crossings = 1
Bounding box <-54.0, 0.0, -54.0> ... <54.0, 264.0, 54.0>
<0.0000, 265.0000, 0.0000> is outside.
<0.0000, 264.0000, 0.0000> is inside.
<0.0000, 263.0000, 0.0000> is outside.
<0.0000, 50.0000, 0.0000> is inside.
<60.0000, 264.0000, 0.0000> is outside.
<42.5000, 263.5000, 0.0000> is inside.

I'm in the middle of another attempt at newer options parsing code so I 
won't now dig into it, but I had the thought we might try looking at the 
normal when there is one intersection.

As with the inside tests for meshes, maybe where the normal is 
perpendicular to the direction of the inside test, we discard those 
intersections?

The spline is getting looked at in segments; maybe this would sometimes 
cause problems with the intermediate points where segments meet? 
Thinking too of Bezier segments running essentially parallel or 
anti-parallel to the test direction.

Anyhow, back to options.

Bill P.


Post a reply to this message

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