Help setting up attractor with triangle pattern

Hello everyone, I’ve been using Grasshopper for a little while but still new to parametric modelling. I’ve managed to create some basic patterns in grasshopper which I am trying to re-create in Dynamo but not having much luck.

If anyone could take a look at this code and help me out it would be much appreciated. I am basically trying to scale the triangles using a curve as an attractor point. It seems to do something but I don’t how to get it to scale to the centre of each triangle. Any help would be much appreciated!

test triangle.dyn (20.7 KB)
test triangle.dyn (20.7 KB)
test triangle.dyn (20.7 KB)

Your node Panel.PanelTriangleC has unresolved symbols. I assume you have installed additional packages, which provide this functionality? Could you please let me which package offers this node?

Reviewed your script, you are using a “general” scale, which scales from the origin (0,0,0), which is not what you want. You want to scale from the center of each of your triangle. Please have a look at the other available scale functions.
I didn’t see a scale which does what you probably want most of the time: scale an object from its center. I will investigate a bit further here…

I think coding the algorithm is not that complicated. You just have to compute the position of the center, and compute the position of the new points given the distance between them and the center and a scale factor.

1 Like

Thanks for your suggestion and that is exactly what I am trying to do. It is much simpler in Grasshopper I think as I am struggling to find the right tools in Dynamo to do these tasks, especially scale as there are so many and they work quite differently.