SETHATCH

Purpose:

Turns 3D cross-hatching On or Off.

Syntax:

SETHATCH(win, hatch, interval)

win

-

Optional. A Window, defaults to the current Window.

hatch

-

An integer, the 3D cross-hatch mode:

0:

Disabled

1:

Set X & Y hatch (default)

2:

Set X hatch only

3:

Set Y hatch only

interval

-

Optional. The cross-hatch spacing. Defaults to 1.

Returns:

Nothing.

Example:

(x, y) = fxyvals(-2, 2, 0.1, -2, 2, 0.1);

cos(x*y);setplottype(4);hot();sethatch(0);

 

creates a shaded 3D plot of cos(x*y) without cross-hatching.

Example:

(x, y) = fxyvals(-2, 2, 0.1, -2, 2, 0.1);

W1: cos(x*y);setplottype(4);hot();sethatch(0);

W2: deriv(w1)

moveto(w1);shadewith(w2);pon;

 

creates a shaded 3D plot of cos(x*y) without cross-hatching using the derivative of the surface as the lighting model.

Example:

(x, y) = fxyvals(-2, 2, 0.05, -2, 2, 0.05);

W1: cos(x*y);setplottype(4);plasma();sethatch(1);

W2: w1;plasma();sethatch(1, 4)

W3: w1;plasma();sethatch(2, 4)

W4: w1;plasma();sethatch(3, 4)

 

image\sethatch1.png

 

W1 contains c shaded 3D plot of cos(x*y) with the standard X and Y cross-hatching.

 

W2 sets the X and Y cross-hatch interval to 4.

 

W3 has X cross-hatching only with an interval of 4.

 

W4 has Y cross-hatching only with an interval of 4.

Remarks:

sethatch(0) or specifying a larger hatch interval is useful for high density 3D plots.

See Also:

PLOT3D

SETPLOTTYPE

SETPLOTMETHOD