dim pt1, pt2, crv1, crv2 dim minimumDist minimumDist = 0.25 '========================== 'Get both curves from scene '========================== crv1 = Rhino.GetCurveObject("select first curve") crv2 = Rhino.GetCurveObject("select second curve") pt1 = Rhino.CurveEndPoint(crv1(0)) pt2 = Rhino.CurveEndPoint(crv2(0)) '========================== ' RECURSIVE FUNCTION '========================== 'This function creates an equidistant point between 'two points 'The function digs to test base case before 'creating points function halfwayPoint(a,b) 'Set variable for creating new point reDim newPt(2) '============BASE CASE IS VERY IMPORTANT=============== 'If distance is less than minimum distance set by user 'break out of function else call snowflake recursively '===================================================== if Rhino.Distance(a, b) < minimumDist then Rhino.Print Rhino.Distance(a, b) exit function else for i = 0 to 2 newPt(i) = (a(i) + b(i))/2 next Rhino.AddPoint newPt '================RECURSION HAPPENS HERE========== '================================================ 'Call function with the return value on itself 'Function draws a point and keeps digging until it 'reaches the base case above '================================================ if halfwayPoint(a, newPt) = 0 then exit function else call halfwayPoint(a, halfwayPoint(a, newPt)) end if end if end function halfwayPoint pt1, pt2