Hi Guys,

Simple question I am sure. I want to pick a point on a curve and then make that point on the curve and use CurveTangent to find the tangent at that point.

In grasshopper i would just use a evaluate length on the curve and use a slider to set the length anywhere between 0 and 1, this would then give me the tangent at that result.

What is the best way to say pick a random point on that curve at parameter 0.4? Upon looking around I thought curve domain and evaluate curve may work?

I assume below would find the domain of the full curve and then we are saying divide that by 2?

import rhinoscriptsyntax as rs

obj = rs.GetObject(“Select a curve”)

if rs.IsCurve(obj):

domain = rs.CurveDomain(obj)

t = domain[1]/2.0

point = rs.EvaluateCurve(obj, t)

rs.AddPoint( point )

Thanks, Sam