算法来确定一个点是否位于一个有界区域之内的 [英] Algorithm to determine whether a point lies within a bounded area

查看:167
本文介绍了算法来确定一个点是否位于一个有界区域之内的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个人如何确定是否一个或多个点所在的区域,其边界内给予?例如,在下面的图中,三个蓝色点落在界在红色的区域内,两个红色点落在界在蓝色的区域内,并且有三个点 - 两个蓝色和一个红色 - 这不内任一躺指示的区域。

How does one determine whether one or more points lie within an area whose boundary is given? For instance, in the following figure, three blue points lie within the area bounded in red, two red points lie within the area bounded in blue, and there are three points - two blue and one red - which do not lie within either of the indicated areas.

推荐答案

这里
这是C,但code /算法可转换为C#提供方便。

look here
It's C, but code/algorithm can be converted to C# with ease.

这篇关于算法来确定一个点是否位于一个有界区域之内的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