These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

 FAQ Members List Calendar Search Today's Posts Mark Forums Read

 How exactly does Graffle interpolate Bezier curves? Thread Tools Search this Thread Display Modes
 dylans Member 2007-07-03, 12:28 PM I would like to use OmniGraffle as a GUI, whereby the user uses Graffle to draw a series of curves (i.e. curved arrows). After I collect the point coordinates used to generate a given curve, I would like to use that information to, for example, calculate the length of a curve, coordinates of points along the curve, radius of curvature at points along the curve, etc. To do this I would like to know precisely how Graffle generates these curves. Nearly all Bezier algorithms employ control points (handles) in addition to the interpolating points. Does anyone know how Graffle draws the curves using only interpolating points? Thanks in advance. -Dylan Post 1
 Wim Lewis Some Guy 2007-07-03, 08:58 PM Graffle uses a cardinal spline interpolation with α=1/2 (which I think is the same as a Catmull-Rom spline with tension=0, but don't quote me on that). Post 2
 dylans Member 2007-07-09, 09:51 AM Thank you for the suggestion. It seems as though Graffle is similar to Catmull-Rom in that a curve is interpolated based on the two points to the left of it and the two points to the right. However, using the catmull-rom algorithm described at: http://www.mvps.org/directx/articles/catmull/ I was unsuccessful. For example, given the point list: {{101, 248}, {211, 218}, {276, 149}, {336, 601}}, one of the points interpolated between the second and third point above should be {247.242462, 130.257446}, but using the algorithm referenced above, I was unable to obtain a point close to that. If anyone has any ideas, I would be most grateful. -Dylan Post 3
 Greg Titus Omni 2007-07-09, 11:24 AM Wim kind of says it backwards. A cardinal spline has a tension, and Graffle uses a tension=0.5. A cardinal spline of tension=0 is the same as a Catmull-Rom spline. See here: http://en.wikipedia.org/wiki/Cardinal_spline Post 4

 Similar Threads Thread Thread Starter Forum Replies Last Post gshenaut OmniGraffle General 0 2013-03-20 04:09 PM nestorph OmniGraffle General 2 2011-11-04 10:43 AM Filip K. OmniGraffle General 1 2007-03-14 01:15 PM

All times are GMT -8. The time now is 09:25 PM.

 -- Omni Style -- Lithographica Contact Us - The Omni Group Forums - Archive - Privacy Statement - Top