~brian-sidebotham/wxwidgets-cmake/wxpython-2.9.4

« back to all changes in this revision

Viewing changes to samples/splash/press.pov

  • Committer: Brian Sidebotham
  • Date: 2013-08-03 14:30:08 UTC
  • Revision ID: brian.sidebotham@gmail.com-20130803143008-c7806tkych1tp6fc
Initial import into Bazaar

Show diffs side-by-side

added added

removed removed

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