Random 3d polygon


How can I make a random 3d polygon, say with 8 points. I’d want such an object to be able to randomly morph between different coordinates, so that it always has a new appearance.

If possible, I’d like to map a texture onto the object, also.

Thanks for any insight!


basically directx draws only triangles. so you need to derive a scheme to create your eight sided polygon from (probably 7) triangles. next you need to create a vertexbuffer (see the VertexBuffer (Join) help patch for that). a RandomSpread will help you creating random values.
If you want to texturize your polygons, you need to generate texture coordinates for each point (if in doubt use the coordinates of your points also as texture coordinates).