taylorj@byuvax.bitnet (03/02/88)
One thing you need to consider to make the solution complete: If any segments of the region boundary cross each other, and the reference line (from the point in question to a point outside the region) also crosses the same point, don't count those segments. (In other words, if the reference line intersects more than one boundary line at the same point, the intersections should be ignored.) Consider a boundary which crosses itself twice at one point and a boundary which crosses itself three times at one point, and you'll see why this check is necessary. Jim Taylor Microcomputer Support for Curriculum, Brigham Young University taylorj@byuvax.bitnet