Learn R Programming

Morpho (version 2.1)

meshPlaneIntersect: get intersections between mesh and a plane

Description

get intersections between mesh and a plane

Usage

meshPlaneIntersect(mesh, v1, v2, v3)

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

Value

  • returns the intersections of edges and the plane

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)
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