POV-Ray : Newsgroups : povray.general : I want spikey balls Server Time
6 Nov 2024 06:21:53 EST (-0500)
  I want spikey balls (Message 1 to 6 of 6)  
From: Tom Melly
Subject: I want spikey balls
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

From: Sir Charles W  Shults III
Subject: Re: I want spikey balls
Date: 15 Oct 2002 14:28:38
Message: <3dac5e56$1@news.povray.org>
I was going to say "see your doctor", but I think that merging code for some
cones might be the simplest way.

Cheers!

Chip Shults
My robotics, space and CGI web page - http://home.cfl.rr.com/aichip


Post a reply to this message

From: Tom & Lu Melly
Subject: Re: I want spikey balls
Date: 15 Oct 2002 14:50:16
Message: <3dac6368@news.povray.org>
"Sir Charles W. Shults III" <aic### [at] cflrrcom> wrote in message
news:3dac5e56$1@news.povray.org...
>     I was going to say "see your doctor", but I think that merging code
for some
> cones might be the simplest way.
>

Yes, but I can't deform them so easily (I was thinking of playing with some
hair).


Post a reply to this message

From: Slime
Subject: Re: I want spikey balls
Date: 15 Oct 2002 15:45:48
Message: <3dac706c@news.povray.org>
> 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).

You might find that instead of taking the sine/cosine of x,y, or z, that
taking the sine or cosine of theta (atan(z/x)) or phi
(atan(y/sqrt(x^2+z^2))) will work better. These two angles can be calculated
with the f_th and f_ph functions in functions.inc. (There's also an f_r
function which gives you the distance to the origin at a point; these three
functions are related.)

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


Post a reply to this message

From: Christopher James Huff
Subject: Re: I want spikey balls
Date: 20 Oct 2002 20:09:32
Message: <chrishuff-F58131.20044620102002@netplex.aussie.org>
In article <3dac6368@news.povray.org>,
 "Tom & Lu Melly" <all### [at] tomandlucouk> wrote:

> Yes, but I can't deform them so easily (I was thinking of playing with some
> hair).

I put an image of your balls in povray.binaries.images, with source code.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Christopher James Huff
Subject: Re: I want spikey balls
Date: 20 Oct 2002 20:22:53
Message: <chrishuff-AD1914.20180620102002@netplex.aussie.org>
In article <chr### [at] netplexaussieorg>,
 Christopher James Huff <chr### [at] maccom> wrote:

> > Yes, but I can't deform them so easily (I was thinking of playing with some
> > hair).
> I put an image of your balls in povray.binaries.images, with source code.

The image won't go through, it's getting stuck partway through for some 
reason. (censorship? j/k)
I'll post source code to povray.text.scene-files instead.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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