User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17

Thread: Parabolic Eliptical orbit....no gravity...math help?

  1. #1
    No Products Registered

    Join Date
    Jan 2014
    Location
    Indiana, USA
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Parabolic Eliptical orbit....no gravity...math help?

    This isn't a hard question but I can't seem to lay out how to use 't' in my head. What I'm trying to do is create a uniform flight path (oval, not a circle) where after reaching the target (mid point of flight) the projectile continues along its orbit back to point of origin.

    I think there's 2 ways to do this, either calculating the parabola to the mid point and then inverting it for the return, or calculating the parabolic ellipse. At this point I'm trying to do the ellipse.

    Here's a site with some good background math: http://www.mathopenref.com/coordparamellipse.html

    The equation of a parabolic ellipse is:

    x = a Cos t
    y = b Sin t

    a = radius from mid point to extreme point of curve along x-axis
    b = distince from mid point to origin along the y-axis
    t = a number ranging from 0 to 2pi radians

    The a and b are easy enough to figure out; a is the width I want the projectile to swing, and b is equal to ((origin_y - destination_y)/2). 'T' just pisses me off I'm afraid to ask how much harder this will be if the origin and destination are on an angle other than 90-degrees too

    I can do the equation for a parabola no problem but the ellipse is killing me. I'm not even using gravity here! Help?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Hi Jarred,
    I skipped the parabolic thing when things got too complex
    but this is juicy

    just built an ellipse tool like the one in mathopenref:
    ellipse.mfa

    T is just increasing degrees value to represent position along the ellipse,
    from 0 to 360 degrees (0-2pi)

    Maybe this can help with your projectile?
    If you want it to hit a certain point in the frame, it shouldn't be too dramatic to figure out... I think

  3. #3
    No Products Registered

    Join Date
    Jan 2014
    Location
    Indiana, USA
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ...wow I'm dumb. 2pi is 360 degrees Thanks!

    For part 2, there may be a work around. Can the ellipse be rotated by the angle to the target? I've done this with a Sine wave...might have been one of yours? Like pretend the frame is just graph paper and we rotated it 45-degrees? To us it would appear to move in an oval at an angle but the program wouldn't care and the math wouldn't need to change.

  4. #4
    No Products Registered

    Join Date
    Jan 2014
    Location
    Indiana, USA
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    More info for you math majors:

    http://math.stackexchange.com/questi...gin-and-rotate

    https://www.desmos.com/calculator/42lngkxil6

    So close...you'll love this

    [[((X cos(a) - Y sin(a))pow2)/(swing_width)pow2)]+[((X sin(a) - Y cos(a))pow2)/((Start_y-Target_y)/2)pow2)]]=1
    a = -3.14, 3.14 (pi to pi)

    I think 'a' is a radian. Pi to Pi is full circle. Just need to figure out 'a' for the angle to target.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Yeah,
    the rotating sinewave example was mine
    Since I'm comfortable with that, I should use the same system here:
    ellipse_enhanced.mfa

    additions:
    you can drag the origin point (red circle)
    and change the angle (buttons on left-bottom)

  6. #6
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)
    So, is this for a boomerang? And are the target and origin positions moving every frame or are they fixed positions while the projectile is moving?

  7. #7
    No Products Registered

    Join Date
    Jan 2014
    Location
    Indiana, USA
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Schrodinger - checking yours in a sec

    Mobichan - It's a boomerang effect for sure, so it's fair to think of it like that. Just not a direct point to point, it has to follow an ellipse. I'm only dealing with fixed positions which should make this not too hard.

  8. #8
    No Products Registered

    Join Date
    Jan 2014
    Location
    Indiana, USA
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Schrodinger - I'm working with yours at the moment since I'm failing to grasp the math of the ellipse.

    Race you? I'm attaching an active to the mouse pointer which alters the angle of the bar based on angle to target (so the ball hits the active) and altering the mid point based on frame height and distance to the active. Those two together should be pretty close to what I think I'm going for. I'm not positive it'll hit the active but it feels like it should.

    Mobichan - you tackling the ellipse boomerang? That would probably be cleaner than the rotation translation.

  9. #9
    No Products Registered

    Join Date
    Jan 2014
    Location
    Indiana, USA
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    See attached:

    ellipse_enhanced.mfa

    For the life of me I can't remember how to calculate angles O_o The 'eangle' should always be the angle from the midpoint to the target.

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Back again,
    mmmmm
    Fusion has a simple way of retrieving angle with an object,
    in this case:

    OAngle( "Active", X( "origin" ), Y( "origin" ) )

    You may add it in the first line like >> set e_angle to (above)

    But to make the ellipse hit the Active,
    you have also to alter A param
    (think of how the ellipse hits the "A" object -right vertical brown bar)

    Always in first event line,
    you can just substitute distance from "A" to distance from "Active",
    like this:

    ODistance( "Active", X( "origin" ), Y( "origin" ) )


    In this example, this would shift angle and hit your ball Active

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Planetary orbit
    By willy in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 21st September 2009, 11:11 PM
  2. Parabolic Motion
    By pirodaggar in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 22nd July 2008, 05:00 PM
  3. Orbit
    By heliuse in forum File Archive
    Replies: 5
    Last Post: 10th October 2007, 05:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •