Yesterday I made a post about SAT. That got me thinking about another nice operation! The Minkowski difference. For two sets A and B, it is just the set of all points a (in A) - b (in B). One of the cool things about that is, that you can test two convex shapes for collisions! If they have a point in common, the Minkowski dif. contains the origin (a-b=0)! Try it out here: https://jsfiddle.net/b9tnpa5x/
#math #programming #javascript #collision #physics #algeobra
Made with https://github.com/sibaku/algeobra
#algeobra #physics #collision #javascript #programming #math
The separating axis theorem (SAT) is one of my fav theorems, since it is actually pretty simple and visually plausible, but also pretty powerful in the information you can get when applied to colliding objects. As I updated my #algeobra library (https://github.com/sibaku/algeobra *wink wink*) today to produce svgs, I made some svgs of the SAT demo! :)
The demo can be found here: https://jsfiddle.net/L4r6ktnh/1/
#math #geometry #collision #physics
#physics #collision #geometry #math #algeobra
Did a bit of refactoring to my #algeobra #javascript library default rendering! Algeobra is a geogebra-esque tool to easily create all kinds of (interactive) #math #geometry diagrams for browsers in code. And now you can also export everything to SVG!
You can find the library here: https://github.com/sibaku/algeobra
There are quite a few demos with code and #JSFiddle as well.
The one for the video (with SVG export) is here: https://jsfiddle.net/kjsL84r0/
#programming #TeachingTools
#teachingtools #programming #jsfiddle #geometry #math #javascript #algeobra
Made the first diagram for my simple visual geometric intuition behind the determinant document. This one is about adding one row/column to another one, which does not change the determinant. As expected, this is just the formula for the area of a parallelogram 😅 A bit more involved to code, but I think it looks kinda nice :)
#math #teaching #javascript #algeobra
#algeobra #javascript #teaching #math
I had a small idea today. I am not a gamedev myself, but have seen/talked to folks without a math background confused about vector stuff. So I thought, why not show some applications with the math condensed for common tasks. Especially various dot product applications. Probably already exists somewhere, but it is a fun thing to make lol. Not finished, but made initial scripts for basic distance and a point in cone check with my #algeobra library. #math #gamedev #js #teaching
#teaching #js #gamedev #math #algeobra
Added some more options and mesh definitions to the new three.js based 3D module for algeobra. Here is a visualization of what a projective matrix does to your FOV! It squishes it into a cube! Regions closer to the cam take up more space in the result! The 3D module is not yet up, but that will probably happen in the next few days. Might not implement as many operations as in 2D. Until then, you can of course check out algeobra ;) https://github.com/sibaku/algeobra #threejs #algeobra #math #cg