File: user_defined.pov

package info (click to toggle)
povray 1%3A3.8.0~beta.2-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 160,364 kB
  • sloc: cpp: 861,153; ansic: 125,127; sh: 34,680; pascal: 6,892; asm: 3,355; ada: 1,681; makefile: 1,432; cs: 879; perl: 645; awk: 590; python: 394; xml: 95; php: 13; javascript: 6
file content (59 lines) | stat: -rw-r--r-- 1,730 bytes parent folder | download
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
//----------------------- user_defined.pov -------------------------
// This work is licensed under the Creative Commons Attribution 3.0 Unported License.
// To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/
// or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View,
// California, 94041, USA.
//
//----------------- Inward facing cylinderical ---------------------
//
// +w900 +h450 +a0.1

#version 3.8;
global_settings { assumed_gamma 1 }

#include "shapes.inc"
background { color rgb <0.5,0.5,0.5> }
#declare OurText = "Round and round we go."
#declare TextAboutY = object {
    Circle_Text_Valigned("crystal.ttf",OurText,
         0.275,0.001,0.02,0.5,0,Align_Left,-5,90)
    pigment { color rgb <0,0,0> }
    rotate x*-90
    translate <0,-0.05,0>
}
#declare CameraPerspective = camera {
    perspective
    location <2.3,2.3,-2.301>
    sky <0,1,0>
    angle 35
    right x*(image_width/image_height)
    look_at <0,0,0>
}
#declare CylY = cylinder { <0,-1,0>, <0,1,0>, 0.01
    texture { pigment { color rgb <0.859,0.910,0.831> }
              finish { ambient 0 diffuse 0 emission 1 }
    }
}
//------- Set up functional camera
#declare FnXrad = function (x) { (x+0.5)*tau }
#declare FnX    = function (x) { cos(FnXrad(x)) }
#declare FnZ    = function (x) { sin(FnXrad(x)) }
#declare CameraUserDefined = camera {
    user_defined
    location {
      function { FnX(x) }
      function { y }
      function { FnZ(x) }
    }
    direction {
      function { -FnX(x) }
      function { 0 }
      function { -FnZ(x) }
    }
}
//---
  camera { CameraUserDefined }
//camera { CameraPerspective } // Use for perspective scene view
object { CylY }
object { TextAboutY }