import rhinoscriptsyntax as rs
import math
def f(t): return t * math.sin(t)
def g(t): return t * math.cos(t)
def evaluate(t):
	point = (f(t),g(t),0)
	print "Parametric function is evaluated at t =",t
	print "Resulting point is at",point
	rs.AddPoint(point)
def graph(t0,t1,dt):
	points = []
	t = t0
	while t <= t1:
		points.append((f(t),g(t),0))
		evaluate(t)
		t = t + dt
	points.append((f(t1),g(t1),0))
	rs.AddPolyline(points)
	print "Domain of t is",t0,"to",t1
	print "Number of samples used:",len(points)
graph(-1,12,0.01)