Title: | Zoo of Geometric Objects |
---|---|
Description: | Geometric objects defined in 'geozoo' can be simulated or displayed in the R package 'tourr'. |
Authors: | Barret Schloerke [aut, cre], Di Cook [ths], Hadley Wickham [ths] |
Maintainer: | Barret Schloerke <[email protected]> |
License: | GPL-2 |
Version: | 0.5.1 |
Built: | 2024-11-03 03:19:32 UTC |
Source: | https://github.com/schloerke/geozoo |
A function to produce a Boy Surface.
boy.surface(n = 10000)
boy.surface(n = 10000)
n |
number of points |
Barret Schloerke
http://schloerke.github.io/geozoo/mobius/other/
## Generates a Boy Surface boy.surface(n = 1000)
## Generates a Boy Surface boy.surface(n = 1000)
A function to produce a conic spiral
conic.spiral(n = 10000, a = 0.2, b = 1, c = 0.1, w = 2)
conic.spiral(n = 10000, a = 0.2, b = 1, c = 0.1, w = 2)
n |
number of points |
a |
final radius of cone |
b |
height of object |
c |
inner radius |
w |
number of spirals |
points |
location of points |
edges |
edges of the object (null) |
Barret Schloerke
http://schloerke.github.io/geozoo/mobius/other/
## Generates a Conic Spiral conic.spiral(n = 1000)
## Generates a Conic Spiral conic.spiral(n = 1000)
A function to produce a Conic Spiral in a nautilus shape
conic.spiral.nautilus(n = 10000, a = 0.2, b = 0.1, c = 0, w = 2)
conic.spiral.nautilus(n = 10000, a = 0.2, b = 0.1, c = 0, w = 2)
n |
number of points |
a |
final radius of cone |
b |
height of object |
c |
inner radius |
w |
number of spirals |
points |
location of points |
edges |
edges of the object (null) |
Barret Schloerke
http://schloerke.github.io/geozoo/mobius/other/
## Generates a Nautilus Conic Spiral conic.spiral.nautilus( n = 1000 )
## Generates a Nautilus Conic Spiral conic.spiral.nautilus( n = 1000 )
A function to generate a cross cap
cross.cap(n = 10000)
cross.cap(n = 10000)
n |
number of points |
points |
location of points |
edges |
edges of the object (null) |
Barret Schloerke
http://schloerke.github.io/geozoo/mobius/other/
## Generates a Cross Cap cross.cap( n = 1000 )
## Generates a Cross Cap cross.cap( n = 1000 )
A function generate a cross polytope, cube dual, with vertices and a wire frame.
cross.polytope(p = 3)
cross.polytope(p = 3)
p |
dimension of object |
points |
location of points |
edges |
edges of the object |
Barret Schloerke
http://schloerke.github.io/geozoo/cube/
# Generates a 3-D Cross Polytope cross.polytope(p = 3)
# Generates a 3-D Cross Polytope cross.polytope(p = 3)
A function to generate a cube with points on its face
cube.dotline(p = 3)
cube.dotline(p = 3)
p |
dimension of object |
points |
location of points |
edges |
edges of the object |
Barret Schloerke
http://schloerke.github.io/geozoo/cube/
## Generates a cube with points along its wire frame cube.dotline(p = 3)
## Generates a cube with points along its wire frame cube.dotline(p = 3)
A function to generate a cube with points on its face
cube.face(p = 3)
cube.face(p = 3)
p |
dimension of object |
points |
location of points |
edges |
edges of the object |
Barret Schloerke
http://schloerke.github.io/geozoo/cube/
## Generates a cube with points on its face cube.face(p = 3)
## Generates a cube with points on its face cube.face(p = 3)
A function generate a cube with vertices and a wire frame
cube.iterate(p = 3)
cube.iterate(p = 3)
p |
dimension of object |
points |
location of points |
edges |
edges of the object |
Barret Schloerke
http://schloerke.github.io/geozoo/cube/
## Generates a cube cube.iterate(p = 3)
## Generates a cube cube.iterate(p = 3)
A function to generate a solid cube with equidistant points
cube.solid.grid(p = 3, n = 8)
cube.solid.grid(p = 3, n = 8)
p |
dimension of object |
n |
length of number of points in each dimension |
points |
location of points |
edges |
edges of the object |
Barret Schloerke
http://schloerke.github.io/geozoo/cube/
## Generates a solid cube with equidistant points cube.solid.grid(p = 3, n = 8)
## Generates a solid cube with equidistant points cube.solid.grid(p = 3, n = 8)
A function to generate a solid cube with random points
cube.solid.random(p = 3, n = 850 * (2^p))
cube.solid.random(p = 3, n = 850 * (2^p))
p |
dimension of object |
n |
number of points |
points |
location of points |
edges |
edges of the object |
Barret Schloerke
http://schloerke.github.io/geozoo/cube/
## Generates a solid cube with random points cube.solid.random(p = 3, n = 1000)
## Generates a solid cube with random points cube.solid.random(p = 3, n = 1000)
A function to generate a dini surface.
dini.surface(n = 10000, a = 1, b = 1)
dini.surface(n = 10000, a = 1, b = 1)
n |
number of points |
a |
outer radius of object |
b |
space between loops |
points |
location of points |
edges |
edges of the object (null) |
Barret Schloerke
http://schloerke.github.io/geozoo/mobius/other/
## Generates a Dini Surface dini.surface(n = 1000, a = 1, b = 1)
## Generates a Dini Surface dini.surface(n = 1000, a = 1, b = 1)
A function to generate an ellipsoid
ellipsoid(n = 10000, a = 1, b = 1, c = 3)
ellipsoid(n = 10000, a = 1, b = 1, c = 3)
n |
number of points |
a |
radius in x direction |
b |
radius in y direction |
c |
radius in z direction |
points |
location of points |
edges |
edges of the object (null) |
Barret Schloerke
http://schloerke.github.io/geozoo/mobius/other/
## Generates an ellipsoid ellipsoid(n = 1000, a = 1, b = 1, c = 3)
## Generates an ellipsoid ellipsoid(n = 1000, a = 1, b = 1, c = 3)
A function to generate Enneper's surface
enneper.surface(n = 10000, a = 4)
enneper.surface(n = 10000, a = 4)
n |
number of points |
a |
angle, radians, minimum and maximum. -a < angle < a |
points |
location of points |
edges |
edges of the object (null) |
Barret Schloerke
http://schloerke.github.io/geozoo/mobius/other/
## Generates an Enneper Surface enneper.surface(n = 1000, a = 4)
## Generates an Enneper Surface enneper.surface(n = 1000, a = 4)
Function to take a d-dimensional compositional data set and transform it using a Helmert transformation into (p-1)-space, where it lives. Mostly internally used, but could be useful for setting up new compositional data.
f_composition(data)
f_composition(data)
data |
object |
data |
points in (d-1)-dimensional space |
Di Cook
http://schloerke.github.io/geozoo/simplices/
Function to set up a Helmert transformation of a (d-1)-dimensional shape in p-space down into its (p-1)-space. Mostly internally used, but could be useful for setting up new compositional data.
f_helmert(d)
f_helmert(d)
d |
object |
helmert |
transformation matrix |
Di Cook
http://schloerke.github.io/geozoo/simplices/
A function to generate a figure eight Klein bottle
klein.fig.eight(n = 10000, a = 3, b = 1)
klein.fig.eight(n = 10000, a = 3, b = 1)
n |
number of points |
a |
radius of outer radius |
b |
radius of inner radius |
points |
location of points |
edges |
edges of the object (null) |
Barret Schloerke
http://schloerke.github.io/geozoo/mobius/other/
## Generates a figure eight Klein bottle. klein.fig.eight(n = 1000, a = 3, b = 1)
## Generates a figure eight Klein bottle. klein.fig.eight(n = 1000, a = 3, b = 1)
A function to generate a mobius strip in the third or fourth dimension.
mobius(p = 3, n = 10000)
mobius(p = 3, n = 10000)
p |
dimension of object. (3) |
n |
number of points |
Barret Schloerke
http://schloerke.github.io/geozoo/mobius/mobius/
## Generates a mobius strip. mobius(3, n = 1000)
## Generates a mobius strip. mobius(3, n = 1000)
A function to generate a 5-D mobius strip in the third dimension.
mobius.experiment(p = 5, n = 10000)
mobius.experiment(p = 5, n = 10000)
p |
dimension of object. (5) |
n |
number of points |
Barret Schloerke
http://schloerke.github.io/geozoo/mobius/mobius/
## Generates a mobius strip. mobius.experiment(5, n = 1000)
## Generates a mobius strip. mobius.experiment(5, n = 1000)
Prints geozoo objects with tourr or prints them
## S3 method for class 'geozoo' print(x, ...)
## S3 method for class 'geozoo' print(x, ...)
x |
geozoo object |
... |
other arguements |
Barret Schloerke
http://schloerke.github.io/geozoo/
## Not run: example(boy.surface) example(cube.face) ## End(Not run)
## Not run: example(boy.surface) example(cube.face) ## End(Not run)
Prints objects without rescaling them to 0, 1 in each dim
## S3 method for class 'geozooNoScale' print(x, ...)
## S3 method for class 'geozooNoScale' print(x, ...)
x |
geozoo object |
... |
other arguements |
Barret Schloerke
http://schloerke.github.io/geozoo/
## Not run: torus() ## End(Not run)
## Not run: torus() ## End(Not run)
A function to generate a Roman surface, also known as a Steiner surface
roman.surface(n = 10000, a = 1)
roman.surface(n = 10000, a = 1)
n |
number of points |
a |
maximum radius of object |
points |
location of points |
edges |
edges of the object (null) |
Barret Schloerke
http://schloerke.github.io/geozoo/mobius/other/
## Generates a Roman surface. roman.surface(n = 1000, a = 1)
## Generates a Roman surface. roman.surface(n = 1000, a = 1)
A function to generate a simplex
simplex(p = 3)
simplex(p = 3)
p |
dimension of object |
points |
location of points |
edges |
edges of the object (null) |
Barret Schloerke
http://schloerke.github.io/geozoo/simplices/
## Generates a simplex simplex(p = 3)
## Generates a simplex simplex(p = 3)
A function to generate a sphere with points on the surface
sphere.hollow(p = 3, n = p * 500)
sphere.hollow(p = 3, n = p * 500)
p |
dimension of object |
n |
number of points |
points |
location of points |
edges |
edges of the object (null) |
Barret Schloerke
http://schloerke.github.io/geozoo/sphere/
## Generates a sphere with points on the surface sphere.hollow(p = 3, n = 1000)
## Generates a sphere with points on the surface sphere.hollow(p = 3, n = 1000)
A function to generate a solid sphere with equidistant points.
sphere.solid.grid(p = 3, n = 8)
sphere.solid.grid(p = 3, n = 8)
p |
dimension of object |
n |
maximum number of points in the diameter |
points |
location of points |
edges |
edges of the object (null) |
Barret Schloerke
http://schloerke.github.io/geozoo/sphere/
## Generates a solid sphere with equidistant points sphere.solid.grid(p = 3, n = 8)
## Generates a solid sphere with equidistant points sphere.solid.grid(p = 3, n = 8)
A function to generate a solid sphere with random points
sphere.solid.random(p = 3, n = p * 500)
sphere.solid.random(p = 3, n = p * 500)
p |
dimension of object |
n |
number of points |
points |
location of points |
edges |
edges of the object (null) |
Barret Schloerke
http://schloerke.github.io/geozoo/sphere/
## Generates a solid sphere with random points. sphere.solid.random(p = 3, n = 1000)
## Generates a solid sphere with random points. sphere.solid.random(p = 3, n = 1000)
A function to generate a torus in any dimension
torus(p = 3, n = 10000, radius = 2^((p - 2):0))
torus(p = 3, n = 10000, radius = 2^((p - 2):0))
p |
dimension of object |
n |
number of points |
radius |
radiuses of the torus, set from largest to smallest |
points |
location of points |
edges |
edges of the object (null) |
Barret Schloerke
http://schloerke.github.io/geozoo/mobius/torus/
## Generates a torus torus(p = 3, n = 1000)
## Generates a torus torus(p = 3, n = 1000)
A function to generate a flat torus in any dimension
torus.flat(p = 4, n = 10000)
torus.flat(p = 4, n = 10000)
p |
dimension of object (number of circles x2) |
n |
number of points |
points |
location of points |
edges |
edges of the object (null) |
Barret Schloerke
http://schloerke.github.io/geozoo/mobius/torus/
## Generates a Flat Torus torus.flat(p = 4, n = 1000)
## Generates a Flat Torus torus.flat(p = 4, n = 1000)
A function that allows the user to write an object into an .xml.
write.xml(object.function, filepath, title)
write.xml(object.function, filepath, title)
object.function |
i.e. cube() or sphere() |
filepath |
where you would like to save the file in quotes |
title |
title of the file in quotes |
Barret Schloerke