# Grids

A grid is like a sheet of graph paper. Grids are useful as a base on which to place other objects. The individual grid blocks do not have to be square - they can be arbitrary parallelograms. In addition, you can define a radial grid (like a radar screen). See the HOOPS/3dGS Reference Manual entry for `Insert_Grid` for more information.

One advantage of grids is that they can be infinite in extent, so, if you are using a grid as a background, you do not have to worry about how big to make the grid. HOOPS figures out what parts of the grid are visible, and draws only those parts. And, when viewed in perspective, infinite grids are drawn all the way to infinity, smoothly vanishing toward the horizon

## Grid attributes

Grids are similar to shells and meshes, and have the same attributes. The main difference is that you cannot set attributes on subparts of a grid.

## Grid example

The following program defines a regular (quadrilateral, not radial) grid that is infinite in extent.

The arguments to `Insert_Grid` specify that this quadrilateral grid starts at the origin. The point `ref1` gives the direction to move to the next grid point in one dimension, and `ref2` gives the direction for the other dimension. The final two arguments give the number of grid points in each dimension - the value `0` specifies that the grid is infinite.