[Gambas-user] translating planar coordinates relative to point's angle
Kevin Fishburne
kevinfishburne at ...1887...
Mon Mar 14 07:13:54 CET 2011
I'm disturbed that I couldn't find an answer via Google that wasn't too
complex for my feeble mind to understand (my fault; I suck at math), so
I'm asking here.
I'm trying to move a point with an angle/direction/vector relative to
its angle. Let's say I have these variables:
Dim a as Single ' Point's angle in degrees.
Dim x as Single ' Point's x coordinate.
Dim y as Single ' Point's y coordinate.
Dim xvel as Single ' Point's right/left velocity (+/-).
Dim yvel as Single ' Point's backward/forward velocity (+/-).
What's a good algorithm to figure out the new values of x and y when
adjusted by xvel and yvel relative to a?
I've looked through a bunch of vector math "tutorials" but they are very
broad and difficult for me to understand. I'm good at many things, but
this isn't one of them. Any help will be greatly appreciated.
--
Kevin Fishburne
Eight Virtues
www: http://sales.eightvirtues.com
e-mail: sales at ...1887...
phone: (770) 853-6271
More information about the User
mailing list