Live data from Hacker News

Drawing better-looking Bézier curves

beta.observablehq.com

11–20 of 45 posts

Re: Drawing better-looking Bézier curves

#12
post #11

Hello :) I'm the author of this notebook if you have any questions. I'm also currently working on a plugin for Adobe Illustrator based on this. Screenshot: https://i.imgur.com/tIPTjLsr.png

Great work. How hard was it to integrate it as an Illustrator plugin ?

Re: Drawing better-looking Bézier curves

#13
post #11

Hello :) I'm the author of this notebook if you have any questions. I'm also currently working on a plugin for Adobe Illustrator based on this. Screenshot: https://i.imgur.com/tIPTjLsr.png

Great work. How hard was it to integrate it as an Illustrator plugin ?

Thanks! Actually it wasn't too difficult. It's all in C++ but the Adobe Illustrator SDK came with some examples that were pretty close to what I wanted already. Once I'd figured out the maths I had a prototype working in about a day.

The one thing left that I can't figure out is how to have the curvature comb update live as you drag the Bezier control points. Currently it only updates when you mouse up.

Re: Drawing better-looking Bézier curves

#14
I'm wondering how well one could define curves by using the physical model of a strip of material, and allowing one to change the properties (stiffness) of the material at different points along the curve, or to insert more material at a given point. Of course, there should be the usual constraints that the strip should pass through a bunch of given (x,y) coordinates, and there could be constraint that "pins" the strip to a given (x,y) coordinate.

In a drawing program, the stiffness could be depicted by using grayscale values.

Re: Drawing better-looking Bézier curves

#15
post #14

I'm wondering how well one could define curves by using the physical model of a strip of material, and allowing one to change the properties (stiffness) of the material at different points along the curve, or to insert more material at a given point. Of course, there should be the usual constraints that the strip should pass through a bunch of given (x,y) coordinates, and there could be constraint that "pins" the str…

Isn't that the MetaFont model that Knuth used?

Re: Drawing better-looking Bézier curves

#17
post #14

I'm wondering how well one could define curves by using the physical model of a strip of material, and allowing one to change the properties (stiffness) of the material at different points along the curve, or to insert more material at a given point. Of course, there should be the usual constraints that the strip should pass through a bunch of given (x,y) coordinates, and there could be constraint that "pins" the str…

It's really interesting if you look at how CAD handles this stuff. It lets you set the degree of curvature-continuity/smoothness you want—and it kind of takes care of filling in the curve for you. You have to give up some direct control over the curve if you need it to meet these constraints.

Here's what different degrees of curvature continuity look like: http://help.autodesk.com/cloudhelp/2017/ENU/Alias-Tutorials/...

.. or in 2d: http://help.autodesk.com/cloudhelp/2017/ENU/Alias-Tutorials/...

To make smooth surfaces you just need the tangents to line up. This is called G1.

But if you also want surface reflections to look smooth you need a higher degree of curvature continuity. G2 or higher.

http://help.autodesk.com/cloudhelp/2017/ENU/Alias-Tutorials/...

Re: Drawing better-looking Bézier curves

#18
post #17
post #14

I'm wondering how well one could define curves by using the physical model of a strip of material, and allowing one to change the properties (stiffness) of the material at different points along the curve, or to insert more material at a given point. Of course, there should be the usual constraints that the strip should pass through a bunch of given (x,y) coordinates, and there could be constraint that "pins" the str…

It's really interesting if you look at how CAD handles this stuff. It lets you set the degree of curvature-continuity/smoothness you want—and it kind of takes care of filling in the curve for you. You have to give up some direct control over the curve if you need it to meet these constraints. Here's what different degrees of curvature continuity look like: http://help.autodesk.com/cloudhelp/2017/ENU/Alias-Tutorials/.…

I wonder whether for curvy automobile sheet metal these days they sculpt and then digitize or start out directly creating virtual shapes.

Re: Drawing better-looking Bézier curves

#19
post #14

I'm wondering how well one could define curves by using the physical model of a strip of material, and allowing one to change the properties (stiffness) of the material at different points along the curve, or to insert more material at a given point. Of course, there should be the usual constraints that the strip should pass through a bunch of given (x,y) coordinates, and there could be constraint that "pins" the str…

Check out Raph Levien's thesis: http://levien.com/phd/phd.html

It doesn't talk about dynamically varying stiffness along the curve, but is otherwise a very detailed dive into splines.

Re: Drawing better-looking Bézier curves

#20
post #13

Earlier quoted context omitted.

Great work. How hard was it to integrate it as an Illustrator plugin ?

Thanks! Actually it wasn't too difficult. It's all in C++ but the Adobe Illustrator SDK came with some examples that were pretty close to what I wanted already. Once I'd figured out the maths I had a prototype working in about a day. The one thing left that I can't figure out is how to have the curvature comb update live as you drag the Bezier control points. Currently it only updates when you mouse up.

Does it run on multiple platforms, or only OSX?
Post reply on HN