Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Great work! Can you add the Klein model?

It's kind of interesting that moving while turning at a constant rate in the hyperbolic plane makes you gradually "drift". Is that actually true, or is it an artifact of the software?



I think it’s just an artifact of the way the ODE gets discretized. You could probably figure out more precisely by reading the code, though it seems to be written in an ML-like language without any comments, so code readability is going to depend a bit on your familiarity with such languages.

https://github.com/imeckler/diffgeo/blob/master/Main.elm

https://github.com/imeckler/diffgeo/blob/master/ODE.elm


The actual guts of the algorithm are in compiled javascript

https://github.com/imeckler/diffgeo/blob/master/Native/ODE.j...

However, this seems to simply be using the numeric library.

http://www.numericjs.com/documentation.html

Which uses 'Dormand-Prince RK'.

https://en.wikipedia.org/wiki/Dormand%E2%80%93Prince_method


For the curious (and if it wasn't obvious enough from the file extension), the language is "Elm" : http://elm-lang.org/


You mean something like this?

http://i.imgur.com/e9s29Jl.png


Added the Klein model! WRT your question, I'm not sure.


Yeah, I'm pretty sure it's an artifact. I'm seeing the same drift in the cylinder geometry, which definitely shouldn't be happening. A cylinder has the same internal geometry as a plane, so turning while moving at a constant rate should give you the transformed version of a circle.

Also, I notice that doing the same thing in the Klein model gives you very weird curves. Maybe you don't have the turning logic quite right? It should turn at a constant rate in the internal geometry, not in the plane geometry. (That shouldn't matter for the hyperbolic disk because it's conformal, so I guess something else is going on.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: