Skip to main content
Tweeted twitter.com/#!/StackGameDev/status/168159844438777856
Fixed code formatting and image embedding
Source Link

I have a vector (8,5). It's origin is at (10,9)

I can calculate a perpendicular like so:

MyPerpendicularVector.x = -MyVector.y MyPerpendicularVector.y = MyVector.x

MyPerpendicularVector.x = -MyVector.y
MyPerpendicularVector.y = MyVector.x

Given that I now know these two axis, how do I make these axis (made up of my new vectors) now my "local" axis? for example I want to plot a vector (2,3) on the "local" axis but I have no idea how to calculate it in relation to the "global" axis

Image of the problem here: https://i.sstatic.net/GNISp.jpg

https://i.sstatic.net/GNISp.jpg

I have a vector (8,5). It's origin is at (10,9)

I can calculate a perpendicular like so:

MyPerpendicularVector.x = -MyVector.y MyPerpendicularVector.y = MyVector.x

Given that I now know these two axis, how do I make these axis (made up of my new vectors) now my "local" axis? for example I want to plot a vector (2,3) on the "local" axis but I have no idea how to calculate it in relation to the "global" axis

Image of the problem here: https://i.sstatic.net/GNISp.jpg

I have a vector (8,5). It's origin is at (10,9)

I can calculate a perpendicular like so:

MyPerpendicularVector.x = -MyVector.y
MyPerpendicularVector.y = MyVector.x

Given that I now know these two axis, how do I make these axis (made up of my new vectors) now my "local" axis? for example I want to plot a vector (2,3) on the "local" axis but I have no idea how to calculate it in relation to the "global" axis

Image of the problem here:

https://i.sstatic.net/GNISp.jpg

Source Link
Chris
  • 151
  • 1
  • 2

Calculate vector in local space

I have a vector (8,5). It's origin is at (10,9)

I can calculate a perpendicular like so:

MyPerpendicularVector.x = -MyVector.y MyPerpendicularVector.y = MyVector.x

Given that I now know these two axis, how do I make these axis (made up of my new vectors) now my "local" axis? for example I want to plot a vector (2,3) on the "local" axis but I have no idea how to calculate it in relation to the "global" axis

Image of the problem here: https://i.sstatic.net/GNISp.jpg