Hacker News new | ask | show | jobs
by openfuture 2182 days ago
Bivector.net

Implementing computer graphics should be done with geometric algebra.

I don't know anything about this field but I know the difference between a clean, consistent API and a random hodgepodge of hacks.

Since I don't know anything I'm not sure if GA allows you to avoid errors such as the one in the article but in typical HN fashion I'll be derailing with some left- field claim and a link to some other project.

6 comments

As nice as GA is, I can’t see how it would help with the problem mentioned in the article, namely dealing with floating point approximation.
It depends on the specifics of the approach. Some variants of Geometric Algebra like Conformal GA are particularly well suited to boolean operations and for finding intersections. Also, GA can help reduce numerical error in many circumstances where vector algebra has issues, because it is more numerically stable in general.

However, some of the issues raised in that article will still be a problem, and the solutions in either vector algebra or geometric algebra would similarly benefit from this approach.

One related trick I've seen recently is to purposefully degrade floating point performance (e.g.: using fp16 or just zooming in a lot) so that rounding errors and numerical instability can be "visually inspected". This is an under-utilised method that reveals that many common graphics algorithms are designed for infinite precision reals and aren't optimal for IEEE 754 reals.

It feels like lisp - neat, maybe has pedagogical value, does not really solve any hard problems and usually not worth the overhead. Yet I still want to like it.
I'm wondering where did you take the notion, that lisp doesn't solve any hard problems? History proves otherwise over and over.
Not knowing what you consider a hard problem, I think most of them are not of the kind that a language can do much about. It can easily be a drag though, for example by being too high-level and taking control away from the programmer when it's needed. I'm not saying it's necessarily a bad tool (lisp or GA). They are just tools, not magic, and tools don't solve hard problems.
Oh, tools definitely solve hard problems. It's just once you got the right tool for a hard problem, the hard problem ceases to be a hard problem.
Or perhaps, choosing the right tool can reveal that certain, select problems are not actually that hard.

And perhaps, certain other problems, like computational geometry, are in fact just really fucking hard, no matter how you express them. Having some familiarity with the space, where the only really quality implementations are a massive GPL research code base in C++ (CGAL) and commercial C Libraries (Parasolid, SMLib), I lean towards this view.

I have some familiarity with computational geometry myself. I've built myself the tools I need for it in pure Apple Metal, and it beats anything you can buy or get for free (for my particular needs).
Companies have been using Lisp to accelerate game development with a scripting language in AA game.

Making a game is a hard problem.

See Lisp on Playstation 2: https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp

But nobody big enough uses Lisp to script games anymore.
List didn't fall out of practical use because it's bad, it fell out of practical use because its successors were better.
Dont Naughty Dog still use some type of lisp for their scripting?
Thanks for mentioning bivector.

Check out the demo https://observablehq.com/@enkimute/animated-orbits

Watch the SIGGRAPH talk https://youtu.be/tX4H_ctggYo

Join the discord https://discord.gg/vGY6pPk

Geometric algebra solves a different problem. This is about correctness (aka robustness), which is probably more important.
Also check out Grassmann.jl at https://github.com/chakravala/Grassmann.jl
This is the whole purpose for affine arithmetic, no?