From: "Dan Ebberts" Received: from resqmta-ch2-04v.sys.comcast.net ([69.252.207.36] verified) by media-motion.tv (CommuniGate Pro SMTP 6.1.0) with ESMTPS id 6453547 for ae-list@media-motion.tv; Mon, 21 May 2018 21:47:33 +0200 Received: from resomta-ch2-13v.sys.comcast.net ([69.252.207.109]) by resqmta-ch2-04v.sys.comcast.net with ESMTP id KjFdfJqOl40iXKqsof2erZ; Mon, 21 May 2018 19:54:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1526932454; bh=h6bcKtUNd4mCvSZ9UR4fhz9dUZ4mIJdqtagjDikdpzc=; h=Received:Received:From:To:Subject:Date:Message-ID:MIME-Version: Content-Type; b=js3zq1q9U+USv5g0f9YSjrgoHORnLKIGhJmgDC95+I5D0IizMqC13lyZ1QGT8b0gi Cm0Qge3iTgnnxLm0Oxi20ZncNzOXK0WmKL78d5WROvjyVOQVhFwZcrWLxe9tvXaCzB b79+1XLonVftzwu8Ex69OL7iI4pUdsVcZ/55QF/blrdjRtaKwg29WC6FzW4xH5g6Xq hAD1UVD1jBktqGczJaTpECKZHTqbEoZTXuHCpMBzIqNXpZ/303lgBy4VIoM2vYY8Zh 1B+N2SeFweAwvCbn26vgDrNi9XpRCj5nXlUULJgs/BEpYSmr365rG3hec4vbiGwFvf xnts0vm+CvSZg== Received: from HPZ440 ([71.197.106.61]) by resomta-ch2-13v.sys.comcast.net with ESMTPSA id Kqsmf0Sg2L5P9KqsnfhL3y; Mon, 21 May 2018 19:54:14 +0000 To: "'After Effects Mail List'" References: In-Reply-To: Subject: RE: [AE] inTangents/outTangents Math Date: Mon, 21 May 2018 12:54:10 -0700 Message-ID: <011201d3f13d$7d00cd60$77026820$@comcast.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0113_01D3F102.D0A3F130" X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQEBG5hZY1dvuguMQw6ssiUFZ2qQVaXgQYqQ Content-Language: en-us X-CMAE-Envelope: MS4wfOwoosJKEv9xPfJWgIst6Tv5UxVpyukMOqil98HpouanWhK7BgZJwhq7CugHbpO61CaV0wZI00EWc5ANsoFwCGKxPIn4py6UuXlcSuyXQV33x2HFPUH2 5+Qo8RHyIhICANnuLHYgazXzS4Z6vD5wQ1NpstwVeLZO9MRxE7WWdcRK This is a multipart message in MIME format. ------=_NextPart_000_0113_01D3F102.D0A3F130 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Just from looking at how AE does it, the math doesn=E2=80=99t seem all = that complex. For all the points except the first and last, it looks = like you just subtract the previous point from the next point and divide = that vector by 6 to get the out tangent of the current point. Then = invert that for the in tangent. =20 If the path is closed, for the first and last point you wrap around. So, = for the first point you would subtract the last point from the 2nd = point, divide by 6, etc. =20 If the path is open, for the first point you would subtract the first = point from the second point and divide by 6 for the out tangent and use = [0,0] for the in tangent. =20 Do something similar for the last point. =20 =20 Dan =20 From: After Effects Mail List =20 Sent: Monday, May 21, 2018 11:02 AM To: After Effects Mail List Subject: Re: [AE] inTangents/outTangents Math =20 Thanks Chris - there is a ton of info on the web about bezier curves and = I am getting what the behind the scenes mechanism is doing - but maybe = my real question is if I create a spline via a script I want to know how = to calculate the in and out tangents to make a spline that mimics the = auto bezier path. Is that even possible? =20 Thanks Tim T On May 20, 2018 at 1:22 AM Chris Zwar > wrote: Here=E2=80=99s a starting point. =20 http://jamie-wong.com/post/bezier-curves/ =20 On 20 May 2018, at 2:39 pm, TIM THIESSEN > wrote: =20 Can any one direct me to where I can read about calculating the = inTangent/outTangents of a path - I want to build a curved path (like = auto bezier) but I don't know the math to figure out the in/out = Tangents. =20 Thank Tim T =20 ------=_NextPart_000_0113_01D3F102.D0A3F130 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Just from = looking at how AE does it, the math doesn=E2=80=99t seem all that = complex. For all the points except the first and last, it looks like you = just subtract the previous point from the next point and divide that = vector by 6 to get the out tangent of the current point. Then invert = that for the in tangent.

 

If the path = is closed, for the first and last point you wrap around. So, for the = first point you would subtract the last point from the 2nd = point, divide by 6, etc.

 

If the path = is open, for the first point you would subtract the first point from the = second point and divide by 6 for the out tangent and use [0,0] for the = in tangent.

 

Do something similar for the last = point.

 

 

Dan

 

From: After Effects Mail List = <AE-List@media-motion.tv>
Sent: Monday, May 21, 2018 = 11:02 AM
To: After Effects Mail List = <AE-List@media-motion.tv>
Subject: Re: [AE] = inTangents/outTangents Math

 

Thanks Chris - there is a ton of info on the web about bezier curves = and I am getting what the behind the scenes mechanism is doing - but = maybe my real question is if I create a spline via a script I want to = know how to calculate the in and out tangents to make a spline that = mimics the auto bezier path. Is that even = possible?

 

Thanks

Tim T

On May 20, 2018 at 1:22 AM Chris = Zwar <AE-List@media-motion.tv> = wrote:

Here=E2=80=99s a starting point.

 

http://jamie-wong.com/= post/bezier-curves/

 



On 20 May 2018, at 2:39 pm, TIM THIESSEN <AE-List@media-motion.tv> = wrote:

 

Can any one direct me to where I can read about calculating the = inTangent/outTangents of a path - I want to build a curved path (like = auto bezier) but I don't know the math to figure out the in/out = Tangents.

 

Thank

Tim T

 

------=_NextPart_000_0113_01D3F102.D0A3F130--