Basic Shapes in TikZ
Learn to draw circles, rectangles, ellipses, polygons, and other geometric shapes in TikZ.
Circles
Draw circles by specifying the center and radius:
Ellipses
Create ellipses by specifying x and y radii:
Rectangles
Rectangles are defined by two opposite corners:
Squares
Squares are just rectangles with equal sides, but you can also use coordinates:
Polygons (Triangles, Pentagons, etc.)
Draw polygons using the shapes.geometric library:
Manual Polygon Drawing
Draw custom polygons by connecting vertices:
Shape Library Shapes
The shapes libraries provide many pre-built shapes:
| Library | Shapes Included |
|---|---|
shapes.geometric | diamond, ellipse, trapezium, semicircle, regular polygon, star, isosceles triangle |
shapes.symbols | forbidden sign, cloud, starburst |
shapes.arrows | single arrow, double arrow, arrow box |
shapes.callouts | ellipse callout, rectangle callout, cloud callout |
shapes.misc | cross out, strike out, rounded rectangle |
Arcs and Partial Circles
Draw partial circles and pie shapes:
Shape Styling Options
Combining Shapes
Create complex figures by layering shapes:
Next Steps
Continue learning TikZ features:
- Arrows - Arrow tips and decorations
- Colors and Styles - Advanced styling options
- Nodes and Labels - Adding text to shapes
Basic Shapes in TikZ
Learn to draw circles, rectangles, ellipses, polygons, and other geometric shapes in TikZ.
Circles
Draw circles by specifying the center and radius:
Ellipses
Create ellipses by specifying x and y radii:
Rectangles
Rectangles are defined by two opposite corners:
Squares
Squares are just rectangles with equal sides, but you can also use coordinates:
Polygons (Triangles, Pentagons, etc.)
Draw polygons using the shapes.geometric library:
Manual Polygon Drawing
Draw custom polygons by connecting vertices:
Shape Library Shapes
The shapes libraries provide many pre-built shapes:
| Library | Shapes Included |
|---|---|
shapes.geometric | diamond, ellipse, trapezium, semicircle, regular polygon, star, isosceles triangle |
shapes.symbols | forbidden sign, cloud, starburst |
shapes.arrows | single arrow, double arrow, arrow box |
shapes.callouts | ellipse callout, rectangle callout, cloud callout |
shapes.misc | cross out, strike out, rounded rectangle |
Arcs and Partial Circles
Draw partial circles and pie shapes:
Shape Styling Options
Combining Shapes
Create complex figures by layering shapes:
Next Steps
Continue learning TikZ features:
- Arrows - Arrow tips and decorations
- Colors and Styles - Advanced styling options
- Nodes and Labels - Adding text to shapes
