Help solving an equation for 3d modeling

  • Thread starter edward5elric
  • Start date
  • Tags
    3d Modeling
In summary, you are converting a 3D model from a file format to a programming language. You are having trouble figuring out an equation. If you want the background of what you are doing, you can explain it to me but it is not necessary to solve your problem.
  • #1
edward5elric
2
0
This is my first post and I'm pretty much lost when it comes to linear algebra. I am a programmer and I am currently working on converting a 3D model format for personal purposes. I am having trouble figuring out an equation. If you want the background of what I am doing I'll be happy to explain but it really isn't necessary to solve my problem.

Lets say that I have two matrices (4x4) M1 and M2. One vector4 v. I transform v by M1 to get v1 and v by M2 to get v2. So...

M1 * v = v1
M2 * v = v2

I am looking for some matrix X.

X * v1 = v2, solve for X.

What I came up with is X = (M2 * v) / (M1 * v), cross out v and get X = M2 / M1 or X = M2 * M1_inverse.

This does not produce the result I am looking for. Any suggestions? Thank you for any help.
 
Physics news on Phys.org
  • #2
X = M2*M1^-1 is correct, so it would seem your implementation is wrong somehow?
 
  • #3
Thanks. I probably made a programming error.
 
  • #4
I take it the problem isn't anything so obvious as M1 being not always invertible?
 
  • #5
edward5elric said:
Thanks. I probably made a programming error.

I'd start by checking that the inverse is actually the inverse, ie multiply by M1 and see you get (almost) the identity matrix. Next I'd check that I got the order of the multiplication right for the matrix multiplication routine I'm using (ie perhaps you should call it with (M1inv, M2) and not the "natural" way).

As a side note, a slightly less "hairy" way to get to the answer is this:

M1 * v = v1 ==> M1^-1 * M1 * v = M1^-1 * v1 ==> v = M1^-1 * v1

M2 * v = v2 ==> M2 * (M1^-1 * v1) = v2 ==> (M2 * M1^-1) * v1 = v2
 
  • #6
I agree with Lorc Crc - I wouldn't do any "crossing out" in linear algebra - or even division for that matter - always move things around with the inverse operation.

Dave
 

Related to Help solving an equation for 3d modeling

1. How do I solve an equation for 3D modeling?

Solving an equation for 3D modeling involves using mathematical principles to determine the values of variables in the equation. This process may involve simplifying the equation, isolating the variable you want to solve for, and using algebraic techniques such as substitution or elimination.

2. What are the common equations used in 3D modeling?

Some of the most commonly used equations in 3D modeling include the distance formula, Pythagorean theorem, and equations for calculating volume and surface area of geometric shapes. Other equations may vary depending on the specific application or modeling software being used.

3. Can I use a calculator to solve 3D modeling equations?

Yes, a calculator can be a helpful tool when solving equations for 3D modeling. However, it is important to have a solid understanding of the mathematical principles behind the equation in order to use the calculator effectively.

4. How do I check my solution for a 3D modeling equation?

To check your solution for a 3D modeling equation, you can plug in the values you have solved for into the original equation and see if it satisfies the equation. Some software programs may also have built-in tools for verifying solutions.

5. Are there any resources or tutorials available for solving equations in 3D modeling?

Yes, there are many online resources and tutorials available for solving equations in 3D modeling. These may include step-by-step guides, video tutorials, and practice problems to help you improve your skills in solving equations for 3D modeling.

Similar threads

Replies
5
Views
440
  • Introductory Physics Homework Help
Replies
8
Views
1K
  • Introductory Physics Homework Help
Replies
6
Views
1K
  • Introductory Physics Homework Help
Replies
2
Views
674
  • Introductory Physics Homework Help
Replies
4
Views
3K
  • Introductory Physics Homework Help
Replies
4
Views
944
  • Introductory Physics Homework Help
Replies
10
Views
2K
  • Linear and Abstract Algebra
Replies
13
Views
711
  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
  • Introductory Physics Homework Help
Replies
15
Views
2K
Back
Top