How to taper a spiral?

jeff but… :wink:
i have to look at it again in a bit… if increasing b to get a more pronounced taper, it’s drawing a spiral 50billion feet across in an inches template… i think it’s because i used degrees (that’s what the 30 is… a point being placed every 30º) instead of radians in the formula… i’ll post again if i can get it under control and of reasonable size.


ha, yeah… i kinda gave up on trying to understand some of those formulas i found a wikipedia… i’d need a little remedial class to really understand what was happening and how to control it better… so i put it in a way i could understand…

i think the logarithmic spiral is doing this:
equally divide a circle with radial lines then just draw perpendicular lines from one curve to where it intersects with the next… then do another perp line from the intersection… etcetc.

so going off that, i can just use trig to figure out the hypotenuse of one triangle then use that as the adjacent for the next triangle and just keep rotating them…:


import rhinoscriptsyntax as rs
import math

ptlist = []
cPt= rs.coerce3dpoint([0,0,0])
angle = math.radians(15)
angleD = 15
x=0
y=1
z=0

ptlist.append(rs.AddPoint (x,y,z))
x= math.tan(angle)*y  #just to get things started?

for i in range(1,102):
    y= x/math.sin(angle)
    x= math.tan(angle)*y
    point=rs.AddPoint(x,y,z)
    rs.RotateObject(point,cPt,-angleD * i)
    ptlist.append(point)

rs.AddInterpCurve(ptlist)

original drawing with a curve struck through the points:

this one is from the state the attached script is in:


if that’s the spiral you like, this script can easily have some user interface stuff attached and made friendlier to use… my main problem is that i’m really new to python and i don’t necessarily know how to share them with windows users (i’m on mac) plus i lack some confidence in ‘publishing’ a script…

so maybe someone else could help out with that :wink:

2 Likes