Make an Attractor linked with a Reference Point
Definition of Attractor :
In the mathematical field of dynamical systems, an attractor is a set of numerical values toward which a system tends to evolve, for a wide variety of starting conditions of the system. System values that get close enough to the attractor values remain close even if slightly disturbed.
In architectural terms we could use an attractor in the design process to get some interesting features in components that build up our projects.
In order to realize a parametric facade create by a series of elements I start to create a "XYZGrid" that define the position of the several elements. This node, in input, requires the counts of x, y adn z rows, the origin point and the spacing between rows giving in output a list of points.
First stop. The node doesn't work and after push "Run" I don't see anything in the model view. Well, "XYZGrid" is a custom node, so maybe there's something wrong with the inputs that compose itself. Let's try to Edit Custom Node.
Here it is! There's something wrong in this block.
"Warning: Multiple definitions for 'Point' are found as Autodesk.DesignScript.Geometry.Point, Rhino.Geometry.Point"
There is a collision between the two definition of Point of Autodesk and Rhino. This bug is almost strange, but is conceivable if we has installed some Dynamo Packages that speaks with Rhinoceros like MantisShrimps or Rhynamo. The deal is that this block doesn't recognize if this point is an Autodesk Point or a Rhino Point, so i tried to put in the entire definition "Autodesk.DesignScript.Geometry.Point" and save the custom node.
WOW! IT WORKS! Now I have my points grid. Now i want an attractor ruled by the distance between every grid's point and a Reference Point in Revit. Let's create a Reference Point and then select this element with the node "Select Model Element".
I need to measure the distance between this Reference Point and points of the grid so is useful the "Geometry.DistanceTo" but there's a problem with the Reference Point. It's not a "point" so we have to transform it into a Point (node: ReferencePoint.Point).
Combining this increasing distances in a Geometry node ruled by a center and a distance, for example a Circle by center and radius we should have our working attractor. This is an attractor with circles that has their centers in the XyzGrid and the radius ruled by the distance to the reference point.
Adjusting the scale of the distance we do appreciate better the usefulness of this node.
If we move the Reference Point in Revit and re-Run Dynamo the attractor works.