Arc Plot

Description

Sage can plot part of the outside of a circle or ellipse as an arc. This is done using the arc() command, which takes the following parameters:

  • center: An ordered pair defining the center of the circle or ellipse.
  • r1: The radius of the first axis of the circle or ellipse. If r2 is not set, it is assumed to be equal to r1 and a circle is drawn.
  • r2: The radius of the second axis of the ellipse. Only set this if drawing an ellipse.
  • angle: The angle in radians between the first axis and the x-axis. Defaults to 0.
  • sector: A tuple determining the portion of the circle or ellipse to draw. Defaults to (0, 2*pi)

Sage Cell

Code

# Arc of a circle from pi/4 to 3*pi/4 radians.
a1 = arc(center=(0,0), r1=1, sector=(pi/4,3*pi/4))
# Arc of an ellipse from 5*pi/4 to 7*pi/4 radians. Colored red.
a2 = arc(center=(0,0), r1 = 2, r2 = 1, sector=(5*pi/4, 7*pi/4), color='red')
(a1 + a2).show()

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: 21 Jul 2019 21:19

Submitted by: Zane Corbiere

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