Hacker News new | ask | show | jobs
by egypturnash 1019 days ago
"I don't know of a reasonable way to guess the right location."

1. Drag curve handles out to 1/3 of the length of the curve segment they control.

2. Eschew s-curves between two control points.

3. Don't turn more than about 90º between two control points.

I learnt this about a year into what is now a 23-year career as an Illustrator artist. It has served me well. You will note that the first interactive example on this page is asking you to violate rule 2.

"Béziers can't represent circles. If you try to approximate one by hand, it'll look lopsided."

If you try to draw a circle by hand, it'll look lopsided too. Any pro traditional artist will have a compass and a few circle templates in their kit. In Illustrator there's an ellipse tool one keypress away. I've been drawing at a pro level for about thirty years and while I can probably pick up a pencil and draw a better circle in a couple quick arm motions than you can in a bunch of little sketchy attempts, they're still nowhere near perfect, and they don't need to be.

I also draw about 90% of my paths with the Pencil tool, which just abstracts worrying all of this way. Unless you are doing very geometric work, or require the absolute minimum possible number of points, I feel that using the Pen tool to draw everything is about as sensible as writing a program entirely in assembly language. And if I do need to work under a tight point count constraint, then I will still draw it with the Pencil, then pull out Astute's Smart Point Removal tool, which does a great job of optimizing the heck out of my paths, much better than Adobe's tools for this.

3 comments

> I feel that using the Pen tool to draw everything is about as sensible as writing a program entirely in assembly language.

As someone who's only ever used the pen tool, I feel mildly attacked!

Jokes aside, I think I agree with you if you have a tablet. I used to draw with a mouse back then, so I'd basically sketch on paper, take a picture or scan it, then use my mouse to pen over it. Sometimes I'd skip the sketching/importing steps, depending on what I'd work on.

Later when I could afford a tablet, I mostly left Illustrator/Inkskape behind in favour of just using Krita for most things. However, if I'm making a vector illustration today, I still use the pen tool... and the mouse, even if I have the tablet. If I were to work on something complex enough, I'd probably sketch it in Krita though, and then use the good'ol pen and mouse...

I'm by no means a professional artist, just do this as a hobby though. So, if my workflows outlined here have mortified you; apologies for that.

The workflow you outline is where I started! It's not one I'd want to use any more, now that I can casually make Illustrator automatically do a lot of work for me, then come back in and refine a few places manually. But it was a good place to begin.

https://egypt.urnash.com/illustratorbook/

I can perhaps refine (1) and provide some insight in support of (2).

It does make intuitive sense for handles to be 1/3 of the length of the curve, as that makes the "speed" close to constant, but this is not the smoothest possible choice in general. In particular, it's not the best approximation to a circular arc, which by most reasonable definitions is the smoothest possible curve. I did the math[1] and found that there's a parabola around each endpoint that does result in an accurate arc approximation, and in fact may be easier to apply as it doesn't move around as the length of the curve changes. Rather, each of the parabolas can be applied independently.

Evidence in favor of this is O(n^5) accuracy scaling to approximate Euler spirals (which are also a good candidate for "smoothest possible curve" depending on the way you define that). I suspect, but haven't yet demonstrated, that there's some variational sense in which this choice is optimum, or at least to a first order approximation.

You can think of cubic Béziers as forming a four-dimensional parameter space (the parameters can be accounted as the lengths and angles of the control handles; in this scheme, the positions of the endpoints are not counted). By applying a rule such as 1/3 arc length, or falling on a parabola, that reduces it to a two-dimensional space (same dimensionality as quadratic Beziers, Euler spirals, and sections of rectangular elastica). I think two dimensions is too few, as it doesn't give you the ability to easily form superellipse shapes, a particular strength of cubic Béziers and quite handy for font design, as superellipse is extremely common in fonts. I think there may be some value in exploring a three-dimensional parameter space (which, among other things, is the count for general elastica) and have some ideas.

As for (2), the problem is that for s-shaped curves, cubic Béziers tend to put curvature maxima near but not exactly on endpoints. Since the curvature maximum is visually salient, you do better subdividing your curves so you can place them at joins. Other curve families, notably those based on elastica and Euler spirals, don't have this problem.

[1]: https://raphlinus.github.io/curves/2021/02/19/parallel-curve...

The ideal dimensionality of the parameter space depends on the jaggedness of the curve. Derivatives are useful when they stay constant over a stretch of time; when derivatives vary too much, it becomes more efficient to use more points of lower degree. This is the same calculation in other domains of approximation: numerical integration, DiffEq, and Taylor series.

For example, to draw rough surfaces, point-to-point lines are the most efficient way, with a ton of points. For industrial geometric shapes, lines and ellipses become efficient. As the smoothness of the curve goes up, more derivatives become valid. But sometimes those higher derivatives are not useful.

This is why the parent comment likes the Pencil tool; it's optimal for high variation, because it is a local (smoothed) control of position, the zeroth derivative. The cost is some loss of smoothness, which likely doesn't matter for her domain, since her hands move smoothly enough.

I think the Pen tool would be a more competitive alternative with a better control scheme. For example, a Pen tool with local control would unify the Pencil and Pen: letting you draw jagged curves by holding your mouse down, and letting you draw straight lines and smooth curves by clicking. There would be no interruption of flow, as you can use either method freely to continue a curve. They should inherently be the same tool anyway, just with different numbers of derivatives.

For example, to draw rough surfaces, point-to-point lines are the most efficient way, with a ton of points.

I usually just draw a quick simple line and tell Illustrator to rough it up for me. There's a lot of ways to do this; "use a custom brush" is a common one, so's "apply the Roughen effect". These will dynamically generate a buttload of virtual points in the vicinity of the basic path when it gets rendered; the editing view is still just a handful of points. Much easier to edit, much faster to draw. If I need precise, human-defined jagginess to a path, then I whip it out with the Pencil, and push it around with stuff like the Puppet Warp tool, which lets me drop a few pins into a complex set of paths, and distort it based on how I move those around.

Illustrator's Pencil tool actually performs a certain amount of smoothing on the raw positional input from the drawing tablet. There's a slider for how much it does this. I have it right in the middle of the range and it makes for a pretty nice compromise between catching every deliberate motion of my fingers/hand/arm across the tablet, and throwing away the little irregularities that I would be working hard to eliminate if I was working in pen and ink.

I think what you've done is mastered an unintuitive (or even counterintuitive) system. That's well and good, but it doesn't mean the system shouldn't be improved. It would make life no worse for you, and better for people with less experience, less time to experiment.
I don’t think they’re implying it takes 21 years to learn. I’m inexperienced and learned how to accurately follow paths with bezier curves using the same technique after watching a 10 minute Burt Munroy tutorial.
Correct. I have certainly learnt a ton more about how to manipulate vector art in the intervening years, and the set of tools I have available has expanded a lot - Adobe's added a lot of tools to Illustrator, and so has the Illustrator plugin ecosystem. But those three simple rules did a lot to make my Illustrator practice a lot faster.