![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Roman Reiner <lim### [at] gmx de> wrote:
> "kiwon" <nomail@nomail> wrote:
> > If I put *inside_vector y* (because the surface's average normal direction is y
> That's not how inside_vector works.
> It simply defines the specified point to be *inside* the object, thus
> determining its inside and outside.
Nope. inside_vector defines a *direction*, not a point.
When determining if a point is inside the mesh or not, a ray will be
shot in that specified direction from that point, and the number of
intersections with the mesh counted. (If the count is odd, then the point
is determined to be inside.)
For closed meshes in theory there's little significance on which direction
you choose. Basically any direction would work equally well. There are certain
pathological circumstances where the chosen direction becomes crucial, though.
For example, if you have a triange that's exactly on the xy plane, choosing
an inside_vector x (or any other vector that's on the xy plane) can cause
the insideness calculations to fail for points on that plane. While this is
quite unlikely to happen and show visible effects, in theory it can happen.
That's why you should try to choose a direction that is not tangential to
any of the triangles, if possible.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp <war### [at] tag povray org> wrote:
> For closed meshes in theory there's little significance on which direction
> you choose.
I forgot to mention the other situation, ie. open meshes: In this case
the chosen direction is *very* crucial, as it determines which direction
the endless "interior" of the open mesh will face. For example, if you have
a "heightfield" built up as a mesh, placed on the xz plane, you want its
interior to be below it, ie. pointing to the negative y direction. In that
case you would use "inside_vector y" (which means that interior testing
rays are shot right up).
(Solid open meshes can often be useful in conjunction with csg, and
perhaps sometimes even on their own, even though in this case you have
to take into account that the "interior" of the mesh will extend to
infinity at the opposite direction of the inside_vector.)
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> Dear POV-Ray users,
>
> when there is only a surface mesh, is there any way to construct a solid
> (volumetric) mesh covered by other solid object boundary such as box?
>
> This codes are what I'm just trying, but doesn't seem to work:
>
> #declare mysurface = mesh2 {
> ... surface data
> }
>
> #declare myvolume = union {
> box {0, 1 clipped_by {mysurface}}
> mysurface
> }
>
> Thanks
>
> Tested in Persistence of Vision(tm) Ray Tracer Version 3.7.0.RC3
> Issued: Parse Error: Illegal texture or patch in clip, bound or object pattern.
>
>
>
I see absolutely no logical to use that kind of construction.
clipped_by cuts a hole in your box and leave it open. You then plug it
with your mysurface object.
If mysurface don't cover exactly the wanted opening, there will be bits
of the parent object sticking or bits of the mesh protuding around.
If you use this:
intersection{
box{0, 1}
object{mysurface}
texture{...}
}
With a mysurface that have a proper inside_vector, you will have the
same result.
Also, mysurface can now be defined with a texture if you want to, or
need it (like when using an UV maped texture)
Alain
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |