POV-Ray : Newsgroups : povray.general : um... : Re: um... Server Time
2 Aug 2024 02:22:41 EDT (-0400)
  Re: um...  
From: Slime
Date: 27 Jan 2005 16:14:01
Message: <41f95999$1@news.povray.org>
> |   function{ sqrt(x*x+y*y)-r - (cos(atan(y/x)*ridges)*d) }
> ~                                          ^^^


You can try replacing atan(y/x) by atan2(y,x) which avoids the division by
zero and also avoids the problem that 1/2 is equal to -1/-2 and thereby
gives more useful results for all values of x and y.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.