POV-Ray : Newsgroups : povray.newusers : Make it shorter. : Make it shorter. Server Time
2 Nov 2024 07:24:32 EDT (-0400)
  Make it shorter.  
From: Oleguer Vilella
Date: 11 Aug 2004 11:41:24
Message: <411a3e24$1@news.povray.org>
Hello,

I have to make shorter this membrane I don't know how can I do it. I also
make an angle like a bridge I trayed with sine and cosine but, logically,
it's doesn't work like I need. The code is:

#include "colors.inc"
#include "textures.inc"
  background { White
  }
  camera {location <170, -11, -110>look_at  <180, -15, -16>}
  light_source { <170, -30, -100> color White}

#declare lipid =  union {
                        blob{  threshold 0.1
                                sphere {<0, 0, 0>, 2 ,1 texture {pigment {
color Red }finish { ambient 0.2 diffuse 0.8 phong 1 }} scale 0.8}
                                cylinder {<0.8,0,0>,<0.8,-5,0>, 0.5,1
texture {pigment { color White }finish { ambient 0.2 diffuse 0.8 phong 1 }}
scale 0.8 }
                                cylinder {<-0.8,0,0>,<-0.8,-5,0>, 0.5,1
texture {pigment { color White }finish { ambient 0.2 diffuse 0.8 phong 1 }}
scale 0.8 }
                        ////rotate <0, 0, 0> translate <0, 14, 1>
                        }

                        blob{  threshold 0.1
                                sphere {<0, 0, 0>, 2 ,1 texture {pigment {
color Red }finish { ambient 0.2 diffuse 0.8 phong 1 }} scale 0.8 }
                                cylinder {<0.8,0,0>,<0.8,-5,0>, 0.5,1
texture {pigment { color White }finish { ambient 0.2 diffuse 0.8 phong 1 }}
scale 0.8 }
                                cylinder {<-0.8,0,0>,<-0.8,-5,0>, 0.5,1
texture {pigment { color White }finish { ambient 0.2 diffuse 0.8 phong 1 }}
scale 0.8 }
                        rotate <190,0,0>translate <0,-8,-1> }
                        translate <90, 0, 0> scale 0 scale <0, -0.78, 0>
                  }

// Fi d'unitats basiques lipid mes paret
// Macro per a crear la membrana
// Apunt: per a crear sensacio de desordre es poden rotar els stuffs en
l'eix y. Aixo produeix l'efecte que les cadenes hidrofobiques del lipid no
estan sempre paralleles. Al final he optat per no tocar el rotate, per a
incrementar l'ordre de la membrana.
#macro Make_Stuff (Stuff,How_Many)
#local Ample=-12;

// Bicapa en una sola dimensio, eix z

#while (Ample<How_Many)
    object{Stuff  rotate <0,0*Ample,0> translate<3*Ample,0*cos
(Ample/8),0> }
    #local Ample=Ample+1;
  #end
#end
// Si es vol una bicapa mes llarga es pot incrementar el nombre de molecules
de lipid. Per defecte, esta a 100. Com mes lipids es posin mes costara crear
la imatge!
#declare layer = union {Make_Stuff (lipid,100)}
///////global_settings { max_trace_level 29 }
// Fi de Bicapa en una sola dimensio
//Bicapa en les dos dimensions del pla de la membrana.
#macro Make_Many (Stuff,How_Many)
#local Fons=0;

#while (Fons<How_Many)
    object{Stuff  translate <0,0*sin (Fons/8),3*Fons>}
    #local Fons=Fons+1;
  #end
#end
// Incrementar el nombre de bicapes unidimensionals per a fer una membrana
mes fonda. 50 molecules de lipid de fons funciona be, 72 amb el

union {Make_Many (layer,50)}
//   End of the code.

Please if someone can help me, replay in the group.
I wait your ideas.

Thank you in advance,
Oleguer
http://www.infonegocio.com/oleguervm


Post a reply to this message

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