ogg said:
The math you need to solve the problem is fairly straight-forward. I've never heard of "inverse kinematics" and know nothing about it. You're on your own there.We can't do all that here. Your arm may have one joint or a thousand, the solution gets harder and harder for each length you add.
But if you want a "brute force" approach, then read on. First, you need to understand how to determine the distance between two points. The formula you use depends on what KIND of coordinate system you choose to use. Its a choice. Let's see, if you're 13 you're maybe in 7th Grade? So you haven't had any exposure to geometry and angles? Sines and cosines?
What is exactly is the "brute force" approach? Since you indicated that you know nothing on the subject of inverse kinematics, is it some sort of "replication" of inverse kinematics, something that isn't exactly inverse kinematics, but is trying to behave like it?
I've covered angles, but geometry I haven't. In my own independent studying, I've touched upon sines and cosines, but very lightly.
Oh, boy. This makes it a bit harder. That's why you were asked what your background was. Why you didn't respond is another issue. So, if I have a rod attached to a ball joint, I can describe the position of the tip of the rod (its end) by a set of coordinates (2 coordinates if you're working on a plane, for instance on a monitor). If the rod is a fixed length then the possible locations (assuming the origin is fixed) are all on the surface of a sphere. So, you actually need only to know the length and one coordinate. (the other coordinate is a function of it).
I'm assuming this is for a 2D example, due to two coordinates and working on a plane.
Saying the "rod" is the arm, then yes, it will be of a fixed length, but as far as I know, you're describing an arm which is made up of one joint? The ball joint is just where it is rotated at?
You might use the x and y coordinates (euclidean coordinates) or you might use polar coordinates and use an angles instead. For most people angles are a bit easier to understand with an arm consisting of rods and joints, but there's no fundamental difference between using angles and using xyz coordinates; the problem can be solved either way. Each rod starts at a fixed point (as a result of the 'previous' rods connecting it to the real starting point) and can rotate through a range of angles (but NOT 360°, I assume - you can't fold two rods so they both occupy the same space).
So the problem becomes A. determining the location of a given joint (at previous rod's tip) and B. selecting a position (a location) of a rod FROM that joint so that it gets your arm closer to the desired final point. The most brute force approach is to pick each joint's position as being on the straight line between the origin and the end-point and then figure out the position of the next rod.
So, we start off deciding one joints position/location, and then do the exact same thing to the next join, depending on the previous joints position/location?
One of two things happens: A. after you've positioned the final rod, you are short of your goal, meaning your arm isn't long enough to reach OR B. your arm is extended past your goal, meaning you will have to bend some of the joints. Chose one, bend it and you now need to extend the rods from that joint towards the goal and you're back in the same situation with two possibilities.
So, it's like a trial-and-error system? We keep on calculating until it's at its closest point? Going back to the previous step, and repeating that?
I've made a bunch of assumptions here, one is that you can easily look up the equations for distance, and the equations for polar coordinates (if you want them). Another is that there are few constraints on the arm, and any there are are easily handled by your program. The final assumption is that you simply don't have the math background to understand all of the math which would be required for a more "elegant" solution.
You could be an exception, but for most people the math would require months or years of study in order to understand what you call "the vocabulary". If you have a specific question about a specific term, we can help (but other sources are likely to be better), but if you want to understand all of (or even most of) the math background you won't be solving this anytime soon.
Yeah, I agree. The problem here is my inexperience and, well my age. The main problem is the "vocabulary", or even knowing what I need. I'm like a builder who doesn't know what tools he needs or has.
You need trigonometry, and differential calculus and multivariate (differential) calculus, as well as an understanding of matrices, linear equations and in computer science depth-first and breadth-first optimization.
You just gave me some tools! I'll start studying/researching on these topics!
You've been a great help. I can't thank you enough! Hopefully using this, I achieve my goal of utilising inverse kinematics! Thanks!