 # Issue while evaluate midpoint of curve spline

Hi all,
i am trying to understand Curve.PointAtSegmentLength & Curve.PointAtParameter. The curve element which i am trying to evaluate is Spline. I am trying to evaluate the point at midpoint of the curve. But the nodes Curve.PointAtSegmentLength & Curve.PointAtParameter giving two different values.while using can any one explain this issue. one more query is, is it possible to see the code for Curve.PointAtSegmentLength behind it?

Instead of a number slider, test by dividing the curve length obtained by 2.0

hi Vikram, Thanks for your reply. my query is, the Points which derived from curve.PointAtParamaeter & Curve.PointAtSegmentLength should be same, but i am getting different points. why this is happen? as per my understanding Curve.PointAtParameter should give the curve midpoint exactly. i should get same points while giving half of the length as input in Curve.PointAtSegmentLength. but i am getting different point. so can you help to calrify on this?

Parameterization isn’t the same as percent of the length for non uniform curves, but rather the locations and directions which define the shape.

We talked about this a bit in this community conversation (starts at round the 14:45 mark): Computational Geometry: Model / Physical types​ with Dynamo - YouTube

hi @JacobSmall thanks for the video. so we cannot use parameter to find exact midpoint of the curve. so if i want to find out the point at some distance along the curve, curve.PointAtSegmentLength node will give the exact value. For non parametric curves i cannot use Curve.PointAtParameter. is it correct?

Correct. Non uniform curves (ie: NURBS curves - non-uniform is in the name) may not have parameter 0.5 at the midpoint. Uniform curves (ie lines, arcs) should align without issue.