Hello, I try to make the curve move away from the points by a specific distance.
Anyone with an idea how to do it?
What boundary conditions do you have/ what are your requirements for the new curve?
For example do want to use a function of a certain degree?
the curve should move away from the points and be smooth. Or what exactly do you mean?
Hmm a simple approach would be
- discretize your curve
- calculate vectors between points coordinates and the discretized points
- apply function with vector and its length as input that calculates the displacement vector (small distance -> high displacement, large distance -> small displacement)
- add displacement vectors to points and calculate new splines with the result
there are for sure better ways to do this
i hope this helps
ok seems difficult. Im very new and donât really know which commands I should use to du this
I would do this with python / the ghpython component, but there must be simpler ways where no code is needed
oh man but thank you either
Maybe âpoint attractorsâ could help, something like Double attraction
maybe I could give you the grasshopper data if you want to?
but they have a field of lines and I have one curve I want to reconstruct.
Yes. Without a GH file from you though, I wonât touch this. Eleven posts so far and still no file?
Sorry, here we go:
Pfad.gh (24.9 KB) Pfad_Rhino6.3dm (2.8 MB)
This is remarkably complicated. Do I understand correctly that of the 47 points in your Pt param, you want to use only four of them? And ignore the rest of them?
Yet somehow you end up with 15 circles? Struggling to make sense of this but not inclined to struggle very hard. Was this code copied from another model?
Yes, I want to just all the red points (15). because they are to near to the curve, so here the curve must move.
And yes the code on the bottom is copied, I donât understand it too.
omg thank you so so much this is better than anything I expected.
I threw away the parts I didnât understand, which was most of it. From too complex to too simpleâŚ
Pfad_2021Jan18a.gh (19.2 KB)
Apparently I didnât understand it at all.
It seems you are already using the field components, and of course in this case they should also workâŚ
But somewhat hard to control many pointsâŚ
Though I apparently missed the point completely, itâs amusing to see the effect of:
- reducing the âVâ count of SDivide from 61 to 10 and
- using Nurbs instead of IntCrv curves
Pfad_2021Jan18b.gh (18.2 KB)
Me again your idea is very good but I works not very well for more than 5 points. I wanted to try another way and want the solution looking like the green line:
the red circles should be boundaries for the line and the line should move around them but very smooth
Here are the current datas:
Pfad_Rhino6.3dm (2.8 MB) Path.gh (31.6 KB)