toPolar
Unroll the child around center, so angle becomes x and distance becomes y.
toPolar(slots: {center: ArgSpec; wrap: ArgSpec; radius: ArgSpec; intensity: ArgSpec}): UvMapSource
Import warps from shaders/std and use warps.toPolar.
wrap scales how many times the child repeats around (1 is once). radius scales the distance axis. intensity runs 0 (no change) to 1 (the full polar unwrap), and the values between are a real partial warp, not a cross-fade.
Parameters
| Name | Type | Notes |
|---|---|---|
slots | {center: ArgSpec; wrap: ArgSpec; radius: ArgSpec; intensity: ArgSpec} |
Example
map: warps.toPolar({center: p('center'), wrap: p('wrap'), radius: p('radius'), intensity: p('intensity')})
See also
fromPolar— Wrap the child into a circle aroundcenter, reading its x as angle and its y as distance.kaleidoscope— Fold the child into mirrored pie slices aroundcenter.