Skip to content

The NewPic command

Command Summary Command Syntax Calculator Compatibility
Forms a new picture out of a n x 2 matrix. NewPic matrix, picVar[, maxRow][, maxColumn] This command works on all calculators.

The NewPic command

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..

See Also

Authors: KG