Math behind the Log spiral calculator