Algosim documentation: LineSegment


Creates a line segment.



LineSegment(a, b) creates a line segment from a to b.

The object is shown in the current diagram and a reference to the object is returned.

The AdjustVisual function can be used to adjust the appearance of the line, including the line end styles. See Visual settings for a list of applicable settings.


d ≔ diagram("levels");
ν ≔ n ↦ 1/4 − 1/n^2;
[3, 100, 1] @ ν @ (ν ↦ LineSegment(❨0, ν❩, ❨1, ν❩)); d

Image 1

See also