Replies: 1 comment
-
|
I think the short answer is that we don't know how to do that. The bezier point evaluation is optimized to be done as a single matrix multiply to make it fast, so you take a big performance hit if you do something adaptive. It's not clear how a non-adaptive scheme can possibly do anything useful. The only method that I can think of that seems like it would make sense is to compute a sampling of N points and then interpolate between points whose spacing exceeds One possibility, I suppose, is a spinesteps="adaptive" method that uses a recursive subdivision scheme. This would not ever be the default. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
It's always bothered me that I have to manually decide a sample count for Bezier curves. Is it just me or does anyone else wish that you could just do
stroke(bezier_curve(b));and get a nice curve that respects your$fs,$fa, and/or$fnsettings?You can work around it for single curves by figuring out something good with
segs()and an artificial radius, but it gets more difficult with bezier paths andsmooth_path()where each corner would share the samesplinestepseven though they may have very different requirements.Correct me if I'm wrong but I haven't found a way to calculate this in BOSL2, although
simplify_path()is perhaps useful.I just wanted to start the discussion so there's some place to discuss the topic. My concrete questions to the more advanced developers and users:
splinestepsbased on$fsand$fa, do you think BOSL2 should implement it as the default unless explicitly defined?Beta Was this translation helpful? Give feedback.
All reactions