current_spiral: Get current spiral object

Description Usage Details Value Examples

View source: R/spiral.R

Description

Get current spiral object

Usage

1

Details

The returned value is an object of spiral reference class. The following methods might be useful:

$curve():

It returns the radius for given angles (in radians).

$spiral_length():

It returns the length of the spiral (from the origin) for a given angle (in radians), thus if you want to get the length of a spiral segment, it will be spiral$spiral_length(theta2) - spiral$spiral_length(theta1) where spiral is the spiral object.

Also there are the following meta-data for the current spiral (assume the object is named s):

s$xlim:

Data range.

s$xrange:

s$xlim[2] - s$xlim[1]

s$theta_lim:

The corresponding range of theta

s$theta_range:

s$theta_lim[2] - s$theta_lim[1]

s$spiral_length_lim:

The corresponding range of spiral length

s$spiral_length_range:

s$spiral_length_lim[2] - s$spiral_length_lim[1]

s$max_radius:

Radius at s$theta_lim[2]

Value

A spiral object.

Examples

1
2
3
4
spiral_initialize()
s = current_spiral()
s$curve(2*pi*2)
s$spiral_length(2*pi*2)

spiralize documentation built on Feb. 6, 2022, 1:06 a.m.