POV-Ray : Newsgroups : povray.binaries.images : wallpaperstuff, no idea how to name this ;-) (~200kB) : Re: wallpaperstuff, no idea how to name this ;-) (~200kB) Server Time
5 Nov 2024 02:17:53 EST (-0500)
  Re: wallpaperstuff, no idea how to name this ;-) (~200kB)  
From: Roman Reiner
Date: 7 Dec 2005 09:35:01
Message: <web.4396f07bbadd071c8af771770@news.povray.org>
Hi there!

Thank you all very much for your nice comments!

> Is there any chance I could take a peek at the code?

Sure! but i told you there isn't something spectacular in there ;-)
here it is:

[codeblock]

camera {
  location 1.2*<-2.5,10,-5>
  look_at 0
  angle 65
}

background { rgb 1 }

light_source {
  <-5,15,-5>
  rgb 1.5
}

plane {
  y, 0
  pigment { rgb 0 }
  finish { reflection 1 }
    //I don't see any reflections in the image, do you? but it
    //looks different with only a white plane ore just with a
    //white background... *weird*
}

global_settings {
  max_trace_level 32      //looks veeery ugly without that :D
}

//creating the boxes (superellipsoids)

#declare H = seed(27);
#declare S = seed(13);

#declare f = .1;
  //parameter adjusting the "roundness" of the superellipsoids

#declare i=-10;  //from left
#while (i<14)    //to right

  superellipsoid {
    <f,f>
      //"roundness" of the box

    pigment { rgb 1+<0,.25*rand(S),rand(S)> transmit .8 }
      //color is a little bit randomized. mainly blue

    scale .25*rand(S)
      //nothing to say here :D

    scale y*2.5*(1+rand(H))
      //the fact that the height is scaled separately
      //and with an other seed is a relic of an older version ;-)

    #local j = 2.5*pow(rand(S),1.5);
      //the amount how much the box is translated from
      //the middle axis (towards upper/lower side of the image)
      //pow is used to "bundle" the objects at the center
      //results in smoother outlines since only very
      //big (almost 1) values stay big. smaller values
      //are scaled towards the center

    translate <i,0,j>
      //move it finally

    no_shadow
      //spares a lot of rendering time ;-)
  }

  superellipsoid {
    //the same thing on the other side of the centerline
    <f,f>
    pigment { rgb 1+<0,.25*rand(S),rand(S)> transmit .8}
    scale .25*rand(S)
    scale y*2.5*(1+rand(H))
    #local j = -2.5*pow(rand(S),1.5);
    translate <i,0,j>
    no_shadow
  }
  superellipsoid {
    //and a few other blocks with some different values
    //(also in pairs)
    <f,f>
    pigment { rgb 1+<0,.25*rand(S),rand(S)> transmit .8}
    scale .25*rand(S)
    scale y*2.5*(1+rand(H))
    #local j = 5*pow(rand(S),1.5);  //and again
    translate <i,0,j>
    no_shadow
  }
  superellipsoid {
    <f,f>
    pigment { rgb 1+<0,.25*rand(S),rand(S)> transmit .8}
    scale .25*rand(S)
    scale y*2.5*(1+rand(H))
    #local j = -5*pow(rand(S),1.5);
    translate <i,0,j>
    no_shadow
  }
  #if(mod(10+i,.1)=0)  //that's meaning not so many ;-)
    superellipsoid {
      <f,f>
      pigment { rgb 1+<0,.25*rand(S),rand(S)> transmit .8}
      scale .25*rand(S)
      scale y*2.5*(1+rand(H))
      #local j = 7*pow(rand(S),2);
      translate <i,0,j>
      no_shadow
    }
    superellipsoid {
      <f,f>
      pigment { rgb 1+<0,.25*rand(S),rand(S)> transmit .8}
      scale .25*rand(S)
      scale y*2.5*(1+rand(H))
      #local j = -7*pow(rand(S),2);
      translate <i,0,j>
      no_shadow
    }
  #end
  #if(mod(10+i,.2)=0)  //that's meaning even less
    superellipsoid {
      <f,f>
      pigment { rgb 1+<0,.25*rand(S),rand(S)> transmit .8}
      scale .25*rand(S)
      scale y*4*(1+rand(H))
      #local j = 10*pow(rand(S),2);
      translate <i,0,j>
      no_shadow
    }
    superellipsoid {
      <f,f>
      pigment { rgb 1+<0,.25*rand(S),rand(S)> transmit .8}
      scale .25*rand(S)
      scale y*4*(1+rand(H))
      #local j = -10*pow(rand(S),2);
      translate <i,0,j>
      no_shadow
    }
  #end
  #declare i=i+.05;
#end

//that's it

[/codeblock]

Regards Roman


Post a reply to this message

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