[QUIZ] Geodesic Dome Faces (#3)

J

Justin Rudd

I'm sorry that it didn't seem to catch people's fancy. To help figure
out what makes a good quiz:
Was the question too hard, too long, or too boring to tackle and solve?
Or was it perhaps not specified/described well enough?

I'll be honest. It was over my head :) I don't have a typical CS or
Math background and reading one of the solutions blew my mind
(http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/116106).
I don't really know what spherical interpolation vs. linear
interpolation are.

So it was interesting, but I didn't really know where to start.

But that's just me.
 
G

Gavin Kistner

geodesic.rb contains the subsampling code,
geodesic-data.rb contains the data as published in the quiz, and
depthcue.rb is a simple opengl visualization (a modified opengl
sample).

Wow...nice work with the OpenGL! (I had to sneak some time at lunch
while at work with my windows box to check it out, since it sadly
didn't work on MacOS X.)

As Dennis noted, you need to normalize your points to create a Geodesic
Sphere and not just a primitive with nicely meshed face.

I'll have to do a more in-depth code review tomorrow or Wednesday, when
I write up the Summary. Very nice and terse, though, from what I see so
far!
 
C

Carlos

Well...no one seems to have posted a Quiz solution.

I'm sorry that it didn't seem to catch people's fancy. To help figure
out what makes a good quiz:
Was the question too hard, too long, or too boring to tackle and solve?

Well, in my case, mathematics are not my strong point (they are my weak :).
I managed to divide a triangle into minifaces and all that, but the part
about rotating and translating it to the actual triangle position was too
hard. (My chosen method was to divide a model triangle and later move it to
each polyedre(?) face to get the actual coordinates of the inner points.
Maybe if I calculated the subfaces directly on the face it would have been
easier... who knows.)

In short, the problem was the mathematics/geometry.

--
 
S

STEPHEN BECKER I V

WOW! That is really cool. Good job :)
BTW: I am running ruby off of a networked drive on a computer with out
admin rights. i had to put geodesic.rb and geodesic-data.rb in the
\ruby\lib\ruby\1.8 folder :)

Becker
 
M

Martin Ankerl

A nice and short solution (I wasn't even aware of the Vector class in the
standard lib), you only forgot to normalize the vertices of the resulting
triangles.

Uh, I completely forgot this while watching the pretty triangles
rotate :)
By the way, the opengl code is only a slight modification of one of
the ruby-opengl examples.

martinus
 
B

Ben Giddings

martinus said:
Here is my solution:
http://martinus.geekisp.com/files/geodesic.zip
unzip and start depthcue.rb for a simple opengl visualization.

geodesic.rb contains the subsampling code,
geodesic-data.rb contains the data as published in the quiz, and
depthcue.rb is a simple opengl visualization (a modified opengl
sample).

*sob*

% ruby -v depthcue.rb
ruby 1.8.2 (2004-07-29) [i686-linux]
/usr/lib/ruby/1.8/mathn.rb:19: warning: method redefined; discarding old
gcd2
/usr/lib/ruby/1.8/mathn.rb:119: warning: method redefined; discarding
old inspect
/usr/lib/ruby/1.8/mathn.rb:231: warning: method redefined; discarding
old sqrt
depthcue.rb:81: [BUG] Segmentation fault
ruby 1.8.2 (2004-07-29) [i686-linux]

zsh: 28856 abort ruby -v depthcue.rb

Any ideas if the segfault is in the opengl stuff, ruby, or what?

I'd like to see the answer, and especially like to see some OpenGL stuff
done in ruby.

Ben
 
J

James Edward Gray II

by Gavin Kistner

SUMMARY

Given the faces for a tetrahedron, octahedron, or isocahedron, create
a geodesic dome of arbitrary frequency.

For those wondering where the summary for this quiz is, please be
patient with us. Gavin assures me it's coming. He hopes to have it to
me today and I will get it out as soon as possible after that. I guess
he's very busy at work right now. Sorry for the delays.

James Edward Gray II
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top