by Tuğrul Yazar | August 7, 2017 16:39
Studied earlier in Grasshopper here[1], creating a cycloid-like curve actually mimics the physical process of rotating disks on a path. Below is a test in Rhino Python.
# Drawing Cycloid-like Curves # 07.08.2017 www.designcoding.net - Tugrul Yazar import rhinoscriptsyntax as rs curv = rs.GetObject("Select curve") qual = rs.GetInteger("Quality",100) radi = rs.GetReal("a radius",4) radi2 = rs.GetReal("Circle radius",4) cua = rs.OffsetCurve(curv,[1,1,0],radi2) cevre = 2 * 3.1415 * radi mimi = [] for i in range(0,qual): ming = i / qual momo = rs.CurveParameter(cua,ming) deto = rs.EvaluateCurve(cua,momo) geto = rs.AddCircle(deto,radi2) angle = (360 * momo) / cevre gogo = rs.RotateObject(geto,deto,angle) mimi.append(rs.CurveStartPoint(gogo)) rs.DeleteObject(geto) rs.AddInterpCurve(mimi) rs.DeleteObject(cua)
Source URL: https://www.designcoding.net/cycloid-curves-with-rhino-python/
Copyright ©2024 designcoding unless otherwise noted.