1// This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
2// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a
3// letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
4
5// Persistence Of Vision Raytracer sample file.
6// BSP test scene by Lance Birch - thezone.firewave.com.au
7// Render with +BM2 to enable BSP tree bounding (POV-Ray v3.7 beta 12 or later).
8
9/***************************************************************
10 * $File: //depot/povray/smp/distribution/scenes/bsp/Tango.pov $
11 * $Revision: #1 $
12 * $Change: 5418 $
13 * $DateTime: 2011/03/06 09:25:00 $
14 * $Author: jholsenback $
15 **************************************************************/
16
17#version 3.7;
18
19global_settings {assumed_gamma 1.0}
20#default {texture {finish {ambient 0.03}} pigment {rgb 1}}
21background {rgb 1}
22
23camera {ultra_wide_angle location <0,0,-55> look_at <0,0,0> angle 100 rotate <0,32,45> translate <-25,-25,0>}
24light_source {0*x color rgb 2.9 area_light <8,0,0> <0,0,8> 8, 8 adaptive 2 jitter circular orient translate <100,0,-100>}
25
26#declare StrandCorner = difference {
27	cylinder {<0,0,0> <0,0,.1> 1}
28	cylinder {<0,0,-0.1> <0,0,.2> .25}
29	box {<-1.1,1.1,-0.1> <1.1,0,.2>}
30	box {<-1.1,1.1,-0.1> <0,-1.1,.2>}
31};
32
33#declare S = seed(12);
34#declare CStrand = 1;
35#declare CDir = 1;
36
37#while (CStrand <= 300)
38	#declare StartOffset = (rand(S)*30)-15;
39	#declare CHeight = <70-StartOffset,70+StartOffset,-CStrand/10>;
40
41	#while ((CHeight.y > -45) & (CHeight.x > -45))
42		#declare CDir = -CDir;
43		#declare StrandSegLength = floor(rand(S)*12)+1;
44		#if (CDir = 1)
45			box {CHeight+<-0.375,0,0> CHeight+<0.375,-StrandSegLength,.1>}
46			#declare CHeight = CHeight + <-0.625,-(StrandSegLength+0.625),0>;
47			object {StrandCorner translate CHeight+<0,0.625,0>}
48		#else
49			box {CHeight+<0,-0.375,0> CHeight+<-StrandSegLength,0.375,.1>}
50			#declare CHeight = CHeight + <-(StrandSegLength+0.625),-0.625,0>;
51			object {StrandCorner rotate <0,0,180> translate CHeight+<0.625,0,0>}
52		#end
53	#end
54	#if (CDir = 1)
55		object {StrandCorner rotate <0,0,270> translate CHeight+<0,0.625,0>}
56	#else
57		object {StrandCorner rotate <0,0,270> translate CHeight+<0.625,0,0>}
58	#end
59
60	#declare CStrand = CStrand + 1;
61#end
62