Learn R Programming

pgs (version 0.4-0)

PP2: Generator of 2D PointPattern objects with 1,4,5,6,7,8 or 9 points

Description

Create a PointPattern-class object representing a 2D point pattern with 1,4,5,6,7,8 or 9 points lying in a rectangle.

Usage

PP2(n = 4, h = 1, v = h, h3 = TRUE)

Arguments

n
the number of points. Must be 1,4,5,6,7,8 or 9. Default, 4.
h
the horizontal side length of the rectangle. Default, 1.
v
the vertical side length of the rectangle. Default, h.
h3
if TRUE, alignment of 3 points (see details below) are horizontal (vertical if FALSE). Used only for n=6, 7 or 8.

Value

A PointPattern-class object.

Details

When n=4, the four points lie at the four corners of the rectangle. When n=5, the fifth point lies at the center of the rectangle. When n=6 (and h3 is TRUE), four points lie at the rectangle corners and the two other points lie at the centres of the top and bottom edges. When n=7 (and h3 is TRUE), the point pattern consists of 3 horizontal alignments of 2, 3 and 2 points. When n=8 (and h3 is TRUE), the point pattern consists of 3 horizontal alignments of 3, 2 and 3 points. When n=9, the point pattern consists of 3 (horizontal or vertical) alignments of 3 points.

See Also

Generators PointPattern, PP3.

Examples

Run this code
plot(PP2(7))

Run the code above in your browser using DataLab