
Opengl Soccer Ball 
Scooter
Member #16,799
January 2018

Hi Folks: I am back at it again. Has anyone drawn a soccer ball using opengl? Thanks 
Edgar Reynaldo
Major Reynaldo
May 2007

"truncated icosahedron concentric with the sphere" a little 3d trig should do you nicely. Then split each pentagon into 5 triangles. Then render with or without textures. EDIT  bump My Website!  EAGLE GUI Library Demos  My Deviant Art Gallery  Spiraloid Preview  A4 FontMaker  Skyline! (Missile Defense) Elizabeth Warren for Vice President 2020!  Modern Allegro 4 and 5 binaries  Allegro 5 compile guide 
Scooter
Member #16,799
January 2018

Checking in! 
Elias
Member #358
May 2000

Another very easy way would be to just use a premade 3D model. Of course that takes out all the fun  
Edgar Reynaldo
Major Reynaldo
May 2007

https://en.wikipedia.org/wiki/Truncated_icosahedron The coordinates are given by the permutations of : Cartesian coordinates for the vertices of a truncated icosahedron centered at the origin are all even permutations of: (0, ±1, ±3φ) (±1, ±(2 + φ), ±2φ) (±φ, ±2, ±φ3) where φ = 1 + √5/2 is the golden mean. The circumradius is √9φ + 10 ≈ 4.956 and the edges have length 2.[1]
EDIT EDIT2 My Website!  EAGLE GUI Library Demos  My Deviant Art Gallery  Spiraloid Preview  A4 FontMaker  Skyline! (Missile Defense) Elizabeth Warren for Vice President 2020!  Modern Allegro 4 and 5 binaries  Allegro 5 compile guide 
Scooter
Member #16,799
January 2018

Yeah, I have seen that. My problem is there is so many numbers involved I am doing this with a list using allegro5 and opengl which takes a lot of time. 
Edgar Reynaldo
Major Reynaldo
May 2007

When you map your sphere texture onto the sphere, it needs to be made of pentagons and hexagons like your polygonal faces. My Website!  EAGLE GUI Library Demos  My Deviant Art Gallery  Spiraloid Preview  A4 FontMaker  Skyline! (Missile Defense) Elizabeth Warren for Vice President 2020!  Modern Allegro 4 and 5 binaries  Allegro 5 compile guide 
Johan Halmén
Member #1,550
September 2001

I once created a polyhedron out of an icosahedron. Let's say each vertex of an icosahedron is on the surface of the final sphere. Divide each triangle of the icosahedron into four. You get a new vertex on each middle point of each edge, that is each pair of vertices. Push these new vertices out until they reach the radius of your sphere. Now you have a polyhedron with 80 triangles. Note that they aren't regular anymore. Now you can continue to divide each of the 80 triangles into four by following the same principle. Find middle point of each pair of vertices. Push this middle point to the radius of the sphere. You get 320 triangles, then 1280, then 5120 and so on. How many do you need? You will always have 20 equilateral triangles left. All the other triangles are a bit twisted. The most twisted ones will have angles 72°, 54° and 54°. The advantage of the truncated icosahedron is only in the real world. It is a neat way of making a football. And it has become an icon of a football, and that's probably why it is used in computer graphics, too. But really, an icosahedron is probably a much easier geometrical struct to begin with, if you are going to divide the faces into smaller triangles anyway. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest. 
