POV-Ray : Newsgroups : povray.newusers : A perplexity... : Re: A perplexity... Server Time
29 Jul 2024 14:14:05 EDT (-0400)
  Re: A perplexity...  
From: Mike Williams
Date: 30 Oct 2005 14:52:01
Message: <SVQ3aJAYRSZDFw9T@econym.demon.co.uk>
Wasn't it Patrick Hagerty who wrote:
>I'm playing with gems.  (I "wish" they were the real thing.  Just POV
>stuff, though.)
>
>I'm observing some anomolous (to me) behavior.  I'm using a declaration
>to define the gem structure.  If I use an "intersection" of box objects,
>I get a dirty or noisy material as a result.  If I use an intersection
>of planes, I get a very clean crystaline result.  The code and resultant
>images are below.

What's happening is that a box rotated by +45 is exactly the same as a
box rotated by -45, so you're getting the coincident surface problem.
See "2.4.2.5  Why are there strange dark pixels or noise on my CSG
object?" in the documentation.

If you delete three of the rotated boxes in your intersection it will be
the same shape but without most of the speckles. The remaining speckles
are caused by the fact that each of the rotated boxes have two faces
that are coincident with the unrotated box. E.g. the box that's rotated
by y*45 has the top and bottom face still in the same plane.

You can fix that by making the first box have a slightly different size.

#declare BrilliantJewell = intersection
{
   box { <-1.0001, -1.0001, -1.0001>, <1.0001, 1.0001, 1.0001> }
   box { <-1.0, -1.0, -1.0>, <1.0, 1.0, 1.0> rotate  45*x }
   box { <-1.0, -1.0, -1.0>, <1.0, 1.0, 1.0> rotate  45*y }
   box { <-1.0, -1.0, -1.0>, <1.0, 1.0, 1.0> rotate  45*z }


By the way: Don't post images to this newsgroup. Binary files should
only be posted to a .binaries newsgroup.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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