Add point but retain shape

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
ernpchan
Posts: 156
Joined: Thu Aug 13, 2015 7:18 pm
Contact:

Add point but retain shape

Post by ernpchan »

Is it possible to add a point to a curve without the new point changing the shape of the curve?
My opinions and comments do not represent those of my employer.
http://www.ernestpchan.com
http://www.zazzle.com/gopuggo
User avatar
jahnocli
Posts: 3471
Joined: Fri Oct 29, 2004 2:13 pm
Location: UK

Re: Add point but retain shape

Post by jahnocli »

Scripts | Draw | Split Curve
You can't have everything. Where would you put it?
ernpchan
Posts: 156
Joined: Thu Aug 13, 2015 7:18 pm
Contact:

Re: Add point but retain shape

Post by ernpchan »

Is this the only way? I thought I saw a way to do this with the existing tools in a video but I can't find that video now.
My opinions and comments do not represent those of my employer.
http://www.ernestpchan.com
http://www.zazzle.com/gopuggo
User avatar
jahnocli
Posts: 3471
Joined: Fri Oct 29, 2004 2:13 pm
Location: UK

Re: Add point but retain shape

Post by jahnocli »

How many ways do you need?
You can't have everything. Where would you put it?
User avatar
Greenlaw
Posts: 10440
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Add point but retain shape

Post by Greenlaw »

Split Curve doesn't really preserve the shape though...all it does is evenly divide the segment between selected points. Running the script with a single point setting between two points is no different from simply adding a point in the middle of the segment using the Add Point tool. The shape is likely to change after running it this way.

And while it's true that if you select all the points in the curve and run the script, the original shape may be more accurately preserved but then of course you haven't added only a single point either.

Unfortunately I have no solution for this myself. :(

G.
User avatar
hayasidist
Posts: 3850
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Add point but retain shape

Post by hayasidist »

strictly the answer is no - all you can do is get close (and that's what split curve does as has been said).

techy answer (I think this is right, but please say if not):

(other than all "peaked" points): in AS the actual path between two points is a Bezier curve. The position of the control handles is hidden, and depends on the curvature at the point and the tangent of the path at the point (IOW where the neighbours to the point are). If you change the curvature through a point it will change the path on both sides of the point (i.e. change the path of two segments). If you move a point it will change the tangent at its two neighbours and thus change the path of four segments.

Consider a line with four control points A, B, D, E
Adding a new point (C) on the path between two existing points (between B and D) will change the precise path of the (now) four segments A-B, B-C, C-D and D-E
changing the curvature at C will change paths B-C and C-D
changing the position of C will change all four paths

If the segments are small (i.e. the points are close together) the visible change in paths will be small.

There is a pending enhancement request for a layer type that will support Bezier curves.
Post Reply