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 Ray Tracer Include File 6// File: Lemon.inc 7// Vers: 3.5 8// Desc: Object for Grenadine.pov 9// Date: 1999/06/04 10// Auth: ingo 11// 12 13// Added to comply with common version preservation scheme 14// 04Aug2008 (jh) 15#ifndef(Lemon_Inc_Temp) 16#declare Lemon_Inc_Temp=version; 17#version 3.7; 18 19#ifdef(View_POV_Include_Stack) 20 #debug "including lemon.inc\n" 21#end 22 23#declare SS=seed(7); 24#declare R_uit= 3; 25#declare R_in=2.9; 26 27#declare Ring = difference { 28 cylinder {< 0 , 0, 0>, <1 , 0, 0>, R_uit} 29 cylinder {<-0.1, 0, 0>, <1.1, 0, 0>, R_in} 30} 31 32#declare R2_uit= 0.8; 33#declare R2_in=0.7; 34 35#declare Ring2 = difference { 36 cylinder {< 0 , 0, 0>, < 1 , 0, 0>, R2_uit} 37 cylinder {<-0.1, 0, 0>, < 1.1, 0, 0>, R2_in} 38} 39 40#declare LemonOut= intersection { 41 merge { 42 difference { 43 merge { 44 object {Ring translate < 0.01, 0, (R_uit+R_in)/2>} 45 object {Ring translate <-1.01, 0,-(R_uit+R_in)/2>} 46 } 47 box {<-1.1, 0.1,-1>, <1.1, 2, 1>} 48 } 49 difference { 50 box {<-1, 0,-(R_uit-R_in)/2>, < 1, 1.1, (R_uit-R_in)/2>} 51 box { 52 <-2.5, 0,-1>, <2.5, 2, 1> 53 translate <0, 0.5, 0> 54 rotate <0, 0,-20> 55 } 56 } 57 difference{ 58 object { 59 Ring2 60 translate <-0.5, 0, 0> 61 scale <2.2, 1, 1> 62 translate < 0, 0, (R2_uit+R2_in)/2> 63 } 64 box {<-2.1, 0,-1>,<2.1,-3, 1>} 65 translate <0, 0.499999, 0> 66 rotate <0, 0,-20> 67 } 68 } 69 merge { 70 cylinder {<0, 0,-0.5>, <0, 0, 0.5>, 0.8} 71 torus {0.8, 0.2 scale <1, 1.1, 1> rotate <90, 0, 0>} 72 } 73} 74 75#declare BS1= array[24] { 76 < 24.8, 49.8>, < 13.0, 31.4>, < 4.0, 8.8>, < 0.1, 9.4> 77 < 0.1, 9.4>, <- 7.4, 10.7>, <-12.5, 30.4>, <-21.1, 49.8> 78 <-21.1, 49.8>, <-33.3, 76.9>, <-39.8, 87.0>, <-29.2, 91.4> 79 <-29.2, 91.4>, <-20.0, 95.3>, <-10.0, 95.9>, < 0.0, 95.9> 80 < 0.0, 95.9>, < 10.0, 95.9>, < 21.3, 95.8>, < 30.0, 90.7> 81 < 30.0, 90.7>, < 41.3, 84.0>, < 45.1, 86.5>, < 24.8, 49.8> 82} 83 84#declare BS2= array[24] { 85 < 24.8, 55.8>, < 13.0, 31.4>, < 4.0, 8.8>, < 0.1, 15.0> 86 < 0.1, 15.0>, <- 7.4, 10.7>, <-12.5, 30.4>, <-21.1, 49.8> 87 <-21.1, 49.8>, <-33.3, 76.9>, <-39.8, 87.0>, <-29.2, 91.4> 88 <-29.2, 91.4>, <-20.0, 95.3>, <-10.0, 95.9>, < 0.0, 95.9> 89 < 0.0, 95.9>, < 10.0, 95.9>, < 21.3, 95.8>, < 30.0, 90.7> 90 < 30.0, 90.7>, < 41.3, 84.0>, < 45.1, 86.5>, < 24.8, 55.8> 91} 92 93 94#declare BS3= array[24] { 95 < 23.0, 49.8>, < 13.0, 31.4>, < 4.0, 8.8>, < 0.1, 6.0> 96 < 0.1, 6.0>, <- 7.4, 10.7>, <-12.5, 30.4>, <-21.1, 49.8> 97 <-21.1, 49.8>, <-33.3, 76.9>, <-39.8, 87.0>, <-29.2, 91.4> 98 <-29.2, 91.4>, <-20.0, 95.3>, <-10.0, 95.9>, < 0.0, 95.9> 99 < 0.0, 95.9>, < 10.0, 95.9>, < 21.3, 95.8>, < 30.0, 90.7> 100 < 30.0, 90.7>, < 41.3, 84.0>, < 45.1, 85.0>, < 23.0, 49.8> 101} 102 103 104#declare BS4= array[24] { 105 < 24.8, 49.8>, < 13.0, 31.4>, < 4.0, 11.8>, < 0.1, 9.0> 106 < 0.1, 9.0>, <- 7.4, 13.7>, <-12.5, 30.4>, <-21.1, 49.8> 107 <-21.1, 49.8>, <-33.3, 76.9>, <-39.8, 87.0>, <-21.2, 91.4> 108 <-21.2, 91.4>, <-20.0, 95.3>, <-10.0, 95.9>, < 0.0, 95.9> 109 < 0.0, 95.9>, < 10.0, 95.9>, < 21.3, 95.8>, < 30.0, 90.7> 110 < 30.0, 90.7>, < 41.3, 84.0>, < 45.1, 86.5>, < 24.8, 49.8> 111} 112 113#declare J=0; 114#declare Part1= prism { 115 bezier_spline 116 -0.5, 0.5, 24, 117 #while (J<24) 118 #declare P= BS1[J]; 119 P 120 #declare J=J+1; 121 #end 122 scale < 0.0095, 1, 0.0095> 123} 124 125#declare J=0; 126#declare Part2= prism { 127 bezier_spline 128 -0.5, 0.5, 24, 129 #while (J<24) 130 #declare P= BS2[J]; 131 P 132 #declare J=J+1; 133 #end 134 scale < 0.0095, 1, 0.0095> 135} 136 137#declare J=0; 138#declare Part3= prism { 139 bezier_spline 140 -0.5, 0.5, 24, 141 #while (J<24) 142 #declare P= BS3[J]; 143 P 144 #declare J=J+1; 145 #end 146 scale < 0.0095, 1, 0.0095> 147} 148 149#declare J=0; 150#declare Part4= prism { 151 bezier_spline 152 -0.5, 0.5, 24, 153 #while (J<24) 154 #declare P= BS4[J]; 155 P 156 #declare J=J+1; 157 #end 158 scale < 0.0095, 1, 0.0095> 159} 160 161#declare LemonTex= texture { 162 pigment { 163 granite 164 scale <0.2,5,1> 165 colour_map { 166 [0.4 rgbf <1,0.65,0,0.4>] 167 [0.6 rgbf <1,0.8,0,0.4>] 168 [0.7 rgbf <1,0.9,0,0.6>] 169 [0.9 rgb <1,0.7,0>*1.5 ] 170 } 171 } 172 normal {granite -0.1 turbulence 0.3 scale <0.2,5,1>} 173 finish { 174 specular .9 175 roughness 0.01 176 } 177} 178 179#declare Parts= union { 180 object {Part1 } 181 object {Part2 rotate <0, 360/7 ,0>} 182 object {Part3 rotate <0,2*(360/7),0>} 183 object {Part4 rotate <0,3*(360/7),0>} 184 object {Part1 rotate <0,4*(360/7),0>} 185 object {Part2 rotate <0,5*(360/7),0>} 186 object {Part3 rotate <0,6*(360/7),0>} 187 rotate <90,0,0> 188} 189 190#declare LemonSlice = union { 191 intersection { 192 object {LemonOut} 193 object {Part1 rotate <90,0,0>} 194 texture {LemonTex rotate <90,0,0> translate rand(SS)*5} 195 } 196 intersection { 197 object {LemonOut} 198 object {Part2 rotate <0,360/7,0> rotate <90,0,0>} 199 texture {LemonTex rotate <0,360/7,0> rotate <90,0,0> translate rand(SS)*5} 200 } 201 intersection { 202 object {LemonOut} 203 object {Part3 rotate <0,2*(360/7),0> rotate <90,0,0>} 204 texture {LemonTex rotate <0,2*(360/7),0> rotate <90,0,0> translate rand(SS)*5} 205 } 206 intersection { 207 object {LemonOut} 208 object {Part4 rotate <0,3*(360/7),0> rotate <90,0,0>} 209 texture {LemonTex rotate <0,3*(360/7),0> rotate <90,0,0> translate rand(SS)*5} 210 } 211 intersection { 212 object {LemonOut} 213 object {Part1 rotate <0,4*(360/7),0> rotate <90,0,0>} 214 texture {LemonTex rotate <0,4*(360/7),0> rotate <90,0,0> translate rand(SS)*5} 215 } 216 intersection { 217 object {LemonOut} 218 object {Part2 rotate <0,5*(360/7),0> rotate <90,0,0>} 219 texture {LemonTex rotate <0,5*(360/7),0> rotate <90,0,0> translate rand(SS)*5} 220 } 221 intersection { 222 object {LemonOut} 223 object {Part3 rotate <0,6*(360/7),0> rotate <90,0,0>} 224 texture {LemonTex rotate <0,6*(360/7),0> rotate <90,0,0> translate rand(SS)*5} 225 } 226 227 difference { //outside 228 object {LemonOut} 229 object {Parts} 230 texture { 231 cylindrical 232 rotate <90,0,0> 233 texture_map { 234 [0.05, pigment {rgb <1,0.8,0>} 235 normal {granite .1 scale 0.1} 236 finish {phong 0.8 phong_size 20} 237 ] 238 [0.06, pigment {rgb <1,0.9,0.7>} 239 normal {granite .07 scale 0.5} 240 ] 241 } 242 } 243 } 244} 245 246/* 247global_settings{assumed_gamma 1.0} 248 249camera{ 250 location <-3.0, 0.01, -3.0> 251 look_at <0.0, 0.0, 0.0> 252 angle 45 253} 254 255light_source{ 256 <500, 550, -100> 257 rgb 1 258} 259 260object { LemonSlice} 261*/ 262 263// Added to comply with common version preservation scheme 264// 04Aug2008 (jh) 265#version Lemon_Inc_Temp; 266#end