User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 18 of 18

Thread: Bézier Curves for Dummies (TDC version)

  1. #11
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleMac Export ModuleSWF Export Module
    Game_Master's Avatar
    Join Date
    Jul 2007
    Location
    England
    Posts
    1,705
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bézier Curves for Dummies (TDC version)

    Nice article, this will help a lot!

    I made this because I was bored:

  2. #12
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Nov 2007
    Posts
    456
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bézier Curves for Dummies (TDC version)

    Quote Originally Posted by DanielRehn
    Quote Originally Posted by Raylax
    One more question, how do I get the moving object to rotate to be facing in the direction it's moving? Preferably using the Set Angle action rather than a 32-direction animation
    Not that hard really.. If you notice the green line in the following image... it's the angle at the current position of the curve


    so basically something like this

    tx1 = p0x + ((p1x - p0x) * t)
    ty1 = p0y + ((p1y - p0y) * t)

    tx2 = p1x + ((p2x - p1x) * t)
    ty2 = p1y + ((p2y - p1y) * t)

    posx = tx1 + ((tx2 - tx1) * t)
    posy = ty1 + ((ty2 - ty1) * t)
    angle = sqrt( ((tx2 - tx1) pow 2) + ((ty2 - ty1) pow 2) )

    I'm a little drunk atm, so I might have gotten a few variables a little wrong x)

    Cheers!
    Is it the same formula for a Quadratic Bezier?

    And, I'm assuming I use the bottom formula and implement the above formulas to replace tx1, tx2 etc. So, it would be:

    angle = sqrt( (((p1x + ((p2x - p1x) * t)) - (p0x + ((p1x - p0x) * t))) pow 2) + (((p1y + ((p2y - p1y) * t)
    ) - (p0y + ((p1y - p0y) * t))) pow 2))

    I'm also assuming that p1x, p2x etc etc mean X Position of P1, X Position of P2 and so on.

    Am I right on this?

    EDIT: And nice cover! :P
    I probably qualify under dummy =D

  3. #13
    No Products Registered

    Join Date
    Jul 2006
    Location
    Umeĺ, Sweden
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bézier Curves for Dummies (TDC version)

    First of all, as I stated 2 posts below my first one, I accidentally used the distance formula.. replace that with a formula to calc the angle and you should be fine..

    also for Quadratic Bezier it's the blue line in the following image...

  4. #14
    No Products Registered

    Join Date
    Jun 2007
    Location
    Croatia
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bézier Curves for Dummies (TDC version)

    A Bezier Curve Extension

    So you don't have to remember or implement the formula


  5. #15
    No Products Registered

    Join Date
    Jul 2006
    Location
    Umeĺ, Sweden
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bézier Curves for Dummies (TDC version)

    It still does not support angles...

  6. #16
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bézier Curves for Dummies (TDC version)

    [size:17pt]New Example[/size]
            &n bsp;    Multiple Objects       & nbsp;       &nb sp;       &nbsp ;        & nbsp;       &nb sp;       &nbsp ;        & nbsp;       &nb sp;       &nbsp ;        & nbsp;       &nb sp;   

    The attached example file shows how to use Object Selection to create many objects, all of whom have a separate Bézier curve.

    The example is of three monsters whose heads swivel left to right, on segmented Bézier necks. Assuming you create the same number of neck segments and nodes for each monster, you can have as many copies as you like with no new events.

    Note: Advanced. Not recommended for new users, relies heavily on MMF's object selection principles, specifically Many-to-Many relationships within MMF. A prior knowledge in this area is strongly recommended, although a separate frame is provided for you to experiment with the ID relationships in a Many-to-Many environment.

    (the long words and jargon are to put the newbies off - trust me guys, if you're new to MMF, this will be beyond you)
    Attached files Attached files

  7. #17
    No Products Registered

    Join Date
    Dec 2006
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bézier Curves for Dummies (TDC version)

    I think the main thing that will scare away new MMF2 users is the expression:

    ((X( "MBod" )+(X( "MBodDir" )-X( "MBod" ))*t( "MNeck" ))+((X( "MBodDir" )+(X( "MNeckDir" )-X( "MBodDir" ))*t( "MNeck" ))-(X( "MBod" )+(X( "MBodDir" )-X( "MBod" ))*t( "MNeck" )))*t( "MNeck" ))+(((X( "MBodDir" )+(X( "MNeckDir" )-X( "MBodDir" ))*t( "MNeck" ))+((X( "MNeckDir" )+(X( "MHead" )-X( "MNeckDir" ))*t( "MNeck" ))-(X( "MBodDir" )+(X( "MNeckDir" )-X( "MBodDir" ))*t( "MNeck" )))*t( "MNeck" ))-((X( "MBod" )+(X( "MBodDir" )-X( "MBod" ))*t( "MNeck" ))+((X( "MBodDir" )+(X( "MNeckDir" )-X( "MBodDir" ))*t( "MNeck" ))-(X( "MBod" )+(X( "MBodDir" )-X( "MBod" ))*t( "MNeck" )))*t( "MNeck" )))*t( "MNeck" )

    While it is fairly simple in principle and concept, it can be intimidating if judged on looks alone.

  8. #18
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bézier Curves for Dummies (TDC version)

    Yeah, it's worse since I used E++ to write that, and I think E++ is generating pretty unoptimised expressions right now, lol

    So it probably needs half as many brackets.

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. Movement Prediction using bezier curves
    By The_Alee in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 21st October 2009, 01:42 AM
  2. Dead reckoning for dummies?
    By Tiny in forum Lacewing
    Replies: 5
    Last Post: 31st December 2008, 02:06 PM
  3. MooApi: Using Bezier Curves for dead reckoning
    By Dynamite in forum Articles
    Replies: 5
    Last Post: 8th June 2008, 09:48 AM
  4. MooClick for Dummies
    By Dynamite in forum Articles
    Replies: 0
    Last Post: 3rd February 2008, 05:49 AM
  5. Bezier Curves in MMF
    By dustingunn in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 4th February 2007, 12:16 AM

Posting Permissions

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