<aside> 💡 Lists - an abstract data type that represents an ordered collection of values, where the same value can occur more than once.

</aside>

To imagine a list and the operations performed on it, we can compare this list to a queue of people and a vendor who needs to sell balls to people in this queue. The queue is a list, just like the set of balls, and the vendor is the operator who performs this job.

A queue

A queue

  1. The first example is when we have 8 people and 8 balls - the result is that each person receives one ball.

https://prod-files-secure.s3.us-west-2.amazonaws.com/ee848b0b-0549-4363-9009-29b090347be4/64e5a076-88db-4c60-8aaa-871b4e3c497d/Frame_16.png

  1. Next, let's imagine that there are 5 people and 8 balls, then the first 4 people will receive one ball each, and the last 3 people will not receive any. These are the peculiarities of working with lists that we will further discuss.

https://prod-files-secure.s3.us-west-2.amazonaws.com/ee848b0b-0549-4363-9009-29b090347be4/e3cd2f2f-b97d-438f-b096-529fc6a4827e/Frame_17.png

  1. And the last case is when there are 8 people and only 5 balls - the result will be that the last 4 people will have to share one ball among them.

https://prod-files-secure.s3.us-west-2.amazonaws.com/ee848b0b-0549-4363-9009-29b090347be4/8a4d544c-85e8-4307-a913-8d9f7f3f5f87/Frame_18.png

<aside> 💡 This behavior may seem strange to you now, but later when we consider a few examples, it will become clearer.

</aside>

Creating Lists

Create a Point node and then right-click on it and select "Set one Point" after clicking anywhere in the Rhino window.

<aside> 📌 To create a node using a name, for example, Point, double-click in the Grasshopper window and type the name of the node you are looking for:

https://prod-files-secure.s3.us-west-2.amazonaws.com/ee848b0b-0549-4363-9009-29b090347be4/31759890-58b8-4591-8c88-06c53ddc4133/Untitled.png

</aside>

https://prod-files-secure.s3.us-west-2.amazonaws.com/ee848b0b-0549-4363-9009-29b090347be4/c578674a-57a8-41cb-b7f2-85a07fcc266e/Untitled.png

https://prod-files-secure.s3.us-west-2.amazonaws.com/ee848b0b-0549-4363-9009-29b090347be4/07ba810d-c925-478b-b70c-ac16b84fac3b/Untitled.png

We have a node with one point created (this is how it will appear in the Rhino window)

We want it to become the center of a circle - we can do this by connecting the Circle node

https://prod-files-secure.s3.us-west-2.amazonaws.com/ee848b0b-0549-4363-9009-29b090347be4/7704d215-56a1-4fa0-b777-bedf7c5f76da/Untitled.png

But usually, working with just one point is not enough, and we can certainly do it this way 😅 and it will work, but we can do better!

https://prod-files-secure.s3.us-west-2.amazonaws.com/ee848b0b-0549-4363-9009-29b090347be4/1404c1e7-c996-423d-afe4-9cc0521cf26f/Untitled.png