POV-Ray : Newsgroups : povray.newusers : difference, plane : Re: difference, plane Server Time
28 Jul 2024 16:16:38 EDT (-0400)
  Re: difference, plane  
From: Alain
Date: 14 Apr 2008 17:41:24
Message: <4803cf84$1@news.povray.org>
en ce 2008/04/12 13:31 :)   ->
> In the past I always "differenced" objects, never a plane, and maybe that's why
> I never noticed this before. Say I want a sphere with the top cut off:
> 
> difference {
>     sphere { 0 1  }
>     plane { y 0.8 }
>     texture { T_Brass_1D }
> }
> 
> Not what I want; only the top segment is kept. Logic holds that
> 
>     plane { -y -0.8 }
> 
> should do the trick, cutting away the stuff above the (inversed) plane instead
> of below it. But POV-Ray doesn't seem to accept negative distances here!
> How do I do this?
> TIA
> 
> 
While all the others is correct, in your case you can replace "difference" by 
"intersection". That way, instead of keeping what NOT in the plane, you keep the 
part that is COMMON to both the sphere and the plane.

You can also use the "inverse" keyword.

-- 
Alain
-------------------------------------------------
I hope our wisdom will grow with our power, and teach us, that the less we
use our power the greater it will be.
Thomas Jefferson


Post a reply to this message

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