Calculating a new list from two lists?

cubehexagonal's Avatar


24 Oct, 2021 09:31 PM

Is it posible to combine two lists with a calculation? For example:

List A:
1, 2, 3

List B:
3, 2, 1

List C (output of the node I need):
4, 4, 4

Ist this possible? Which node do I need?

  1. 1 Posted by cubehexagonal on 24 Oct, 2021 09:49 PM

    cubehexagonal's Avatar

    I want to add two lists of XY coordinates.

    First X from list A is added with first X from list B.
    First Y from list A is added ith first Y from list B.


  2. Support Staff 2 Posted by john on 24 Oct, 2021 09:54 PM

    john's Avatar

    Yes, this is easy.

    Simply combine the two lists with an ADD node.

    See screenshot. List A contains 1, 2, 3. List B contains 3, 2, 1. I simply feed them into an add node and the output is 4, 4, 4.

    (I added an integer node because the list and add nodes output floating point numbers which show as n.0. The integer node turns them into integers (which may or may not be necessary).

    There is a subtlety to how this works. The add node is configured to take items from a list one at a time. Each time an item from list A and an item from list B arrive at the node it outputs the sum of these two items.

    So in this case the node fires 3 times. The first time it outputs 1 + 3 = 4. The second time it outputs 2 + 2 = 4. The third time it outputs 3 + 1 = 4. The result is a list containing three 4s.

    Please let me know if you have any other questions. Happy NodeBoxing!


  3. 3 Posted by cubehexagonal on 24 Oct, 2021 10:03 PM

    cubehexagonal's Avatar


    Sorry, I found out it works with the add node two minutes before seeing your answer. ^^'

    Maybe it didn't worked well at first because I didn't split the list into X and Y.

  4. Support Staff 4 Posted by john on 24 Oct, 2021 10:06 PM

    john's Avatar

    Your followup question arrived just as I posted my answer. But I think my answer also works for your followup.

    You can separate the Xs and Ys from each list of points using a lookup node, then use the Add node to combine the Xs from A and B and the Ys from A and B. Then turn these two lists back into points by simply feeding the two lists into a point node.

    If this is unclear let me know and I will make an example file for you.


Reply to this discussion

Internal reply

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

Attaching KB article:


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


? 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

29 May, 2024 05:47 AM
29 May, 2024 05:15 AM
29 May, 2024 05:12 AM
28 May, 2024 07:37 PM
25 May, 2024 11:52 AM


24 May, 2024 07:39 AM
16 May, 2024 02:11 AM
14 May, 2024 01:29 AM
12 May, 2024 07:46 PM
05 May, 2024 04:38 PM
03 May, 2024 06:50 AM