Linking words in commom

Bruno's Avatar

Bruno

12 May, 2016 05:49 PM

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!!!

  1. Support Staff 1 Posted by john on 13 May, 2016 01:30 PM

    john's Avatar

    Dear Bruno,

    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!

    John

  2. 2 Posted by Bruno on 13 May, 2016 02:03 PM

    Bruno's Avatar

    Super useful explanation John!!!!

    Thank you so much :))))

Reply to this discussion

Internal reply

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

Attaching KB article:

»

Already uploaded files

  • 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

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 Mar, 2023 12:11 PM
26 Mar, 2023 12:02 PM
24 Mar, 2023 09:51 PM
23 Mar, 2023 09:43 PM
23 Mar, 2023 08:23 AM

 

21 Mar, 2023 11:00 AM
21 Mar, 2023 09:32 AM
21 Mar, 2023 04:46 AM
12 Mar, 2023 03:02 AM
11 Mar, 2023 02:11 AM
10 Mar, 2023 06:47 AM