Curve Tangent

Call Main()
Sub Main()
Const rhObjectCurve = 4

Dim strObject, arrPoint, dblParam, arrNormal

strObject = Rhino.GetObject("Select a curve", rhObjectCurve)

If Not IsNull(strObject) Then

	arrPoint = Rhino.CurveStartPoint(strObject)

	If IsArray(arrPoint) Then

		dblParam = Rhino.CurveClosestPoint(strObject, arrPoint)

		arrNormal = Rhino.CurveTangent(strObject, dblParam)

	End If

End If
Rhino.AddLine  arrPoint, arrNormal

End Sub

Untitled

Red line is a line I want to creat from a point on curve and a point tangent curve.
I don’t don’t know how to do it. Please help me.Untitled.3dm (16.4 KB)

Perhaps you could try this approach:

or even better:

Curve.GetLocalTangentPoint()
https://developer.rhino3d.com/api/RhinoCommon/html/Overload_Rhino_Geometry_Curve_GetLocalTangentPoint.htm