POV-Ray : Newsgroups : povray.unofficial.patches : Tesselation and mesh data extraction patches : Re: Tesselation and mesh data extraction patches Server Time
12 May 2024 10:36:56 EDT (-0400)
  Re: Tesselation and mesh data extraction patches  
From: Chris Huff
Date: 14 Dec 2000 16:30:09
Message: <chrishuff-E37068.16310714122000@news.povray.org>
In article <Xns### [at] povrayorg>, ing### [at] homenl (ingo) 
wrote:

> When you tesselate a mesh from a declared object, can't you use this 
> object to get the insideness information (all intersections?) from and 
> apply it to the mesh?

I vaguely remember this coming up in some earlier discussions about 
tesselating objects, but it apparently was forgotten, since nobody until 
now has actually done any work on a tesselation patch. You are right, it 
should work perfectly well for most purposes.
That could be a third insideness testing method...
Maybe an "insideness_method" keyword...

type 0:
insideness_method 0, DIRECTION
Fire a ray in DIRECTION, count intersections to determine insideness.

type 1:
insideness_method 1, DIRECTION_A, DIRECTION_B, DIRECTION_C, 
bidirectional BOOLEAN
Same as type 0, but performs three tests and returns the result of 2 or 
more. Avoids some problems with the first method, but slower and method 
0 would be useful for some things, like meshes that have "interiors" 
extending infinitely in one direction.
The sample directions would default to x, y, and z. If you specify only 
DIRECTION_A, the others are automatically calculated to be perpendicular 
to the given vector. If you only specify DIRECTION_A and DIRECTION_B, 
DIRECTION_C is automatically calculated to be perpendicular to those two.
The "bidirectional" keyword takes a boolean value that tells POV whether 
or not to sample in the opposite directions as well as the given 
directions. If it is true, yes, on, or 1, and you specify x, y, and z, 
it will send sample rays in x, y, z, -x, -y, and -z. It would default to 
"off", of course.

type 2:
insideness_method 2, OBJECT
Takes an object to use for insideness checks, the object could be 
declared or specified directly. Meshes generated with the "tesselate" 
feature could use this by default, unless something else is specified.


BTW, another thing about the tesselation patch: it could be very useful 
for the proximity patch, because it could use a proximity calculation 
optimized for meshes on any kind of object. Most objects wouldn't even 
need a high-res mesh, just something to give the general shape.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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