Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Using a grid and placing objects

$
0
0

@BeginnerOF wrote:

I am trying to place objects randomly within the boxes with a grid.
I am using this method to draw the grid:

ofDrawGrid(…)

void ofDrawGrid(float stepSize=1.25f, size_t numberOfSteps, bool labels=false, bool x=true, bool y=true, bool z=true)

I know you can generate random numbers between certain limits. What I am trying to work out is how I can use the stepSize and number of steps in the grid method to calculate generate random x and y coordinates for my object to ensure it is in the grid boxes

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles