import rhinoscriptsyntax as rs import Rhino.Geometry as rg import random as r rs.EnableRedraw(False) rs.EnableRedraw(False) objects = rs.ObjectsByLayer("Default") rs.DeleteObjects(objects) divisions = 100 nr_of_curves = 20 curve_dist = 10 noise_y_max = 0.5 noise_z_max = 0.2 curves = [] for k in range(nr_of_curves): points = [] for x in range(divisions): # noise over the whole surface #noise_y = r.uniform(-noise_y_max, noise_y_max) # progressive noise along the height #noise_y = r.uniform(-noise_y_max, noise_y_max)*k # progressive noise along the height #noise_y = r.uniform(-noise_y_max, noise_y_max)*k noise_z = r.uniform(-noise_z_max, noise_z_max)*k y = x%(k+1) z = k*curve_dist + noise_z point = rg.Point3d(x, y, z) #rs.AddPoint(point) points.append(point) curve = rs.AddPolyline(points) rs.RebuildCurve(curve, 3, divisions) curves.append(curve) rs.AddLoftSrf(curves)