Omni Calculator logo

Welcome to the coordinate grid calculator, where you will learn how to calculate a coordinate grid with this handy tool. In this short article, we will show you:

  • The basics of tiling and the regular grids in two dimensions;
  • How to calculate a square and rectangular grid;
  • How to calculate a triangular grid;
  • The properties and math of a hexagonal grid; and
  • How to use Omni's coordinate grid calculator.

What are you waiting for?

Tessellation and tilings: types of regular grid in a two-dimensional space

Look down at your feet: the floor you're standing on is likely covered in tiles. Tiling is a way to cover a two-dimensional surface with repeating shapes. The most common type of tiling is the square tiling, which allows you to cover a surface with a grid of equally spaced points both in the horizontal (xx axis) and vertical (yy axis) direction.

🙋 Are you looking for tiling in construction? We've got you covered: try our tile calculator for your flooring needs!

In the picture below, you can see an example of a square grid. If this looks familiar, it's because this is nothing but a Cartesian coordinates grid, the kind where most geometry happens!

A square grid centered in the center

Square tiling is the simplest example of regular tiling, which is one way to entirely cover a surface with a single type of regular shape (or "face"). In how many other ways we can perform this action? Surprisingly few! With regular shapes, we can do only:

  • Square tiling;
  • Triangular tiling; and
  • Hexagonal tiling.

These three tiling techniques are the only ways we can cover a two-dimensional surface without leaving empty spaces. Since we use regular polygons for each of them, we can call these tilings regular. Square tiling is extremely simple, as it only involves copying and translating the same shape over and over again: we tile the plane by adding parallel lines with regular spacing, thus identifying more squares.

Triangular tiling follows the same rule, but with a twist (literally).

A triangular tiling

You can build a triangle grid by copying and pasting the same parallel lines over and over again.

Things change when we consider a hexagonal grid. You can't "propagate" this tiling by copying parallel lines, the only way is to rotate the hexagon.

How to tile with hexagons

🙋 Visit our hexagon calculator and hexagon quilt calculator for mathematical and crafty twists on this beautiful shape!

Why we can only create regular square, triangular, and hexagonal grids?

There is a simple mathematical reason behind this limited choice of tilings. Among the regular polygons, only squares, triangles, and hexagons have internal angles that can sum to 360°360\degree when multiplied by an integer number. This is the condition for a tiling where cells share a vertex.

  • For the square, we have 90°×4=360°90\degree \times 4 = 360\degree.
  • Considering triangles, we have 60°×6=360°60\degree \times 6 = 360 \degree.
  • For the hexagonal grid, we find that 120°×3=360°120\degree \times 3 = 360\degree.

The numbers we used in the multiplications above are also the number of cells that share a vertex in each shape's grid! Four squares meet in one corner of square tiling, six in one corner of triangular tiling, and three in one corner of hexagonal tiling.

🙋 If you need a refresh on these shapes, visit our polygon calculator: we cover all the most important properties of regular polygons and more!

How to calculate a coordinate grid for 2D regular tilings

We can't define generic rules to calculate a coordinate grid. Some tilings are straightforward, others slightly more complex. To fill a hexagonal grid, you need multiple formulas and conditions, making hand-calculation of the coordinates a tedious task.

In this section, we will try to lay down the rules to create a grid.

Creating a square or rectangular coordinate grid

To calculate a coordinate grid's points in the case of a rectangular or square grid, you simply have to propagate the dimensions of the cell in the proper direction. For a square grid with a cell side equal to ll, we can create a grid originating from the point (x0,y0)(x_0,y_0) by following these simple rules:

xi=x0+i×loxyi=y0+i×loy\begin{split} x_i &= x_0 + i\times l - o_x\\ y_i &= y_0+ i\times l-o_y \end{split}

where:

  • ii — The index of the point we are considering; and
  • oxo_x and oyo_y — The offsets in the two directions.

A few words about the offsets: the most likely to occur in a square grid places the origin of the grid in the center of the starting cell. In this case, the offsets would be:

  • ox=l/2o_x = l/2; and
  • oy=l/2o_y = l/2.

To generate the points of a rectangular grid, the calculations for the coordinate grid change only slightly. Defining the dimensions of the rectangular cell as aa and bb (for the xx and yy direction respectively), we use the following formulas:

xi=x0+i×aoxyi=y0+i×boy\begin{split} x_i &= x_0 + i\times a- o_x\\ y_i &= y_0+ i\times b-o_y \end{split}

Generating a triangular grid

To generate a triangular grid from a starting point (x0,y0)(x_0,y_0), start by creating a row of points. If your cell has side ll, then you can find your points with the formula:

xi=x0+i×loxx_i = x_0+i\times l -o_x

To create other rows of points, we need to move vertically by the height of the triangular cell:

h=l×32h = l\times \frac{\sqrt{3}}{2}

Each row then has a vertical coordinate given by:

yi=y0+i×hoyy_i = y_0+i\times h -o_y

That's not all: every second row is shifted by l/2l/2.

To move the origin of a triangular grid to the center of the cell, we need to use the following offsets:

  • ox=l/2o_x = l/2; and
  • oy=l/23o_y = l/2\sqrt{3}.

How to generate a hexagonal grid coordinates

