make_array SciMax Toolbox make_poly_continent

SciMax Toolbox >> make_level_picture

make_level_picture

Maxima Function

Calling Sequence

make_level_picture (data)
make_level_picture(data,width,height)

Description

Returns a levels picture object. make_level_picture (data) builds the picture object from matrix data. make_level_picture (data,width,height) builds the object from a list of numbers; in this case, both the width and the height must be given.

The returned picture object contains the following four parts:

  1. Argument data must contain only numbers ranged from 0 to 255; negative numbers are substituted by 0, and those which are greater than 255 are set to 255.

Example:

Level picture from matrix.

(%i1) load(draw)$
(%i2) make_level_picture(matrix([3,2,5],[7,-9,3000]));
(%o2)         picture(level, 3, 2, {Array:  #(3 2 5 7 0 255)})

Level picture from numeric list.

(%i1) load(draw)$
(%i2) make_level_picture([-2,0,54,%pi],2,2);
(%o2)            picture(level, 2, 2, {Array:  #(0 0 54 3)})
make_array SciMax Toolbox make_poly_continent