|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
If I create a group of objects with a while loop
#declare Thing =
union {
#declare a = 0;
#while (a<10)
#declare b = 0;
#while (b<10)
sphere{<a,b,0>,1}
#declare b=b+1;
#end
#declare a=a+1;
#end
}
and then intersected my new object Thing with a plane
intesection {
object{ Thing }
plane {y,0 }
}
would the intersection testing be done only to those objects that the
plane actually comes in contact with or would the intersection testing
be done against every object in the object Thing ?
--
Ken Tyler - 1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ken wrote:
>
> If I create a group of objects with a while loop
>
> #declare Thing =
> union {
> #declare a = 0;
> #while (a<10)
> #declare b = 0;
> #while (b<10)
> sphere{<a,b,0>,1}
> #declare b=b+1;
> #end
> #declare a=a+1;
> #end
> }
>
> and then intersected my new object Thing with a plane
>
> intesection {
> object{ Thing }
> plane {y,0 }
> }
>
> would the intersection testing be done only to those objects that the
> plane actually comes in contact with or would the intersection testing
> be done against every object in the object Thing ?
>
> --
> Ken Tyler - 1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
> http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Good question. I suspect that all objects will be tested for
intersection.
It should be possible during parsing to test whether objects in an
intersection will actually intersect, at least for simple primitives.
PoD.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Fri, 10 Mar 2000 10:51:55 -0800, Ken wrote:
>
>If I create a group of objects with a while loop
[...]
>and then intersected my new object Thing with a plane
>
>intesection {
> object{ Thing }
> plane {y,0 }
>}
>
>would the intersection testing be done only to those objects that the
>plane actually comes in contact with or would the intersection testing
>be done against every object in the object Thing ?
Only the object it comes in contact with, in this case, but only because
you picked such an easy plane.
POV computes the bounding box of the intersection by intersecting the
bounding boxes of its constituents. If a plane is axis-aligned, as
yours is, its bounding box is the half-space that would be considered
its "inside". So the intersection of the two bounding boxes is the
half of the union's bounding box that is inside the plane.
Had you intersected with plane {x+y,0}, however, this optimization would
not have happened. You could still attempt to bound it manually.
--
These are my opinions. I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ron Parker wrote:
> Only the object it comes in contact with, in this case, but only because
> you picked such an easy plane.
>
> POV computes the bounding box of the intersection by intersecting the
> bounding boxes of its constituents. If a plane is axis-aligned, as
> yours is, its bounding box is the half-space that would be considered
> its "inside". So the intersection of the two bounding boxes is the
> half of the union's bounding box that is inside the plane.
>
> Had you intersected with plane {x+y,0}, however, this optimization would
> not have happened. You could still attempt to bound it manually.
I suspected this was the case since some CSG operations on groups
of objects seem to operate much faster than they do on others.
Thanks for the input,
--
Ken Tyler - 1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|