1// Insert menu illustration scene 2// Created June-August 2001 by Christoph Hormann 3// Modified (added to) October 2001 by Bob Hughes 4// Updated to 3.7 by Friedrich A. Lohmueller, June-2012. 5 6// ----- patterns submenu ----- 7 8// -w120 -h64 +a0.1 +am2 -j +r3 9 10#version 3.7; 11global_settings{ assumed_gamma 1.0 } 12 13#include "colors.inc" 14 15/* 16#declare Typ=1; // agate 17#declare Typ=2; // boxed 18#declare Typ=3; // bozo 19#declare Typ=4; // brick 20#declare Typ=5; // bumps 21#declare Typ=6; // cells 22#declare Typ=7; // checker 23#declare Typ=8; // crackle 24#declare Typ=9; // cylindrical 25#declare Typ=10; // density_file 26#declare Typ=11; // dents 27#declare Typ=12; // fractal 28#declare Typ=13; // function 29#declare Typ=14; // gradient 30#declare Typ=15; // granite 31#declare Typ=16; // hexagon 32#declare Typ=17; // image_pattern 33#declare Typ=18; // leopard 34#declare Typ=19; // marble 35#declare Typ=20; // onion 36#declare Typ=21; // planar 37#declare Typ=22; // quilted 38#declare Typ=23; // radial 39#declare Typ=24; // ripples 40#declare Typ=25; // spherical 41#declare Typ=26; // spiral1 42#declare Typ=27; // spiral2 43#declare Typ=28; // spotted 44#declare Typ=29; // waves 45#declare Typ=30; // wood 46#declare Typ=31; // wrinkles 47#declare Typ=32; // facets 48#declare Typ=33; // average 49#declare Typ=34; // object 50#declare Typ=35; // pigment_pattern 51#declare Typ=36; // slope 52*/ 53 54#if (Typ=17) // image_pattern 55 #include "logo.inc" 56#end 57 58//global_settings { assumed_gamma 1.0 } 59 60camera { 61 orthographic 62 location <0,0,1> 63 look_at <0,0,0> 64 right -x*image_width/image_height// -(120/64)*x 65 up y 66} 67 68light_source { 69 <-1000, 2500, 2000> 70 color rgb 1.2 71} 72 73#declare P1=pigment {checker 74 color rgb <0.85, 0.00, 0.25>, color rgb <0.4, 0.20, 0.85> scale 0.2} 75#declare P2=pigment {hexagon 76 color rgb <0.85, 0.00, 0.25>, color rgb <0.0, 0.30, 0.42>, color rgb <0.25, 0.40, 0.35> scale 0.3 rotate 90*x} 77 78/* 79#declare P1=pigment {checker 80 color rgb <0.85, 0.55, 0.45>, color rgb <0.00, 0.00, 0.42> scale 0.2} 81#declare P2=pigment {hexagon 82 color rgb <0.85, 0.55, 0.45>, color rgb <0.00, 0.00, 0.42>, color rgb <0.25, 0.40, 0.35> scale 0.3 rotate 90*x} 83*/ 84#if (Typ=36) 85union { 86 sphere { 0, 0.47 translate <0.5, 0, 0>} 87 sphere { 0, 1.7 } 88 89 cylinder { -z*0.5+0.3*(x+y), z*0.5-0.3*(x+y), 0.2 translate <-0.5, 0, 0>} 90 91 92#else 93plane { 94 z, 0 95#end 96 texture { 97 #if (Typ<39) 98 pigment { 99 #switch (Typ) 100 #case (1) 101 agate 102 #break 103 #case (2) 104 boxed 105 #break 106 #case (3) 107 bozo 108 #break 109 #case (4) 110 brick 111 #break 112 #case (5) 113 bumps 114 #break 115 #case (6) 116 cells 117 #break 118 #case (7) 119 checker 120 #break 121 #case (8) 122 crackle 123 #break 124 #case (9) 125 cylindrical 126 #break 127 #case (10) 128 density_file df3 "spiral.df3" 129 #break 130 #case (11) 131 dents 132 #break 133 #case (12) 134 mandel 50 135 interior 2,.5 136 exterior 1,.01 137 #break 138 #case (13) 139 function { pow(min(min(abs(x) + y, (x*2)*(x*2)),y*5),2) } 140 #break 141 #case (14) 142 gradient x 143 #break 144 #case (15) 145 granite 146 #break 147 #case (16) 148 hexagon 149 #break 150 #case (17) 151 image_pattern { 152 //png "mtmandj.png" 153 function 50, 50 { 154 pattern { 155 object { 156 Povray_Logo_Prism 157 scale <1,-1,1>*0.5 158 translate 0.5*(x+y) 159 } 160 } 161 } 162 interpolate 2 163 } 164 #break 165 #case (18) 166 leopard 167 #break 168 #case (19) 169 marble 170 #break 171 #case (20) 172 onion 173 #break 174 #case (21) 175 planar 176 #break 177 #case (22) 178 quilted 179 #break 180 #case (23) 181 radial frequency 6 182 #break 183 #case (24) 184 ripples 185 #break 186 #case (25) 187 spherical 188 #break 189 #case (26) 190 spiral1 5 191 #break 192 #case (27) 193 spiral2 5 194 #break 195 #case (28) 196 spotted 197 #break 198 #case (29) 199 waves 200 #break 201 #case (30) 202 wood 203 #break 204 #case (31) 205 wrinkles 206 #break 207 #case (32) 208 // facets 209 #break 210 #case (33) 211 average 212 pigment_map { 213 [1, P1] 214 [1, P2] 215 } 216 #break 217 #case (34) 218 object { 219 object { 220 union { 221 cone {-y,1,y/2,0} 222 difference { 223 sphere {y,1} 224 cylinder {-z,z,0.25 translate y*2} 225 cylinder {-z,z,0.25 scale <1,0.5,1> translate <0.5,1.5,0>} 226 } 227 sphere {0,0.125 scale <2,1,1> translate <1,2,0> } 228 } 229 scale <0.3,0.6,0.3> rotate 90*z translate 0.25*x 230 } 231 color rgb <0.85, 0.00, 0.25> 232 color rgb <0.00, 0.30, 0.42> 233 } 234 #break 235 #case (35) 236 pigment_pattern { 237 checker 238 pigment { gradient x color_map {[0 color rgb 0.0][1 color rgb 0.5]} scale 0.34 rotate 45*z }, 239 pigment { marble color_map {[0 color rgb 0.3][1 color rgb 1.0]} scale 2 turbulence 1 } 240 scale 0.5 241 } 242 #break 243 #case (36) 244 slope {<0,1,0>,0,1 altitude <0,0,0>,0,1} 245 #break 246 247 #case (37) // new in 3.7 248 square //max.4 colors/textures 249 color White 250 color rgb<1.00, 0.00, 0.30>, 251 color rgb<0.10, 0.70, 0.00>, 252 color Orange rotate<-90,0,0> scale 0.2 253 #break 254 255 #case (38) // new in 3.7 256 triangular //max.6 colors/textures 257 color Red, 258 color rgb<1.0, 0.4, 0.0>, 259 color rgb<1.0, 0.9, 0.0>, 260 color rgb<0.5, 1.0, 0.0>, 261 color rgb<0.5, 0.5, 1.0>, 262 color rgb<0.5, 0.0, 1.0> rotate<-90,0,0> scale 0.2 263 #break 264 265 #end // switch(Typ) 266 267 #if ((Typ=33) | (Typ=34) | (Typ=37) | (Typ=38)) 268 // nothing 269 #else 270 #if ((Typ=4) | (Typ=7) | (Typ=16)) 271 color rgb <0.85, 0.00, 0.15>, 272 color rgb <0.00, 0.60, 0.42>, 273 #if (Typ=16) 274 color rgb <0.25, 0.40, 0.35> 275 #end 276 #else 277 #if (Typ=32) 278 color rgb <0.25, 0.40, 0.35> 279 #else 280 color_map { 281 [0.0 color rgb <0.85, 0.10, 0.10> ] 282 [0.1 color rgb <0.85, 0.25, 0.45> ] 283 //[0.5 color rgb <0.25, 0.40, 0.35> ] 284 [0.5 color rgb <1, 0.85, 0.3> ] 285 [0.9 color rgb <0.00, 0.30, 0.42> ] 286 [1.0 color rgb <0.00, 0.10, 0.22> ] 287 } 288 #end 289 #end 290 291 scale 0.7 292 293 #if (Typ=17) 294 translate 1 scale 0.9 // image_pattern 295 #end 296 #if (Typ=10) 297 translate -<0.4, 0.4, 0.4> scale 1.3 // density_file 298 #end 299 #if (Typ=4) 300 scale 0.19 // brick 301 #end 302 #if ((Typ=6) | (Typ=7) | (Typ=16) | 303 (Typ=18) | (Typ=21) | (Typ=24) | (Typ=29)) 304 scale 0.3 // cells / checker / hexagon / leopard / planar / ripples / waves 305 #end 306 #if (Typ=0) 307 rotate 90*y // agate 308 #end 309 #if ((Typ=16) | (Typ=23) | (Typ=24)) 310 rotate 90*x // hexagon / radial / ripples 311 #end 312 #end 313 } // close pigment 314 315 #if (Typ=32) // facets 316 normal { 317 facets 0.5 318 coords 1.5 319 scale 3 320 } 321 #end 322 323 #end // #if (Typ<39) 324 325 // 101 - 299 ------------------------------------------------------------- 326 #if (Typ>=101 & Typ<=127) // tiling - new in 3.7 327 #local Nr= Typ-100; 328 329 pigment{ 330 tiling Nr // 1~24 Pattern_Number 331 color_map{ 332 [ 0.0 color rgb<1,1,1>*1] 333 [ 0.5 color rgb<1,0.5,0>*1] 334 [ 1.0 color rgb<1,1,1>*0] 335 } // end color_map 336 #if (Nr = 6| Nr=7 | Nr=11 | Nr=12 | Nr=13 | Nr=14 | Nr=15 | Nr=18 ) 337 scale 0.20 338 339 #else 340 #if (Nr= 22 | Nr=23 | Nr=24) 341 scale 0.10 342 #else 343 scale 0.25 344 #end 345 #end 346 rotate<-90,0,0> 347 } // end pigment 348 349 #end //------------------------------------------------------------------ 350 351 352 #if (Typ>=150 & Typ<=271) // pavement - new in 3.7 353 354 355 pigment{ // ------------------------------------------------------------ 356 pavement // polyform paving the x-z plane 357 358 // ---------------------- 359 #if (Typ>=150 & Typ<=171) 360 number_of_sides 3 // 3 triangle 361 362 #if (Typ>=150 & Typ<=152) 363 number_of_tiles Typ-149 pattern 1 // 11,21,31 ; 364 #end 365 #if (Typ>=153 & Typ<=155 ) 366 number_of_tiles 4 pattern Typ-152 // 41, 42, 43, 367 #end 368 #if (Typ>=156 & Typ<=159 ) 369 number_of_tiles 5 pattern Typ-155 // 51, 52, 53, 54 370 #end 371 #if (Typ>=160 & Typ<=171 ) 372 number_of_tiles 6 pattern Typ-159 // 6 with 1,...12 373 374 #end 375 #end // end triangle 376 //----------------------------- 377 //---------------------------- 378 #if (Typ>=172 & Typ<=173) 379 number_of_sides 4 // 4 sqare 380 number_of_tiles Typ-171 pattern 1 // 11,21 381 #end // end sqare 382 //---------------------------- 383 #if (Typ>=174 & Typ<=175) 384 number_of_sides 4 // 385 number_of_tiles 3 pattern Typ-173 // 31,32 386 #end // end sqare 387 //---------------------------- 388 #if (Typ>=176 & Typ<=180) 389 number_of_sides 4 // 390 number_of_tiles 4 pattern Typ-175 // 41,42,... 45 391 #end // end sqare 392 //---------------------------- 393 #if (Typ>=181 & Typ<=192) 394 number_of_sides 4 // 395 number_of_tiles 5 pattern Typ-180 // 5 01,..., 5 12 //1...12 396 #end // end sqare 397 //---------------------------- 398 #if (Typ>=195 & Typ<=229) 399 number_of_sides 4 // 400 number_of_tiles 6 pattern Typ-194 // 1,...35 401 #end // end sqare 402 //----------------------------- 403 //----------------------------- 404 #if (Typ>=238 & Typ<=239) 405 number_of_sides 6 // 6 hexagon 406 number_of_tiles Typ-237 pattern 1 // 1,2,3 407 #end 408 409 #if (Typ>=240 & Typ<=242) 410 number_of_sides 6 // 411 number_of_tiles 3 pattern Typ-239 // 1,2,3 412 #end 413 414 #if (Typ>=243 & Typ<=249) 415 number_of_sides 6 // 416 number_of_tiles 4 pattern Typ-242 // 1, ... 7 417 #end 418 419 #if (Typ>=250 & Typ<=271) 420 number_of_sides 6 // 421 number_of_tiles 5 pattern Typ-249 // 1, ... 22 422 #end // end hexagon 423 424 //----------------------------- 425 426 427 428 exterior 0 // 0, 1, 2; 429 interior 0 // 0, 1, 2 430 form 0// 0, 1 or 2, (3 for square only) copies the look of interior for some additional variations. 431 color_map{ 432 [ 0.00 color rgb<1.00, 1.00, 1.00> ] 433 [ 0.20 color rgb<1.00, 1.00, 1.00> ] 434 [ 0.20 color rgb<0.00, 0.00, 0.00> ] 435 [ 0.60 color rgb<0.00, 0.00, 0.00> ] 436 [ 0.60 color rgb<1.00, 0.60, 0.20> ] 437 [ 1.00 color rgb<1.00, 0.60, 0.20> ] 438 } // end color_map 439 440 441 #if (Typ>=150 & Typ<=152 ) frequency 3 #end 442 // scales: 443 #if (Typ>=150 & Typ<=152 ) scale 0.3 #end 444 #if (Typ>=153 & Typ<=171 ) scale 0.15 #end 445 446 447 #if (Typ>=172 & Typ<=237 ) scale 0.1 #end 448 #if (Typ>=238 & Typ<=271 ) scale 0.1 #end 449 rotate<-90,0,0> 450 } // end pigment ------------------------------------------------ 451 452 453 454 455 #end //------------------------------------------------------------------ 456 457 finish { 458 #if (Typ=32) 459 specular 0.4 // facets 460 #else 461 diffuse 0.0 462 ambient 1.0 463 #end 464 } 465 466 467 } // close texture 468} // close plane 469