# vector math

This topic is 4899 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

how do I divide a vector into two components? In my case I need to know the force along a certain axis. for instance: Vector Force = (0, 10, 10); Vector Axis = (0, 0, 1); the result here is would be (0, 0, 10) ( and the other component (0, 10, 0) ) I've seen a formula for this once in a book ..cant remember which one though =/

##### Share on other sites
Well, in the simple case you showed, you could just multiply them together, and then subtract the result from the first.

##### Share on other sites
Try this:

dot(Vector Force ,Vector Axis) / length(Vector Axis)^2 * Vector Axis

##### Share on other sites
Assuming your Axis vector is normalised (i.e. its length is 1) you can get the length of the Force vector projected onto the Axis vector by taking the dot product of the two. So to get the projected component of the force vector on the Axis vector multiply that length by the Axis vector.

Essentially what MickePicke said... but you can miss out the division by length term if your axis vector is normalised.

Projected Vector = dot(Vector Force, Vector Axis) * Vector Axis
Second Component = Vector Force-Projected Vector

##### Share on other sites
Tnx ...that helped alot =)

##### Share on other sites
Tnx ...that helped alot =)

1. 1
Rutin
45
2. 2
3. 3
4. 4
5. 5
JoeJ
19

• 11
• 13
• 10
• 12
• 10
• ### Forum Statistics

• Total Topics
633002
• Total Posts
3009822
• ### Who's Online (See full list)

There are no registered users currently online

×