UI ideas for quadratic and elliptic curves?

Krzysztof is working on Node tool as his GSoC task, and as part of the refactoring we may be able to add support for editing quadratic and elliptic segments in paths. Is anyone aware of how other software supports these beasts from UI viewpoint - what handles are used and how? Any pointers will be appreciated.

bulia byak wrote:
Krzysztof is working on Node tool as his GSoC task, and as part of the refactoring we may be able to add support for editing quadratic and elliptic segments in paths. Is anyone aware of how other software supports these beasts from UI viewpoint - what handles are used and how? Any pointers will be appreciated.
Nathan and Marco have done some work in lib2geom experimenting with various user interactions for elliptic segments. I would recommend chatting with Nathan and testing some of the toy implementations in lib2geom.
Aaron Spike

bulia byak wrote:
Krzysztof is working on Node tool as his GSoC task, and as part of the refactoring we may be able to add support for editing quadratic and elliptic segments in paths. Is anyone aware of how other software supports these beasts from UI viewpoint - what handles are used and how? Any pointers will be appreciated.
I used some software once that had these, though I can't remember the name of it. SomethingDraw I think. In that your paths were either/or - you would use either a bezier tool, or a quadratic tool, or an elliptical segment tool.
A dedicated elliptical path drawing tool would be fairly useful imho. You could draw shapes with one tool or another and combine them with boolean operations.
One use case that would come in handy would be if you could convert a rounded rectangle to a path with elliptic segments for corners so that you could scale each corner individually without distorting the rectangle's sides.
Dan

2009/6/17 Daniel Pope <mauve@...1559...>:
I used some software once that had these, though I can't remember the name of it. SomethingDraw I think. In that your paths were either/or - you would use either a bezier tool, or a quadratic tool, or an elliptical segment tool.
This is wrong. We can have any of those segments in any path: SVG allows to mix them freely. Not to mention it would be very confusing, because we would now have several modes of the node tool, and modes are bad. I didn't think about drawing such paths yet - for now it's sufficient if we can change the type of a segment to either quad or arc and edit it.
Now actual UI ideas. For quadratic beziers, it's rather easy: we have something like two cubic bezier handles glues together. It's a bit harder for elliptical arcs. The ellipse-fitting toy from 2geom uses three points on the arc, but it's hard to get the shape you want with this kind of control. The ellipse tool uses the bounding rectangle, but this approach doesn't make much sense for paths when the ends of the arc are fixed. Here are my initial ideas:
a) Ellipse's major and minor axis end with handles. Dragging on one of the handles would leave the second handle of the same axis in place and update the handles of the other axis appropriately. Unwieldy for shallow arcs.
b) Draw the entire ellipse as a helper path, allow dragging any part of it and do the "expected thing". Not very precise, unwieldy for shallow arcs.
c) Use the ellipse's foci and a point on the arc as handles. Dragging any of the handles would have to change the position of at least one other handle, so they wouldn't be independent, unwieldy for shallow arcs.
d) Use a point on the arc with one handle which specifies the direction of the normal at that point. The point would be independent, but there would be keys to drag the point along the arc without changing the shape with the tangent point following. Pros: can edit very shallow arcs with ease. Cons: might not work well for arcs larger than 180 degrees, I don't know how to do this mathemathically :), not sure about interaction with smooth and symmetric nodes.
Regards, Krzysztof

Krzysztof Kosiński wrote:
This is wrong. We can have any of those segments in any path: SVG allows to mix them freely.
I'm aware of that, but just because the SVG format allows something it's not necessarily easier for users. SVG also allows horizontal and vertical segments too, but what Inkscape currently implements is a good approximation[1] to the superset of all shapes without introducing different user interfaces for each of the 6 segment types.
Not to mention it would be very confusing, because we would now have several modes of the node tool, and modes are bad.
"Modal interfaces are bad" is only a loose usability guideline. What is good usability can only be measured by how people interact with an interface. Modal interfaces only present a problem when it's not obvious which mode you're in. We have modes for other tools, and tools themselves are modes of the user interface.
In any case, what I was suggesting was no change to the node tool except that it allows you to scale the axes of elliptic segments, and an additional pen tool for creating elliptic/straight paths alongside the existing tool for creating cubic/straight paths. Quadratic segments aren't compelling for me.
Dan
[1] I recall cubics can approximate elliptical segments to an accuracy of greater than 99%.

SVG also allows horizontal and vertical segments too
They are no different than ordinary line segments beyond shortening the representation a bit, so it doesn't make much sense to treat them specially. On the other hand elliptical and quadratic beziers would allow users to edit the paths differently: it's rather hard to create a circular or elliptical shape with cubic beziers without resorting to boolean operations on ellipses. I'm not instisting on supporting those kinds of segments, but if we can come up with a good UI to edit them, why not provide this?
Regards, Krzysztof Kosiński

From my point of view (an user) is hard to tell since I don't know
what these new curve types offer or what can I gain by using them. I have basic knowledge of them but I don't know what's the advantage of having more than one, care to explain?
I think FontLab has a way to edit different curve types. PostScript fonts are cubic while TrueType are quadratic. Maybe the free Fontforge has support for both too? last I checked it let you export fonts in both formats. However, font editors are one of a kind since you are editing one type of curve *or* the other, you can't mix both (maybe I'm wrong and native file formats support this (FontLab has support for Spiro curves too, how does it store them?). I need to know if this will have a "one thing or the other" treatment --i.e.:if the user sets this exclusively for each document or not.
If all the types will be editable at the same time on the canvas --like it's done now with bezier and spiro paths--, it might be worth checking 3D and CAD apps like Maya, 3D Studio Max or Autocad, since some of them support various types of curves (like bezier and nurbs, but I'm not sure if the case is the same here).
Regards.

On Thu, Jun 18, 2009 at 2:41 AM, Pajarico wrote:
Maybe the free Fontforge has support for both too?
Yes, you set this in preferences
last I checked it let you export fonts in
both formats. However, font editors are one of a kind since you are editing one type of curve *or* the other, you can't mix both (maybe (FontLab has support for Spiro curves too, how does it store them?).
What? v6 is out already? :-D
Alexandre
participants (6)
-
Aaron Spike
-
Alexandre Prokoudine
-
bulia byak
-
Daniel Pope
-
Krzysztof Kosiński
-
Pajarico