Hello, I would like to discuss how jME does its rotations and an efficient method for doing them using Rodrigues’ formula (a formula derived from quaternion multiplication I believe).
Given a unit rotation axis v and a point p1, a rotation of theta radians may be done to find the new point p2 using quaternions where qp is the quaternion version of p (0, p). q is the quaternion created using v and the angle theta: (cos(theta/2), sin(theta/2)*vx, sin(theta/2)*vy, sin(theta/2)vz).
p2 = q * qp * q^-1
Each quaternion multiplication requires approximately 16 multiplications and 11 additions, and so here there are two multiplications [(qqp) * q^-1] in addition to the 3 multiplications necessary to create q^-1 from q.
Rodrigues’ rotation formula is this:
p2=(cos(theta))p1+[(1-cos(theta))(p1.v)]v + (sin(theta))(v X p1)
This requires about 24 multiplications and 12 additions total (negating the calculation of sin and cos because it’s the same amount for the quaternion method).
Now, I’m not quite positive about all this, this is merely something my math teacher showed me, and I would like to know if you guys think jME could do rotations like this (if it doesn’t already) to increase speed.
several days and still no reply… man this place is slow…
a sample implementation and two jme-tests comparing the speed might help
several days and still no reply... man this place is slow...
1. 2 days, not several.
2. Lack of interest does not imply anything about the speed of replies on the forum.
3a. If it interests you a great deal, you can by all means play with an implementation and tell us your results. Failing that...
3b. We might get to looking at this when we get through the 15 other things that are higher priority.
mojomonk said:
several days and still no reply... man this place is slow...
1. 2 days, not several.
2. Lack of interest does not imply anything about the speed of replies on the forum.
3a. If it interests you a great deal, you can by all means play with an implementation and tell us your results. Failing that...
3b. We might get to looking at this when we get through the 15 other things that are higher priority.
Hey hey, sorry, I didn't mean to offend you, I just wanted to discuss this possibility and see if anyone's heard of it before.
Honestly, this is the most popular open-source project's forum I've ever seen.
Also, try to understand the position of the people here that take their own time (by that I mean, time they aren't getting paid for) to answer often the same questions over and over and I have yet to see a complaint about that. However, when you add to the mix someone complaining about lack of response in a couple days time on something that is of low priority (meaning, it's not a bug but a new feature possibility) I can understand how people might get a bit miffed. :-p
No worries, people around here are forgiving…otherwise I don't think I'd be able to show my face around here. Give it some time. Stuff along these lines usually gets reads a while before anyone has a chance to play around with any implementation possibilities. If you don't get a response within a week or two feel free to bump it. After a few weeks of bumping it and no one responds, then you might have reason to complain. :-p
darkfrog
Thanks darkfrog, you're absolutely right.