Wave Line art
Hi
I am very new to this and I am still figuring out how to make this. I try to make fine wave line art like in the attached file. I imported a svg-file and I ungrouped it. I have tried multiple things. I tried making grids, waves (not animated), lines and more, but nothing will work. It is for a selfportrait for school. I looked on here and did not find many help. How do I make this with my own image?
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
1 Posted by florisdejonge on 16 Dec, 2025 02:43 PM
Hi Ari,
This is possible with the image node. You might want to check out the node, the examples and discussion in this thread.
Floris
Support Staff 2 Posted by john on 17 Dec, 2025 01:24 AM
Hi Ari,
Sorry, I only now just saw your note. Thanks to Floris for jumping in.
Floris is right: since Nodebox does not natively handle images you will need my image node, plus several other nodes from my Cartan Node Library.
What you are asking for is fairly sophisticated for a beginner. You need some way of reading brightness (luma) values for each pixel of an image and then a way to translate each pixel to a section of a sine wave with the appropriate amplitude and period. In addition to my luma and waveform nodes, this requires a little bit of math.
If your goal was to learn Nodebox, I would be happy to help you work toward a solution step by step. But in this case I think it would be better just to make a sine wave portrait network for you and let you play with it.
So that's what I did: screenshot and zipped demo attached.
Open the folder and launch the wavy portrait.ndbx. It may take a few seconds for the image to appear - an old snapshot of me. You can zoom in to verify that it is completely made of sine waves, scrunched up sine waves for dark spots, stretched out sine waves for light spots.
You can substitute your own photo for the one I provided. For best results there are several adjustments you need to make.
Start by rendering (double-clicking) the image node at the top. Your render time can be slow so it's important to get the image set up correctly before doing all the calculations below. Turn on the Bounds checkbox atop the Nodebox render pane so you can see the size of your canvas.
The canvas size determines the dimensions of your final product. For this demo I left it at the default size of 1000 x 1000. If you want a higher res output you will want to increase your canvas size using File / Document Properties.
You will then want to change the image scale in the image node until your image fills the canvas. For this demo I set scale to 1.25. If you want to bleed the image to the edge of the canvas you will need to scale it up until both dimensions exceed the canvas boundary,
The other key setting in the image node is Image Quality (currently set to Medium Clarity). This controls how finely grained the pixels are. The more more pixels, the more processing required. If you're going to fiddle with higher resolutions I recommend starting at the lowest setting (Fuzzy) before rendering the final node of the network so that you don't grind Nodebox to a halt. Start low res and then work your way up.
You are now ready to render the final node of the network: colorize. This node has one more setting that can significantly effect the final output: stroke width. This is the thickness of the sine waves. I currently have this set to .25. If the image is too dark you can decrease this down as low as .1. If the image is too light you can increase it.
As you increase the image quality in the image node, you will probably need to adjust the stroke width to compensate. You can also change the stroke color if you want.
That's it. It's a pretty cool effect.
One request. If you see this note, PLEASE reply and let me know you gave it a try. Better yet, if you can, please share the image you produced.
The same goes for anyone else who sees this. If you use this to make a cool wavy portrait, please share it so we all can see!
John
Support Staff 3 Posted by john on 22 Dec, 2025 12:41 AM
No response from Ari yet. I don't know whether he/she ever saw Floris's note, or mine, or downloaded my code, or tried it. Discouraging.
Meanwhile, though, I have become more interested in using sine waves to do pixelation. The solution I provided above was quick and dirty. It works OK for many images, but will start to fail as the pixel size decreases and is not as accurate as it could be.
So I've been thinking of making a better version. As a first step I needed to better understand the relationship between the luma function I was using and the relative brightness of different sine wave periods. So I made a poster to make that relationship clearer. See attached.
As you can see, gray scale is a better measure for a monochrome output. To make this poster I had to devise a luma_to_gray function. I would now like to make it more efficient and maybe tie the pixels in each row together so that the network outputs one variable sine wave per row instead of one for each pixel.
Floris, do you think you would find such a thing useful? I know you've done some previous work using similar techniques to plot photographs. These sine waves seem well-suited for plotters.
Anyway, if anyone is still out there, please let me know if you have any questions about my poster or would like to see the code I used to make it. If I do decide to make a better sine wave pixelizing function I will post it on this thread.
Support Staff 4 Posted by john on 26 Dec, 2025 10:30 AM
I did decide to make a better pixel wave node:
http://support.nodebox.net/discussions/show-your-work/1022-pixel_wa...
5 Posted by florisdejonge on 27 Dec, 2025 01:15 PM
Hi John,
That's an interesting direction. Attached is what I made earlier. This is an image converted to connected dots based on a spiral pattern, inspired by the concentric pattern with which we developed a plot node a while back. This way it's possible to quickly plot images. I must have a CMYK version as well. I would think its cool when the image would consist of a single sine wave line, in which the density is based on the darkness of the pixels. But there's software available to do that.
The convert_to_gray function is really helpful if that yields better results. Right now I converted these values a if they would represent brightness and thus a grey value (or a certain density). Do you think it would be useful to add contrast, brightness and saturation controls to the image node? I usually do this further down the line, as seen in the example.
Floris
Support Staff 6 Posted by john on 29 Dec, 2025 07:44 AM
Hi Floris,
Thanks for the response.
Yeah, there are a zillion ways to render rasterized vector images, and lots of software to do it with. The example you linked to shows some options with wavy lines, but their lines vary in thickness, which seems plotter-unfriendly to me.
Thanks also for reminding me about your plot node that we worked on together and your technique for representing pixels with random splines where more joints equals darker blobs. You also use a spiral so that you can draw an entire photo without lifting the pen.
I played with your demo a bit and tried some variations with my new techniques (attached).
I made a modified version of your plot node using my luma_to_gray function. It renders slightly more detail on the lighter parts of the image. Your version had already compensated for the limitations of the luma function by limiting the luma values fro .3 to .9. So the plot_gray function is slightly better but not dramatically better.
I also applied my pixel_waves node to both your spiral pattern and to the original image.
In the first case, it produces a superior image but took over 15 seconds to render it. It tried to form rows of connected waves but was only able to do this in a few sections of the spiral, so still created almost 4300 separate paths.
Applying pixel_waves to a relatively high-res version of your photo also took around 15 seconds to render, but produced a very nice (rectangular) image with under 300 paths (see screenshot).
NOTE - The two copies of the pixel_waves node in this demo are improved over the version I posted a few days ago. The node now runs faster, especially if you don't use a sine wave, and also will now automatically ungroup any geometries you pass to it, so you no longer have to add an ungroup node between image and pixel_waves.
If you have a chance and are willing to spend a little time and ink, I would love to see an actual plot of one of your photos using pixel_waves. I'm curious to see how the quality and plotting time would compare against your recent work.
If plotting in a spiral is important to you, if would be possible to make a version which plots waves in a spiral instead of in rows.
John
7 Posted by lastvector on 04 Jan, 2026 02:48 PM
Hi John
A happy new year btw. :)
In addition to the discussion above, i like to mentioned
"Paragraphic" (Mac/PC) too, it is from the same Devs
as "Vectoraster" and work on PCs too.
It use a kind of a Node system that works a bit different
than in Nodebox. On thing that i like that you are also be able
to manipulate your Objects / Paths manually.
Here is their YouTube channel
https://www.youtube.com/@LostmindsVideo/videos
Here a video about Halftones
https://www.youtube.com/watch?v=eYjO06jT3x8
Support Staff 8 Posted by john on 05 Jan, 2026 01:40 AM
Hi Gottfried,
Happy New Year to you too! And thanks for joining the conversation
Paragraphic is a really interesting tool! As you say, it has some similarities to Nodebox but is also different in fascinating ways. Some really thought-provoking UI concepts. And, as that second video shows, very powerful for creating vector-based photos and line art.
Food for thought!
John
9 Posted by florisdejonge on 12 Jan, 2026 04:08 PM
Hi John,
Thanks for providing the pixel_waves_node. I did a quick test, but could not find the right settings currently. The plot became to dense, so there wasn't any detail left. So, I will try again. For now, I kept thinking about a wave spiral. Here's my attempt. It would be cool if the resample value would become higher and the waves not only longer, but also denser when the darkness value is as well, but this is the result for now. The settings can be changed to increase detail, but it slows down the program.
Floris
Support Staff 10 Posted by john on 16 Jan, 2026 09:58 AM
Floris,
Sorry for the delay. I used to receive an email notification whenever you posted, but for some reason that no longer happens. So it took me a few days to see your note.
When you say you tried a quick test, do you mean you tried an actual physical plot? I can easily see how the plot could come out too dark. On the screen you could lighten the image by reducing the strokeWidth of the path, but on a plotter you are stuck with the actual physical strokeWidth of the pen. (I presume you could choose finer pens, but only up to a point).
With a small pixel size even the lowest frequency wave for a light pixel might look dark if the pen strokeWidth is thick compare to the pixel width. This suggests that for given pen size you may be constrained to minimum pixel size, and a minimum number of waves per pixel. It would be helpful to know the pen's actual Nodebox strokeWidth (when rendered at a given paper size). Do you have such a value for the pens you use?
I took a quick look at your spiral wave plot. It's a clever approach and quite different to what I've been doing so far.
My waves are frequency based. The higher the frequency (that is, the lower the period), the more waves bunch up in each segment and the darker that segment appears.
Your approach appears to be amplitude based. The frequency of your triangle wave segments is identical throughout the spiral and is solely driven by how finely you resample the spiral you use as a mask. Instead of changing frequency, you alter line segment length based on pixel brightness and just rotate and connect the segments to form waves. Longer line segments create taller (higher amplitude) wave segments. The taller the wave segment, the darker it appears.
You said "It would be cool if the resample value would become higher and the waves not only longer, but also denser when the darkness value is as well." In other words, if both the frequency and the amplitude together could determine darkness.
I agree. In fact I was already toying with the idea of adding an amplitude setting to my waveform node. This would be cool for animations because you could make the waves wiggle even as the camera zooms in or follows a path. But it might also be helpful for controlling overall darkness when plotting these things.
I was thinking of just providing a single universal amplitude factor that would magnify all the waves at once. You could reduce the magnitude to open more space between the arms of the spiral, thereby lightening the overall image. For animations you could wiggle the waves by reversing the polarity back and forth using a negative magnification factor.
This is fairly easy to implement and might help your plots a bit. Varying both frequency and amplitude to get a wider range of brightness values for each pixel would take more work. I might consider trying that if it would a significant improvement.
But for plotting, as I said above, the critical factor might be strokeWidth as limited by the physical pen used. This is where I am totally out of my depth. Knowing the actual Nodebox equivalent strokeWidth for given pen types would be very helpful.
I hope we can continue this dialog!
John
Support Staff 11 Posted by john on 22 Jan, 2026 08:50 AM
Floris,
If you are still there, please continue this discussion on the new thread I started about the pixel_waves node:
http://support.nodebox.net/discussions/show-your-work/1022-pixel_wa...
I improved it to more easily apply path masks like concentric circles and spirals. Please check it out and try plotting some of the demos (using the finest pen you have). I'm afraid they may still come out too dark on a plotter, but maybe you can find some settings that will do better.