Creating an ellipse mask by hand

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
cswaim
Posts: 2
Joined: November 3rd, 2012, 12:43 pm

Hi, first time poster to aenhancers.com! Excited to get discussions and feedback on this question.

I'm writing a script to automate creating a custom vignette in a stylized way I use a lot. I've gotten it to create the solid, add the mask with proper vertices, and change the mask mode to Subtract. I've also been able to create the ellipse with the proper inTangents and outTangents from page 173 of the scripting guide:

-----------------------

Example: Create an oval
An oval is a closed shape with 4 vertices and with inTangent and outTangent values:

var myShape = new Shape();
myShape.vertices = [[300,50],[200,150],[300,250],[400,150]];
myShape.inTangents = [[55.23,0],[0,-55.23],[-55.23,0],[0,55.23]];
myShape.outTangents = [[-55.23,0],[0,55.23],[55.23,0],[0,-55.23]];
myShape.closed = true;

-----------------------

And did some research here to re-write it to work for any comp size: http://www.aenhancers.com/viewtopic.php ... lit=circle.

My question is this: what is the significance of the 55.23? Where do they get that value...is it calculated or is it just some contant when dealing with ellipses?

I'm shifting over from a software engineering background heavy in javascript, but it's the math/geometry that's caught me up now. Thanks so much!
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

My guess would be it's the offset in pixels from the vertices to the tangent handle.
Post Reply