tri2std.basic.tri: Converting a triangle to the standard basic triangle form...

View source: R/AuxDelaunay.R

tri2std.basic.triR Documentation

Converting a triangle to the standard basic triangle form form

Description

This function transforms any triangle, tri, to the standard basic triangle form.

The standard basic triangle form is T_b=T((0,0),(1,0),(c_1,c_2)) where c_1 is in [0,1/2], c_2>0 and (1-c_1)^2+c_2^2 \le 1.

Any given triangle can be mapped to the standard basic triangle form by a combination of rigid body motions (i.e., translation, rotation and reflection) and scaling, preserving uniformity of the points in the original triangle. Hence, standard basic triangle form is useful for simulation studies under the uniformity hypothesis.

Usage

tri2std.basic.tri(tri)

Arguments

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

Value

A list with two elements

Cvec

The nontrivial vertex C=(c_1,c_2) in the standard basic triangle form T_b.

orig.order

Row order of the input triangle, tri, when converted to the standard basic triangle form T_b

Author(s)

Elvan Ceyhan

Examples

## Not run: 
c1<-.4; c2<-.6
A<-c(0,0); B<-c(1,0); C<-c(c1,c2);

tri2std.basic.tri(rbind(A,B,C))
tri2std.basic.tri(rbind(B,C,A))

A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
tri2std.basic.tri(rbind(A,B,C))
tri2std.basic.tri(rbind(A,C,B))
tri2std.basic.tri(rbind(B,A,C))

## End(Not run)


elvanceyhan/pcds documentation built on June 29, 2023, 8:12 a.m.