squareMesh | R Documentation |
The square is subdivided into m
internal squares.
Within each internal square nodes are set at the corners and the middle.
Each square is thus subdivided into four triangles.
squareMesh(m=1)
m |
The number of squares within the outer square. |
The outer square has sides of length m
. If another length $x > 0$ of the side
is required, this can easily be achieved by the command p = p*x/m
.
A named list containing locations of nodes and which nodes define the edge segments and the triangles. The members are:
p: A two-column matrix specifying the nodes of the mesh.
e: A two-column matrix of integers specifying which nodes define each edge segment.
t: A three-column matrix of integers specifying which nodes define each triangle in anti-clockwise order.
Jim Ramsay
Sangalli, Laura M., Ramsay, James O., Ramsay, Timothy O. (2013), Spatial spline regression models, Journal of the Royal Statistical Society, Series B, 75, 681-703.
link{plotFEM.mesh}
m <- 3 # A square of size 3 with 9 internal squares, # 25 nodes, 12 edge segments and 36 triangles. result = squareMesh(m) pts = result$pts edg = result$edg tri = result$tri # plot the mesh plotFEM.mesh(pts,tri)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.