File: povcatray.pov

package info (click to toggle)
povray 1%3A3.6.1-12
  • links: PTS
  • area: non-free
  • in suites: lenny, squeeze
  • size: 31,084 kB
  • ctags: 20,310
  • sloc: ansic: 110,032; cpp: 86,573; sh: 13,595; pascal: 5,942; asm: 2,994; makefile: 1,753; ada: 1,637
file content (295 lines) | stat: -rw-r--r-- 6,508 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
// Persistence Of Vision Ray Tracer Scene Description File
// File: PovCatRay.pov
// Vers: 3.5
// Desc: A cool cat and his gang
// Date: 1999/12/04
// Updated: 2001/07/27
// Auth: Ingo Janssen
//
// -w320 -h240
// -w800 -h600 +a0.3
//

#version 3.5;
global_settings {assumed_gamma 1.0}
#include "cattext.inc"

// A basic hair creation macro
#macro Obj_RndOn_Sphere(r_Big, PlaceObj, TraceObj, n, S)
  #local R1=seed(S);
  #local Counter=0;
  #while (Counter != n)
    #local Angle= <rand(R1)*360,rand(R1)*360,rand(R1)*360>;
    #local OnSphere= vrotate(<0,r_Big,0>,Angle);
    #local TObj= trace(TraceObj,<0,0,0>, OnSphere);
    #if (TObj.x !=0 | TObj.y !=0 | TObj.z !=0)
      object {PlaceObj translate <0,r_Big,0> rotate Angle}
      #local Counter=Counter+1;
    #end
  #end
#end

light_source { < 500, 500,-500> rgb 1}
light_source { < 200, 500, 500> rgb 0.5}
light_source { < 0, 0,-500> rgb 0.2 shadowless}
light_source { <-500, 500,-500> rgb 0.1 shadowless}

camera {
   location  < 0, -0.2,-8.0>
   look_at   < 0, -0.2, 0.0>
   angle 35
}

#declare P= text {
   ttf
   "povlogo.ttf", "P",
   2, 0
   scale 0.8
   translate <0.25,0.05,-1>
}

#declare PP= pigment {
   object {
      P
      color rgb 0
      color rgb 0.1
    }
    warp {repeat x}
    warp {repeat y}
}

#declare Tor1Pos=transform {scale <0.9,1,1> translate <-0.9,0.1,0>}
#declare Tor2Pos=transform {scale < 0.8, 1, 1.5> scale 0.3 translate <1.7,1.1,0>}
#declare Tor3Pos=transform {scale 0.3 scale <0.9,1,1> translate <1.7,0.1,0>}
#declare Tor4Pos=transform {scale 0.3 scale <0.9,1,1> translate <1.7,-0.9,0>}

union {
   difference {
      plane {-z, 0 texture {pigment {checker pigment {rgb 0.7} pigment {PP} scale 0.25}}}
      sphere {0,1.5 scale 0.93 scale <1,1,2> transform Tor1Pos pigment {rgb <0,0,0.4>}}
      sphere {0,1.5 scale <1,1,2> transform Tor2Pos pigment {rgb <0.4,0,0>}}
      sphere {0,1.5 scale <1,1,2> transform Tor3Pos pigment {rgb <1,0.2,0>}}
      sphere {0,1.5 scale <1,1,2> transform Tor4Pos pigment {rgb <0,0.4,0>}}
   }
   torus {1.5,0.1 scale 0.93 rotate <90,0,0> transform Tor1Pos}
   torus {1.5,0.1 rotate <90,0,0> transform Tor2Pos}
   torus {1.5,0.1 rotate <90,0,0> transform Tor3Pos}
   torus {1.5,0.1 rotate <90,0,0> transform Tor4Pos}
   pigment {rgb 0.8}
   no_shadow
}

//==========================
//=== Cat1 = unmodified cat.
//==========================

#include "coolcat.inc"
object {
   Cat
   scale 0.93
   rotate <-5,-25, 0>
   translate <-0.9,-0.10,0>
}

//=========================
//===  Cat2
//=========================
#declare BaseTex= pigment {
   marble
   turbulence 0.4
   scale 0.2
   colour_map {
      [0, rgb 0.5]
      [1, rgb 0.8]
   }
}

#declare CatTex= texture {
   pigment {
      pigment_pattern {
         spherical
         scale <4,2,1.8>
         translate <0,-0.3,-0.7>
      }
      pigment_map {
         [0.7, BaseTex]
         [0.8, rgb 0.3]
      }
   }
}

#declare HairTex=texture {
   pigment {
      marble
      rotate <0,90,0>
      turbulence 0.4
      scale 0.2
      colour_map {
         [0, rgb 0.2]
         [1, rgb 0.05]
      }
   }
   finish {specular 0.2 roughness 0.08}
}

