![]() ![]() Welcome back, let's now look at how we might connect two spheres to create this irregular shaped 3D object. For example, you can use the '//set' command to replace a large area of blocks with a single type of block. WorldEdit also offers a range of commands that allow you to perform a variety of tasks quickly and efficiently. This 3D object is basically constructed by linking two spheres with a polygon object. This makes it easy to create complex structures and shapes with just a few clicks of a mouse. So to create the two spheres, we can just make small modification of the same routine by adding another vertex array, and off-setting those spheres location along the y-axis by a fixed distance. To draw this second sphere we basically copy the same vertices from the first sphere, and then offset the y-axis coordinates with a fixed distance. As I want the color of the second sphere to be a green gradient color, I modify the color for the vertices to have a green gradient color. We can then create the buffers for storing the vertices and color indexes of our second sphere. In the draw functions we add the functions to upload the vertices and color buffer onto the shaders, and then call the GLDrawElements to draw the second sphere. This 3D object can be constructed by using two circular planes and creating a surface to link these together. So we can use the vertices of the circular planes to form triangles and patches to create this 3D object. The circular planes can be defined as planes cutting across the spheres.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |