? subroutine to check if a 3D point is in the 3D region or not
Author Message
? subroutine to check if a 3D point is in the 3D region or not

Dear All:

Anyone know if there is any fortran subroutine that can check if a 3D
point is belong to

a 3D region? Say given a point A(x,y,z), check if point A is on the boundary
or indside the

points set R constructed by B1(x,y,z), B2(x,y,z), and so on.

Thank you

by Cheng Cosine
Jun/28/2k+1 UT

Tue, 16 Dec 2003 14:06:07 GMT
? subroutine to check if a 3D point is in the 3D region or not

Quote:

>Dear All:

>   Anyone know if there is any Fortran subroutine that can check if a 3D
>point is belong to

>a 3D region? Say given a point A(x,y,z), check if point A is on the
boundary
>or indside the

>points set R constructed by B1(x,y,z), B2(x,y,z), and so on.

>  Thank you

>by Cheng Cosine
>   Jun/28/2k+1 UT

One possible way - and this may not be efficient:
Find the 3d convex hull containing your basic set of points.
Add the new point to the set and see if the number of points
in the hull increases - if it does, then the new point must
have been outside.

I know nothing about algorithms for 3D convex hulls, but
I guess that they contain a test for whether a point is inside
or not.

There is a site in Japan with Fortran code for the 3D convex
hull, and some other geometric software.   Have a look at
http://dmoz.org  (The Open Directory Project)
under Computers/Programming/Languages/Fortran/Source_code

--
Alan Miller (Honorary Research Fellow, CSIRO Mathematical
& Information Sciences)
http://www.ozemail.com.au/~milleraj
http://users.bigpond.net.au/amiller/

Tue, 16 Dec 2003 15:51:56 GMT
? subroutine to check if a 3D point is in the 3D region or not
hello,

the 3D region is composed with triangles... (of course the 3D region is
closed)

find the bounding box of the 3D region take a point A outside the bounding
box
so i think the best algorithm to determine if B is inside the 3D region is :
- find how many triangles the segment AB intersect the 3D region
- if the intersection count is odd , B is inside otherwise outside

regards
jacques Le Thuaut

ps : sorry for my english

Quote:

> >Dear All:

> >   Anyone know if there is any Fortran subroutine that can check if a 3D
> >point is belong to

> >a 3D region? Say given a point A(x,y,z), check if point A is on the
> boundary
> >or indside the

> >points set R constructed by B1(x,y,z), B2(x,y,z), and so on.

> >  Thank you

> >by Cheng Cosine
> >   Jun/28/2k+1 UT

> One possible way - and this may not be efficient:
> Find the 3d convex hull containing your basic set of points.
> Add the new point to the set and see if the number of points
> in the hull increases - if it does, then the new point must
> have been outside.

> I know nothing about algorithms for 3D convex hulls, but
> I guess that they contain a test for whether a point is inside
> or not.

> There is a site in Japan with Fortran code for the 3D convex
> hull, and some other geometric software.   Have a look at
> http://dmoz.org  (The Open Directory Project)
> under Computers/Programming/Languages/Fortran/Source_code

> --
> Alan Miller (Honorary Research Fellow, CSIRO Mathematical
> & Information Sciences)
> http://www.ozemail.com.au/~milleraj
> http://users.bigpond.net.au/amiller/

Tue, 16 Dec 2003 16:29:01 GMT
? subroutine to check if a 3D point is in the 3D region or not

Quote:

> >Dear All:

> >   Anyone know if there is any Fortran subroutine that can check if a 3D
> >point is belong to

> >a 3D region? Say given a point A(x,y,z), check if point A is on the
> boundary
> >or indside the

> >points set R constructed by B1(x,y,z), B2(x,y,z), and so on.

> >  Thank you

> >by Cheng Cosine
> >   Jun/28/2k+1 UT

There is an easy way to tell whether two points lies on the same side of
a hyperplane.

If the hyperplane is given by  a_1*x_1 + ...+ a_n*x_n + b = 0 and
(u_1,...,u_n) and (v_1,...v_n) are given points then they are on the
same side of the plane provided
p = (a_1*u_1 + ...+a_n*u_n + b)*(a_1*v_1 + ...+a_n*v_n + b) > 0, on
opposite sided if that p < 0 and at least one point is on the hyperplane
if the p=0.

Given a set of points in 3D, determine which triangular faces are faces
of the convex hull, and the sign of each such plane
a_1*u_1 + ...+a_n*u_n + b = 0 for an interior point (u_1,u_2,u_3),
then test your given point to see if it is on the correct side of each
of those planes.

Wed, 17 Dec 2003 03:36:17 GMT

 Page 1 of 1 [ 4 post ]

Relevant Pages