计算区域面积[VB/VBA函数]
08-22 13:58:42 浏览次数:541次 栏目:工程测量
'Points格式:
'Points(0):X
'Points(1):Y
'Points(2):H
'...公式:Area=1/2*(x1*y2-x2*y1+x2*y3-x3*y2+... ...+xn*x1-x1*yn)
Private Function Area(Points() As Double) As Double '计算Points()区域面积
Dim L As Long
L = UBound(Points) - 3
Dim T1 As Long
Dim S As Double
S = 0
For T1 = 0 To L Step 3
S = S + Points(T1) * Points(T1 + 4) - Points(T1 + 1) * Points(T1 + 3)
Next T1
S = S + Points(T1) * Points(1) - Points(T1 + 1) * Points(0)
Area = Abs(S / 2)
End Function,计算区域面积[VB/VBA函数]
++《计算区域面积[VB/VBA函数]》相关文章
- › 计算区域面积[VB/VBA函数]
- 在百度中搜索相关文章:计算区域面积[VB/VBA函数]
- tag: 暂无联系方式, 工程测量,工程测量规范,工程测量技术,工程资料 - 工程测量