|
Post by Slissith on Jul 3, 2011 7:34:18 GMT -5
So, I want to create a circular movement. Took the circle equation... (A is the initial x, B is the initial y) Centre of Circle: (A, B) (x-A)*(x-A) + (y-B)*(y-B)= 4 (The beam squared) Converted it to... y=(4-x*x+2*A*x-A*A+2*B*y-B*B)/y Doesn't work Can anyone help?
|
|
Chaotic Chao
Forum Regular
Speed Highway is the best stage in history.
Posts: 242
|
Post by Chaotic Chao on Jul 11, 2011 21:44:24 GMT -5
Holy crap. This post looks like when I get up in the morning and have to do math for 2-4 hours.
y=(4-x*x+2*A*x-A*A+2*B*y-B*B)/y
Believe it or not, I actually understood most of this until this part. Now, I'm not sure about this (math being my worst subject, even though I'm pretty much good at it), but can you try simplifying this...or something?
...There's a 60% chance I have no idea what this is and that I'm babbling nonsense. 40% chance that I might be right. =p
|
|
|
Post by Werekill on Jul 12, 2011 21:10:29 GMT -5
Whoa, what the hell was your conversion process? I have no idea whatsoever how you reached that equation, but I can tell at a glance that it isn't a valid equation.
Mind going step-by-step to show how you reached it?
Also, why were you converting something in the first place?
Edit: Also, what was your goal by squaring the beam? And what do you mean by beam?
|
|
|
Post by Slissith on Jul 13, 2011 7:47:13 GMT -5
Alright, here goes...
(x-A)*(x-A) + (y-B)*(y-B)= 4 (the radius)
x*x -2*A*x + A*A + y*y - 2*B*y + B*B = 4
y*y = 4 - x*x + 2*A*x -A*A + 2*B*y - B*B
y = root of (4 - x*x + 2*A*x -A*A + 2*B*y - B*B)
|
|
|
Post by Werekill on Jul 13, 2011 10:08:41 GMT -5
It looks like you should've FOILed for the first time.
Should have looked like:
(X*X)(X*-A)(-A*X)(-A*-A) + (Y*Y)(Y*-B)(-B*Y)(-B*-B) = 4
Then
X^2 - AX - AX + A + Y^2 - BY - BY + B = 4
X^2 - 2AX + A + Y^2 - 2BY + B = 4
X^2 - 2AX + A - 2BY + B - 4 = Y^2
then put a square root thing over both sides of the equation and solve for Y, I guess. Honestly, I stopped really caring during that last equation, and I get the feeling that I missed the point of what you were trying to do.
|
|
|
Post by Slissith on Jul 13, 2011 10:14:55 GMT -5
Err...
I was trying to create circular movement in GM. I have already gone to the forums and been told. I still wanted, however, to see if I could use the actual equation.
From what I see though, I made no mistake.
|
|
|
Post by Werekill on Jul 13, 2011 10:25:19 GMT -5
Ok ok, I'm tired as hell, so maybe I made a mistake in mistaking your equation for a mistake. My mistake.
|
|
|
Post by Slissith on Jul 13, 2011 10:27:51 GMT -5
Doesn't matter, thanks for trying to help out!
|
|
|
Post by falcon8r on Jul 14, 2011 12:37:16 GMT -5
Circular movement? Just constantly increase/decrease the "direction" variable of a moving object in a Step event.
|
|
|
Post by Slissith on Jul 14, 2011 16:09:03 GMT -5
YOU'RE ALIVE!!!
And, anyway, I did get my answer at the GM forums. I was simply wondering whether it could be done this way.
|
|