Learn R Programming

geophys (version 1.2-1)

TriangleCenter: Triangle Center

Description

Extract Triangle center in 3D

Usage

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)

Value

  • Centerx-y of center of the inscribed circle
  • rradius of inscribed
  • Cinscribedinscribed circle points around center
  • CIRCUMx-y of center of the circumscribed circle

Details

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

See Also

TriangleInfo

Examples

Run this code
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])

Run the code above in your browser using DataLab