Learn R Programming

fdaPDE (version 1.1-21)

projection.points.1.5D: Project 2D points onto 1.5D linear network mesh

Description

This function projects any 2D points onto 1.5D linear network mesh.

Usage

projection.points.1.5D(mesh, locations)

Value

2D points projected onto 1.5D linear network mesh.

Arguments

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.

Examples

Run this code
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)

Run the code above in your browser using DataLab