POV-Ray : Newsgroups : povray.general : I want spikey balls : I want spikey balls Server Time
5 Aug 2024 08:27:28 EDT (-0400)
  I want spikey balls  
From: Tom Melly
Date: 15 Oct 2002 09:47:10
Message: <3dac1c5e$1@news.povray.org>
I think there's a built in function (iirc), but I'd rather roll my own.

I played with:
#declare fn_X = function(x,y,z) { x*x + y*y + z*z -
(sin(x*5)*sin(y*5)*sin(z*5)) - 1 }
but, although interesting, for obvious reasons (well, obvious when you render
it), this doesn't work.

I tried normalising x,y and z, but that didn't seem to work either (but I think
I was doing that wrong - it seemed like a good idea).

So, how do I make my balls spikey?

--
#macro A(V,B,C,R)#while(B-256)#if(V-128/B>=0)sphere{0,.5translate<C-4R-1,9>
pigment{rgb<1-C/8R/2C/8>}}#local V=V-128/B;#end#local B=B*2;#local C=C+1;#
end#end A(234,1,0,2)A(85,1,0,1)A(81,1,0,0)light_source{-5 1}//Tom Melly


Post a reply to this message

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