]>
Commit | Line | Data |
---|---|---|
b1096e45 WS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: press.pov | |
3 | // Purpose: POV-Ray scene used to generate clip for splash | |
4 | // Author: Wlodzimierz ABX Skiba | |
5 | // Modified by: | |
6 | // Created: 24/11/2004 | |
b1096e45 WS |
7 | // Copyright: (c) Wlodzimierz Skiba |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #version 3.6; | |
12 | ||
e9043580 WS |
13 | // Rendering options : +FT +W80 +H60 +AM1 +A0.05 +R5 +J0 +KFF500 |
14 | // Produced TGA images converted to MPG with good old (1993) CMPEG tool | |
15 | // Conversion : cmpeg.exe -v1 ipb.ctl frames.lst press.mpg | |
b1096e45 WS |
16 | |
17 | #include "colors.inc" | |
18 | #include "rad_def.inc" | |
19 | ||
20 | global_settings { | |
21 | assumed_gamma 1.0 | |
22 | max_trace_level 100 | |
23 | } | |
24 | ||
25 | background { colour White } | |
26 | ||
27 | #declare Texts = array[ 3 ]; | |
28 | ||
29 | #declare Texts[0] = "PRESS"; | |
30 | #declare Texts[1] = "ANY"; | |
31 | #declare Texts[2] = "KEY"; | |
32 | ||
33 | camera{ orthographic look_at .5 location .5-z right 1.05*x up 1.05*y } | |
34 | ||
35 | #declare Items = dimension_size( Texts , 1 ); | |
36 | ||
37 | #declare Objects = array[ Items + 1 ]; | |
38 | ||
39 | #declare f_line = function(x,xa,ya,xb,yb){((yb-ya)/(xb-xa))*(x-xa)+ya}; | |
40 | ||
41 | #declare Counter = 0; | |
42 | #while ( Counter <= Items ) | |
43 | #if ( Counter < Items ) | |
44 | #declare Object = text{ ttf "crystal.ttf" Texts[ Counter ] 1 0 }; | |
45 | #else | |
46 | #declare Object = Objects[ Items ]; | |
47 | #end | |
48 | ||
49 | #declare M = max_extent( Object ); | |
50 | #declare m = min_extent( Object ); | |
51 | #declare S = M - m; | |
52 | #declare Objects[ Counter ] = object{ Object translate -m + z*Counter scale <1/S.x,1/S.y,1> }; | |
53 | #declare Objects[ Items ] = | |
54 | #if ( Counter = 0 | Counter = Items ) | |
55 | object{ | |
56 | #else | |
57 | union{ | |
58 | object{ Objects[ Items ] translate y*1.1 } | |
59 | #end | |
60 | object{ Objects[ Counter ] } | |
61 | }; | |
e9043580 WS |
62 | |
63 | #declare Pause=0.1; | |
64 | #declare X0=(Counter+Pause)/(Items+2); | |
b1096e45 | 65 | #declare Y0=0; |
e9043580 | 66 | #declare X1=(Counter+1)/(Items+2); |
b1096e45 | 67 | #declare Y1=1; |
e9043580 | 68 | #declare X2=(Counter+2-Pause)/(Items+2); |
b1096e45 WS |
69 | #declare Y2=0; |
70 | ||
e9043580 WS |
71 | #declare C1=f_line(clock,0,0,3/4,1); |
72 | #declare C2=(Items+1)/(Items+2); | |
73 | #declare C3=f_line(clock,1/4,0,1,1); | |
74 | #declare C=max(min(C1,C2),C3); | |
75 | ||
76 | #declare increase=f_line(C,X0,Y0,X1,Y1); | |
77 | #declare decrease=f_line(C,X1,Y1,X2,Y2); | |
b1096e45 | 78 | #declare change=min(increase,decrease); |
e9043580 | 79 | #declare level=min(max(change,0),1); |
b1096e45 WS |
80 | |
81 | object{ | |
82 | Objects[ Counter ] | |
83 | pigment{ rgb level transmit 1-level } | |
84 | } | |
85 | #declare Counter = Counter + 1; | |
86 | #end | |
87 |