xy_to_polar: Convert data coordinates to polar coordinates
Description
Convert data coordinates to polar coordinates
Usage
xy_to_polar(x, y, track_index = current_track_index(), flip = TRUE)
Value
A data frame with two columns: theta (in radians) and r (the radius).
Arguments
- x
X-locations of the data points.
- y
Y-locations of the data points.
- track_index
Index of the track.
- flip
If it is FALSE, it returns theta for the original spiral (before flipping).
Details
Note different settings of flip and reverse in spiral_initialize affect the conversion.