I have a collection of curves from which I would like to find the point at which the curves have “x” slope.

To do this I first divide the curve by many points and test the nearest to “x”.

It works fine for this little amount of curves, but I have much more, and if I want more precision I need to divide by 1000 instead of 100. That means a lot of data, and all the components after the first division take quite some time to calculate.

So I wonder, isn’t there a better way? Thank in advance.
Shynn

I don’t see a heavy performance penalty here at all, even dividing each curve by 1000 instead of 100?

On an old laptop (R5) using 1000 curves instead of the 27 provided, dividing each curve by 1000 (testing one million points!!), the “weight” is more apparent. But it’s all in the setup phase before the ‘Slope%’ slider, which remains quite responsive, since the code after that is quick.

Indeed, but those seconds that each component takes matter to me because the definition is calculated multiple times for 1000 curves 1100 curves 1200 curves, etc, or even the same amount of curves but with different curvature, height, etc. Quite a pain if you ask me.

Get the grevilleParams and do the slope Intervals List (0 to 360 by measuing tangents VS, say, Plane.WorldXY.XAxis and with respect the Plane.WorldXY).

Search the Intervals for containment the search slope.

The first to comply (or any other if you want to find all the slope points) is a candidate.

From that point and on is a matter of variable (i.e. strinking) resolution recursive search.

Indeed: Imagine getting the greville parameters (that define crv segments), the tangents at ends … thus the slopes (counter clock wise by measuring against a V (1,0,0) and Plane.WordXY) and then doing a test if the given slope is included. Then you sample the right pieces and you feed the next recursive loop with these: you get the greville paramemeters on pieces blah, blah. So finally and depending on the accuracy (i.e. the recursion Loops) you get mini crv pieces. Then you do an array sort on the greville parameters per mini piece (actually 3 array sorts, but who’s counting? ) and you get the best approximation. In plain English: given a slope, find the points.

Bad news: (mode: find all points - as opposed to find the first) 0.5 milliseconds … an eternity if you have 1M curves … so … we need // stuff. But most // C#'s are classified as strictly internals meaning a Catch22 situation.

But maybe a can figure out a compromise. On the other hand I’m not in the right mood given the incredible things that Mercedes did (Brazil F1) to hero Lewis (these fellas are certified idiots: pitted the great man for fresh soft tires with 4 laps to go + a safety car + 2 brocken Ferraris on track … ). Plus when Bottas retired (safety car etc etc) … they left Lewis out while everybody else got fresh tires. BRAVO Mercedes.