POV-Ray : Newsgroups : povray.text.scene-files : Tinsel Server Time
1 Nov 2024 13:21:52 EDT (-0400)
  Tinsel (Message 1 to 1 of 1)  
From: Gail Shaw
Subject: Tinsel
Date: 24 Dec 1999 14:32:01
Message: <3863ca31@news.povray.org>
Here's source for the tinsel scene in p.b.i
It's not perfect 'cause I'm working from memory, but it should give the
correct idea. NB this has not been tried in pov. If it doesn't work, play
with it until it does.

This requires superpatch or megapov

Gail

#declare MetalFinish =
 finish {
  ambient 0
  diffuse 0
  specular 0.9
  roughness 0.002
  reflection 0.95
  metallic
  reflect_metallic
}

#declare Tinsel1=
 spline {
  cubic_spline
  -0.25 <-1,0.25,0>
   0,<0,0,0>
   0.5 <2,-0.5,0>
   1 <4,0,0>
   1.25 <5,0.25,0>
 }

#declare Rand1=seed(3487);

#declare Loop=0;
#while (Loop<=1)
 sphere {
  <0,0,0>+Tinsel(Loop),0.002
  pigment {rgb <1,1,0.9>}
 }
 box {
  <-0.001,-0.05,-0.002>,<0.001,0.05,0.002>
  pigment { rgb <0,0,0.8>}
  finish {MetalFinish}
  rotate y*180*rand(Rand1)
  rotate x*360*rand(Rand1)
  translate <0,0,0>+Tinsel1(Loop)
 }
 box {
  <-0.001,-0.05,-0.002>,<0.001,0.05,0.002>
  pigment { rgb <0.8,0.8,0.8>}
  finish {MetalFinish}
  rotate y*180*rand(Rand1)
  rotate x*360*rand(Rand1)
  translate <0,0,0>+Tinsel1(Loop+0.001)
 }
 #declare Loop=Loop+0.002;
#end


Post a reply to this message

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