# TriangleCenter: Triangle Center In geophys: Geophysics, Continuum Mechanics, Gravity Modeling

## Description

Extract Triangle center in 3D

## Usage

 `1` ```TriangleCenter(P1, P2, P3, A1= 0, A2= 360, KNum=10) ```

## Arguments

 `P1` 3-vector, point(x,y,z) `P2` 3-vector, point(x,y,z) `P3` 3-vector, point(x,y,z) `A1` degrees, initial angle in plane(default=0) `A2` degrees, final angle in plane(default=360) `KNum` Divisor Number to divide range by (default=10)

## Details

Program rotates the object to the X-Y plane and does calculations in 2D, then rotates back.

## Value

 `Center` x-y of center of the inscribed circle `r` radius of inscribed `Cinscribed` inscribed circle points around center `CIRCUM` x-y of center of the circumscribed circle

## Author(s)

Jonathan M. Lees<[email protected]>

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25``` ```S = stressSETUP() pstart() PLOTbox(S\$Rax, S\$Rbox, axcol= 'green', boxcol= 'purple') pstart() PLOTplane(S\$Rp, planecol="brown") PLOTbox(S\$Rax, S\$Rbox, axcol= 'green', boxcol= 'purple') NORMvec(S\$PPs, S\$xscale, S\$Rview, S\$aglyph, add=TRUE) P1 = S\$PPs[1, 1:3] P2 = S\$PPs[2, 1:3] P3 = S\$PPs[3, 1:3] BV = TriangleCenter(S\$PPs[1,1:3],S\$PPs[2,1:3], S\$PPs[3,1:3] ) CIRCview = BV\$Cinscribed lines(CIRCview[,1], CIRCview[,2], col='purple') cview = BV\$Center points(cview[1,1], cview[1,2]) ```