pouët.net

icosahedron / hexasphere / geodesic sphere code/math

category: code [glöplog]
Hi,

did anyone create a proper math formula (code) for creating a sphere with only hexagons?

The ideas I've seen is that one can start from an icosahedron, subdivide it, but then, if I understand correctly, 12 points will have 5 edges which doesn't sound optimal if one wants this in a lower resolution...

Or is this even possible (the hexagon sphere that is)?

In either case this is over my head, and google doesn't give much so I thought if anyone knew about this, it would be interresting and helpful :)
added on the 2013-02-13 18:52:11 by jaw jaw
so basically you want a football?
added on the 2013-02-13 18:57:57 by Gargaj Gargaj
Quote:
Or is this even possible (the hexagon sphere that is)?

If you tile hexagons you get a plane. To make a sphere you need to combine hexagons and pentagons, in which case you get the classic football.
added on the 2013-02-13 19:06:50 by Tjoppen Tjoppen
Ok, but at higher levels? Maybe the suggested subdivision approach is the best then... If hexagons and pentagons in combination is the only way to make a sphere..
added on the 2013-02-13 19:37:24 by jaw jaw
What Tjoppen says!
+you must define "optimal" and "higher levels".
added on the 2013-02-13 21:51:46 by baah baah
Use a more brute force method:
generate random points over a sphere (sphere point picking)
for each point repel it a few times
added on the 2013-02-14 01:42:38 by xernobyl xernobyl
3) tesselate it somehow =)
added on the 2013-02-14 01:43:03 by xernobyl xernobyl
Yes, I solved this with subdivision of an icosahedron. Thx!
added on the 2013-02-14 09:50:52 by jaw jaw
You created a sphere with only hexagons by subdividing a icosahedron? How did you manage to do that, without adding any pentagons?
added on the 2013-02-14 09:53:23 by Rob Rob
xernobyl: i think you missed out an extra couple of steps.
"..."
"profit"




added on the 2013-02-14 11:37:56 by smash smash
surely there are enough whitepapers written about the somehow technique, right? :)
added on the 2013-02-14 11:43:02 by Gargaj Gargaj
gargaj: well, from reading xernobyl's post i imagine that the "somehow" is an active area of research for him personally. i.e. he has a number of techniques implemented, done some comparisons and instrumentation, but hasnt decided on the best possible approach yet. i look forward to his paper with great interest because at first his approach looks completely and totally idiotic - so perhaps there's something new to be learned from the solution he comes up with.


i assume that because obviously nobody would be a dick enough to post a load of hot air onto a pouet thread to look clever when they actually have no fucking clue about what they are talking about. that never happens right? :)
added on the 2013-02-14 11:49:24 by smash smash
even our dear friend Paul Bourke doesnt explain it!!!
Quote:
You created a sphere with only hexagons by subdividing a icosahedron? How did you manage to do that, without adding any pentagons?


Well, no-one said they had to be regular hexagons.

Code: . /|\ / | \ / | \ / |_ \ / | \ / / \ /______/______\ repeat x20
added on the 2013-02-14 12:38:58 by gasman gasman
Quote:
You created a sphere with only hexagons by subdividing a icosahedron? How did you manage to do that, without adding any pentagons?

no no, the pentagons are still there (even though one does not add them, they appear naturally when subdividing)... but it's a reasonable tradeoff (visually).
added on the 2013-02-14 14:12:02 by jaw jaw
BB Image
Care to share screenshots of your work?
added on the 2013-02-14 14:21:17 by cxnull cxnull
Quote:

i assume that because obviously nobody would be a dick enough to post a load of hot air onto a pouet thread to look clever when they actually have no fucking clue about what they are talking about. that never happens right? :)

<3 <3 <3

Ohhhh just for the lulz (somewhat related to "you can't to it with hexagons only"):

Anyone able to triangulate a sphere-topology with valency 6 vertices ("regular") only? - degenerate triangles == cheating.

It's a riddle - jsyk.
added on the 2013-02-14 15:04:09 by las las
I took a tetrahedron or octahedron in the past and subdivided it, depending on how much code size I had available.
added on the 2013-02-14 15:11:42 by xTr1m xTr1m
indian code:
Code: pi.f=3.14159;27 Dim x.f(12) Dim y.f(12) Dim z.f(12) x(1)=0;Sqr(5)/2 y(1)=0 z(1)=Sqr(5)/2 For j=0 To 4 x(j+2)=Cos(j*72*pi/180) y(j+2)=Sin(j*72*pi/180) z(j+2)=0.5 x(j+7)=Cos((36+j*72)*pi/180) y(j+7)=Sin((36+j*72)*pi/180) z(j+7)=-0.5 Next j x(12)=0 y(12)=0 z(12)=-Sqr(5)/2 Repeat glClear_(#GL_DEPTH_BUFFER_BIT | #GL_COLOR_BUFFER_BIT); glLoadIdentity_() ;Reset The Current Modelview Matrix glTranslatef_(0,0,-6.0) ;Move Right 1.5 Units And Into The Screen 7.0 glRotatef_(rquad,3.0,-6.0,0.0) ;Rotate The Cube On X, Y & Z glColor3f_(1.0,1.0,1.0) Restore icosavert glBegin_(#GL_TRIANGLES) For i=0 To 19 ; glColor3f_(i/19,0,0.0) Read.b a Read.b b Read.b c ;glBegin_(#gl_lines);#GL_TRIANGLES);#GL_lines); glColor3f_(0.0,0.0,1.0); glVertex3f_(x(a),y(a),z(a)) glColor3f_(0.0,1.0,0.0); glVertex3f_(x(b),y(b),z(b)) glColor3f_(1.0,0.0,0.0); glVertex3f_(x(c),y(c),z(c)) ; glEnd_() Next i glEnd_() rquad=rquad-0.15 glFinish_() SwapBuffers_ ( hDC ); Until ( GetAsyncKeyState_ (#VK_ESCAPE) ) DataSection icosavert: Data.b 1,2,3,1,3,4,1,4,5,1,5,6,1,6,2;ok 15 Data.b 2,6,11,3,2,7,6,5,10,5,4,9,4,3,8;ok 15 Data.b 5,9,10,6,10,11,4,8,9,3,7,8,7,2,11;15 Data.b 11,10,12,7,11,12,8,7,12,9,8,12,9,12,10;15


you can build dodecahedron by calculating centres of teh triangles.
next step is to build edges, i have not this list.
and building geodesic sphere is rocket science)
added on the 2013-02-14 16:13:03 by bulb@ bulb@
http://fly.cc.fer.hr/~unreal/theredbook/chapter02.html

icosahedron+algo.
added on the 2013-02-14 16:21:36 by bulb@ bulb@
Heh, I got lost in the icospheres... didn't end up with the hexagons in the end...

https://www.dropbox.com/s/2ilnt8cro2ydf5q/sphereworld.png
added on the 2013-02-14 22:19:39 by jaw jaw
Nice!
added on the 2013-02-15 10:04:23 by cxnull cxnull
If a circle is an infinite number of infinitesimal lines, a sphere is an infinite number of infinitesimal hexagons. Or regular sized hexagons, if it's an infinitely large sphere.

(None of that is actually true. Or is it?)

Maybe it's possible to 'construct a sphere' using a flat plane of hexagons and curved space (so the plane curves into a sphere)? Technically it wouldn't be a sphere at all, but it could look like one.
added on the 2013-02-15 15:58:05 by psonice psonice
Not that it would help at all with the original question, unless you're going to generate the vertices per frame.
added on the 2013-02-15 16:20:49 by psonice psonice

login