Jump to content

arraying rectangles with phi distance


Recommended Posts

I'd like to use Marionette to make an array of rectangles over some distance with the distance between each rectangle increasing by phi. If I use this network to control the rectangle's width and height, it works perfectly, but when I try to use the output of the range as an input to the y value of the point, it doesn't work, the rectangles are just spaced out evenly.

Screenshot 2020-04-07 01.48.17.png

Link to comment


I think that you need to rethink what you would like to do.

Your network works like this:

1. create a range of numbers

2. Multiply these numbers by phi

3. Use this list of numbers as Y coordinate.

This network returns a range of evenly multiplied numbers (each base number is multiplied by phi separately) so distances between rectangles are constant.


1st. point (0,0)

2nd. point (0, 161) where Y = 100*1,61

3rd. point (0, 322) where Y = 200*1,61

4th. point (0, 483) where Y = 300*1,61

and so on...

You can see that distance between points is constant and is equal to step*phi


As I understand you want to make a network that distributes rectangles at different distances using phi, yes?

This will require different approach. You need to multiply a previous distance.


1st. point (0,0)

2nd. point (0,161) where Y = 100x1,61

3rd. point (0, 259) where Y = 161x1,61

4th. point (0, 417) where Y = 259x1,61

and so on...

You can spot the difference.

Hope you'll make it. If you have any questions just ask.

Link to comment

Oh dear, this is what happens when I try to program at 4am. Okay, I see what's going wrong, but I'm having a hard time thinking of how to pull this off in Marionette. I know how I'd do this in Python:

x = 0
y = 2

for item in range(10):
	z = 1.68 * (abs(x-y))
	x = y
	y+= z

But Marionette seems tricky when it comes to loops. Any tips or hints would be appreciated.


Thank you!


Link to comment
13 hours ago, GRZEGORZ said:

The easiest way to create custom node is to modify existing one.

Thats what i actually did.


For the node above I used the Int-Node as base.This, because it was already on the drawing and (whats more important) the input and output ports are correct. The Int-Node and your node both have an integer OIP input and a single output. This means no new ports need had to be created. It is always an effort to create new ports and therefore much easier to reuse existing structures. For the same reason, the node is not completely rewritten. I always try to copy and reuse as much as possible. It's a lot easier.


After deciding which node to use as a basis (A decision on life and death😂), I deletet the first codeline. Without this step it isn't possible to change the code. Then i copied your code into the node and made some changes to create the output list. Next step was to integrate the Integer-Input and replace 1.68 through the code into the phi-node. Last but not least the inputs got new names and descriptions.


Between these steps there was always a test whether the node still worked correctly.


All in all, the creation of the node took about 5 minutes. This also explains the bad descriptions.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...