POV-Ray : Newsgroups : povray.newusers : isosurfaces? : Re: isosurfaces? Server Time
30 Jul 2024 18:15:19 EDT (-0400)
  Re: isosurfaces?  
From: Warp
Date: 4 Nov 2003 07:49:11
Message: <3fa7a046@news.povray.org>
Tom Melly <tom### [at] tomandlucouk> wrote:
> Also, and less importantly, you probably want {pow(x*x+y*y+z*z,0.5)-R}, since
> otherwise you sphere is going to have a radius of the square-root of R, rather
> than R (which is fine, but breaks the doctrine of least surprise ;)

  Why use a heavy solution to a simple problem?
  If the R needs to be squared, then simply square it. This will probably
result in much faster renderings, the result being equal:

#declare FSphere = function(x,y,z,R) { x*x+y*y+z*z-R*R }

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

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