waveform

bobharterink's Avatar

bobharterink

04 Jun, 2024 09:33 AM

Dear Nodebox Community,

I am writing to seek guidance on a specific aspect of my Nodebox.live project.

The project allows users to upload an image and manipulate it through various parameters to generate a unique pattern. Following this, the user can send the final pattern to Axidraw for physical creation on a postcard.
here you can try it:
picturemod.netlify.app.

However, I am aiming to incorporate an additional effect that utilizes abstract curved lines, similar to the concept demonstrated in the Nodebox.live image grid tutorial (https://nodebox.live/tutorial/f0imagegrid).

My current challenge lies in achieving smoother, curved lines with a reduced number of points. This approach would enhance the overall abstract aesthetic I am striving for.

I would be grateful if any members of the Nodebox community could offer insights or code examples on how to effectively generate these desired curved lines within Nodebox.live.

  1. Support Staff 1 Posted by john on 04 Jun, 2024 11:07 AM

    john's Avatar

    Hello Bobharterink,

    I'm not sure if I can be of any help, but I will try.

    My area of expertise is solely NodeBox 3. I do not use Nodebox Live and am unaware of any active community supporting NodeBox Live. Both were invented by Frederik De Bleser, but Frederik has drifted away from supporting either product. Nevertheless, I have added him to this conversation on the off chance he might see this and be able to contribute something.

    It would make sense for this forum to have a separate section on NodeBox Live. If there is ANYONE out there who still regularly uses NodeBox Live and would like to help contribute to such a section, please reply to this thread and say hello.

    Both products are similar and share a core set of the same basic concepts, including many nodes. I cannot help you with anything on NodeBox Live, but I COULD help you if you were to attempt doing your project in NodeBox 3 instead. You would have to use the Mac or PC Nodebox app and recreate your network there. You could then export your final product as an SVG file, which should be able to import into Axidraw.

    Unlike Nodebox Live, Nodebox 3 does not have a built-in way of accessing PNGs or JPEGS. However, I have created a Cartan NodeBox Library, free for use with no restrictions, that does include a node, image, that makes this possible. With that node and other standard Nodebox 3 nodes, you could create something similar to what you have built on Nodebox Live. You could take an image and do some processing to turn it into a bunch of curves. (There are several plotter enthusiasts on this forum who have done exactly that.)

    At that point you would face the same challenge of making smoother curves with fewer inflection points. This can be tricky, but is possible.

    You can resample any curve Into a spline of straight line segments using a resample node. In the resample node, you can simplify the curve by reducing the number of inflection points (or by increasing the length of each segment which achieves the same effect). You can then turn that simplified spline back into a smoother curve, using the standard round_segments node, or the fit_curve node from my Cartan Node Library.

    You might be able to do something similar even in Nodebox live. Feed your curves into a resample node and feed that into a round_segments node (if they have one). You can then adjust the number of inflection points in the resample node while rendering the round_segments node to see the final result. The number of inflection points and the curviness factor you need will vary depending on the curve, so this will require some experimentation.

    It is also possible to do a more precise form of surgery on your curves by turning them into individual points, modifying those points, and then reconnecting them into a modified curve. Bézier curves in Nodebox are comprised of 3 types of points. Type 1 are used in straight lines and in the start of a curve, Type 2 points are the endpoints of curves, and Type 3 points are the two control points in between.

    In theory you can do some calculations based on how close these points are together, the tangents of the curves they form, etc. and devise an algorithm to simplify the curves. I have done some work like this, but there's some trigonometry involved and it is not easy. General purpose algorithms are very hard to make, but if your curves are relatively simple and predictable, such an approach might work.

    To summarize...

    If Nodebox Live has a resample node and a round_segments node, try using those to smooth your curves.

    If that doesn't work, and you are sufficiently desperate, download NodeBox 3, try recreating your project there, and then come back to this forum for more help.

    And again, IF THERE ARE ANY NODEBOX LIVE USERS OUT THERE, PLEASE REPLY TO THIS THREAD. If I can't help, maybe there is someone else out there who can.

    John

  2. 2 Posted by lastvector on 04 Jun, 2024 12:02 PM

    lastvector's Avatar

    John

    i have a Nodebox LIve Account and had a look
    related to the two Nodes you mentioned
    resample node and round_segments node

    Nodebox Live have similar Nodes in Graphics call
    resampleByAmount and roundedSegments
    made a Screenshot see below

    gottfried

  3. 3 Posted by bobharterink on 05 Jun, 2024 11:26 AM

    bobharterink's Avatar

    Thanks John and Gottfried!

    I just working on it! and i get some results that i like. Thanks for helping me!

    Bob

  4. 4 Posted by lastvector on 05 Jun, 2024 11:52 AM

    lastvector's Avatar

    bobharterink

    you are very welcome
    nice that it was helpful
    looks interesting

    gottfried

  5. Support Staff 5 Posted by john on 05 Jun, 2024 10:00 PM

    john's Avatar

    Bob,

    Glad we could help. Good luck with your work; looks intriguing!

    Gottfried,

    Thanks for stepping up and pitching in.

    John

  6. 6 Posted by florisdejonge on 08 Jun, 2024 09:05 AM

    florisdejonge's Avatar

    Hi Bob,
    This look like a really interesting experiment. I can imagine that one could build similar networks in Nodebox Live as in Nodebox 3. Therefore, the examples in these posts might be helpful as well: Image Node, Plot Node.

    The embedding of a Nodebox Live network within a webpage with controls is really cool by the way. Would you be willing to share on the forum how you managed to do that?

    Floris

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • abstract-image.jpg 693 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

26 Jan, 2025 02:09 AM
24 Jan, 2025 07:50 AM
22 Jan, 2025 11:42 PM
21 Jan, 2025 09:43 AM
21 Jan, 2025 09:41 AM

 

21 Jan, 2025 09:36 AM
21 Jan, 2025 02:00 AM
16 Jan, 2025 08:30 PM
15 Jan, 2025 06:37 AM
04 Jan, 2025 04:09 AM
03 Jan, 2025 05:32 PM