POV-Ray : Newsgroups : povray.newusers : alittle assistance? : Re: alittle assistance? Server Time
31 Jul 2024 04:17:20 EDT (-0400)
  Re: alittle assistance?  
From: Tom Melly
Date: 10 Jan 2003 10:12:35
Message: <3e1ee2e3$1@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3e1d414f$1@news.povray.org...
>
> On the bright side, you've thrown a nice gauntlet down as to who can be the
> first to recreate the scene.....
>

... which ain't gonna be me.

I've been playing with doing this as a single isosurface, but have run into a
problem I can't solve.

I can get a grid of spheres with:

#declare Fc = function(m){abs(int(m)*2-(int(m/2)*2)-m)}
#declare Fa = function(x,y,z){pow(Fc(x),2) + pow(y,2) + pow(Fc(z),2) - 1/2}

isosurface{
  function{Fa(x,y,z)}
  contained_by {box{<-10,-2,-10>,<10,2,10>}}
  accuracy 0.001
  max_gradient 10
  pigment{rgb 0.5}
}

but if I try and perturb their placement with:

#declare Fc = function(m){abs(int(m)*2-(int(m/2)*2)-m)}
#declare Fb = function(q,r){sin(pow(q,2)+pow(z,2))/5}
#declare Fa = function(x,y,z){pow(Fc(x),2) + pow(y-Fb(x,z),2) + pow(Fc(z),2) -
1/2}

isosurface{
  function{Fa(x,y,z)}
  contained_by {box{<-10,-2,-10>,<10,2,10>}}
  accuracy 0.001
  max_gradient 10
  pigment{rgb 0.5}
}

I run into the obvious problem of this affecting the sphere-shapes, rather than
their placement. I tried various INT options, so that Fb would return a constant
value for any particular sphere, but couldn't get it to work. Any ideas anyone?


Post a reply to this message

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