Generating a hexagonal grid's coordinates is not easy. First, there are multiple "neat" offsets, even apart from the center (thanks to the many corners in a hexagon). Moreover, we find an increased number of possible distances between the points. We will leave the math to our calculator: in this section, we will only introduce the possible types of hexagonal grids and the spacing you can find there.

For the coordinates of a hexagonal grid where the cell has a horizontal side, we can use this reference image to identify the characteristic spacing of this grid.

Horizontal hexagonal cell

We marked in red the possible origins of the hexagonal grid coordinates, which coincide with a vertex or to the center of the cell.

We can introduce the vertical cell, too: the spacing is the same, only tilted, but we can now identify different origin points.

Hexagonal cell 2

How to use Omni's coordinate grid calculator

Omni's coordinate grid calculator saves you a lot of time by doing tedious calculations for you. To use our grid calculator, simply choose the type of tiling you need. We give you five options!

  • Square grid;
  • Rectangular grid;
  • Triangular grid; and
  • Hexagonal grid (both horizontal and vertical).

Then, you need to insert some other parameters:

  • The number of points per side of the grid; and
  • The necessary cell parameters (one or two sides).

We give you the possibility of visualizing the first 100 points; then, you will only be prompted to download the file.

Building a triangular grid: an example

Let's check the step needed to build the first 25 points of a triangular grid. Follow these steps:

  1. Choose the placement of the origin. We will set it at (0,0)(0,0).
  2. Choose the length of the triangle cell's side: we went for a neat l=1l = 1.
  3. Next up: generate the first two rows of points:
    • The first one has y=0y=0 and x=l×i=ix=l\times i=i with i=04i=0\rightarrow 4.
    • The second one has y=l×3/2=3/2y = l\times\sqrt{3}/2 = \sqrt{3}/2 and x=l/2+l×i=0.5+ix = l/2 +l\times i = 0.5+i with i=04i= 0\rightarrow 4.
    The first ten points are, then:
(0,0),(1,0),(2,0),(3,0),(4,0),(0.5,3/2),(1.5,3/2),(2.5,3/2),(3.5,3/2),(4.5,3/2)\footnotesize\begin{split} &(0,0),(1,0),(2,0),(3,0),(4,0),\\ &(0.5,\sqrt{3}/2),(1.5,\sqrt{3}/2),(2.5,\sqrt{3}/2),\\ &(3.5,\sqrt{3}/2),(4.5,\sqrt{3}/2) \end{split}
  1. To generate the following rows, add 3/2\sqrt{3}/2 to the value of yy in the two cases we've seen in the last point.

FAQ

What are the three possible regular tilings?

There are only three possible regular tilings (tilings that use only translation and rotations of regular polygons):

  • Square tiling;
  • Triangular tiling; and
  • Hexagonal tiling.

All other regular polygons leave gaps in the plane when you attempt to cover it using such shapes.

How do I calculate the coordinates in a triangular grid?

To calculate the grid coordinates using a triangular cell, follow these simple rules:

  1. Generate the first row of points: they share the same y coordinate and are spaced by the side of the cell .
  2. Generate new rows by adding integer multiples of ℓ × √3/2 (the cell's height).
  3. Shift every second horizontally by ℓ/2.
  4. Translate the grid by the desired offset by subtracting the vertical and horizontal offset from each coordinate.

Why is a hexagonal grid special?

Hexagonal grids are unique for an interesting series of reasons:

  1. Hexagons don't tile the plane by simple repetition of parallel lines (as squares and triangles).
  2. Hexagons tile a plane using the smallest perimeter per number of cells: it means that every interface between cells is reduced.
  3. The triangles in a triangular grid are a simple subdivision of a hexagonal grid.

It comes as no surprise that nature is filled with hexagons: from beehives to planets, from foam to cells: the hexagon minimizes the energy required for things to stay close to each other.

What are the coordinates of a square grid with side 1.5?

To generate the coordinates of a grid of squares with side ℓ = 1.5, follow these easy steps:

  1. Choose the grid's origin: we place a vertex in the point (0,0).
  2. Choose the number of points in each direction: try with a 4×4 grid.
  3. Start by generating the first row. Fix y=0 and create the points with the formula x = ℓ × i = 1.5 × i, with i going from 0 to 3. You'll get (0,0),(1.5,0),(3,0),(4.5,0).
  4. Generate each new row by adding to the y coordinate.
Davide Borchia
Type
Square
Number of points per side (n)
Origin point
Center
Square cell side (a)
a square grid centered in the center
Check out 46 similar coordinate geometry calculators 📈
Average rate of changeBilinear interpolationCatenary curve… 43 more
People also viewed…

Area

Find the area of sixteen common shapes with this intuitive area calculator!

Christmas tree

Welcome to the Christmas tree calculator, where you will find out how to decorate your Christmas tree in the best way. Take a look at the perfect Christmas tree formula prepared by math professors and improved by physicists. Plan in advance how many lights and decorations you'll need!

Humans vs vampires

Vampire apocalypse calculator shows what would happen if vampires were among us using the predator - prey model.

Trig identities

Discover the most important relationship between trigonometric functions with our trig identities calculator.
Copyright by Omni Calculator sp. z o.o.
Privacy, Cookies & Terms of Service