runif.std.tri: Generation of Uniform Points in the Standard Equilateral...

View source: R/PatternGen.R

runif.std.triR Documentation

Generation of Uniform Points in the Standard Equilateral Triangle

Description

An object of class "Uniform". Generates n points uniformly in the standard equilateral triangle T_e=T(A,B,C) with vertices A=(0,0), B=(1,0), and C=(1/2,\sqrt{3}/2).

Usage

runif.std.tri(n)

Arguments

n

A positive integer representing the number of uniform points to be generated in the standard equilateral triangle T_e.

Value

A list with the elements

type

The type of the pattern from which points are to be generated

mtitle

The "main" title for the plot of the point pattern

tess.points

The vertices of the support region of the uniformly generated points, it is the standard equilateral triangle T_e for this function

gen.points

The output set of generated points uniformly in the standard equilateral triangle T_e.

out.region

The outer region which contains the support region, NULL for this function.

desc.pat

Description of the point pattern from which points are to be generated

num.points

The vector of two numbers, which are the number of generated points and the number of vertices of the support points (here it is 3).

txt4pnts

Description of the two numbers in num.points

xlimit,ylimit

The ranges of the x- and y-coordinates of the support, T_e

Author(s)

Elvan Ceyhan

See Also

runif.basic.tri, runif.tri, and runif.multi.tri

Examples

## Not run: 
A<-c(0,0); B<-c(1,0); C<-c(1/2,sqrt(3)/2);
Te<-rbind(A,B,C);
n<-100

set.seed(1)
Xdt<-runif.std.tri(n)
Xdt
summary(Xdt)
plot(Xdt,asp=1)

Xlim<-range(Te[,1])
Ylim<-range(Te[,2])
xd<-Xlim[2]-Xlim[1]
yd<-Ylim[2]-Ylim[1]

Xp<-runif.std.tri(n)$gen.points
plot(Te,asp=1,pch=".",xlab="",ylab="",xlim=Xlim+xd*c(-.01,.01),
ylim=Ylim+yd*c(-.01,.01))
polygon(Te)
points(Xp)

## End(Not run)


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