![]() ![]() We populate our new vertices list and then return the new set of cube vertices, ready to be rendered! So first we start off with an empty list, then we begin our for loop running through the vertices list.įinally in this loop and concluding our function: ![]() It is the maximum distance out that we're going to consider drawing cubes.įrom there, we define some changes for x, y and z, which pertains to the changes we're going to make to our initial cube! To start, we have a parameter, max_distance, which is what it sounds like. Z_value_change = random.randrange(-1*max_distance,-20) Y_value_change = random.randrange(-10,10) X_value_change = random.randrange(-10,10) ![]() To create a bunch of random cubes, we're going to start off with a new function, set_vertices. Now that we've made one random cube, why not make many? After all, we can probably see here that avoiding one cube on a plane with x,y and z is quite simple!
0 Comments
Leave a Reply. |