17_regular_polygons: Regular Polygons

Description Usage Arguments Value Examples

Description

Regular polygons.

NOTE:
INTERNAL STRUCTURE OF OBJECTS IS SUBJECT TO CHANGE.
DO NOT USE SLOTS, DIRECTLY.

Usage

1
2
3
4
5
regPolygon (n=4, ..., about.axis, d=1, stagger = (n %% 2 == 0) )

Rect (..., about.axis, center=FALSE, side.length=1,
    glist = list () )
Cuboid (..., center=FALSE, side.length=1, glist = list () )

Arguments

n

Integer, the number of points.

d

Numeric, the distance.

about.axis

A single character equal to "x", "y", z".
If missing (the default), the object is in 2d space.
If true, a 2d object is created in 3d space.

stagger

Logical, if false, the first point is at the top.
Otherwise, it's rotated half the angle.
(That is, the angle equal to 2pi divided by n).

center

Logical, if true, the object is centered about the origin, otherwise, it has the lowermost corner at the origin.

side.length

Numeric vector of length one or two, the x and y lengths.

glist

Argument lists for plotting functions.
Note that, in Cuboid, it's applied to each face.

...

Ignored.

Value

A regPolygon, Rect or Cuboid object.

Examples

1
vt3.testplot (Rect (side.length = c (2, 1) ) )

vectools documentation built on June 7, 2021, 9:08 a.m.