Math library for renderers and GUIs

2022-09-14 Thread Obstinate1234
> It's very similar to quaternion based rotations but there is a whole > conceptual framework behind it that explains why all of the parts work t > should be technically usable

Math library for renderers and GUIs

2022-09-05 Thread icedquinn
this has been a little idle while i read other things. looking to swing back around and get the unit tests done for the basic linear algebra code so at least that is done. it should be technically usable (but not simd optimized) at that point.

Math library for renderers and GUIs

2022-08-20 Thread icedquinn
> rotors some form of Rotor3 may stick around for optimization purposes. i just pushed multivectors in R^2 and R^3 and changed the geometric products to produce those. however i noticed the tutorial code for rotors is abridging the math somewhat. they are supposed to carry the vectors along wit

Math library for renderers and GUIs

2022-08-18 Thread ro2
That makes sense, and I don’t think you really want a rotor class at all - just a “rotation” class that has methods to e.g. rotate a vector or return the axis of rotation or return the angle of rotation. It’s very much a design decision what to put at the _type_ level and what to put at the _va

Math library for renderers and GUIs

2022-08-18 Thread icedquinn
I don't mind defining a `Multivector2` etc. It just felt wrong returning a rotor here because while the data type has the same fields the result _isn 't necessarily_ going to be rotating anything. The videos I pulled up to check up on what the product result was called didn't call it anything.

Math library for renderers and GUIs

2022-08-18 Thread ro2
> The definition of a Rotor is identical to a geometric product > (scalar+bivector) so returning one as something like geometric(v1, v2) is not > inherently wrong but it does seem like it could be misleading because it > would mean the Rotor becomes the general object used to store any geometric

Math library for renderers and GUIs

2022-08-17 Thread icedquinn
> The Hadamard product is not geometrically meaningful! As of `d0975` there is no longer a `*` defined for vectors. `hadamard(v1, v2)` does what that operator used to do and a version of that for matrices already existed. The definition of a Rotor is identical to a geometric product (scalar+biv

Math library for renderers and GUIs

2022-08-16 Thread ro2
The Hadamard product is not geometrically meaningful! While it's great for data processing, it doesn't really make sense to compute the Hadamard product of two _spatial vectors_ (i.e. two relative positions in space) The geometric product makes sense as a product, and so do the inner product and

Math library for renderers and GUIs

2022-08-16 Thread dlesnoff
I am very interested to learn how you use algebraic geometry here, I'll look into the linked articles before looking at your code, in a week or so. From a math POV, we do not have many names for element-wise operator, I do not know if there is a name for absolute value applied to each element of

Math library for renderers and GUIs

2022-08-16 Thread icedquinn
> element-wise vector operations i'll replace those with the hadamard operator.

Math library for renderers and GUIs

2022-08-16 Thread ro2
There's another issue of mathematical correctness. The `*` and `/` operators operate elementwise, which does not seem a geometrically meaningful operation. These _do_ have meaningful definitions in geometric algebra, but... There's a fundamental tension between linear algebra and geometric algeb

Math library for renderers and GUIs

2022-08-15 Thread icedquinn
Exiled the game engine specific broadcast functions like `abs` to a separate `vectors/game.nim` for now. Also refactored those on to the broadcast template, and enforced the naming scheme. It should have been `absed`, `maxed`, etc, since the lib generally uses past tense to denote copying functi

Math library for renderers and GUIs

2022-08-15 Thread icedquinn
no effort has gone in to being compatible with stuff. it's all very bog standard though so they are probably reinterpret castable between libraries.

Math library for renderers and GUIs

2022-08-15 Thread icedquinn
> submit a pull request sourcehut doesn't have those. you either export the patch and mail it or do what you did and ask a maintainer to pull it manually. i should go set up the mailing list. > abs i think there's actually a better way to do that one.

Math library for renderers and GUIs

2022-08-15 Thread ro2
I love this and I'm interested in contributing! I have a branch here: I'm not familiar with this site so I don't know how to submit a pull request, but here's my first commit: BTW, I'm not sure I'm comfortable

Math library for renderers and GUIs

2022-08-13 Thread ingo
Do the vec3's etc interoperate with for example [vmath](https://github.com/treeform/vmath) ?

Math library for renderers and GUIs

2022-08-13 Thread ElegantBeef
As nice as it is to see someone implement vectors, quaternions, rotors and so on it'd really be nice if we could agree to use concepts as much as possible for any user facing code that relies on vectors. It makes life so much easier as you can bring your own data types.

Math library for renderers and GUIs

2022-08-13 Thread icedquinn
Projective geometric algebra is a real bear to figure out but I think I managed to scrounge together enough references to figure out some of the basic Motor and Rotor concepts. It's very similar to quaternion based rotations but there is a whole conceptual framework behind it that explains why a

Math library for renderers and GUIs

2022-08-06 Thread icedquinn
I've just finished putting together what should be a relatively complete but untested set of math code for game engines and GUIs: Proper testing will come somewhen. I'm sure there are some wrinkles.