|
|
Mike Marinos <mik### [at] yahoocom> wrote:
: Is it possible to create two unions , each with a single blob on top of
: a cylinder, position the unions so that the blobs are in contact with
: each other and get the blobs to interact blobby like?
Well, supposing you want to do something like this:
#declare Thing =
union
{ cylinder { 0, y, .1 }
blob { sphere { y, 1, 1 } }
}
union
{ object { Thing translate -x rotate z*-45 }
object { Thing translate x rotate z*45 }
}
and you want those two created blob spheres to interact, you will have to
make some tricks.
The fact is that the two blob sphere have to be in the same blob block in
order to interact. So we have to create them inside it.
This could be one way of doing it (untested):
#macro CreateBlobComponent(Loc, Rad, Str, Transf)
sphere { Loc, Rad, Str transform { Transf } }
#end
#declare Thing =
cylinder { 0, y, .1 }
#declare BlobLocation = y;
union
{ #declare Tr1 = transform { translate -x rotate z*-45 }
#declare Tr1 = transform { translate x rotate z*45 }
object { Thing transform { Tr1 } }
object { Thing transform { Tr2 } }
blob
{ CreateBlobComponent(BlobLocation, 1, 1, Tr1)
CreateBlobComponent(BlobLocation, 1, 1, Tr2)
}
}
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|