Parameters are an important part of creating geometry in Dynamo.
Parameters allow you to make
geometry more complex and interesting. Also, once parameters are added, the geometry becomes more parametric. In other words, parameters allow you to manipulate and change the form, rather than having a static form. In this exercise file, four points have been created as the vertices of a square. Four lines have also been created between the points. Now you can add another point to each line and have the location of the point be controlled by a parameter. This will allow you to host geometry to the points and control the location with a parameter. In the node Library, under Geometry, expand Curve. There are several Action nodes available to manipulate curves or use them to create additional geometry. First of all, realize that lines are considered curves in Dynamo. Therefore, you can use the majority of these nodes to manipulate the lines that are created in this workspace. To add a point to the lines in this example, use the PointAtParameter node. Click PointAtParameter to add the node to the workspace and then move it to the right of the graph. The first input is curve. Since lines are considered curves, you can connect the Line output to this input. Also, realize that the Line output is a list, so multiple lines will be input into the Curve.PointAtParameter node. The next input is param. The value for this input needs to be a number between 0 and 1. Essentially, the parameter is the normalized length of the curve. 0 is the start point of the curve, and 1 is the end point of the curve. Therefore, 0.5 is the center of the curve. You can use a Number node to enter the parameter input. For example, in the node Library, search "number" and then click Number to add a Number node. Enter 0.5 in the Number node and then connect the output to the param input. When you do, points are created at the midpoint of each line. This method works, but another option that provides more flexibility is a Number Slider node. Back in the node Library, you should see Number Slider while still searching for "number". Delete the Number node and then click Number Slider.Expand the drop-down on the Number Slider node to access the node's settings: Min, Max, and Step. This node is great for number parameters that you will update frequently. Enter 1 for the Max and leave the other settings the same. Next, connect the output of the Number Slider to the param input.Now you can control the location of the points with the number slider. At this point, you have parametric points.