# Changing Curve Slope

@pascal - This is a great tool! Just for other’s information, set the AddLabels and TangentLines options to add them as Pascal did in the example below. I was going to ask you how to do this but then noticed the options.

1 Like

@Helvetosaur - I like the GH script you provided. How do I get the point count from the original curve so that I can set the number of samples to that or maybe 1 more so that I don’t have to adjust the number of samples. Just trying to not have to adjust the number of samples.

@Helvetosaur - Found it…Control Points then List Length

Well, you can simply set the slider to some value which is sufficient for you and leave it that way. Note that interpolating through too few sample points may result in a curve that does not match exactly your input curve in Top view - as it is not constrained to anything between the samples.

The idea was that this is a general solution, I don’t know what type of input curves you may encounter and how complex they might be. The sampling is completely independent of the original curve control points - it is simply dividing the curve into the sample number of equal curve length segments and then interpolating the height at each of those points.

Using the number of original control points as a sample count might result in too few or too many points, depending on what the original input curve was like. In any case, as this is passing an interpolated curve through the sample points, the actual control points of the result will not be at the same locations as the sample points.

But anyway, the definition is there for you to use/modify as you see fit.

@Helvetosaur - Yes I knew about all this and had already experimented with it. When using the techniques it seemed that the number of points on the resulting curve was about 3 x the number of control points on the original curve. So to automate things in GH I simply determined the number of points on the original curve and multiplied by 3 and used that as the input for the Divide and Range objects. Not using the slider. So far so good.