smoothing out an icosahedron
Sat, 11/01/2008 - 18:17
I'm new to OpenGL ES (and Obj-C) and am trying to figure out how to subdivide & texture an icosahedron.
I came across the Molecules source-code, and have been using your source-code as a reference.
There's one thing I can't figure out - what code would you add to subdivide your icosahedrons even more? I have read the Red Book procedure, but I cannot translate it into ES.
Seeing as I'm only interested in rendering one sphere object, cpu/gpu shouldn't be a constraint.
I assume that you're referring to this Red Book procedure as far as the subdivisions go. I have a stub of an implementation of this in the addIcosahedronFaceWithVertex1:vertex2:vertex3:divisions:radius: method within SLSMolecule. It just needs to be integrated with the addAtomToVertexBuffers:atPoint: method.
I had planned to complete this integration myself so that I could have high-quality spheres for low-atom-count molecules (small molecules or unit cell crystal structures), but haven't yet. Looking at it, I don't think it would be that hard to do. Unfortunately, I'm a little behind on adding the custom importing of user structures right now, so I don't think I'll have time to work on it for a while.