meshPlaneIntersect: get intersections between mesh and a plane

View source: R/meshPlaneIntersect.r

meshPlaneIntersectR Documentation

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)

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)

Value

returns the intersections of edges and the plane

Examples

data(nose)
v1 <- shortnose.lm[1,]
v2 <- shortnose.lm[2,]
v3 <- shortnose.lm[3,]
intersect <- meshPlaneIntersect(shortnose.mesh,v1,v2,v3)
## Not run: 
require(rgl)
wire3d(shortnose.mesh)
spheres3d(shortnose.lm[1:3,],col=2)#the plane
spheres3d(intersect,col=3,radius = 0.2)#intersections

## End(Not run)

Morpho documentation built on June 22, 2024, 7:19 p.m.