Rhino python interpolate curve question

Hi, I’m trying to create an interpolate curve through a set points which I also scripted in python.
import rhinoscriptsyntax as rs
from math import*
for i in range (0,100):

I tried to referencing these points as
points = rs.AddPoints([(sin(i)*3),i,(cos(i)*3)])
rs.AddInterpCurve(points, degree=3)
,but it gives me error. How should I fix this?

Hi Megan,

See of the commented script below makes sense to you:

import rhinoscriptsyntax as rs
from math import *

added_points = []
for i in range (0,100):
    #add single point and store the returned id in new_point
    new_point = rs.AddPoint([(sin(i)*3),i,(cos(i)*3)])
    #append the new_point to the list of added points

#when all points are created and stored in added_points
new_curve = rs.AddInterpCurve(added_points, degree=3)


btw when pasting scripts to keep the formatting paste it between triple ticks like so:


...paste code here...


Thank you so much.