In most IGS, one starts construction by putting a few points and using them to define new objects such as lines, circles or other points. Thanks to for supervising this document.Interactive geometry software (IGS) or dynamic geometry environments (DGEs) are computer programs which allow one to create and then manipulate geometric constructions, primarily in plane geometry. If you are going to render a lot of spheres or you need highly tessellated spheres think about switching to any of the other algorithms. The UV sphere is the worst option in terms of accuracy for a given number of triangles but it is still the easiest algorithm. The triangulation of the subdivided cubes can be improved by making them symmetrical to the center of the faces of the cube. This could be avoided at the cost of complicating the code. The implementation provided for the spheres based on subdivided cubes generates duplicated vertices on the edges of the cube. Visualization of the surface distance error In this case the icosahedron beats the spherified cube for all the analyzed subdivisions but we can see how the error is already increasing. When looking at the average error, the normalized cube performs better than the UV sphere but the situation is reversed when considering the maximum error. We can see that the behaviour is similar to the maximum error of surface distances. It is the only one where the ratio between the triangles area and the expected triangle area (area of the sphere divided by the number of triangles in the mesh) decreases with the number of triangles.The error in the icosahedron case increases because successive subdivisions produces for each triangle four triangles of slightly different areas. Here is where we see the benefits of the spherified cube. The icosahedron still wins in accuracy over the other three. Distance to the Sphere: Maximum Errorĭespite the average error to be quite close between the normalized and the spherified cube we can see here that the maximum error is larger for the first one been worst than in the uv sphere. Distance to the Sphere: Average ErrorĪs we can see the standard sphere has the largest average error and the icosahedron is better than any of the other methods but for the number of triangles analyzed here we can only create two subdivisions with 3 triangles, which limits the flexibility of the method. ResultsĪll charts in this section show the number of triangles in the X axis and the (average or maximum) error in the Y axis. This can be interesting for subdivision purposes as more uniform triangles may give better results.īoth metrics will be given as maximum and mean square error. The first metric we will use to compare the different implementations is the distance from a number of points on the sphere surface to the mesh created.Īnother thing we are going to test is the ratio between the expected triangle area and the actual triangle area. The mesh will be an imperfect representation as we are using triangles to approximate the surface of the sphere. The pseudocode for the subdivision algorithm looks like the following: The pseudocode is not added here due to the length of the algorithm that needs the initial 12 vertices and 20 faces to be manually written. But it is still a better approximation by almost any measure excluding its number of triangles. An added problem with this method is that we can only increase the number of faces by four each time. Sadly this breaks the initial properties of the icosahedron, the triangles are not equilateral anymore and neither the area nor the distance between adjacent vertices is the same across the mesh. To get a higher number of triangles we need to subdivide each triangle into four triangles by creating a new vertex at the middle point of each edge which is then normalized, to make it lie in the sphere surface. Rz = sqrt(1.0 - 0.5 * (p2.x + p2.y) + p2.x*p2.y/3.0)Īn icosahedron is a polyhedron composed of 20 identical equilateral triangles and possesses some interesting properties: Each triangle has the same area and each vertex is at the same distance from all its neighbours. P = origin + 2.0 * (right * i + up * j) / subdiv_count
0 Comments
Leave a Reply. |