Thanks for the bug report! Fixed.
Video Lectures | Linear Algebra | Mathematics | MIT OpenCourseWare
This section contains a complete set of video lectures on linear algebra along with transcripts and related resource files.
Thanks for the bug report! Fixed.
There are some more. I’m correcting them as I go. (Like: public AxisAngle4f set(AxisAngle4f a))
So any thoughts on range requirements? I’m seeing internal inconsistencies. Some axis-angle routines are assuming unit length and others are not.
Also: Any reason @Override isn’t begin used and @SuppressWarnings(“hiding”) where field hiding is reasonable?
EDIT: And effectively static methods which aren’t static.
EDIT 2: I may not have ever said why [-pi,pi]…only one trig op is needed for sin(a) & cos(a).
EDIT 3: Some routines are converting returned angles to positive variants…see EDIT 2. Make work that reduces their usefulness.
EDIT 4: Quaternion get(AxisAngleXf dest)…checks for non-unit quaternions…I say user’s problem.
LibGDX has a really useful function where you can generate a quaternion from the rotation between two vectors. I find my self in need of such a function right now. Might be useful to add?
This is already available. Look at Quaternionf.rotationTo and .rotateTo
Ah, my bad. xd
I feel like crying. Given unit vectors a & b and we want quaternion q that rotates a into b then solve the rotation equation:
b = qaq
q = sqrt(ba)
now carry through the derivation. The equation ba* is quaternion speak for compose the magnitudes and find the relative angle and containing plane. Remember how I said that sqrt of unit quaternions and multiply with one conjugated are basic building blocks? These composed together result in zero trig and one square root. Apply the quaternion rotation equation 3 times to (1,0,0), (0,1,0) & (0,0,1) and you have a matrix form that requires zero roots in the unit vector case.
EDIT: Oh and it should be obvious that there are not multiple solutions. The solution is unique.
Just noticed that today is JOML’s first birthday!
Celebrating this anniversary with a new 1.7.0 release and the first steps of expanding JOML into the realms of geometric intersection algorithms, some of which are already being used by @theagentd in WSW.
They can be interesting for people wanting to do their own physics, which does not require a full physics engine like jBullet, or just for checking whether things intersect each other.
JOML is a good reference, but I had trouble deciphering the algorithms used in Matrix4f, as it deals mainly dumping matrix data into new matrices when translation or rotation goes on.
Hmm. I see you’ve started using the word “affine” for certain functions. Might want to rename the “4x3” ones to something like that too, as they work on affine transforms too.
Great idea, thanks! Will do. That’s exactly why I like working with people who really know about and are engaged in the topic.
If you want to know more about the algorithms/formulas, then Wikipedia is a good resource. Many more complex JOML methods are also annotated in their JavaDocs with references to web pages describing the algorithm/formula.
I was being told that Khan Academy has a good course on linear algebra, too: https://www.khanacademy.org/math/linear-algebra
I’ve searched and searched but anything on the wikipedia math wise isn’t legible to me and everyones complex answers don’t revolve around how the matrix exists, but just where it is stored. The translations and rotations algorithms don’t explain anything on this subject, and for opengl tutorials its all the fixed function pipeline and hidden method bullcrap that are either outdated or just stupid. > Refers to my post about decent learning material <
The topic itself is not easy to actually “explain” and I agree with you that it is hard to learn.
At some point with math we just have to simply accept that it is what it is and that it works out.
With rotation I was about to explain this. It has not yet reached at the actual “matrix”, but it will lead to it, until I made the step from ad-hoc/manual formula to linear algebra with matrices.
Maybe you can make something out of this.
The topic itself is not easy to actually “explain” and I agree with you that it is hard to learn…
I opened it to look at it and when it didn’t explain to me what the coefficients and subscripts were I kind of just assumed and then got bored within two minutes. “Let R represent the rotation and sub x represent the x axis” would be nice. I also found that in school textbooks, the text right next to the code (which btw is in top to bottom per step, not side by side which could come in handy to represent, but I can see why its left to right) which explains the steps briefly like…
2z + 3z + 2z = 180 Set all outer angles equal to the sum of all exterior angles
7z = 180 Combine like terms
z = 180/7 Solve
Khan Academy’s linear algebra videos got me an A in Linear Algebra at my uni. They’re AWESOME at explaining the basics and giving you an intuitive idea of what’s going on underneath the surface, which sounds like exactly what you want. I can admit that having the tutorials in a video format is a bit annoying since it takes time to watch them, but they’re well worth it.
I can totally agree with you about college textbooks being extremely bad at actually TEACHING you new things. They’re almost always just throwing shit out there and expecting you to get it. This is especially true for university/college text books in my experience. My statistics book would throw out a crazy formal expression defining a Poisson distribution, not even bothering to explain what the different variables stood for. Khan Academy would start with a binomial distribution, give an example of an interesting problem and then derived the expression for a Poisson distribution to show the motivation and meaning of all variables in an extremely effective way. Khan Academy has their shit straight.
It’s also worth mentioning that most of the higher academic world is really frigging annoying when it comes to actually explaining things, and it’s best to get used to it. Learning from formal sources takes a crapload of time. I’ve learned that the best way for me to understand scientific papers is to just read a few things from it each day and trying to understand it. Example: Weighted Blended Order-Independent Transparency. 20 pages just to describe creating a weighted sum and dividing by the weight at the end, plus calculating the alpha value correctly. The code for this is literally ~20 lines. It took me over a week of skimming through the paper a bit every day understanding nothing until it finally clicked, and the ground trembled from the massive “meh” I let out.
Khan Academy isn’t the most reliable source for all of that is there. I don’t like Khan Academy to a certain extent condoning only subjects. However, I am using it right now to learn the entire course of trig. I am almost done. Proud of myself. pats back :point:
I opened it to look at it and when it didn’t explain to me what the coefficients and subscripts were I kind of just assumed and then got bored within two minutes.
Having this sort of attitude is a sure way of never learning anything. Maybe certain concepts came to you easily in the past, but that’s no guarantee that it is always going to be the case.
Math is not easy. Programming is not easy. Learning any field beyond a few basic ideas is not easy. If you don’t understand something you have to look for explanations, and explanations for those explanations, etc. until you finally get it.
If you find yourself in way over your head, it’s probably because you’re trying to learn something without the proper foundations of previous concepts, in which case you need to take a step back and learn all those.
If you want to become good at something, you have to work hard at it, whether it’s interesting or not.
There are SOOO many resources on the internet to learn things that there is almost something for everyone. My favorite for linear algebra is
This section contains a complete set of video lectures on linear algebra along with transcripts and related resource files.
Note there are many other courses there too.
Expecting everything for free though and complaining when “free” doesn’t have exactly what you want is not very good. In those situations either pay some money for better material or ask lots of questions on forums to fill in the gaps.