I am trying to figure this out but just cannot manage it. I dont have a file as i have not been able to crack this at all(new user here). I have a curve say eg with 50 points spaced apart with either same distances or variable maybe. i wish to move certian points on the curve by a specific distance. eg in this case 3 points by 2/5/2m. How to make sure that everytime we move a point it effects the neighbouring points such that it creates a slope of 4 percent till it naturally discipates.
Please if anyone could help me this. Thanks a lot everyone
Best
Arav
Since there is no code to work with, the only way to help is “thinkering” as if it was my poblem . So this is how I would approach this question:
I see you have 50 points on a curve, and you have to move them more or les in Z direction.
Assuming point 0 and point 50 are on Z=0, and you already know 3 points you have to calculate the other 45.
Important question: If you want the slope to be 4%. Then we would need to know 4% of what? It could be 4% of the highest; or 4% of the height you allready know form the neighbour point; or 4% of the height of the closest allready known point, etcetera.
Depending on the choice (about the 4%), next question is, what to do when the height goes below 0 (zero Z)? Negative numbers? Or accept a sharper slope when on the original curve?
WIth clear choices on above, it is possible to “construct a point” on Z level left + right of every known point.
Somewhere in between two points there will be a “connecting” point. How to handle slope there? The answer will depend on the choices made above.
When all points are calculated, create an interpolated curve through all.
the curve of your definition is an Interpolated-curve with well choosen points.
in many cases interpolated-curve will not give the desired result.
here is a simple example where interpolated-curve shows its limitations.
the red points lay on one line.
the input points not necessarily become min / max / “summit” / “lowest valley”- points
Thank you so much for helping me.
I have taken your code and lifted some points in the z axis as shown in the image. Now i would like to connect back to the original curve at a 4percent slope. Distance between the points is 36m and i have raise the point by 4m and 6m. I would assume that say after point 2 it needs 100m to connect back to the curve at 4 perent grade. But i am struggling to achieve this.
Thank you so much again for the help.
Distance between the points is 36m and i have raise the point by 4m and 6m. I would assume that say after point 2 it needs 100m to connect back to the curve at 4 perent grade.
I think you might use base length as curve lower limit, and diagonal length at 4% slope as max limit (Pythagora), then Anchor_XYZ the points you raised (so they won’t move at all) and anchor just on XY the other ones so they are able to slide along Z