The NewPic command


Command Summary

Forms a new picture out of a n x 2 matrix.

Command Syntax

NewPic matrix, picVar[, maxRow][, maxColumn]

Menu Location

This command can't be found in any menu besides the command catalog.

Calculator Compatibility

This command works on all calculators.

This command forms a new picture from a matrix. The matrix must have only 2 columns, and should contain as many rows as there are "on" pixels (darkened pixels) in the image. If the picture variable specified already exists, this command will overwrite it. This command takes each row of the matrix, and forms pixel coordinates from the two numbers there. The optional arguments maxRow and maxColumn specify the boundaries of the picture, so this is a good way to form a small sprite from a matrix.

:newPic [1,1;2,2;3,3;4,4;5,5], picline

The above code would form a picture named "picline" which would have pixels at (1,1),(2,2),(3,3),(4,4), and (5,5), which would basically be a straight line.

Error Conditions

260 - Domain error happens when an element of the matrix is outside the screen range..

230 - Dimension error happens when The matrix has more or less then 2 columns..

Related Commands

See Also

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Noncommercial 2.5 License.