Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2007-07-18 05:31:48

luca-deltodesco
Member
Registered: 2006-05-05
Posts: 1,470

vector/matrix math help.

i havn't done much formally with vector and matrix math so im hoping for some help here, it should be solvable given that 'w' is unique to the two values.

what im trying to solve is two sets of equations for 'w', lets say:

where all vectors but 'w' are known.

Last edited by luca-deltodesco (2007-07-18 05:35:47)


The Beginning Of All Things To End.
The End Of All Things To Come.

Offline

#2 2007-07-18 05:57:45

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: vector/matrix math help.

I'm not certain of this, but here's what I've got:

A property of the vector product is that the result is orthogonal to both of the vertices that made it. Therefore, v[sub]1[/sub] and v[sub]2[/sub] are both orthogonal to w.

However, that also means that w is orthogonal to v[sub]1[/sub] and v[sub]2[/sub].
Therefore, w = k[v[sub]1[/sub] x v[sub]2[/sub]], where k is some constant.

Substituting this into the first equation, v[sub]1[/sub] = k[v[sub]1[/sub] x v[sub]2[/sub]] x r[sub]1[/sub] = k[(v[sub]1[/sub] x v[sub]2[/sub]) x r[sub]1[/sub]].

Everything in this equation in known except k, so by rearranging and using the identity for the vector triple product:
(a x b) x c = b(a.c) - a(b.c)

k can be found, and hence w can be found.

The same reasoning can be used for the 2nd original equation, and since r[sub]1[/sub] and r[sub]2[/sub] are independent of each other, that means that a solution doesn't exist in general. The value of k needs to match with both.


Why did the vector cross the road?
It wanted to be normal.

Offline

#3 2007-07-18 06:23:12

luca-deltodesco
Member
Registered: 2006-05-05
Posts: 1,470

Re: vector/matrix math help.

if v[sub]1[/sub] = k[(v[sub]1[/sub]×v[sub]2[/sub])×r[sub]1[/sub]], i should be able to just take a non-zero component of v[sub]1[/sub] and divide through to find k given that it is not a zero-vector, the application i have pertaining to these equations dictates that w IS unique for the given values of v1,v2,r1,r2

Last edited by luca-deltodesco (2007-07-18 06:26:59)


The Beginning Of All Things To End.
The End Of All Things To Come.

Offline

#4 2007-07-18 07:14:22

luca-deltodesco
Member
Registered: 2006-05-05
Posts: 1,470

Re: vector/matrix math help.

yes infact, that worked perfectly, thankyou very much as to what my application is: its for colliding against elastic ropes in my game.

the elastic ropes are just particles connected with springs, but the actual springs themselves are what are colliding generally, and to collide correctly with the rigid bodies i need to treat it as an actual rigid body with its own angular momentum to find the velocity of the point along the line segment.

so like this, i can calculate the angular velocity w for the spring from the velocities of the two particles composing it, and find the velocity of an imaginary particle along the spring

Last edited by luca-deltodesco (2007-07-18 07:16:48)


The Beginning Of All Things To End.
The End Of All Things To Come.

Offline

#5 2007-07-18 08:42:32

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: vector/matrix math help.

Heh, well then I'm glad the first part of my post helped and that you could finish from where I lost it. Yay for teamwork!

So when do you think you're going to finish this game?


Why did the vector cross the road?
It wanted to be normal.

Offline

#6 2007-07-18 08:48:20

luca-deltodesco
Member
Registered: 2006-05-05
Posts: 1,470

Re: vector/matrix math help.

oh i dunno, a long time from now probably, ive finished implementing non-colildable springs between world points and rigid bodies, and between rigid bodies, so i can have a platform with a mesh of springs underneath it to make it bouncy, or even a box attached with springs to the edge of a world to make a door sort of speak, or use some tight springs to join boxes together.

obviously, not as good as having actual constraints, but i dont even want to consider at the moment going into all that stuff lol.


The Beginning Of All Things To End.
The End Of All Things To Come.

Offline

Board footer

Powered by FluxBB