|
|
Hi all-
I need to be able to draw a bunch of repeating spheres in the shape of a
sphere, see
http://bunshi3.bio.nagoya-u.ac.jp/bunshi3/students/yohko/liposome.jpg for
an example. I can't for the life of me figure out how to do this! I want
to create my own image so I can modify it further and avoid copyright
infringements. It needs to be 3D, so if I do a cut-away in the sphere I
can see the little spheres, so I can't just plop a picture of a sphere on
the surface of the sphere....does this make sense?
The only things I can think of are to either:
- Figure out a way to make a sphere into a repeating pattern to use as a
pattern on another sphere
<or>
- figure out a mathematical way of creating a sphere and repeating another
sphere next to it, in increments of Xsquared + ysquared to create a circle
of spheres, then build from there- but I have NO IDEA how to do this in
POVRAY!!!
Any other ideas???
PLEASE help!!!!
thanks in advance!
Post a reply to this message
|
|
|
|
"Chemgirl" <nomail@nomail> wrote:
> PLEASE help!!!!
> thanks in advance!
Here is a scene using a macro I wrote a while back for geodesic packing. As
you increase the n-value, the number of spheres becomes exponentially more
(and so does parsing and rendering. Feel free to use this or modify it if
is of use to you.
Geodesic(n,R,Obj)
n=subdivision level
R=radius of geodesic shpere
Obj=object to place geodesically
//START
camera{
up y
right x*image_width/image_height
angle 30
location <0,0,-1000>
look_at 0
}
light_source{<0,1000,-1000>
rgb 1
}
#macro Geodesic(n,R,Obj)
union{
#if (n=0)
object{Obj}
#else
#local nL=pow(2,(n-1));
#local i=-nL;
#while (i<=nL)
#local nS=4*(nL-abs(i));
#if (nS=0)
object{Obj translate<0,0,-R> rotate x*i*90/nL}
#else
#local j=0;
#while (j<nS)
object{Obj translate<0,0,-R> rotate x*i*90/nL rotate y*j*360/nS}
#local j=j+1;
#end
#end
#local i=i+1;
#end
#end
}
#end
#declare SP=sphere{0,6 pigment{rgb 1}}
object{Geodesic(5,100,SP)}
//START
-tgq
Post a reply to this message
|
|