Re: CCL:Inside or outside of a polyhedron
- From: Alexander Golbraikh <golb' at \`osi.lanet.lv>
- Subject: Re: CCL:Inside or outside of a polyhedron
- Date: Wed, 17 Apr 1996 11:03:29 +0300 (EET DST)
On Tue, 16 Apr 1996, Brian W. Beck wrote:
> Alexander Golbraikh wrote:
> :
> :
> :
> : Take any ray beginning at the given point. Count the number of
> : points of intersection of this ray with polyhedron surface. If it is
> : even, then the point is outside the polyhedron, if it is odd, then
inside.
> : One precaution: the ray may slide on some edges of the polyhedron.
> :
> : Best regards,
> : Alexander Golbraikh
> :
> :
> ^ /
> |/
> < As you say, the ray may slide. The "o" point at
the left is
> |\ outside the "polyhedron" yet passes through the
polyhedron
> | \ surface only once if you send the ray only through the
vertices
> o \ defined by... say the Calphas of a protein.
>
> -Brian
> --
Thank you for your remark. I mean the point must be taken into
account in case the ray crosses the surface of the polyhedron, i.e. when
any whatever small segment of the ray containing this point
contains also points both in the inside and in the outside of the
polyhedron. Both cases could be easily discriminated. You may also ask
what to do if the given point belongs to the polyhedron surface. In this
case all depends on which polyhedron we consider: the closed or the open
one. (If we consider that the border (the surface) of the polyhedron
belongs to the polyhedron, it is closed). If it is closed, the point
belongs to the polyhedron (but isn't its inner point), if it is open, the
point doesn't belong to the polyhedron.
Alexander
+----------------------------------------------------------------------+
+ Dr. Alexander Golbraikh Email: golb' at \`osi.lanet.lv +
+ Group of Molecular Biophysics +
+ Latvian Institute of Organic Synthesis FAX: + (371) 7-821-038 +
+ 21 Aizkraukles st. +
+ Riga LV-1006 Phone: + (371) 7-552-354 +
+ LATVIA +
+----------------------------------------------------------------------+