- From: Dirk Schulze <dschulze@adobe.com>
- Date: Tue, 13 Nov 2018 08:27:45 +0000
- To: Gavin Kistner <phrogz@me.com>, Doug Schepers <standards@schepers.cc>
- CC: www-svg <www-svg@w3.org>
Hi everyone, SVG 2.0 is in the stage of transition from a Candidate Recommendation (CR) to a Proposed Recommendation (PR). (The last step before an official W3C Recommendation.)[1] In this transition period, the specification depends on multiple, existing and interoperable implementations. Catmull-Rom didn't match the requirements and therefore had to be deferred until after SVG 2.0. The specification text in question moved to the SVG Paths module which allows the feature to get developed independently from SVG 2.0.[2] The current working group charter of the SVG WG [3], provided by the W3C, defines the focus of the SVG WG. The current charter requires the WG to transition SVG 2.0 to PR before continuing other work items. Therefore, the work on SVG Paths had to be deprioritized for the rest of the period of the current charter. Kind regards, Dirk Schulze (chair of the SVG WG) [1] https://www.w3.org/2018/Process-20180201/#recs-and-notes [2] https://svgwg.org/specs/paths/ [3] https://www.w3.org/2017/04/svg-2017.html ________________________________________ From: Gavin Kistner <phrogz@me.com> Sent: Tuesday, November 13, 2018 12:24:41 AM To: Doug Schepers Cc: www-svg Subject: Re: SVG2 CR - Catmull-Rom curve commands missing?? On Nov 12, 2018, at 2:27 PM, Doug Schepers <standards@schepers.cc> wrote: > I'm the person who originally suggested the Catmull-Rom path command. I'd love to see it added, as I think it would make a lot of authoring tasks much more straightforward. For sure. > My initial suggestion was simply having some form of smooth curve that interpolates between control points, such that all the control points are on the line itself (unlike Beziérs); after a bit of research, I stumbled on Catmull-Rom curves as a reasonable solution to that. With no attempt to suggest the following should be used instead of Catmull-Rom, I wanted to share my own investigations into this. Given a set of points (P0, P1, … Pn), and a desire to create a smooth path through them using a cubic Bézier curve, I came up with the following algorithm (which I ostentatiously call a “kistcurve”): Put the first control point of the Bézier on the starting point P0. Put every third Bézier control point on a points on the curve P1, P2, … For each point calculate the segment between the adjacent points. (For endpoints P0 and Pn, use the endpoint for the adjacent point after the line.) For example, for point P7, calculate the segment P8-P6. Use this segment as the tangent at that point. Scale the length of the tangent between some maximum factor when the angle formed by the adjacent points is straight, and some minimum factor when the angle is 180°. As shown in this test (works on Desktop on Chrome, doesn’t work on iOS Safari), the results (shown in dashed orange) can be quite similar to a Catmull-Rom curve (shown in blue). And by adjusting the min and maximum factors, you can control how smooth or sharp the curve is under some interesting factors. http://phrogz.net/svg/kistcurve2_vs_catmullrom.html
Received on Tuesday, 13 November 2018 08:28:09 UTC