add.constraint(tri.obj,cstx,csty,reverse=F)
tri.obj
|
object of class "tri"
|
cstx
| vector containing x coordinates of the constraint curve. |
csty
| vector containing y coordinates of the constraint curve. |
reverse
|
if TRUE the orientation of the constraint curve
is reversed.
|
tri.mesh
by the following:
5') If a node is contained in the interior of the circumcircle of a triangle, then every interior point of the triangle is separated from the node by a constraint arc.
In order to be explicit, we make the following definitions. A constraint region is the open interior of a simple closed positively oriented polygonal curve defined by an ordered sequence of three or more distinct nodes (constraint nodes) P(1),P(2),...,P(K), such that P(I) is adjacent to P(I+1) for I = 1,...,K with P(K+1) = P(1). Thus, the constraint region is on the left (and may have nonfinite area) as the sequence of constraint nodes is traversed in the specified order. The constraint regions must not contain nodes and must not overlap. The region R is the convex hull of the nodes with constraint regions excluded.
Note that the terms boundary node and boundary arc are reserved for nodes and arcs on the boundary of the convex hull of the nodes.
The algorithm is as follows: given a triangulation which includes one or more sets of constraint nodes, the corresponding adjacencies (constraint arcs) are forced to be present (Fortran subroutine EDGE). Any additional new arcs required are chosen to be locally optimal (satisfy the modified circumcircle property).
"tri"
.tri
, print.tri
, plot.tri
, summary.tri
, triangles
, convex.hull
.# we will use the test data from library(akima): library(akima) data(akima) akima.tr<-tri.mesh(akima$x,akima$y) # include all points in a big triangle: akima.trc<-add.constraint(akima.tr,c(-30,50,15),c(-10,-10,40),reverse=T) par(mfrow=c(1,2)) plot(akima.tr) plot(akima.trc)