solve_theta_from_spiral_length: Get theta from given spiral lengths

View source: R/transform.R

solve_theta_from_spiral_lengthR Documentation

Get theta from given spiral lengths

Description

Get theta from given spiral lengths

Usage

solve_theta_from_spiral_length(len, interval = NULL, offset = 0)

Arguments

len

A vector of spiral lengths.

interval

Interval to search for the solution.

offset

Offset of the spiral. In the general form: r = a + r*theta, offset is the value of a.

Details

The length of the spiral has a complicated form, see https://downloads.imagej.net/fiji/snapshots/arc_length.pdf . Let's say the form is l = f(theta), solve_theta_from_spiral_length tries to find theta by a known l. It uses uniroot to search solutions.

Value

The theta value.

Examples

spiral_initialize()
s = current_spiral()
theta = pi*seq(2, 3, length = 10)
len = s$spiral_length(theta)
solve_theta_from_spiral_length(len) # should be very similar as theta

spiralize documentation built on Aug. 9, 2022, 5:09 p.m.