Line

Line[{p1,p2,}]
represents the line segments joining a sequence for points .

Line[{{p11,p12,},{p21,},}]
represents a collection of lines.

更多信息和选项更多信息和选项

背景
背景

  • Line is a graphics and geometry primitive that represents a geometric line segment or sequence of connected line segments (a "poly-line"). The location of a Line connecting points in -dimensional space is specified as a list argument consisting of sublists, with each sublist containing Cartesian coordinate values. The coordinate sublists of Line objects may consist of exact or approximate values, where RegionEmbeddingDimension can be used to determine the dimension for a given Line expression. A collection of lines (or poly-lines) may be represented as a nested lists of -tuples inside a single Line primitive (a "multiline"). The coordinates of Line objects may have exact or approximate values.
  • Line objects can be visually formatted in two and three dimensions using Graphics and Graphics3D, respectively. Line objects can also be used in geographical maps using GeoGraphics and GeoPosition (e.g. GeoGraphics[Line[GeoPosition[{{38.9,-77.0},{40.1,-88.3}}]]]). In addition, Line may serve as a region specification over which a computation should be performed.
  • While lines themselves have dimension 1 (as reported by the RegionDimension function) with zero thickness, Line objects in formatted graphics expressions are by default styled to appear "thicker" than a one-dimensional mathematical line. Furthermore, in graphical visualizations, lines are displayed at the same size regardless of varying distances from the view point. The appearance of Line objects in graphics can be modified by specifying thickness directives such as Thickness, AbsoluteThickness, Thick, and Thin; dashing directives such as Dashing, AbsoluteDashing, Dashed, Dotted, and DotDashed; edge and cap directives EdgeForm and CapForm; color directives such as Red; the transparency directive Opacity; and the style option Antialiasing. In addition, the colors of multilines may be specified using VertexColors, while the shading and simulated lighting of multilines within Graphics3D may be specified using VertexNormals.
  • GeometricTransformation and more specific transformation functions such as Translate and Rotate can be used to change the coordinates at which a Line object is displayed while leaving the underlying Line expression untouched.
  • Other graphics primitives such as Tube, Arrow, HalfLine, and InfiniteLine may resemble those of stylized Line objects. While poly-lines consist only of straight line segments, smooth curves may be constructed via splines using BSplineCurve or BezierCurve or via an interpolating function using Interpolation. A function related to Line as a geometric region is Interval, which interprets pairs of numbers as endpoints of a line segment lying on the number line and which can be directly operated on using arithmetic and relational operators.
  • While the Line primitive explicitly appears in graphics and geometric region specification expressions, it should be noted that coordinates are commonly represented as bare lists in other contexts in the Wolfram Language. However, a number of graphics functions including Plot, ParametricPlot, ParametricPlot3D, and ContourPlot return graphical expressions that explicitly include Line objects.
1988年引入
(1.0)
| 2014年更新
(10.0)