projection.points.1.5D | R Documentation |
This function projects any 2D points onto 1.5D linear network mesh.
projection.points.1.5D(mesh, locations)
mesh |
A mesh.1.5D object representing the graph mesh, created by create.mesh.1.5D. |
locations |
2D points to be projected onto 1.5D mesh. |
2D points projected onto 1.5D linear network mesh.
library(fdaPDE)
##Create Mesh
nodes=matrix(c(0.25,0.25,0.5,0.25,0.75,0.5,0.75,0.), nrow = 4, byrow=TRUE)
edges=matrix(c(1,2,2,3,2,4),nrow = 3,byrow = TRUE)
mesh_ = create.mesh.1.5D(nodes,edges,order=1)
## Create 2D points to be projected
locations=matrix(nrow=5,ncol=2)
locations[,1] = runif(5,min=0.25,max=0.75)
locations[,2] = runif(5,min=0.25,max=0.5)
## Project the points on the mesh
loc = projection.points.1.5D(mesh_, locations)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.