POV-Ray : Newsgroups : povray.binaries.scene-files : Short code Christmas Server Time
23 Nov 2024 20:24:26 EST (-0500)
  Short code Christmas (Message 1 to 1 of 1)  
From: Paolo Gibellini
Subject: Short code Christmas
Date: 20 Dec 2006 12:50:27
Message: <458977e3$1@news.povray.org>
// Merry Christmas!
#declare s=seed(2);

//A winter sky
sky_sphere{
 pigment{
  agate
  color_map{
   [0  rgb.5]
   [.5 rgb.6]
   [1  rgb.8]
  }
 }
}

// A glass-like (due to sky reflection) star:
#macro star(c,s)
 // An element...
 #local o=sphere_sweep{
  linear_spline 2,2*z,.2,2*z-x,.1
  pigment{
   c
  }
  finish{
   reflection 1
  }
  scale s
 };
 // ...repeated 8 times
 union {
  #local i=0;
  #while(i<9)
   object{
    o
    scale .8*x+.3*y
    rotate i*45*z
   }
   #local i=i+1;
  #end
 }
#end

// Some random
#macro r(m)
    rand(s)*m
#end

// Main red star
object {star(rgb x,1) translate <0,0,1>}

// Other stars
#local i=500;
#while(i>0)
 object {star(rgb x+y,0.1+r(0.4)) rotate int(-2+r(4))*(10+r(70))*y translate
<-15+r(30),-5+r(10),3+r(10)>}
 #local i=i-1;
#end

// Some text
#declare txt=text {
 ttf "polo.ttf", "Merry Christmas! Happy 2007!", 0.2, 0
  scale 0.095
}

object {
 txt
 texture{pigment{color rgb x} finish{reflection 1}}
 translate <-max_extent(txt).x/2,-0.4,1>
}


Post a reply to this message

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