I am a python beginner and I am having hard time to make recursion working. I want to create rectangle fractal which will multiply itself as it goes smaller and smaller.
but for some reason it does not want to multiply itself. Can anybody give me an advise? Here is the code. Thank you for the help.
import rhinoscriptsyntax as rs
import Rhino as r
explodedCurves = rs.ExplodeCurves(rec,False) for curve in explodedCurves: parameter = rs.CurveParameter(curve,p) point_on_curve = rs.EvaluateCurve(curve, parameter) pts.append(point_on_curve) A = pts B = pts C = pts D = pts Fractal1 = rs.AddPolyline([A,B,C,D,A]) if (repetition > 0): repetition -= 1 Fractal_split(Fractal1,repetition,p) else: Fractals.append(Fractal1)