|
![](/i/fill.gif) |
On Wed, 12 Dec 2001 16:17:35 +0100, Tim Nikias <Tim### [at] gmx de> wrote:
> Though I couldn't test your code yet (POV-Ray doesn't do multiple
> instances yet
POV-Ray does multiple instances, but... with previous beta :-)
> Somehow, I don't know why, there is this rumour that objects itself
> can't be stored in arrays. You can actually do things like:
> #declare Objects=array[3]
> {sphere{<0,0,0>,1},box{-1,1},cylinder{0,y,1}}
of course I know. but it complicates intersection checking.
you considered memory problems and mine seems optimal in this case.
> But yes, your code did actually (in some other method, not using objects
> themselves) do the job I was talking about. Though that was of no concern,
> I just wanted to know, if there is some easier way, some special clue, which
> might improve the process.
My code is universal. Just replace spheres condition (distance<2R) with own
method based on another set of traces or whatever you want.
> Another thing that was just on my mind:
> Using Macros, one could also increase the dimensions of arrays dynamically,
> so there is also no need to set an amount beforehand.(Just in case someone was
> curious about that).
I know. My point was to write readable and fast enough code.
ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)&_((x+y)*.7,z,.1)&_((x+y+2)*.7,z,.1)&_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35
Post a reply to this message
|
![](/i/fill.gif) |