How should spatial motion tangents and shape tangents be interpreted?

I'm writing a script that needs to interpret motion paths. The After Effects Scripting Guide specifies that each keyframe has a position, an in tangent and an out tangent.
My assumption was that these tangents indicate the position of the control points for a cubic bezier curve, relative to the keyframe position. So the curve from position p1 at keyframe 1 to position p1 at keyframe 2 is a cubic bezier determined by the points (p1,p1+out1,p2+in2,v2), where out1 is the out tangent of p1, and in2 is the in tangent of p2. Is this correct?
When I read about shapes, however, I got a bit confused. Shapes are also specified by vertices, and each vertex has an in-tangent and out-tangent. My initial assumption was that these also specify control points in a cubic bezier curve. But the guide shows an example of an oval:
As far as I know, there is no way to represent a circle or ellipse using cubic beziers. This got me thinking that perhaps my interpretation of the curves as cubic beziers is incorrect (I'd like to think that a circle in AE is really a circle, and not an approximation
Does anyone know how to interpret the tangents in both cases correctly?

Hi,
Bezier segments are polynomial curves, and as such, can't plot a circle (if X and Y are real polynomials then X^2+Y^2=1 would imply that both X and Y are constant, so a Bezier segment plotting exactly a portion of circle would plot at most one point of that circle...).
However they can approximate a circle (or ellipse) arc. This is what the example is talking about.
There is not just one way to decide when the approximation is good or not.
You can try to minimize the max radial distance from the approximated circle to the ideal one, or minimize the difference of areas, etc...
You'll get different data each time.
The most used convention for cubic Bézier and 90° arcs is "like this": start with a quarter of ideal circle, set the start and end points of the Bezier segment to coincide with the extremities of the arc, the tangents tangent to the arc, and adjust their common length so that the point at parameter t=0.5 coincides with the middle of the arc. Then (calculate) you find that the tangent length should be 4/3* (Math.sqrt(2)-1)  (0.552284741...) times the radius. This extends to 90° ellipse arcs as well since the image of a segment under affine transformation is the segment defined by the image of its control points. That's where the 55.23 comes from. If you want more info there are articles on the net about that (Cubic Bezier + circle).
There other approaches (other contraints)  that give closer approximations but for video it really doesnt matter, even 0.5 or 0.6 would work, noone will come and tell you that your circle is not a circle...
Your interpretation of motion path / shape path data is correct.
Xavier.

Similar Messages

  • How do I motion blur and object?

    I have an Ace Of Spade playing card that I scanned as a PSD.
    I imported it into Motion and moved it around the scene. I want to apply a motion blur to it but when I use the movement blur filter it does not motion blur the object.
    What am I doing wrong?

    There's info about motion blur in Motion's help. You don't need a filter for this. Motion blur is part of the Project and View settings. Project settings determine how much blur and how it is sampled. View settings turn it on and off for display and determine whether blur carries over to FCP. You need to do a couple things to get motion blur to work. First, check Motion blur under the View settings in Motion. Second, go to your sequence settings in FCP and under Render Control set Master Templates and Motion Projects quality to Best. Settings of Draft and Normal will not include motion blur. The amount of blur is controlled by the shutter angle and sample settings in the Motion project settings.
    BTW, the filter you tried is for blurring motion in clips that already contain motion. For example, you could exaggerate the motion blur of cars moving through an intersection. When the cars move, the filter blurs them. When they stop, the blur stops. Make sense?

  • How can I create icloud account which I tried and it has showing the message that multiple free accounts have been activated on this device how should I install icloud and I got from apple support if you have mac then create a new icloud account but I don

    How will have an option to create an icloud id

    Hello there, vishal274.
    The following Knowledge Base article provides a great FAQ that provides some great answers to some of the more common questions about iCloud, including yours:
    Creating an iCloud account: Frequently Asked Questions
    http://support.apple.com/kb/ht4436
    How do I sign up for iCloud?
    You can sign up for iCloud on an iPhone, iPad, or iPod touch with iOS 5 or later, or through System Preferences on a Mac with OS X Lion v10.7.4 or later. Just follow the setup instructions for your iOS device or Mac.
    You may need to verify the email address that you use for your Apple ID. See Frequently Asked Questions About Apple ID for more information.
    I had a free Find My iPhone account. How do I sign up for iCloud?
    Update the devices that you use with Find My iPhone to iOS 5 (iOS 6 recommended). When you're asked to enter an Apple ID during setup, enter the Apple ID you were using for Free Find My iPhone. Your account will be automatically updated to iCloud.
    I had a MobileMe account. How do I sign up for iCloud?
    To use your MobileMe account for iCloud, follow the iCloud setup instructions and enter your @me.com or @mac.com email address as your Apple ID. If you had an @me.com address, it will be reactivated for email when you sign up for iCloud. If you had an @mac.com address, it won't be reactivated for email, but you can set up a new @icloud.com email address to use with iCloud.
    Important: You will need a verified email address associated with your @me.com or @mac.com Apple ID to set up iCloud. To add a verified email address, go to My Apple ID (appleid.apple.com), sign in with your @me.com or @mac.com email address, and add a valid email address to your account.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • How should I pick up and go with Time Machine running

    I have noticed that since Time Machine backs up my computer often, programs hang up and don't close right away. I'm often on a short window to pack up my machine and go to a meeting. Can I just pull all the plugs out and go? Ejecting the disk seems to take a lot of time when a backup is occuring.
    What's the best way to do an immediate disconnect from the external hard drive?

    _*Can I just pull all the plugs out and go?*_
    And the answer to this would be a resounding... NO !!
    As a general rule, you should always eject your drive by dragging it to the trash... and waiting for it to dismount before you disconnect it. Just pulling the cable... especially when the system is in the middle of a back up, WILL result in damaging your backup... making the point of having a back up pretty useless. While it is nice to get back ups every 15 minutes... it can be a hog on resources. You may just want to connect your external drive when you know you'll be in one place for quite a while... or use something like Carbon Copy Cloner (SuperDuper is more popular, but does not yet make bootable backups for machines with Leopard installed) to make backups when you want them.

  • How should I apply patches to forms 6i?

    Hi,
    Someone told me that in order to work properly with forms 6i you have to apply patches.
    How could we find that our forms 6i need patches in order to run properly on windows 2000 Server?
    I have a metalink account, what patch of forms 6i I need and how should I download it and then how should I apply it to forms 6i from METALINK?
    After applying required patch does forms 6i works properly in the future?
    Thanks
    Behari

    Without having any details about your problem, there is no way of knowing if a "patch" will solve your problem. Additionally, there are no specific patches required which are needed to run on Windows 2000. All 6.0.8.x versions were certified on Win2k
    However, the latest and last patch for Forms/Reports 6i is Metalink Patch ID# 4183804
    This will make your Forms version 6.0.8.26

  • How should devs interact with the db?

    Good day. For some time my organization has worked as most small shops do: web and software developers log into the database and create their own views, procs, etc. However we have grown to a much larger staff and have begun the process of transitioning into a more "professional" shop.
    In your experience, how should web/software developers (and their products) interact with the production database? In other words, should they send their views to the DBA who will create said views? Or should they not be connecting to views at all? Should they have their own schema on the production database (and this will be the one which holds their views)?
    If you say that the developers should have absolutely no access to the production db at all, then how should their products interact with the database?
    I appreciate any links, advice, etc.
    Thank you.
    EDIT: the developers products are about 75% read-only search/reporting apps and 25% data entry.
    Edited by: 893968 on Oct 12, 2012 8:39 AM

    893968 wrote:
    Good day. For some time my organization has worked as most small shops do: web and software developers log into the database and create their own views, procs, etc. However we have grown to a much larger staff and have begun the process of transitioning into a more "professional" shop.
    In your experience, how should web/software developers (and their products) interact with the production database? In other words, should they send their views to the DBA who will create said views? Or should they not be connecting to views at all? Should they have their own schema on the production database (and this will be the one which holds their views)?
    If you say that the developers should have absolutely no access to the production db at all, then how should their products interact with the database?
    I appreciate any links, advice, etc.
    Thank you.
    EDIT: the developers products are about 75% read-only search/reporting apps and 25% data entry.
    Edited by: 893968 on Oct 12, 2012 8:39 AMThink about this. The earlier in the process that the DBA becomes a reviewer/gatekeeper, the earlier in the process you can eliminate bad design decisions. Bad design decisions can be any of the following and more:
    wrong data types
    badly normalized tables
    use of reserved or key words for object/table/column names
    reinventing wheel (especially common when needing a sequence number)
    object names that make no sense and fit no pattern.
    I'm sure others will chime in with more.
    The point being, if you allow developers the 'create' privilege at any level, they will create things that will become a headache for you further down the road. Let them write queries and procedures ... that's their job. But not tables, indexes, sequences, etc.
    And don't fall for "it's just dev, we can clean it up when we move to QA". No, they won't. At the time it moves to QA it will be "we've got too much invested in this, we can't afford to make those changes now." And regardless of what was agreed to six months earlier, management will side with the developers because they really can't afford to pay for the re-work that would have been avoided in the first place with proper division of responsibility.
    It will be a painful process to bring about. Someone will have to stand firm. And there will always be low-level complaints, but it still comes back to 'if you don't have time to do it right the first time, when will you find time to fix it later?" It's part of the DBA's job to make sure it gets done right the first time, and he will need management support to maintain it.

  • How do you make a motion tween, mask effect and shape tween, with a flash website?

    More of less, I will have three seperate pages for the motion tween, mask effect and shape tween... would you make the seperately, in a different scene, as a symbol or on the same scene with the website.

    It's not clear what you are after since you start talking about separate pages for the three things, and then ask about how best to put them together.  If they are going to be separate they can't be together.
    If your intention is to have these three things in one Flash file, ut as separate parts of it, then I would have each within a symbol and have each symbol within the same scene (I don't use multiple scenes).

  • How to implement BINDING between drawing shapes and properties?

    See this background info:
    Can we have BINDING between drawing shapes and properties?
    This needs more specific info. My application reads a number of XML files, and places the data in an Excel worksheet. Let's say that there are 20 XML files, the app creates 20 lower tabs (spreadsheets) named: "Item 1", "Item 2", ...,
    "Item 20".
    That is the current version. I am told by the users, however, that in some cases there are some XML files which create more than 1 Excel lower tab.  For example, the file: "Items 8-11.xml" needs to fill tabs 8, 9, 10 and 11.
    In that particular case the user will modify the default map (a 45-degree diagonal, equivalent to the
    identity function F(x) = x), by clicking around. The resulting new map will look as follows:
    Since the number of XML files does not change, the number of rows is constant. However, each time a black square is moved from its canonical (45-degree) location, a spreadsheet becomes "orphan" and therefore the application must create a new Excel
    lower tab (which is a grid column). IOW: The number of columns keeps on growing to the right.
    List<Model>
    I figure that (as opposed to DataGrids which grow and shrink vertically, which each Model being 1 row) this thing should use the column as fundamental Model.
    Before running the main app (the XML file reading procedures), the user will select a menu item named "Configure XML to Excel Mapping" and an interface similar to the image above will be shown.
    In addition to the property binding, which has been discussed, how should I implement the drawing and erasing of black and white squares? I guess I will need some sort of "ConvertTo" bidirectional bridge from/to boolean and square drawing?

    You lost me with the xml file and the tab and the wossname to the thingummybob.
    I don't follow the explanation, sorry.
    The way to show stuff like that isn't dependent on how the data is stored where though.
    I probably wouldn't draw them, as such.
    I'd probably just make each a usercontrol which bound the fill brush of a rectangle for the black white bit and used a border for the outline.
    To simplify that:
    <Grid> <Border>
    <Rectangle Fill={Binding FillBrush}"/>
    </Border>
    </Grid>
    FillBrush
    Would be a public property solidcolorbrush exposed from your cellvm
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Media;
    using GalaSoft.MvvmLight;
    namespace wpf3
    public class CellVM : ViewModelBase
    private SolidColorBrush fillBrush;
    public SolidColorBrush FillBrush
    get { return fillBrush; }
    set
    fillBrush = value;
    RaisePropertyChanged();
    You can then have some logic somewhere which tells that viewmodel to show black or white fill.  Which would be that converter bridge thingy equivalent.  This thing is true then FillBrush = whiteBrush else FillBrush = blackBrush.
    You could probably do it with just rectangle, lose the border and set the Stroke on the rectangle.
    The stroke is the outside line round a rectangle ( or any shape).
    https://msdn.microsoft.com/en-us/library/system.windows.shapes.shape.stroke(v=vs.110).aspx
    And you would of course do other stuff like sizing the usercontrol and arranging an list in a list as I explained in your other thread.
    Oh.................
    But to answer the question in the title.
    Yes you can bind all sorts of things including the point making up a polygon, brush used to draw the line and all sorts.  You could even do flashing cells if you wanted.
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • HT200246 I JUST PURCHASED MOTION 5 AND HAVE NEVER USED IT OR ITS PREDECESSORS BEFORE.  HOW CAN I GET A LESSON GUIDE FOR HOW TO USE THIS SOFTWARE?

    I JUST PURCHASED MOTION 5 AND HAVE NEVER USED IT OR ITS PREDECESSORS BEFORE.  HOW CAN I GET A LESSON GUIDE FOR HOW TO USE THIS SOFTWARE?

    There are a number of resources.  You might want to start with:
    The User Manual:
    http://help.apple.com/motion/mac/5.0/en/motion/usermanual/
    This Thread:
    https://discussions.apple.com/message/22833760#22833760
    or just do a google search, that should bring up plenty of tutorials from around the web.
    Cheers!

  • Hi, I have a macbook pro 10.6.8 and an iphone 4s. I have already created an icloud account. I want my normal mails to be saved on icloud. how should i go about?

    Hi, I have a macbook pro 10.6.8 and an iphone 4s. I have already created an icloud account. I want my normal mails to be saved on icloud. how should i go about?

    I'm not sure I understand your question really, but one thing for sure is that you need Lion for iCloud to work.

  • I have few PDf files on my computer and I want to add them to my ipod touch, please tell me the procedure on how should I do that? Secondly I want to run these Pdf files through the ibook app, as it also have the Pdf file sections

    I have few PDf files on my computer and I want to add them to my ipod touch, please tell me the procedure on how should I do that? Secondly I want to run these Pdf files through the ibook app, as it also have the Pdf file sections

    You should be able to just place them in your Books library in iTunes and check to ensure that your Book library is configured to sync to your iPod when you sync your iPod to iTunes.

  • I want to use one apple id in my macbook and iPad but i don't want pics to get sync and show in both devices, how should i stop this ?

    I want to use one apple id in my macbook and iPad but i don't want pics to get sync and show in both devices, how should i stop this ?

    Turn off My PhotoStream in iCloud on both the iPad and the Mac. PhotoStream is what shares your photos (unless you are using iCloud Photo Library Beta, in which case, all photos uploaded are accessible from all devices signed onto the same Apple/iCloud ID).
    Cheers,
    GB

  • I accidentally dropped macbook air that was in a book bag. The keyboard is working because I can see the light but the screen is black and it won't turn off. How should I fix this? Please Help ME!!

    I accidentally dropped my friend's macbook air that was in a book bag. The keyboard is working because I can see the light but the screen is black and it won't turn off. How should I fix this? Please Help ME!!
    I tried to turn it off and it didn't work... and I held on to the shift key too and it still doesn't work..
    Please help me..

    Accidental damage is not covered under Apple warranty.  And it seems there is much accidental damage.  Only a Genius Bar tech looking at it can tell how much it will cost to repair.
    Cost to repair will be high, I suspect (though Genius Bar will confirm/deny.
    There is no gentle way to say this sir/ma'am ... someone will need to pay for your friend's MBA repairs.

  • I have a mac pro g4 when i load a cd or dvd there is no start up noise from drive and icon will not show on desktop or in itunes. How should i troubleshoot? pioneer 105 mirror door

    I have a mac pro g4 when i load a cd or dvd there is no start up noise from drive and icon will not show on desktop or in itunes. How should i troubleshoot? pioneer 105 mirror door

    PIONEER DVD-RW  DVR-105:
      Firmware Revision:          A506
      Interconnect:          ATAPI
      Burn Support:          Yes (Apple Shipping Drive)
      Cache:          2000 KB
      Reads DVD:          Yes
      CD-Write:          -R, -RW
      DVD-Write:          -R, -RW
      Write Strategies:          CD-TAO, CD-SAO, CD-Raw, DVD-DAO
      Media:          Insert media and refresh to show available burn speeds
    yes its a power mac thanks its been a long month and Merry Christmas thanks for checking my question im hoping its a driver problem but not liking some other stuff looking like replace drive

  • Old Macbook to New Macbook Air Transfer but new Macbook Air has less Storage Space. I only want to keep all iTunes and iPhoto Files. I can keep the rest on an External HD. How should I do this?

    Bought a New Macbook Air and wanting to transfer only iTunes and iPhoto stuff to the new Macbook Air. How should I do this? Ive got and External HD acting as Time Machine but the Data on there is 143G worth and the New Macbook Air is a 128G HD. So i dont need all the extra Documents but want to keep them on the External HD which has been Partitioned.
    Question is - How do I transfer the iTunes and iPhoto info into the New Macbook air and keep all its settings ect and also keep the Docs ect in the HD? Time Machine wont work as there is too much info for the New Macbook Air.
    What should I do?

    In iTunes 11 uncheck the preferences setting in in the iTunes Preferences panel "Advanced > Copy Files to iTunes Media folder when adding to Library"

Maybe you are looking for