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:17:35 EDT (-0400)
  Re: Adding inside_vector (for CSG) to HF macros in shapes.inc  
From: Kenneth
Date: 16 Oct 2008 23:40:00
Message: <web.48f807b26bc5685d78dcad930@news.povray.org>
"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


Post a reply to this message

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