File: parseLight.sci

package info (click to toggle)
scilab-plotlib 0.41-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,196 kB
  • sloc: xml: 3,308; makefile: 15
file content (19 lines) | stat: -rw-r--r-- 488 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
function out=parseLight(typeOfPlot,value,pptystring,ppty);

if type(value)==1
   if length(value)==2
      az=value(1)*%pi/180;
      el=value(2)*%pi/180;
      v=[cos(az)*sin(el);sin(az)*sin(el);cos(el)];
   elseif length(value)==3
      v=value(:);
   else
      _error(sprintf('%s : light specification must be a 2 or 3-vector',typeOfPlot))
   end
else
   _error(sprintf('%s : light specification must be a vector',typeOfPlot))
end

out=list(ppty,v);

endfunction // end of parseLight