Linking words in commom
Hi, I'm a beginner in Nodebox (please forgive me for the silly question) and I was trying to linking with curves points in common in a circle, for example: linking all words "Apostila" , all words "Aniversario".. All the common words in the circle.
I read some discussions on the forum but I had no progress in my project.
I would appreciate any help, thanks!!!
- Screen_Shot_2016-05-12_at_2.46.26_PM.png 258 KB
- node_info.ndbx 2.22 KB
- Poemas_novos_otimizado2_-_Página1.csv 3.66 KB
|?||Show this help|
|ESC||Blurs the current field|
|r||Focus the comment reply box|
|^ + ↩||Submit the comment|
You can use
Command ⌘ instead of
Control ^ on Mac
Support Staff 1 Posted by john on 13 May, 2016 01:30 PM
It's not surprising you had some trouble with this - it's trickier than it might seem. I am attaching one possible solution.
The first trick is to create a new table of each item and its coordinates. This allows you to randomly access sets of matching items without loosing track of where each one is located.
You can then make a distinct list of terms and, for each one, find all matching occurrences. For those that occur more than once you can look up the coordinates in your new table and draw curves to connect them.
There are two ways of connecting matching items. You could connect each item with every other match, but this creates a massive tangle. The other (cleaner) way is to just link each item with its neighbor. That's what I did.
You could connect each set quite easily by simply using the connect node, but this connects items with straight lines which tend to overlap around the edge of the circle; the result is hard to read.
Connecting matching items with quadratic curves is somewhat harder. The quad node tends to make some curves bend in and some bend out; it takes a few extra calculations to make them all bend inward. I also varied the color of each set of curves slightly to make them easier to follow. Feel free to adjust the color scheme.
In addition to coloring the curves I also colored the words, accenting the start of each new poem in red.
Attached are my nodeBox network, a screenshot, and a PDF of the output. You can edit the make_table and connect_items subnetworks to see how they work.
Hope you find this useful. Welcome to the NodeBox community!
2 Posted by Bruno on 13 May, 2016 02:03 PM
Super useful explanation John!!!!
Thank you so much :))))