Author |
doran is stupid |
Doran Chief Marshal Galactic Navy
Joined: March 29, 2003 Posts: 4032 From: The Gideon Unit
| Posted: 2013-02-12 14:20  
okay, so what ive got here, is a set of XY coordinates. lets go ahead and say each coordinate represents a system in the MV, or whatever's mentally convienient.
Point 1 = (15250,-12250)
Point A = (15500,-12500)
Point B = (15750,-12250)
Point C = (15250,-12000)
which looks like this:
where the red squre (Point 1) is the nominal center-point (Points A-C are all some distance from Point 1)
good so far?
now, what i want to do, is take Points A-C and move them away from Point 1, (by lets say, 50% farther), while keeping them in the same relative position. like so:
here's where the headache happens.
looking at just Point 1 and Point A by way of example,
- Find distance from pA to p1. subtract A's x-value from 1's x-value, and do the same for the y-values of each.
(15500-15250), (-12500 - -12250), which gets me (250,-250), as in Point A is (250,-250) relative to Point 1.
next, apply the Pythagorean theorem (a^2 + b^2 = c^2[i]), to find out the linear distance between Points 1,A (which will be [i]c courtesy of the above theorem), swaping in x and y for a and b thus: - (x^2+y^2)=c^2
- (250^2) + (-250^2) = c^2[b]
- [b]sqrt((250^2)+(-250^2))
= 353.55
Point A is 353.55 units of distance away from Point 1.
- now, because i want Point A to be 50% farther away from Point 1, i should expect the end result to be very close to (1.5*353.55)=530.33. sounds resonable right?
this is where my logic/math turns into alphabet soup.
- (250, -250) * 1.5
(375, -375) <- new position for Point A relative to Point 1.
- add that to Point 1's current location, and i should end up with the new absolute coordinates for Point A)
(375 + 15250), (-375+ -12250) = (15625,-12625)
that still looks good, right?
- if we take that (375, -375) and run it thru the pythagorean theorem again,
[b]sqrt((375^2)+(-375^2))= 530.33
does anyone see any logical errors in that mess? [ This Message was edited by: Doran on 2013-02-12 14:35 ]
_________________
|
Fattierob Vice Admiral
Joined: April 25, 2003 Posts: 4059
| Posted: 2013-02-12 14:51  
You're scaling a vector by 1.5. You multiply all numbers of the vector by your scaling value to scale a vector.
Find the distance between the two points (THE VECTOR).
Multiply by 1.5 (THE SCALING VALUE).
That is your new point (MATH IS HARD)
You are correct in your math, Doran [ This Message was edited by: Fattierob on 2013-02-12 14:53 ]
_________________
|
YIIMM Grand Admiral
Joined: June 16, 2005 Posts: 851 From: Barcino, Hispania Tarraconensis
| Posted: 2013-02-12 16:00  
As Fattie has said, yes you are correct.
Around half of the modules in my degree involved vector calculus in one form or another. If you have any future questions or want a few notation tips to make things easier to work out feel free to send me a PM.
_________________
|
Fattierob Vice Admiral
Joined: April 25, 2003 Posts: 4059
| Posted: 2013-02-12 17:01  
Quote:
|
On 2013-02-12 16:00, YIIMM wrote:
Around half of the modules in my degree involved vector calculus in one form or another.
|
|
You have my condolences
_________________
|
Pantheon Marshal Palestar
Joined: May 29, 2001 Posts: 1789
| Posted: 2013-02-12 17:19  
A month with smart projectile vector processing was enough for me.
_________________
|
Flux Capacitor Marshal
Joined: July 30, 2010 Posts: 305 From: the place
| Posted: 2013-02-13 04:42  
lol, was expecting a locked QQ thread.
well yeah it looks correct Doran. If you want to increase relative position, you have to increase relative coordinates the same amount.
so 50% further relative position, means 1,5 times the current relative coordinates. 50% closer is 0,5 times the relative coordinates.
the reason for this is A^2 + B ^2= C^2
meaning distance between 2 points is root C^2= C,
A and B are the relative coordinates.
when doubling the distance C, the values A and B both have to double, to come up with same balance. since C is the crooked line between lines A and B of the triangle. Of course, when its not important to keep same relative positions there are many more possibilities (only extend line A to make C longer, keep B the same)
for instance:
5^2 + 6^2 = 7,8^2 > 61
double distance C so 7,8x2 > 15,62, C^2= 244
check by doubling A and B: 10^2 + 12^2 = 244
Doran is NOT stupid!
just one thing...b1 relative position moved 100 gu to far with b2...
also u places a2 50 gu to far to right and bottom. at the 75 spot instead of 25 spot
also c2 seems a bit to high up.. c1 is 250 gu from the point, so expected c2 375 gu above the point, or just 125 gu above c1
calculations good, drawing the points in a graph...not so good
[ This Message was edited by: CheuceLeude on 2013-02-13 04:50 ]
_________________ my signature is awesome
|
Talien Marshal Templar Knights
Joined: May 11, 2010 Posts: 2044 From: Michigan
| Posted: 2013-02-13 12:40  
Quote:
|
On 2013-02-13 04:42, CheuceLeude wrote:
just one thing...b1 relative position moved 100 gu to far with b2...
|
|
Bananas in Pajamas are now touring the galaxy. Scary thought.
_________________ Adapt or die.
|
Necrotic Chief Marshal Pitch Black
Joined: March 19, 2002 Posts: 378
| Posted: 2013-02-13 14:56  
u know it would be so easy to troll this thread givin the name of the thread
_________________
No matter how hard they have tried. They havnt figured out how to nerf skill yet :P
|
YIIMM Grand Admiral
Joined: June 16, 2005 Posts: 851 From: Barcino, Hispania Tarraconensis
| Posted: 2013-02-13 15:10  
Quote:
|
On 2013-02-12 17:01, Fattierob wrote:
You have my condolences
|
|
Compared with other stuff I had to do (electromagnetism, optics, complex dynamical systems) it was actually the easiest and most enjoyable part.
[ This Message was edited by: YIIMM on 2013-02-13 15:15 ]
_________________
|
-DBS Marshal
Joined: January 04, 2011 Posts: 204 From: St. Petersburg, FL
| Posted: 2013-02-13 16:13  
Same formula used to check square on a foundation or structure The 3-4-5 rule.
_________________
|
Ignorance Grand Admiral
Joined: October 27, 2012 Posts: 85
| Posted: 2013-02-13 16:32  
Quote:
|
On 2013-02-13 04:42, CheuceLeude wrote:
lol, was expecting a locked QQ thread
|
|
QQ
Are you sure the headache didn't start as soon as you started talking about calculus?
_________________ Lt. Commander Data: \"In the game of poker, there is a moment when a player must decide if an opponent is being deceptive, or actually holds a winning hand.\"
|
-(kha-ti the silent watcher)- Grand Admiral
Joined: September 12, 2011 Posts: 185 From: the land of silent watchers
| Posted: 2013-02-13 19:38  
i only came here for some reason expecting a qq thread but then the wave of math hit me in the head and i backed away.....
_________________
|
Kenny_Naboo Marshal Pitch Black
Joined: January 11, 2010 Posts: 3823 From: LobsterTown
| Posted: 2013-02-13 19:42  
WaAaAaaargh! Maths!
Brain ish hurt. Me go now. Take a nap.
_________________ ... in space, no one can hear you scream.....
|
Flux Capacitor Marshal
Joined: July 30, 2010 Posts: 305 From: the place
| Posted: 2013-02-13 20:20  
Quote:
|
On 2013-02-13 12:40, Talien wrote:
Quote:
|
On 2013-02-13 04:42, CheuceLeude wrote:
just one thing...b1 relative position moved 100 gu to far with b2...
|
|
Bananas in Pajamas are now touring the galaxy. Scary thought.
|
|
how did u get from there to bananas? Surely it must be the Pineapples
_________________ my signature is awesome
|
Enterprise Chief Marshal Raven Warriors
Joined: May 19, 2002 Posts: 2576 From: Hawthorne, Nevada
| Posted: 2013-02-15 20:17  
Quote:
|
On 2013-02-12 17:01, Fattierob wrote:
Quote:
|
On 2013-02-12 16:00, YIIMM wrote:
Around half of the modules in my degree involved vector calculus in one form or another.
|
|
You have my condolences
|
|
I loved this post just because Spirted Away.
-Ent
_________________
|