31 karma · joined Apr 25, 2016 (10y ago) · 21 submissions
comment 7mo ago · link · parent
It's quite handy, though the syntax for it is rather clunky compared to the rest of the language in my opinion.
comment 2y ago · link · parent
Consider also the minkowski portal refinement algorithm: http://xenocollide.snethen.com/mpr2d.html . Similar idea, but I find it more intuitive.
comment 2y ago · link · parent
https://github.com/beaumayns/box4d
Not nearly as polished as your video, but hopefully someone finds it interesting.
comment 2y ago · link · parent
6.
Show HN: Box4D – 4D physics demo using Rust and wgpu(github.com ↗)
4 points · by beaumayns · 3y ago · discuss
comment 4y ago · link · parent
comment 6y ago · link · parent
I think of a Jacobian as a way to transform the velocities from however they're stored for the interacting objects into linear world-space velocities.
For example, in 2D rigid body physics, rotational velocity is usually just a single number representing how fast something is spinning. Given a radius from the center of a spinning object (e.g. object origin -> a contact point in world space), the instantaneous linear velocity is the rotation speed times the tangent to that radius. Therefore, the Jacobian is just that tangent vector - multiplication by that vector transforms scalar rotational velocities into 2D linear velocities. The Jacobian for the object's linear velocity is just the identity matrix.
The rotation Jacobian is more complicated in 3D and 4D, but the principal is the same - find a matrix (at a particular point, usually the contact point or the joint location) to multiply with whatever represents rotational velocity to get the linear velocity.
[1]https://box2d.org/files/ErinCatto_ModelingAndSolvingConstrai... [2]http://allenchou.net/2013/12/game-physics-constraints-sequen...
comment 6y ago · link · parent
Another game idea is The Incredible Machine in 4D, but it would be so hard to play, and even harder to design the puzzles.
comment 6y ago · link · parent
What Marc's done with Miegakure, from what's publicly visible, is pretty incredible. I have no idea how he's managed to seemingly create a coherent 4D world while only being able to view a slice of it at a time. I guess it's a bit like using ed instead of a modern text editor.
comment 8y ago · link · parent
* If your code doesn't spend most of its time in primitive verbs operating on large vectors, it's gonna be more or less as slow as any other interpreted language. Q and kdb+ can be fast and beautiful if you can arrange your problem in the right way, but it's not magic.
* The internals are locked away. If you don't like the way something fundamental works, tough. I've known some folks to go to heroic lengths with debuggers and hacked up shared objects to get Q to do what they want. You could also get Kx to add the stuff you need (they're pretty reasonable and responsive). But, you can't really take it apart and put it back together again like you can with, say, Lua, Ruby, or Python.
* Relating to the above point, one of the weaknesses of the language is that there are a lot of useful (even necessary) features packed into weird corners. There's little room for abstractions beyond the basics, so you get stuff like CSV parsing controlled by the structure of lists passed to a function called "0:". It's getting better documented lately, but it's still not pretty.
* Various annoyances (no real module system, no lexical scoping, etc...)
In many of those cases, I'm not even sure what could be done without compromising some other aspect of the language. Most of the time (at least for me), it's really a joy to use.
comment 9y ago · link · parent
It's a really elegant way of dealing with large amounts of data, although the downside is that you've typically got to build a lot of the nice-to-have dbms type infrastructure yourself.
It would be interesting if BigQuery or Redshift ever figure out that they could have a much more powerful system if they stuck an array language on the front of their storage engines.
comment 10y ago · link · parent
http://code.kx.com/wiki/Reference/Bar http://code.kx.com/wiki/Reference/Ampersand