#declare Hair= difference {
   sphere {0,1.1}
   sphere {0,1.2 scale < 0.5, 3, 1.5> rotate < 0, 0, 40> translate <-0.3, 0,-1>}
   sphere {0,1.2 scale < 0.5, 3, 1.5> rotate < 0, 0,-40> translate < 0.3, 0,-1>}
   sphere {0,1.3 translate < 0,-1.37,-0.3>}
   sphere {0,0.32 translate < 0, 1, 0> rotate < 0, 0, 45>}
   sphere {0,0.32 translate < 0, 1, 0> rotate < 0, 0,-45>}
   scale <1,1,1.3>
}

#declare PupilPos    =  <-10,0,10>;
#declare PupilDiam   =  0.06;
#include "coolcat.inc"

object {
   Cat
   scale < 0.8, 1, 1.5>
   scale 0.3
   rotate <-10, 20, 0>
   translate <1.7,1,0>
}

#undef BaseTex
#undef CatTex
#undef HairTex
#undef Hair
#undef PupilPos
#undef PupilDiam

//==============================
//=== Cat3
//==============================
#declare CatTex= texture {
   pigment {
      spherical
      turbulence 0.3
      scale 1.5
      translate <0.2,0.2,-1>
      colour_map {
         [0.5, rgb 0.2]
         [0.8, rgb 0.8]
      }
   }
}
#declare HairTex= texture{pigment{rgb 0.8}}

#declare HairPiece= difference {
   sphere {0,1.1}
   sphere {0,1.2 scale < 0.5, 3, 1.5> rotate < 0, 0, 40> translate <-0.3, 0,-1>}
   sphere {0,1.2 scale < 0.5, 3, 1.5> rotate < 0, 0,-40> translate < 0.3, 0,-1>}
   sphere {0,1.3 translate < 0,-1.37,-0.3>}
   sphere {0,0.32 translate < 0, 1, 0> rotate < 0, 0, 45>}
   sphere {0,0.32 translate < 0, 1, 0> rotate < 0, 0,-45>}
   sphere {0,1}
   scale <1,1,1.3>
}
#declare OneHair= sphere {0,0.05 scale <1,2,1>}

#declare Hair= union {
   Obj_RndOn_Sphere(1,OneHair,HairPiece,1001,7)
}
#declare PupilPos    =  <0,0, 10>;
#declare PupilDiam   =  0.06;

#include "coolcat.inc"

object {
   Cat
   scale 0.3
   rotate <0, 20, 0>
   translate <1.7,0,0>
}

#undef CatTex
#undef HairTex
#undef HairPiece
#undef OneHair
#undef Hair
#undef PupilPos
#undef PupilDiam

//=================================
//=== Cat4
//=================================
#declare CatTex = texture {
   pigment {
      leopard
      turbulence 0.3
      scale 0.09
      colour_map {
         [0, rgb 0.4]
         [1, rgb 0.9]
      }
   }
}

#declare HairTex= texture {pigment {rgb 0.1}}

#declare HairPiece= intersection {
   difference {
      union {
         sphere {0,1 scale <0.2,1,1> translate < 0,1,0.1>}
         sphere {0,1 scale <0.1,1,1> translate <-0.3,1,0.2>}
         sphere {0,1 scale <0.1,1,1> translate < 0.3,1,0.2>}
         sphere {0,1 scale <2,0.5,0.2> translate <-0.5,-0.3,-0.20>}
      }
      sphere {0,1}
   }
   sphere {0,1.001}
}
#declare OneHair= mesh {triangle {<-0.005,0,0>,<0,0.2,0>,<0.005,0,0>}pigment{rgb 1}}

#declare Hair= union {
   Obj_RndOn_Sphere(1,OneHair,HairPiece,5000,7)
}

#declare PupilPos    =  <10,0, 10>;
#declare PupilDiam   =  0.08;
#declare L_EarTip    = <-20, 0,-30>;
#include "coolcat.inc"

object {
   Cat
   scale < 0.8, 1, 1.5>
   scale 0.3
   rotate < 10, 23, 0>
   translate <1.7,-1,0>
}

#undef CatTex
#undef HairTex
#undef HairPiece
#undef OneHair
#undef Hair
#undef PupilPos
#undef PupilDiam
#undef L_EarTip

//================================
//===Text
//================================
object {
   RayText
   no_shadow
   scale (1/346)*2.6
   rotate <0,0,15>
   translate <-0.7,-1.35,-0.3>
}
object {
   AndText
   no_shadow
   scale (1/51)*0.7
   scale <1,1,0.2>
   translate <0.5,-1.35,-0.28>
}
object {
   TBTrioText
   no_shadow
   scale (1/537)*2
   translate <1.1,-1.65,-0.3>
}