// Eternity Screensaver - Ubuntu Studio Plugin // Copyright (C) 2007 Garry Parker // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License along // with this program; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. //------------------------------------------------------------------------- // povray -Q11 -W640 -H480 +kff360 +kc ubuntustudio-anim.pov #include "shapes.inc" #include "colors.inc" #include "textures.inc" #include "rand.inc" #include "shapes_lo.inc" // Required for Segment_of_Torus /*-----------------------------------------------------------------------*/ // Construct the Ubuntu Studio Logo using CSG #declare UbuntuStudio = merge { // Inner circle torus { 0.36, 0.15 } // Middle circle sphere {<0, 0, 0>, 0.15 translate <0,0,0.8> rotate <0,260,0> } sphere {<0, 0, 0>, 0.15 translate <0,0,0.8> rotate <0,280,0> } object {Segment_of_Torus(0.8, 0.15, 20) rotate <0,170,0> } sphere {<0, 0, 0>, 0.15 translate <0,0,0.8> rotate <0,230,0> } sphere {<0, 0, 0>, 0.15 translate <0,0,0.8> rotate <0,310,0> } object {Segment_of_Torus(0.8, 0.15, 280) rotate <0,220,0> } // Outer circle sphere {<0, 0, 0>, 0.15 translate <0,0,1.2> rotate <0,20,0> } sphere {<0, 0, 0>, 0.15 translate <0,0,1.2> rotate <0,50,0> } object {Segment_of_Torus(1.2, 0.15, 30) rotate <0,290,0> } sphere {<0, 0, 0>, 0.15 translate <0,0,1.2> rotate <0,130,0> } sphere {<0, 0, 0>, 0.15 translate <0,0,1.2> rotate <0,160,0> } object {Segment_of_Torus(1.2, 0.15, 30) rotate <0,40,0> } sphere {<0, 0, 0>, 0.15 translate <0,0,1.2> rotate <0,255,0> } sphere {<0, 0, 0>, 0.15 translate <0,0,1.2> rotate <0,285,0> } object {Segment_of_Torus(1.2, 0.15, 30) rotate <0,165,0> } texture { pigment { rgb <0,0.61,0.98> } finish { phong 1.0 phong_size 10 ambient 0.2 diffuse 0.8 } } } /*-----------------------------------------------------------------------*/ // Here are a few macros intended to mimic the standard UbuntuStudio // artwork, which looks like an out-of-focus Christmas tree laid on its // side! We have lights which are then grouped into clusters. #macro Light(Loc, Col) sphere { Loc 1 hollow interior { media { emission Col } } pigment {Clear} } #end #declare S = seed(0); // Define a LightCluster as a number of lights randomly grouped around // a centre point. Each cluster has a colour, the green part of which // is also randomised. // Number of lights, standard deviation, position, colour #macro LightCluster(N, SD, X,Y,Z, R,G,B) #declare i = 1; #while(i <= N) // Cluster around the main position #declare Pos = ; #declare G2 = G; #if (rand(S) > 0.5) #declare G2 = rand(S)-0.5; #end #if (rand(S) > 0.9) #declare G2 = 1; #end #declare Col = ; Light(Pos, Col) #declare i = i + 1; #end #end /*-----------------------------------------------------------------------*/ // Construct the scene. global_settings { assumed_gamma 1.0 } light_source { <50, 100, 0> colour White } light_source { <-200, 30, -300> colour White } camera { location <0, 1.2, -3.5> look_at <0,-0.2,0> // Focal blur. // Looks nice but slows down the rendering significantly, // (especially variance 0) blur_samples 120 aperture 0.3 focal_point <0,0,0> variance 0 } plane { y, -1.5 texture { pigment { Black } finish { reflection { .9 metallic} } } } // Add a number of light clusters in varying colurs // and rotate based on the clock. union { LightCluster(10, 3, -9,3,1, 0.6,0.0,0.0) // Red LightCluster(10, 4, -8,3,0, 0.6,0.0,0.0) // Red LightCluster(10, 5, 0,4,2, 0.0,0.0,0.6) // Blue LightCluster(7, 3, 1,6,5, 0.0,0.2,0.0) // Green LightCluster(5, 2, 2,6,5, 0.6,0.0,0.0) // Red LightCluster(22, 2, 10,2,0, 0.6,0.0,0.0) // Red rotate <0, -360*(clock+0.00), 0> translate <0,0,30> } // Add the logo and rotate based on the clock object { UbuntuStudio /*rotate <90,30,0>*/ rotate <+360*(clock+0.00), +360*(clock+0.00), +360*(clock+0.00)> }