|
![](/i/fill.gif) |
Hi all -
I'm working on a solar system image right now, and im having trouble with
the asteroid belt. I've tried a media - filled cone, and a while loop to
place random spheriods. (see code below)
So really, I have 3 questions -
1) is there a way to adjust the while loop so that it generates the spheres
inside the boundries of the cone?
2) i know Tek used an asteroid belt pigment in one of his IRTC entries. Does
anyone have the source code for this pigment or something similar that I
could use?
3) Anyone have any other ideas for this project?
Thanks,
OpalPlanet
(i know the scales and colors of both of these are odd, they're all
placeholders, sorry)
//media filled cone
cone { <0 0, 0>, 0 // Center and radius of one end
<127,0, 0>, 30.0 // Center and radius of other end
rotate<0, 0,0>
pigment{rgbt 1}
hollow
interior{
media {
emission .1
density {
bozo density_map {
[.51 rgb <0, 0, 1> warp{ turbulence .5} ]
}//end density map
}//end density
}//end media
}//end interior
}//end cone
//randomly-generated spheres
#declare xp = seed(0);
#declare yp = seed(0);
#declare zp = seed(0) ;
#declare rad = seed(3);
#declare xs = seed(4) ;
#declare ys = seed(5);
#declare zs = seed(6) ;
#declare xr = seed(7) ;
#declare yr = seed(8) ;
#declare zr = seed(9) ;
#declare n = 0;
#while (n<20000)
sphere{<1000+rand(xp),1000+rand(yp),1000+rand(zp)>, rand(rad)
scale<rand(xs),rand(ys),rand(zs)>
rotate<rand(xr),rand(yr),rand(zr)>
pigment{Green}}
#declare n = n+1;
#end
Post a reply to this message
|
![](/i/fill.gif) |