yorick banner

Home

Manual

Packages

Global Index

Keywords

Quick Reference

functions in pl3d.i - l

 
 
 
light3


             light3, ambient=a_level,  
                     diffuse=d_level,  
                     specular=s_level,  
                     spower=n,  
                     sdir=xyz  
 
     Sets lighting properties for 3D shading effects.  
     A surface will be shaded according to its to its orientation  
     relative to the viewing direction.  
     The ambient level A_LEVEL is a light level (arbitrary units)  
     that is added to every surface independent of its orientation.  
     The diffuse level D_LEVEL is a light level which is proportional  
     to cos(theta), where theta is the angle between the surface  
     normal and the viewing direction, so that surfaces directly  
     facing the viewer are bright, while surfaces viewed edge on are  
     unlit (and surfaces facing away, if drawn, are shaded as if they  
     faced the viewer).  
     The specular level S_LEVEL is a light level proportional to a high  
     power spower=N of 1+cos(alpha), where alpha is the angle between  
     the specular reflection angle and the viewing direction.  The light  
     source for the calculation of alpha lies in the direction XYZ (a  
     3 element vector) in the viewer's coordinate system at infinite  
     distance.  You can have ns light sources by making S_LEVEL, N, and  
     XYZ (or any combination) be vectors of length ns (3-by-ns in the  
     case of XYZ).  (See source code for specular_hook function  
     definition if powers of 1+cos(alpha) aren't good enough for you.)  
     With no arguments, return to the default lighting.  
   EXAMPLES:  
     light3, diffuse=.1, specular=1., sdir=[0,0,-1]  
       (dramatic "tail lighting" effect)  
     light3, diffuse=.5, specular=1., sdir=[1,.5,1]  
       (classic "over your right shoulder" lighting)  
     light3, ambient=.1,diffuse=.1,specular=1.,  
             sdir=[[0,0,-1],[1,.5,1]],spower=[4,2]  
       (two light sources combining previous effects)  
interpreted function, defined at i/pl3d.i   line 262  
SEE ALSO: rot3,   save3,   restore3  
 
 
 
limit3


             limit3, xmin,xmax, ymin,ymax  
          or limit3, xmin,xmax, ymin,ymax, zmin,zmax  
 
     Set the 3D axis limits for use with the cage.  
     Use keyword aspect=[ax,ay,az] to set the aspect ratios of the  
     cage to ax:ay:az -- that is, the ratios of the lengths of the  
     cage axes will become ax:ay:az.  
interpreted function, defined at i/pl3d.i   line 181  
SEE ALSO: cage3,   range3,   plwf,   plwf,   orient3