POV-Ray : Newsgroups : povray.bugreports : inside() is unreliable on lathe : inside() is unreliable on lathe Server Time
9 May 2025 15:18:42 EDT (-0400)
  inside() is unreliable on lathe  
From: Cousin Ricky
Date: 3 May 2025 17:14:41
Message: <68168741$1@news.povray.org>
I'm still dealing with trace() failures on lathe.  I've tried various
workarounds, but the most promising entails an inside() tests.

The attached scene file does inside() tests on a wine glass defined as a
Bézier lathe, with the following results:

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.

These tests are at, respectively:
  1. Along the central axis, above the height of the glass.
  2. Along the central axis, at exactly the height of the glass.
  3. Along the central axis, just below the height of the glass.
  4. Along the central axis, within the stem of the glass.
  5. At exactly the height of the glass, outside its bounding box.
  6. Within the rim of the glass.

The second test is inside neither the wall nor the stem of the glass;
the inside() function has given the wrong result!

My apologies for the procedural definition of the lathe object, but when
I print the values and use those to define the lathe, I cannot reproduce
the bug.

(I'm looking at having to tell my trace macro in advance whether or not
I'm starting the trace from within the object.  I don't like having to
tell a macro how to do its job.)


Post a reply to this message


Attachments:
Download 'inside_test.png' (16 KB) Download 'inside_test.pov.txt' (4 KB)

Preview of image 'inside_test.png'
inside_test.png

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