Disk

Disk[{x,y},r]

represents a disk of radius r centered at {x,y}.

Disk[{x,y}]

gives a disk of radius 1.

Disk[{x,y},{rx,ry}]

gives an axis-aligned elliptical disk with semiaxes lengths rx and ry.

Disk[{x,y},,{θ1,θ2}]

gives a sector of a disk from angle θ1 to θ2.

Details

  • Disk can be used as a geometric region and a graphics primitive.
  • Disk[] is equivalent to Disk[{0,0}]. »
  • Disk represents the filled region .
  • Angles are measured in radians counterclockwise from the positive x direction.
  • Disk can be used in Graphics.
  • In graphics, the points {xi,yi} can be Scaled, Offset, ImageScaled, and Dynamic expressions.
  • Graphics rendering is affected by directives such as FaceForm, EdgeForm, and color.

Background & Context

  • Disk is a graphics and geometry primitive that represents a circular disk, elliptical disk or sector in the plane. In particular, Disk[{x,y},r] represents the disk of radius r in centered at {x,y}, Disk[{x,y},{rx,ry}] represents the axis-aligned filled ellipse in with center {x,y} and semiaxis lengths rx and ry, and Disk[{x,y},,{θ1,θ2}] represents the (potentially elliptical) sector centered at {x,y} ranging between angles θ1 and θ2 measured in radians counterclockwise from the positive axis. The shorthand form Disk[{x,y}] is equivalent to Disk[{x,y},1], while Disk[] autoevaluates to Disk[{0,0},1].
  • Disk objects can be formatted by placing them inside a Graphics expression. The appearance of Disk objects in graphics can be modified by specifying edge and face directives EdgeForm and FaceForm, color directives such as Red, the transparency directive Opacity, and the style option Antialiasing.
  • Disk may also serve as a region specification over which a computation should be performed. For example, Integrate[1,{x,y}Disk[{0,0},r]] and Area[Disk[{0,0},r]] both return the area of a disk of radius , and Perimeter[Disk[{x,y},r]] returns the perimeter .
  • Disk is related to a number of other symbols. Circle represents the boundary of a disk, as can be computed using RegionBoundary[Disk[{x,y},r]]. Ball and Ellipsoid may be thought of as higher-dimensional analogs of disks. Annulus gives a region obtained by removing a small disk from the interior of a larger concentric disk. Disk[{x,y},r] may be alternately represented using Ball[{x,y},r], ImplicitRegion[(x-u)2+(y-v)2r2,{u,v}] or ParametricRegion[a{Cos[θ],Sin[θ]}-{x,y},{{θ,0,2π},{a,0,r}}]. Precomputed properties of the disk and its variants in standard position are available using LaminaData["entity","property"] or EntityValue[Entity["Lamina","entity"],"property"], where "entity" is one of "CircularSector", "Disk", "FilledEllipse", "FilledHalfEllipse", "HalfDisk", etc.

Examples

open allclose all

Basic Examples  (5)

A unit disk:

In[2]:=
Click for copyable input
Out[1]=

A disk sector:

In[1]:=
Click for copyable input
Out[1]=

An elliptical disk:

In[1]:=
Click for copyable input
Out[1]=

Differently styled unit disks:

In[1]:=
Click for copyable input
Out[1]=

Get the Area of a disk:

In[1]:=
Click for copyable input
Out[1]=

The area of an ellipse:

In[2]:=
Click for copyable input
Out[2]=

Scope  (22)

Applications  (11)

Properties & Relations  (9)

Possible Issues  (2)

Neat Examples  (4)

See Also

DiskSegment  Circle  Polygon  BoundingRegion  Rotate  PlotRangeClipping

Introduced in 1991
(2.0)
| Updated in 2014
(10.0)