I am trying to follow a script from a book that shows how to use point attractors to change the density of wave patterns in Grasshopper. It is likely something simple that I am missing, but I haven’t been able to get the script to change the wave pattern I have so far. I am interested in using point attractors that are set to one, or multiple points. I am trying to achieve something like the images attached. Any help would be appreciated!
point attractor test.3dm
point attractor test.gh
Where are your point attractors? What are you going to do with your polylines? Especially only one?
Here is a simple example of random point attractors using your surface. It’s far from the only way! But maybe a useful example?
P.S. The purple group (below) adds spheres on each point, with radius determined by the same attractor points. It is VERY SLOW so is disabled in the GH file. I just realized that I should have added a non-zero slider value to the Dom ‘A’ input to set a minimum size, or otherwise filtered out radii less than a certain minimum.
Thank you for your reply Joseph! The script you sent was a helpful example for me to better understand.
What I am trying to do is set up a point attractor that can change the length of the woven polyline that I have made. I am trying to 3D print this object, so the woven line is the printer’s tool path. What I am struggling with, is getting the point attractor to change the length that the woven line projects at in some areas, to change the density of the print. I think the point attractors need to be associated with the line, rather than the surface. I’ve attached an image of what I am looking to achieve.
I’m playing around with your script to keep working at, but would appreciate any further suggestions! Thank you!
I copied part of my code into yours (white group) and added the cyan group to make the result more obvious by coloring polyline segments based on their length. I added the Pipe because the segments are harder to see. Two of your images look like the pipe radius is larger on the peaks and smaller in the valleys?
P.S. The yellow group is a rough approximation of changing pipe radius based on segment length.
MultiPipe might look better, I haven’t really used it yet.
For what it’s worth, the purple group is a crude effort at using MultiPipe to set pipe radii as a fraction (‘F’ slider) of the distance each peak point is raised above the surface.
That’s awesome, thank you Joseph! I’ve incorporated your code and it’s looking much better. I just have one further question about the point attractors.
Ultimately, I am looking to print this vessel with clay, as a vase. The area with the point attractor will be unglazed, and I want it to have a more dense weave, like the image above (titled 3D printed part in white PLA with three attractor points). I’ve reworked the script a bit, and I have two versions - one referencing a single point attractor, and another referencing a circular curve attractor.
The issue I’m having now, is that I’m not able to define boundaries around how much of the vase weave is altered by the point attractor. The weave is being altered across the entire vase, but I would prefer it to be just one circular area (like the sketch attached). Is there a way that I can define a radius or perimeter around the attractors, so that only one circular part of the vase has a more dense weave?
I have attached both of the scrips I have been working with.
Point attractor test revised.3dm
Point attractors test revised.gh
It looks like you have restored some of your original code that I removed, specifically ToPoly? If you must do that, why not apply it only to the circular contour curves instead of also affecting the polylines that have already been created?
I don’t understand “more dense weave”? Does that mean more contours in that area?
The idea of limiting the range of attractors is common in these scripts, often using a Minimum component. Examples:
But I don’t really understand what you want to do with it here? Sorry.
I tried to use ur script but I guess my geometry is too complicated and I couldn’t feed it in the flip component, are there any ways that I could do it? Thanks!
I have opened another post:
Thanks a lot! Sorry for my bad English as well.
Hi Joseph, what if I want to create points attractors with the points i set? How should i do it? Thanks!