Algosim documentation: DrawLines

DrawLines

Draws a sequence of connected lines.

Syntax

Description

DrawLines(pm, L, c) returns pm with lines drawn between the points in L using colour c. Lines are drawn between L[1] and L[2], between L[2] and L[3], ..., and between L[n − 1] and L[n], where n = #L. They are drawn as solid single-pixel lines with no antialiasing.

Examples

x ≔ 600;
n ≔ 100;
pm ≔ CreatePixmap(x, x);
L ≔ compute(❨round(x⋅sin(i)), round(x⋅cos(i))❩, i, 1, n);
ComponentHighlight(DrawLines(pm, L, "black"))

Image 1

See also