Just look at the attachments.
It's a simple example. Before I make this code example, I was thinking about placing some constraints to draw a graph or 3D model. We can place a dependent variables (center point, width, radius and etc) and create the other variables which are based on these dependent variables. We can also place constraints between variables to automaticaly calculate the variables' value we want to achieve. In the latter case, we have to solve the equations. I think mixing these two methods is more flexible.
Usually we draw a graph using some kind of UI tool, then you have to click the tool button to start the tool action. Then, you have to select a center point to start placing a circle. Sometimes we hope to have this center point snaped to an exixsting point. This "existing piont" is actually a dependent variable.
When you try to place nodes to get such a center point, you usually don't want to place too many nodes. At this time, we can place a code defined node to get an output what we want.
The new NodeBox forum is live! Everything from support.nodebox.net moved here: sign in with the same email to pick up your old posts. Something not working? Write to forum-support@nodebox.net.
Show your WorkFrom the old forum
Another code example
-
-
I chaged the code.