2ca33044cc96cd9f3c785392c79e6e177c42e99a
[scilab.git] / scilab / modules / graphics / demos / lighting / rot_light.dem.sce
1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2 // Copyright (C) 2013 - Pedro SOUZA
3 //
4 // This file is released under the 3-clause BSD license. See COPYING-BSD.
5
6
7 function demo_rot_light()
8
9     my_handle             = scf(100001);
10     clf(my_handle,"reset");
11     demo_viewCode("rot_light.dem.sce");
12
13     // DEMO START
14
15     my_plot_desc          = "Rotating light";
16     my_handle.figure_name = my_plot_desc;
17
18     plot3d;l=light();s=gce();
19
20     for i=0:2000
21         sleep(5);
22         x = 2*cos(i*%pi/180);
23         y = 2*sin(i*%pi/180);
24         z = 2;
25         l.position = [x y z];
26     end
27
28     // DEMO END
29
30 endfunction
31
32
33 demo_rot_light();
34 clear demo_rot_light;
35