Well, a good way to figure this stuff out before you start coding is to write yourself a logic diagram or “plan of attack”… In this case, without actually writing your script for you, I would do the following:
The first thing is to be able to create one random point somewhere in the box.
Then do that 5 or more times
Then make one curve from the points
Then repeat all of the above 300 times.
Written that way, it looks pretty simple no?
So something like:
- Create an empty list to store your points
- Make a random function that can generate a number between 0 and 10. This will be your X coordinate. Store this in a variable, say, “x”.
- Make another that can generate a number between 0 and 80 - your Y coordinate.
- Make a third that generates a number between 0 and 20 for Z.
- Use the 3 generators above to create one 3d point., store it in a variable.
- Add that point to the list.
Now, create a loop that runs through the above 5 or more times, your list will have all the points.
Then, create a single interpolated curve through the 5+ points.
You’re almost done here… All you need to do now is enclose all of the above in another (outer) loop, and run that one 300 times. Presto!
Now all you need to do is translate the above into real code, using the syntax of whatever programming language you’re using.