POV-Ray : Newsgroups : povray.newusers : mapping spheres onto a sphere....liposome Server Time
27 Dec 2024 00:42:40 EST (-0500)
  mapping spheres onto a sphere....liposome (Message 1 to 3 of 3)  
From: Chemgirl
Subject: mapping spheres onto a sphere....liposome
Date: 26 Jan 2007 13:05:00
Message: <web.45ba42a9d907dc90b0e7987f0@news.povray.org>
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

From: Trevor G Quayle
Subject: Re: mapping spheres onto a sphere....liposome
Date: 26 Jan 2007 15:00:00
Message: <web.45ba5cd1a6cc4078c150d4c10@news.povray.org>
"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

From: Chemgirl
Subject: Re: mapping spheres onto a sphere....liposome
Date: 29 Jan 2007 11:45:00
Message: <web.45be2357a6cc4078b0e7987f0@news.povray.org>
Thank you SO much Trevor!  I really appreciate it! This should be fun to
play with. :)


Post a reply to this message

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