It is currently Sat Aug 22, 2026 4:43 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: How to add points to curves...
PostPosted: Sat Nov 05, 2016 10:38 pm  (#1) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4527
Location: Canada
Right now I have a script that selects area between two diffrent paths (that have same number of strokes and points but might be different scale).
How I am doing it is simply using existing points to define the surface but it's inaccurate in this case.
See in blue, is what i am doing but the hump in the curve throws off the accuracy.
But ideally, i would have to break it up into 2 pieces like red. that way it'll cover the area like as if every point is stretched.
Is there a way to determine where these points are...and is it possible to add these points onto existing path like inserting them there?
Image

_________________
TinT


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: How to add points to curves...
PostPosted: Sat Nov 05, 2016 11:35 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Oct 06, 2010
Posts: 4050
I'm happy with the straight perspective points, for which I was seeking a script for. If there is a fix to curved points, I'll gladly update the plugin.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: How to add points to curves...
PostPosted: Sun Nov 06, 2016 5:24 am  (#3) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
In the absolute case it is easy to add a point. See "De Casteljau's algorithm" on Wiikipedia. Don't get impressed by the math, see the geometric interpretation, and milk the sentence "Note that the intermediate points that were constructed are in fact the control points for two new Bézier curves"

However for your script you have first to find where these points will be, so you want to find the tangent between two Bezier curves, and since in the general case these tangents will not be between corresponding segments, of the two paths, you'll have to find an algorithm to determine which segments... Not trivial. There may be a research paper on the subject somewhere.

_________________
Image


Top
 Post subject: Re: How to add points to curves...
PostPosted: Sun Nov 06, 2016 9:56 am  (#4) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4527
Location: Canada
Thanks ofnuts.
I was hoping it was easy. :hehe

_________________
TinT


Top
 Post subject: Re: How to add points to curves...
PostPosted: Sun Nov 06, 2016 10:38 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Oct 06, 2010
Posts: 4050
It is easy with a pencil and tracing paper... hahaha

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: How to add points to curves...
PostPosted: Sun Nov 06, 2016 12:16 pm  (#6) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
mahvin wrote:
It is easy with a pencil and tracing paper... hahaha


More exactly, the easy cases can be done with pencil and tracing paper :)

_________________
Image


Top
 Post subject: Re: How to add points to curves...
PostPosted: Sun Nov 06, 2016 1:28 pm  (#7) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4527
Location: Canada
that's not fair because with a ruler on paper, when searching for similar tangent points you're doing parallel search as you move the ruler across the paper. :mrgreen:

_________________
TinT


Top
 Post subject: Re: How to add points to curves...
PostPosted: Sun Nov 06, 2016 3:55 pm  (#8) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
Let's see how many tangents you find...

Attachment:
TangentPuzzle.png
TangentPuzzle.png [ 17.32 KiB | Viewed 3487 times ]


:gaah

_________________
Image


Top
 Post subject: Re: How to add points to curves...
PostPosted: Sun Nov 06, 2016 4:15 pm  (#9) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4527
Location: Canada
:hehe

_________________
TinT


Top
 Post subject: Re: How to add points to curves...
PostPosted: Sun Nov 06, 2016 6:00 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Oct 06, 2010
Posts: 4050
:rofl Do the invisible tangents count?

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group