Adjust Point Node
This is a fun one!
Adjust_point changes the position of one point, or possibly also two adjacent points, in a complex path. By complex I mean anything from a simple line segment to a font character with bezier splines and multiple contours. It changes this point without disrupting the rest of the path, including colorization.
This is particularly useful with those pesky Bézier curves with tricky control points. Adjust_point has a point selector and FIVE different options which you can mix or match to achieve a variety of effects:
- Point number. If you choose a point number larger than the number of points, it will take the final point.
- Reposition. The amount to change the X,Y position of the selected point.
- Repos adj ctrls. If checked, will also reposition any adjacent control points. A type 2 point in the midst of a multi-curve spline will take the control point on either side. An endpoint or control point with only one adjacent control point will take that one point. Points with no adjacent control points will be unaffected.
- Rotate adj ctrls. If other than zero, adjacent control points will be rotated about the selected point. This twisting motion is highly useful and entertaining.
- Extend previous. If positive extends, if negative retracts the previous point in relation to the selected point. Applies to all points (not just control points) except for the first point of an open path.
- Extend next. If positive extends, if negative retracts the next point in relation to the selected point. Applies to all points (not just control points) except for the last point of an open path.
This is one of those nodes that takes some playing with to really understand. The demo includes FOUR examples, each with a screenshot.
Screenshot 1 shows a single point in a simple curve being manipulated one parameter at a time. I first show the original curve, then reposition point 3, then check the box to reposition both of its adjacent control points, then rotate both control points -112 degrees, then extend the previous point 2 by 45 units, then retract the next point by -19 units. The changes are applied in that order, so the extensions move in the direction established by the previous rotation. Fiddle with any of the values in adjust_point6 to see how each parameter affects the overall shape of the curve.
Screenshot 2 shows how to turn an ordinary Verdana Q into a devilish figure by chaining together multiple point changes. The first two adjustments add horns, the next four give it a spiked tail, and the last turns the inner contour into a hideous scream.
Screenshot 3 turns an ordinary pentagon into a diamond using only a single point change. You can use my poly_labels node to see the edge lengths and interior angles as you manipulate the shape.
Screenshot 4 applies the infamous balloon test to simultaneously warp all the balloons, highlights, and strings. Gives it a jaunty look without blowing up.
The changes that adjust_point makes could be made by changing the way you generate your path, but sometimes this is hard to do, so it's easier just to tack on an extra node, or even a chain of extra nodes. Or sometimes you just want to play to see what kind of curves are possible; once you have the parameter values you need to achieve that effect, you can go back and alter the original path directly.
When playing with paths using adjust_point, it is highly recommended to use my new draw_points node. You can adjust the display to see the point numbers clearly regardless of the size or coloring of your path.
There is one catch: adjust_point requires the CONTOURS.PY external code module, so you will have to copy that from my library (or the demo file) and add it to your code library to avoid error messages. I tried to avoid using an external module, but it proved impossible in this case because other approaches, using the compound node, scramble the path order and starting points.
I have only just started playing with this, so still have only a faint idea how it can be used. So I hope someone out there gives this a spin and shares some of the resulting mischief.
Enjoy!
- adjust_point_screenshot_1.png 786 KB
- adjust_point_screenshot_2.png 471 KB
- adjust_point_screenshot_3.png 504 KB
- adjust_point_screenshot_4.png 943 KB
- adjust_point_node.zip 551 KB
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac