Get Started »

# Geometry

The Graphics command generates all kinds of 2D shapes:

 In[1]:= ⨯ `Graphics[Disk[]]`
 Out[1]=

Many geometric objects take a series of coordinates (lists) as arguments:

 In[2]:= ⨯ `Graphics[Rectangle[{0, 0}, {4, 2}]]`
 Out[2]=

Pass in a list with directives to combine graphics and change their styles:

 In[3]:= ⨯ `Graphics[{Green, Rectangle[{0, 0}, {2, 2}], Red, Disk[]}]`
 Out[3]=

Generate triangles with commands like SASTriangle:

(Type ESCdegESC for the `°` symbol.)
 In[1]:= ⨯ `tr = SASTriangle[1, 90 \[Degree], 2]`
 Out[1]=

Properties like area can be computed directly:

 In[2]:= ⨯ `Area[tr]`
 Out[2]=

Pass this expression into Graphics:

 In[3]:= ⨯ `Graphics[tr]`
 Out[3]=

Similarly, you can use Graphics3D to display 3D objects:

 In[1]:= ⨯ `Graphics3D[Ball[]]`
 Out[1]=

Calculate volume and other properties:

(With no arguments given, a cylinder has a radius of 1 and a height of 2.)
 In[2]:= ⨯ `Volume[Cylinder[]]`
 Out[2]=

You can also find formulas and other information using natural-language input:

 In[3]:= X `volume of a cone`
 Out[3]=

Geometric transformations like Rotate, Translate and Scale are built in:

 In[1]:= ⨯ `Graphics[Rotate[Rectangle[], 45 \[Degree]]]`
 Out[1]=

QUICK REFERENCE: Plane Geometry `»`

QUICK REFERENCE: Solid Geometry `»`

QUICK REFERENCE: Geometric Transforms `»`