Hi
I’m looking for some code to display these objects in 3D:
mainly the Icosahedral ones.
Before implementing by this I was wondering if someone already did that with babylon.js ? (couldn’t find anything in the playground except https://www.babylonjs-playground.com/#7LLRFM#2 which does
only GP(m,0))
yes the method for creating a fix coordinate mesh poly given the vertex data is fine and easy, what KGersen was referring to is a code that can generate the GP(m,n) geometry. That code can generate a fix GP(m,0) given the m, it starts from a base icosahedron as a templete then divides it
I haven’t firgured out how to adapt that code to be a GP(m,n) type of poly generator. It would be amazing to do it…
On the other hand I was thinking of using the BABYLON.Mesh.CreateIcoSphere as a starter template of the geometry to make the hexasphere since it makes all the facets on the right locations, it just needs to combine the vertices in to the appropriate m,n hexaspheres.
Anyways if anybody wants to work making this, I would gladly join since this is way above my skill level.
I did say this was a first step and it would take some time. Currently I am working on producing GP(m, 0) from its geodesic dual. Then will work on using the dual kis operator to produce GP(m, m). After that will see what GP(m, n) can be produced.
cool cool! if you need any help, cheering…or just a DJ with some flow music to get the code going let me know. I did enjoy a lot figuring stuff out, figuring out this got me in to babylon js…so for sure im in! let me know.
If you’re still in the ‘research phase’ and not coding yet:
I found someone using an alternative method to the usual “conway operators” method (aka what we usually do with http://antiprism.com/ or polyHédronisme )
it’s capsid (in this site h,k display a GP(h,k) when “hex” is the geometry)
The author is Daniel Antonio Negrón.
He’s from the “bio virus” world (in demand these days…) and he’s using Caspar-Klug theory to generate these hex layouts. So it’s not 3D objects per se but he’s projecting on a 3D object every frame so may be his technic can be reused to generate a 3D GP mesh instead. He can also do trihex, snubhex and other geometries.
Porting parts of Antiprism in BJS could also be another approach (may be using wasm and keeping C code instead of porting code to TS/JS). But I looked at Antiprism code = not simple !
I currently use Antiprism to generate GP objects like this:
Class I - GP(m,0) :
geodesic -c m,0 ico | pol_recip | antiview (or off2obj to export)
Class II - GP(m,m) :
geodesic -c m,m ico | pol_recip | antiview
or convert a Class I to Class II :
geodesic -c m,0 ico | pol_recip | conway z | antiview
Been able to do this generation step in the browser with BJS would be very nice.
This PG https://www.babylonjs-playground.com/#S753J0#2, uses an icosahedron GD(1, 0) (red and solid) and subdivides each face into equilateral triangles as shown in white wireframe to produce GD(m, 0) for some integer m, the radius is inactive in this PG, enter a value for m on line 218.
yeah building the mesh from scratch is the best option to be precise. The thing i haven’t raped my head is how to build the pentagons and hexagons with the displacement in plane of the icosahedron facet so to have the m,n [Goldberg–Coxeter construction - Wikipedia ].
I can make the icosahedron, i divide it in to facets, i cant stich the edges to hexes and pentagons the sequence still eludes me that is where the magic happens.
The problem with the GP(m,n) is the rotation of the plane that it need to be tessellated in all faces. You could start with m=n since the max it can be moved, you could never go higher than m=n or lower than m,0 (0,n is like a mirror inverted of m,0) in the rotation (0 to π/5).