歡迎來到http://www.tljciu.live !
當前位置:六六工程資料網建筑課堂工程資料工程測量計算區域面積[VB/VBA函數]

計算區域面積[VB/VBA函數]

08-22 13:58:42  瀏覽次數:541次  欄目:工程測量
標簽:工程測量規范,工程測量技術, 計算區域面積[VB/VBA函數],http://www.tljciu.live
'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函數]》相關文章

22选五的开奖公告