# ofxShowGrid, an addon to draw visually a grid, the golden ratio

Openframeworks addon C++

Draw visually a grid, the golden ratio, the third ratio and center relative to your width and height.

**USAGE:**

in **testApp.h** add :

`#include "ofxShowGrid.h" `

Then in **draw()** of **testApp.cpp** add :

To show **Grid** relative to your width and height, define sizeW and sizeH to define each cell size.

`ShowGrid(int widthG, int heightG, int sizeW, int sizeH, int decalX, int decalY);`

To show **Golden ratio** relative to your width and height.

`ShowGoldenRatio(int widthG, int heightG, int decalX, int decalY);`

To show **Center** relative to your width and height.

`ShowCenter(int widthG, int heightG, int decalX, int decalY);`

To show **Third Ratio** relative to your width and height.

`ShowThirdRatio(int widthG, int heightG, int decalX, int decalY);`

**int decalX, int decalY** are optionals, see the example for complete usage.