Re: [svgwg] Add circular arc path command 'R'. (#767)

As well for multiple elliptical arc, you don't necessarily need to have on-curve points: between the off-curve control points, additional on-curve points can be infered by prolongating the tangeants because control points on each side of the on-curve points will be aligned: you can infer a default position for the missing on-curve point by setting them in the middle of the segment joining off-curve two control points.

This means that you can also create a full ellipse by just
*  specifying the starting point (the current position set by a prior moveto or prior arc) and only the 4 control points defined as the 4 corners of the tangeant rectangle.
* by the 4 on-curve points where the same rectangle is tangeant: the first one being the current position (from a prior moveto or arc), so 3 points will be enough.

You can distinguish which king of points (on-curve, or control points) you have set using the notation with coordinates and flags in parentheses. Without parentheses, points are 2D only. In all cases, points in parentheses or not will inherit some flags from the previous points in the series to determine if they are off-curve controls or not, and the type of curve  (bezier, elliptic, C-rom, possibly other common types like sinusoidal, polynomial, hyperbolic, exponential/logarithmic...)
A curve would be valid only if points have the same number of coordinates: missing coordinates would be 0. All shapes can then be designed in arbitrary cartesian dimensions

Only one command needs an additional specification with more than 2 dimensions: the "bearing" B command need an orientation, the first angle is measured in the plane of axis 1 and 2 (in its current transformation where all coordinates are in an orthonormal system) so that "90 degrees" rotates axis 1 to axis 2, the second angle is measured in the plane of axis 2 and 3 so that "90 degrees" rotates axis 2 to axis 3, and so on... Some other coordinates transforms would be useful in addition to bearing:
* "skewing" coordinates by adding a proportion of the other coordinates (if there are missing proportions, just consider the missing proportions are 0).
* "scaling" coordinates by multiplying by a factor (if there are missing factors, jsut consider the missing factors are 1).
* translation is probably not needed directly: bearing, skewing, and scaling can all have a different center than the current position: this center can be set relatively, so that these 3 transforms use a default center at relative position 0 from the current position (these relative positions are measured from the coordinates system before applying these transforms).


-- 
GitHub Notification of comment by verdy-p
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/767#issuecomment-626041926 using your GitHub account

Received on Friday, 8 May 2020 22:08:24 UTC