manpagez: man pages & more
info mathgl
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.1.2 Lighting (MGL)

There are several commands for setup lighting. The general command is light which switch on/off the lighting for overall plot. Generally MathGL support up to 10 independent light sources. The position, color, brightness of each light source can be set separately. By default only one light source is active. It is source number 0 with white color, located at top of the plot.

MGL command: light [val=on]

Sets the using of light on/off for overall plot. It is recommended to call this command before any plotting command. Default value is lightning off.

MGL command: light num val

Switch on/off num-th light source separately.

MGL command: light num xpos ypos zpos ['col'='w' br=0.5]

The command adds a light source with identification num at position {xpos, ypos, zpos}. The color of light is col (white by default). The brightness of light is br which must be in range [0,1].

MGL command: ambient val

Sets the brightness of ambient light. The value should be in range [0,1]. Initial value is 0.5.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.