Bases: sage.plot.primitive.GraphicPrimitive
Primitive class for the Arc graphics type. See arc? for information about actually plotting an arc of a circle or an ellipse.
INPUT:
EXAMPLES:
Note that the construction should be done using arc:
sage: from sage.plot.arc import Arc
sage: print Arc(0,0,1,1,pi/4,pi/4,pi/2,{})
Arc with center (0.0,0.0) radii (1.0,1.0) angle 0.785398163397 inside the sector (0.785398163397,1.57079632679)
Returns a dictionary with the bounding box data.
The bounding box is computed as minimal as possible.
EXAMPLES:
An example without angle:
sage: p = arc((-2, 3), 1, 2)
sage: d = p.get_minmax_data()
sage: d['xmin']
-3.0
sage: d['xmax']
-1.0
sage: d['ymin']
1.0
sage: d['ymax']
5.0
The same example with a rotation of angle \(\pi/2\):
sage: p = arc((-2, 3), 1, 2, pi/2)
sage: d = p.get_minmax_data()
sage: d['xmin']
-4.0
sage: d['xmax']
0.0
sage: d['ymin']
2.0
sage: d['ymax']
4.0
TESTS:
sage: from sage.plot.arc import Arc
sage: Arc(0,0,1,1,0,0,1,{}).plot3d()
Traceback (most recent call last):
...
NotImplementedError
An arc (that is a portion of a circle or an ellipse)
Type arc.options to see all options.
INPUT:
OPTIONS:
EXAMPLES:
Plot an arc of circle centered at (0,0) with radius 1 in the sector \((\pi/4,3*\pi/4)\):
sage: arc((0,0), 1, sector=(pi/4,3*pi/4))
Graphics object consisting of 1 graphics primitive
Plot an arc of an ellipse between the angles 0 and \(\pi/2\):
sage: arc((2,3), 2, 1, sector=(0,pi/2))
Graphics object consisting of 1 graphics primitive
Plot an arc of a rotated ellipse between the angles 0 and \(\pi/2\):
sage: arc((2,3), 2, 1, angle=pi/5, sector=(0,pi/2))
Graphics object consisting of 1 graphics primitive
Plot an arc of an ellipse in red with a dashed linestyle:
sage: arc((0,0), 2, 1, 0, (0,pi/2), linestyle="dashed", color="red")
Graphics object consisting of 1 graphics primitive
sage: arc((0,0), 2, 1, 0, (0,pi/2), linestyle="--", color="red")
Graphics object consisting of 1 graphics primitive
The default aspect ratio for arcs is 1.0:
sage: arc((0,0), 1, sector=(pi/4,3*pi/4)).aspect_ratio()
1.0
It is not possible to draw arcs in 3D:
sage: A = arc((0,0,0), 1)
Traceback (most recent call last):
...
NotImplementedError