tag:support.nodebox.net,2012-11-01:/discussions/show-your-work/211-curvesNodeBox: Discussion 2022-12-27T06:57:48Ztag:support.nodebox.net,2012-11-01:Comment/428871522017-09-03T10:01:42Z2017-09-03T10:01:42ZCurves!<div><p>Incredible! I'm working on an illustration and this is exactly what I needed. Thank you so much</p></div>gabriel sim-larameetag:support.nodebox.net,2012-11-01:Comment/428871522017-09-03T20:00:03Z2017-09-03T20:00:03ZCurves!<div><p>You just made my day.</p>
<p>If possible, I'd love to see what you eventually make with these tools.</p>
<p>John</p></div>johntag:support.nodebox.net,2012-11-01:Comment/428871522017-10-28T22:25:57Z2019-07-10T23:42:00ZCurves!<div><p>NOTE: Attached is an updated version of my Curves demo. It contains an updated version of the fit_curves subnetwork.</p>
<p>For certain paths, if fit curve was set to "closed" it would not fill correctly when colorized. This version fixes this.</p>
<p>If you are using make _curve or fit_curves in any of your projects, you should replace it with the fit_curves subnetwork found inside this demo.</p>
<p><strong>JULY 10, 2019 UPDATE: I have changed the port order for make_curve and released new versions of make_curve, fit_curve, and make_curve.py. See July 10, 2019 comment in this thread for an attachment with the latest versions.</strong></p></div>johntag:support.nodebox.net,2012-11-01:Comment/428871522017-11-15T17:03:41Z2017-11-15T17:03:41ZCurves!<div><p>This is another super-useful node to have in core! I'll see if I can port it to Java soon.</p></div>Frederik De Blesertag:support.nodebox.net,2012-11-01:Comment/428871522017-11-15T17:10:46Z2017-11-15T17:10:46ZCurves!<div><p>I've added this to GitHub to track its progress:</p>
<p><a href="https://github.com/nodebox/nodebox/issues/437">https://github.com/nodebox/nodebox/issues/437</a></p>
<p>Since there are basically two types of curves in NodeBox (quads and béziers) I was thinking how you would generalize this. Then I remembered that in Houdini, you can specify the <strong>order</strong> of the curve, which allows you to set the number of control points for the curve. 0 control points will give you a straight line, 1 a quad, 2 a bézier. And you can go higher!</p>
<p><a href="http://www.sidefx.com/docs/houdini/nodes/sop/curve#parameters">http://www.sidefx.com/docs/houdini/nodes/sop/curve#parameters</a></p></div>Frederik De Blesertag:support.nodebox.net,2012-11-01:Comment/428871522017-11-16T09:06:55Z2017-11-16T09:06:55ZCurves!<div><p>Frederik,</p>
<p>I am excited you are looking at this.</p>
<p>If you wind up generalizing curves, you might also consider generalizing the connect node. My fit_curve subnetwork is the natural companion to my make_curve custom node - I almost always use the two together. Fit_curve works exactly like connect except with curves instead of line segments.</p>
<p>I notuce that Houdini also has a fit curve node, though theirs is more complex.</p>
<p>Just a thought...</p>
<p>John</p></div>johntag:support.nodebox.net,2012-11-01:Comment/428871522019-03-24T20:45:39Z2019-03-24T20:45:39ZCurves!<div><p>Frederik,</p>
<p>The perfect should not be the enemy of the good. Given that all NodeBox curves are build out of cubic beziers - even quads are instantly turned into cubics under the hood - a basic cubic make curve node is all we really need.</p>
<p>I am working on a library of NodeBox nodes. I try to avoid using custom nodes (Python code) unless absolutely necessary. I am finding that I end up using make_curve in many of these nodes.</p>
<p>If you could release a new version of NodeBox with a simple make_curve node, as you said you wanted to do back in November of 2017, would be a solid step forward.</p>
<p>(FYI - the other custom node I am forced to use from time to time is contours, a very simple node you wrote which just turns a path into separate contours. I think that is also worthy of promotion to a full-fledged node, though the need for make_curve is more urgent.)</p></div>johntag:support.nodebox.net,2012-11-01:Comment/428871522019-07-10T21:47:24Z2019-07-10T21:47:24ZCurves!<div><p>UPDATE</p>
<p>I just made a minor revision to my make_curve node. Same functionality; all I did was change the order of the ports. NEW VERSION ATTACHED.</p>
<p>As I learn more about bezier curves I notice that the rest of the world always lists the four points of a bezier curve in P1 C1 C2 P2 order (with the control points in the middle and the end point last). It was confusing having my ports in a different order, so I changed my order to match.</p>
<p>This did require a change to the python code as well. Going forward I will be using this new node which requires the revised make_curve.py file. This is what I will be using in my soon to be released node library.</p>
<p>The new version is in the attached zip file. The demo also includes an updated version of fit_curve. I recommend using these new versions of make_curve and fit_curve (with the new make_curve.py) in any new projects you make.</p>
<p>Frederick, if you're still out there somewhere, this is the version I wish you would add as a first class Nodebox node. Many of the new nodes I will soon be releasing depend on this one custom node.</p>
<p>John</p></div>johntag:support.nodebox.net,2012-11-01:Comment/428871522019-07-12T15:13:23Z2019-07-12T15:13:23ZCurves!<div><p>Hi John,</p>
<p>Finally I found some time to look at some of the forum posts. My job has changed somewhat in the last year and going forward, I will have even less time to work on NodeBox. It's not part of my job description; personally I'm also in the process of building a house so I have very different engagements at the moment.</p>
<p>I don't think it's realistic to build entirely new functionality in NodeBox 3 for now. The curve node seems easy enough, and something I will consider soon.</p></div>Frederik De Blesertag:support.nodebox.net,2012-11-01:Comment/428871522019-07-12T22:39:52Z2019-07-12T22:39:52ZCurves!<div><p>Hi Frederik,</p>
<p>Thanks for letting us know. If you can find the time to publish one minor point release (maybe the last we will see for a very long time) please consider adding two other pieces of low-hanging fruit:</p>
<p>In priority order:</p>
<ol>
<li>
<p>make_curve node</p>
</li>
<li>
<p>contours node (my second most commonly used custom node, often used with make_curve. I am attaching the one-line python code you wrote for easy reference.)</p>
</li>
<li>
<p>a fix for the option-drag bug (<a href="http://support.nodebox.net/discussions/nodebox-2-3/6122-option-drag-bug">http://support.nodebox.net/discussions/nodebox-2-3/6122-option-drag...</a>)</p>
</li>
</ol>
<p>I can think of a few other quick improvements / bug fixes that would make a big difference without requiring entirely new functionality (e.g. publish as list/value <a href="http://support.nodebox.net/discussions/general-discussion/14887-feature-request-publish-as-listvalue">http://support.nodebox.net/discussions/general-discussion/14887-fea...</a>). I am also about to release a node library with over fifty nodes; a few of these are quite simple and might be worthy additions to the core. Let me know if you want any more ideas.</p>
<p>I can only imagine how busy you are with your house (congratulations) and your new teaching job. If you can give us one last point release before you go the entire community would greatly appreciate it.</p>
<p>John</p></div>johntag:support.nodebox.net,2012-11-01:Comment/428871522022-01-06T21:04:39Z2022-01-06T21:04:39ZCurves!<div><p>make_curve is awesome. I was also wondering what sort of drawing access there is in Nodebox for custom nodes. So now I have another rabbit hole to dig into! Thanks, John! I'm currently rebuilding something I built in Processing that takes about 15 seconds in Nodebox thanks to you! AND it's more usable.</p></div>joe.s.claytag:support.nodebox.net,2012-11-01:Comment/428871522022-01-06T23:19:06Z2022-01-06T23:19:06ZCurves!<div><p>Hi Joe,</p>
<p>Yes, make_curve does provide a template for doing drawing chores in a custom node. I'm delighted you find it useful and am excited to see what new nodes you might make.</p>
<p>FYI, I no longer use make_curve myself. Instead I now use curve:</p>
<p><a href="http://support.nodebox.net/discussions/show-your-work/430-curve-node">http://support.nodebox.net/discussions/show-your-work/430-curve-node</a></p>
<p>Curve is a subnetwork which works exactly like make_curve but does not require a custom code module. In addition to the above link you can also find it in version 3 of my Cartan Node Library.</p>
<p>Keep innovating!</p>
<p>John</p></div>johntag:support.nodebox.net,2012-11-01:Comment/428871522022-02-04T22:38:35Z2022-02-04T22:38:35ZCurves!<div><p>Sorry for the delayed response. I got very busy. I must've missed that in the library. I'll check it out! I ended up making this with your node and a lot of tweaking in After Effects!</p></div>joe.s.claytag:support.nodebox.net,2012-11-01:Comment/428871522022-02-04T23:18:07Z2022-02-04T23:18:07ZCurves!<div><p>Joe,</p>
<p>That is <em>beautiful</em>. Glad you are putting my curve node to such good use.</p>
<p>I wonder if there is any way to create blurring effects like this in NodeBox.</p>
<p>John</p></div>johntag:support.nodebox.net,2012-11-01:Comment/428871522022-12-27T02:11:12Z2022-12-27T02:11:16ZCurves!<div><p>I never ended up using make_curve for that illustration. I did use nodebox for the main design (below).<br>
I have grown by leaps and bounds in the last five years. Now I am much better at understanding programming ideas and I have revisited nodebox as a tool to create vector graphics for video, prints, and laser cutting.<br>
I was very interested in the idea of being able to write nodebox nodes using the java awt. I am currently crawling through the nodebox.graphics library. I'm trying to understand what is NOT implemented in the current set of nodes, but is available from the java awt.<br>
Is make_curve not included in the main release of nodebox because the philosophy is to keep things as simple as possible? It seems that there would be an explosion of nodes contributed if people realized how simple it is. Maybe I just missed where in the documentation there is a step-by-step description of how to make your own nodes.</p></div>gabriel sim-larameetag:support.nodebox.net,2012-11-01:Comment/428871522022-12-27T06:57:47Z2022-12-27T06:57:47ZCurves!<div><p>Gabriel,</p>
<p>I don't think make_curve (now just curve) was omitted as a standard node for any philosophical reasons; it was just an oversight. When I suggested adding it, Frederik immediately agreed it should be standard (see above), but never found the time to do it.</p>
<p>I originally implemented make_curve as a (very simple) Python code module. But I later found a way to do it as a subnetwork ("curve") with no external code required. You can find it in my node library.</p>
<p>Most of the "nodes" in my library are actually subnetworks. The documentation on making subnetworks is sparse; you can learn more by searching the forum for threads about it or looking at the many subnetworks in my library as examples.</p>
<p>There is almost no documentation about rolling your own external code libraries. I had to figure out how to do it by painful trial and error. But I now have 15 Python modules and 1 Clojure module in my library so you can study those. That should at least give you a head-start.</p>
<p>I agree that java.awt is a treasure trove of useful functions that can easily be surfaced as nodes. My font_table.py library shows just one example. I would be delighted if you could publish some more.</p>
<p>My own preference is to avoid external code libraries whenever possible because it's a slight pain keeping track of them and making sure they stay in the right place when you copy or transport or publish your Nodebox networks. I also like the challenge of finding ways to do things entirely in NodeBox.</p>
<p>Your Rochester poster is quite lovely. I look forward to seeing more of your Nodebox work!</p>
<p>John</p></div>john