Plotting 3d Line Segments

Description

Sage can plot 3D "line segments" as a thin cylinder drawn between two given points with the LineSegment command. The command takes 3 arguments in this order

  • The starting point, as a 3-tuple containing an xyz coordinate, such as (1, 1, 1)
  • The ending point as another 3-tuple containing an xyz coordinate
  • The radius of the cylinder being drawn.

Sage Cell

Code

from sage.plot.plot3d.shapes import *
LineSegment((0, 0, 1), (2, 2, 2), 1)

Options

none

Tags

Primary Tags:

Secondary Tags:

A list of possible tags can be found at The WeBWorK Open Problem Library. For linear algebra tags see the Curated Courses Project.

Related Cells

Any related cells go here. Provide a link to the page containing the information about the cell.

Attribute

Permalink:

Author:

Date: 28 Aug 2019 19:42

Submitted by: Zane Corbiere

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License