Next: Functions and Variables for worldmap, Previous: Functions and Variables for draw, Up: draw [Contents][Index]
Returns pixel from picture. Coordinates x and y range from 0 to
width-1
and height-1
, respectively.
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:
level
Example:
Level picture from matrix.
(%i1) make_level_picture(matrix([3,2,5],[7,-9,3000])); (%o1) picture(level, 3, 2, {Array: #(3 2 5 7 0 255)})
Level picture from numeric list.
(%i1) make_level_picture([-2,0,54,%pi],2,2); (%o1) picture(level, 2, 2, {Array: #(0 0 54 3)})
Returns an rgb-coloured picture object. All three arguments must be levels picture; with red, green and blue levels.
The returned picture object contains the following four parts:
rgb
Example:
(%i1) red: make_level_picture(matrix([3,2],[7,260])); (%o1) picture(level, 2, 2, {Array: #(3 2 7 255)}) (%i2) green: make_level_picture(matrix([54,23],[73,-9])); (%o2) picture(level, 2, 2, {Array: #(54 23 73 0)}) (%i3) blue: make_level_picture(matrix([123,82],[45,32.5698])); (%o3) picture(level, 2, 2, {Array: #(123 82 45 33)}) (%i4) make_rgb_picture(red,green,blue); (%o4) picture(rgb, 2, 2, {Array: #(3 54 123 2 23 82 7 73 45 255 0 33)})
Returns the negative of a (level or rgb) picture.
Returns true
in case of equal pictures, and false
otherwise.
Returns true
if the argument is a well formed image,
and false
otherwise.
Reads a file in xpm and returns a picture object.
Transforms an rgb picture into a level one by averaging the red, green and blue channels.
If argument color is red
, green
or blue
,
function take_channel
returns the corresponding color channel of
picture im.
Example:
(%i1) red: make_level_picture(matrix([3,2],[7,260])); (%o1) picture(level, 2, 2, {Array: #(3 2 7 255)}) (%i2) green: make_level_picture(matrix([54,23],[73,-9])); (%o2) picture(level, 2, 2, {Array: #(54 23 73 0)}) (%i3) blue: make_level_picture(matrix([123,82],[45,32.5698])); (%o3) picture(level, 2, 2, {Array: #(123 82 45 33)}) (%i4) make_rgb_picture(red,green,blue); (%o4) picture(rgb, 2, 2, {Array: #(3 54 123 2 23 82 7 73 45 255 0 33)}) (%i5) take_channel(%,'green); /* simple quote!!! */ (%o5) picture(level, 2, 2, {Array: #(54 23 73 0)})
Next: Functions and Variables for worldmap, Previous: Functions and Variables for draw, Up: draw [Contents][Index]