Learn R Programming

geophys (version 1.4-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

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

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
# NOT RUN {
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  
# }
# NOT RUN {
<!-- %*% S$Rview -->
# }
# NOT RUN {
    lines(CIRCview[,1], CIRCview[,2], col='purple')

cview =   BV$Center  
# }
# NOT RUN {
<!-- %*% S$Rview -->
# }
# NOT RUN {
    points(cview[1,1], cview[1,2])


# }

Run the code above in your browser using DataLab