Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


geophys (version 1.4-1)

rot2Zplane: Rotate to Z-plane

Description

Rotation matrix to project a set of 3D points to z-plane

Usage

rot2Zplane(vec, p)

Arguments

vec

3D normal vector

p

translation from this point

Value

Matrix for projection

Details

provides a matrix to rotate and translate a set of points to the X-Y plane. Used for internal calculations

See Also

gmat

Examples

Run this code
# NOT RUN {

P1=runif(3)
P2=runif(3)
P3=runif(3)

PP = rbind(P1, P2, P3, rep(1, 3) )

    g1 = PP[1, 1:3] - PP[3, 1:3]
    g2 = PP[2, 1:3] - PP[3, 1:3]


 B = unlist(AXB.prod(list(x = g1[1], y = g1[2], z = g1[3]), 
        list(x = g2[1], y = g2[2], z = g2[3])))
    B = B/sqrt(sum(B * B))


MF = rot2Zplane(B, P3) 

UMAT = t(PP) 
# }
# NOT RUN {
<!-- %*% MF -->
# }
# NOT RUN {

# }

Run the code above in your browser using DataLab