GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • » Octave core
  • » by package
  • » alphabetical

This view

  • Original page
  • New address

GeezerVison is showing octave.sourceforge.io — Function Reference: lighting

Octave-Forge - Extra packages for GNU Octave
Home · Packages · Developers · Documentation · FAQ · Bugs · Mailing Lists · Links · Code

Navigation

Operators and Keywords

Function List:

  • » Octave core
  • » by package
  • » alphabetical

C++ API

: lighting (type)
: lighting (hax, type)

Set the lighting of patch or surface graphic objects.

Valid arguments for type are

"flat"

Draw objects with faceted lighting effects.

"gouraud"

Draw objects with linear interpolation of the lighting effects between the vertices.

"none"

Draw objects without light and shadow effects.

If the first argument hax is an axes handle, then change the lighting effects of objects in this axis, rather than the current axes returned by gca.

The lighting effects are only visible if at least one light object is present and visible in the same axes.

See also: light, fill, mesh, patch, pcolor, surf, surface, shading.

Demonstration 1

The following code

 clf;
 colormap ("default");
 sombrero ();
 shading flat
 lighting flat
 light ();
 title ("shading flat - lighting flat");

Produces the following figure

Figure 1

Demonstration 2

The following code

 clf;
 colormap ("default");
 sombrero ();
 shading interp
 lighting gouraud
 light ();
 title ("shading interp - lighting gouraud");

Produces the following figure

Figure 1

Demonstration 3

The following code

 clf;
 colormap ("default");
 pcolor (peaks ());
 shading flat
 lighting flat
 light ();
 view (3)
 title ("shading flat - lighting flat");

Produces the following figure

Figure 1

Demonstration 4

The following code

 clf;
 colormap ("default");
 pcolor (peaks ());
 shading interp
 lighting gouraud
 light ();
 view (3)
 title ("shading interp - lighting gouraud");

Produces the following figure

Figure 1

Demonstration 5

The following code

 clf;
 colormap ("default");
 mesh (sombrero ());
 shading flat
 lighting flat
 light ();
 title ("shading flat - lighting flat");

Produces the following figure

Figure 1

Demonstration 6

The following code

 clf;
 colormap ("default");
 mesh (sombrero ());
 shading interp
 lighting gouraud
 light ();
 title ("shading interp - lighting gouraud");

Produces the following figure

Figure 1

Package: octave

SourceForge.net Logo
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.