Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rtorus

Generate points in the torus


Description

This function generates n random points within the torus whose minor radius is r, major radius is R and center is ct.

Usage

rtorus(n, r, R, ct = c(0, 0, 0), rotx = NULL)

Arguments

n

Number of observations.

r

Minor radius (radius of the tube).

R

Major radius (distance from the center of the tube to the center of the torus).

ct

A vector with the coordinates of the center of the torus.

rotx

If not NULL, a rotation through an angle rotx (in radians) about the x-axis is performed.

Examples

T1 <- rtorus(2000, 0.5, 2.5)
rgl.bbox()
rgl.points(T1, col = 4)

T2 <- rtorus(2000, 0.5, 2.5, ct = c(2, 0, 0.5), rotx = pi/2)
rgl.points(T2, col = 2)

alphashape3d

Implementation of the 3D Alpha-Shape for the Reconstruction of 3D Sets from a Point Cloud

v1.3.1
GPL-2
Authors
Thomas Lafarge, Beatriz Pateiro-Lopez
Initial release
2020-12-09

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.