POV-Ray : Newsgroups : povray.general : Adding inside_vector (for CSG) to HF macros in shapes.inc : Re: Adding inside_vector (for CSG) to HF macros in shapes.inc Server Time
30 Jul 2024 16:26:21 EDT (-0400)
  Re: Adding inside_vector (for CSG) to HF macros in shapes.inc  
From: jan dvorak
Date: 17 Oct 2008 04:52:54
Message: <48f85266@news.povray.org>
Kenneth napsal(a):
> "Zeger Knaepen" <zeg### [at] povplacecom> wrote:
>> [inside_vector] should not be done
>> randomly.
> 
> When I was working on adding it to shapes.inc, I actually set up a little
> randomizer, to see what might happen:
> 
> #declare SSS = seed(73);
> inside_vector <rand(SSS) - .5,rand(SSS) - .5,rand(SSS) - .5>
> 
> That pretty well scrambles up the values + and -. I plugged in a bunch of
> different seed values, ran the HF_Cylinder macro each time--which has big open
> ends-- and it worked successfully with a CSG difference 100% of the time. Along
> with previous experience, that convinced me that the vector could have
> completely random values (although not <0,0,0>, I suspect; that would create no
> vector direction at all.)
> 
> Something I've always wondered about: The docs say that a ray is shot in this
> direction; but from *where*? Anyone know if it's from the origin?
> 
> KW
> 
> 
from the point you test for insideness


Post a reply to this message

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