Resizing shapes within a grid

FT's Avatar

FT

02 Dec, 2017 03:07 PM

Hi!

I want to animate (resize) the shapes separately within my grid. I tried to animate the shapes by using the 'sample" node so far, which generates a random number but I want to input my own data.(see attached file)
For example: the first row of the grid should have shapes which are 10 width x 10 height.
I tried to import an csv file and link it to the shape node but it didn't seem to work.

Here is an animation of how it looks like right now with the "sample" node:
https://vimeo.com/245515236

Thanks in advance!

  1. Support Staff 1 Posted by john on 02 Dec, 2017 10:19 PM

    john's Avatar

    Hi FT,

    I am attaching a simple demo of how to read data from a csv and use it to size an array of dots.

    For this demo I created a csv file of the seven dwarves. The table lists dwarf name (Doc, Grumpy, Happy, etc.) and weight. See first screenshot.

    Everything in NodeBox runs off of lists. For this demo our ellipse node needs a list of 7 positions and another list of 7 sizes.

    The grid node generates a list of positions. I set it to 4 x 4, so it would produce 16 positions. As we can tell from the count node, this data file only has seven rows, so I use the slice node to reduce the list to 7 positions. Positions are ordered left to right, top to bottom, so that creates one row of four and a second row of three.

    To get our list of sizes we use a lookup node to retrieve numbers from the Weight column. We then feed those into the width and height ports of the ellipse node. See second screenshot.

    That should give you a clearer understanding of how to size shapes from data. The zip file contains the NodeBox network and data file for you to play with.

    I don't understand how you want to animate your dots. Using data to control every dot for every frame of an animation would require a larger and more complex dataset. Could you say more about what your data file looks like and exactly how you want to use that data to create an animation?

    Good luck and please let me know if this helped and if you have further questions.

    John

Reply to this discussion

Internal reply

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

Attaching KB article:

»

Already uploaded files

  • grid.PNG 32.1 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

15 Jun, 2024 06:14 AM
08 Jun, 2024 09:05 AM
08 Jun, 2024 09:00 AM
04 Jun, 2024 04:37 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