航空学报 > 2002, Vol. 23 Issue (3): 234-236

一种新的判断二维直角坐标网格角点在任意外形物面内外的算法

李志宏, 陶智, 蔡伟华   

  1. 北京航空航天大学动力系402教研室 北京 100083
  • 收稿日期:2001-08-02 修回日期:2001-11-26 出版日期:2002-06-25 发布日期:2002-06-25

NEW METHOD FOR JUDGING CARTESIAN GRID VERTICES INSIDE OR OUTSIDE ARBITRARILY GEOMETRIC BODIES

LI Zhi-hong, TAO Zhi, CAI Wei-hua   

  1. Faculty 402, Beijing University of Aeronautics and Astronautics, Beijing 100083, China
  • Received:2001-08-02 Revised:2001-11-26 Online:2002-06-25 Published:2002-06-25

摘要:

根据计算机图形学中的视线遮挡原理,提出了二维平面上判断直角坐标网格角点在任意外形物面内外的一种新算法,并计算了一个 27× 15的直角坐标点阵元素与 3个等腰三角形物面的位置关系,作为该方法的一个算例。计算结果表明,该方法精度高,计算量小,通用性好,并且易于推广至三维复杂情况。

关键词: 二维平面, 角点, 任意外形物面

Abstract:

A new method is presented in this paper for judging if Cartesian grid vertices are inside or outside arbitrarily geometric bodies on the 2 dimensional plane. As an example, a 27×15 lattice is tested for judging the relations between the positions of its elements and those of three isosceles triangles. The calculated result shows that the presented method is precise, efficient and flexible. And it can be easily extended and applied to more complex 3 dimensional cases.

Key words: 2-dimensional plane, vertex, arbitrarily geometric bodies