next up previous
Next: 3-d geometry Up: Geometry and graphics Previous: 3-d rendering.

3-d spots

If you enable Lights in the cfg configuration of a 3-d graph, the scene will be rendered by the OpenGL lighting algorithm. You can enable 1 to 8 spots of light, each is configurable (buttons l1 to l8).

Each spot has geometric properties: it may be a positional spot if w = 1 or a directional spot if w = 0

Objects from the scene may have their own properties with respect to three kinds of light:

In addition, an object may have intrinsic light, called emission. Each property must be specified for 4 channels: r (red), b (blue) and g (green) for the colors, and a (alpha) for transparency (if you enable Blending). Object properties must be specified in their definition (on the commandline):

Summing up, the formula for light on each channel is :

l = oe + oa$\displaystyle \sum_{{j=1}}^{8}$la, j + os$\displaystyle \sum_{{j=1}}^{8}$ls, jcos($\displaystyle \gamma_{j}^{}$)S +  
    + od$\displaystyle \sum_{{j=1}}^{8}$ld, jcos($\displaystyle \alpha_{j}^{}$)ejcos($\displaystyle \beta_{j}^{}$)$\displaystyle {\frac{{1}}{{a_{0,j}+a_{1,j}
d_j+a_{2,j} d_j^2}}}$  

where :


next up previous
Next: 3-d geometry Up: Geometry and graphics Previous: 3-d rendering.
giac documentation written by Bernard Parisse