Hi! I am not kidding. Your example is what I meant by "inflection points". I forgot to add that the curve should be continuous. Cheers, Samy
--- In svg-developers@yahoogroups.com, "a_matseevsky" <[EMAIL PROTECTED]> wrote: > > --- In svg-developers@yahoogroups.com, "Samuel Dagan" <dagan@> > wrote: > > > > Hi Jake, > > I've just started to calculate the case of Bezier2, in order to > obtain > > the algorithm. I am glad that you found the solution. This also > saved > > me from the calculation. > > > > If a curve is defined by a bunch of points, I propose a simple > > algorithm that should work for most of the cases (excluding some > cases > > with inflection points): > > (1) Calculate the 3 distances - 2 to the end points of the curve > and > > one to a middle point. > > (2) Continue with the curve limited by the end point with shortest > > distance and the middle point. Now you are left with a curve of > about > > half of the length of the previous. > > (3). Calculate the distance of the middle point of the new curve. > > (4). You have now again two end points and and one middle. From > here > > on repeat (2) and (3) till you get the required minimal distance. > > > > This algorithm lets you calculate number of distances much lower > than > > the number of the total points of the curve. For instance if you > have > > 1000 points in total, you'll finish with calculating about 10 > distances. > > Good luck, Samy > > > > > > Are you kidding? Let's try to imagine 5 points- P1, P2, P3, P4 and > P5. P1 and P5 are end points, P3 is the middle one. If the distance > from P0 to P1 is less than distance from P0 to P5, you > recommendation is to select point P1, P2, P3. Well but why do you > think, that distance from P0 to P4 cannot be less than from P0 to > P1?! > ------------------------------------ ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ----Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/