# Isometric Grids

    library(grid)
    library(isocubes)

Isometric grids of points and lines can help “ground” a structure made from isometric cubes.

Adding an `isoaxesGrob()` is useful for helping debug cube orientation. The x, y and z axes lines are colored red, green and blue (respectively).

    isopointsGrob(pch = "+", size = 10) |>
      grid::grid.draw()

    isolinesGrob() |> grid::grid.draw()
    isoaxesGrob()  |> grid::grid.draw() # (x,y,z) axis = red, green, blue lines

### Placing a voxel letter on a ground plane

    # Clear page and set background
    grid::grid.newpage()
    grid::grid.rect(gp = gpar(fill = 'lightblue'))

    # Draw an isometric grid
    isolinesGrob(col = 'darkblue', lwd = 3, x = 0.35, y = 0.1) |>
      grid::grid.draw()

    # Draw isometric cubes
    isocubesGrob(coords = isocubes::obj_letter, x = 0.35, y = 0.1, xyplane = 'right') |>
      grid::grid.draw()

    # Overlap axes
    isoaxesGrob(size = 20, x = 0.35, y = 0.1, col = 'yellow', lwd = 8, cex = 2, fontface = 'bold') |>
      grid::grid.draw()