Learn R Programming

Morpho (version 2.12)

meshPlaneIntersect: get intersections between mesh and a plane

Description

get intersections between mesh and a plane

Usage

meshPlaneIntersect(mesh, v1, v2 = NULL, v3 = NULL, normal = NULL)

Value

returns the intersections of edges and the plane

Arguments

mesh

triangular mesh of class "mesh3d"

v1

numeric vector of length=3 specifying a point on the separating plane

v2

numeric vector of length=3 specifying a point on the separating plane

v3

numeric vector of length=3 specifying a point on the separating plane

normal

plane normal (overrides specification by v2 and v3)

Examples

Run this code
data(nose)
v1 <- shortnose.lm[1,]
v2 <- shortnose.lm[2,]
v3 <- shortnose.lm[3,]
intersect <- meshPlaneIntersect(shortnose.mesh,v1,v2,v3)
if (FALSE) {
require(rgl)
wire3d(shortnose.mesh)
spheres3d(shortnose.lm[1:3,],col=2)#the plane
spheres3d(intersect,col=3,radius = 0.2)#intersections
}

Run the code above in your browser using DataLab