plot::line
-- graphical object for
linesplot::line
(p1, p2)
returns a polygon
connecting the point p1 with the endpoint p2.
plot::line(p1, p2 <, option1, option2...>)
p1, p2 |
- | points, i.e., objects of domain type plot::Point or lists of two or three
arithmetical expressions, respectively |
option1, option2, ... |
- | plot option(s) of the form option =
value |
a graphical object of the domain type plot::Polygon
.
plot
, plot2d
, plot3d
, plot::Polygon
plot
to display the result on the screen.option1
, option2
... must
be valid plot options for two- or three-dimensional graphical objects,
respectively. See plot2d
and plot3d
for details.
Note that scene options are not allowed! You may
give scene options as optional arguments for the function plot
, or use plot::Scene
to create an object
representing a graphical scene.
We define a line starting at point (1;2) and ending at point (3;-1):
>> l := plot::line([1, 2], [3, -1])
plot::Polygon()
To plot this line, call plot
:
>> plot(l)
Use expose
to expose the points of a
line:
>> expose(l)
plot::Polygon(plot::Point(1, 2), plot::Point(3, -1))
To change the color of the line from the previous example, enter:
>> l::Color := RGB::Green: plot(l, Axes = Box)
Here the scene option Axes = Box
was
given.