A new method is presented in this paper to decide whether a point is in a polygon or a polyhedron. By taking a preprocessing to organize facets of polyhedrons and edges of polygons in to layers, it employs the binary searching algorithm to perform tests instead of handling all facets and edges. Experimental results show that it is simple, robust, and easy to use.