Spc.MakePolygon: Construct a polygon from elementary triangles. Returns these...

Description Usage Arguments Value See Also Examples

Description

Construct a polygon from elementary triangles. Returns these as a combined list.

Usage

1
Spc.MakePolygon(x, y, z, properties = NA)

Arguments

x, y, z

Three vectors containing the 3 euclidean coordinates of 4 or more points to be combined.

properties

Package-independent object defining additional properties. Default NA

Value

List of triangles, constructed from elements 1,2 and 3; then 1,3 and 4, then 1,4 and 5; and so on. The function will check you've supplied at least 3 points. If you supply exactly three, it'll simply return a triangle object. The function is designed to mostly be used to construct polygons within a common plane, but will run on any sets of points regardless.

See Also

Other constructors: Spc.Combine, Spc.MakeCuboid, Spc.MakePlane, Spc.MakeSphere, Spc.MakeTriangle

Examples

1
2
  p <- Spc.MakePolygon(x=c(0,0,1,1), y=c(0,1,1,0), z=c(0,0,0,0), "square1")
  Spc.MakePolygon(x=c(0,0,1,1,2,2), y=c(0,2,2,1,1,0), z=c(0,0,0,0,0,0), "L-shaped flat object")

JerBoon/vecspace documentation built on May 26, 2019, 7:28 a.m.