POV-Ray : Newsgroups : povray.windows : how to create a random coil : Re: how to create a random coil Server Time: 7 Jul 2008 04:35:31 GMT
  Re: how to create a random coil  
From: St 
Date: 18 Oct 2007 03:06:33
"zj905" <zj905 [at] hotmailcom> wrote in message 
news:web.4716a7eca1216bf14f7090800@news.povray.org...
> Anybody knows how to draw a random coil in povray? I am very interested in
> doing this but not capable of doing it. I need help. Thanks in advance.


   Google Is Your Friend: 
http://www.geocities.com/ccolefax/download/coil.txt

    (Note that the code shown there is for pov3.1 but it shouldn't be a 
problem).



    Or, you could experiment with this:



 #declare Ball =
 sphere{<0,0,0>,0.15 scale <1,1,1> rotate<0,0,0> translate<0,0,0>
 texture{pigment{ color rgb<1,0.7,0>}
                finish { diffuse 0.9 phong 1}}}

union{
 #local Nr = 0;            // start
 #local N_per_Rev = 500;   // Number of Elements per revolutions
 #local N_of_Rev  = 4.25;  // Total number of revolutions
 #while (Nr< N_per_Rev*N_of_Rev)
   object{Ball translate<1,Nr*0.45/N_per_Rev,0>
               rotate<0,Nr * 360/N_per_Rev,0>}

 #local Nr = Nr + 1;    // next Nr
 #end // ---------------  end of loop
rotate<0,0,0>
translate<0,0,0>} // end of union


    ~Steve~


Post a reply to this message

Copyright 1991-2004 POV-Team™