Underleaf Logo
Underleaf
BlogPricing
Log InTry Free

Learn TikZ

Getting Started

  • What is TikZ?
  • TikZ for Beginners
  • Basic Setup

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:

LibraryShapes Included
shapes.geometricdiamond, ellipse, trapezium, semicircle, regular polygon, star, isosceles triangle
shapes.symbolsforbidden sign, cloud, starburst
shapes.arrowssingle arrow, double arrow, arrow box
shapes.calloutsellipse callout, rectangle callout, cloud callout
shapes.misccross 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

Try it free

Sketch it — AI draws the TikZ.

Upload a photo of a hand-drawn diagram, flowchart, or plot and Underleaf generates the TikZ code for you. 10 free credits every month, no credit card required.

Convert your diagram
A hand-drawn sketch converted into a clean TikZ diagram

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:

LibraryShapes Included
shapes.geometricdiamond, ellipse, trapezium, semicircle, regular polygon, star, isosceles triangle
shapes.symbolsforbidden sign, cloud, starburst
shapes.arrowssingle arrow, double arrow, arrow box
shapes.calloutsellipse callout, rectangle callout, cloud callout
shapes.misccross 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:

Underleaf Logo
Underleaf

Empowering students and researchers with AI-powered tools for academic writing.

Go to appContact us

Company

PricingBlogTutorialsConference TemplatesConference Deadlines

Free Tools

Image to LaTeXExcel to LaTeXArXiv to LaTeXTikZ GeneratorLaTeX Table GeneratorCitation GeneratorThesis GeneratorChrome ExtensionAll Tools

© 2026 Underleaf. All rights reserved.