Hello,

here’s what I’m looking at :

http://www.blender.org/documentation/249PythonDoc/Curve-module.html

how do I call this “bezList2Curve” function?

I assumed it needed 3 vectors so I made a list of 3 vectors, but the error is :

```
AttributeError:'float' has no attribute 'x'
```

so… am I plugging the parameters in right?

also, I’m trying to make a script that will take an equation : eg: y = x^2 , and plot the points in 3d space. What’s the best way to go about this?

code is below :

```
from Blender import *
from Blender import Mathutils
'''
how do you call the function bezList2Curve() ?
This is what I'm trying to get the code to do:
# make a new curve
# set variables
# make a new equation eg: y= x^2
# create a new object to store each location
#create an array of these location objects to make a table
# set each point equal to a certain object in the array
# create a 3d (or 2d in 3d space) object for the curve
is there an easier method than what I'm attempting?
'''
#http://www.blender.org/documentation/249PythonDoc/API_related-module.html
def bezList2Curve(bezier_vecs):
'''
Take a list or vector triples and converts them into a bezier curve object
'''
def bezFromVecs(vecs):
'''
Bezier triple from 3 vecs, shortcut functon
'''
bt= BezTriple.New( vecs[0].x, vecs[0].y, vecs[0].z, vecs[1].x, vecs[1].y, vecs[1].z, vecs[2].x, vecs[2].y, vecs[2].z)
bt.handleTypes= (BezTriple.HandleTypes.FREE, BezTriple.HandleTypes.FREE)
return bt
# create the curve data with one point
cu= Curve.New()
cu.appendNurb(bezFromVecs(bezier_vecs[0])) # we must add a starting point
cu_nurb = cu[0] #get first curve just added in the curve data
i=1 # skip first vector triple because it was used to initialize the cuve
while i<len(bezier_vecs):
bt_vec_triple = bezier_vecs[i]
bt= bezFromVecs(bt_vec_triple)
cu_nurb.append(bt)
i+=1
# add teh curve into the scene
scn = Scene.GetCurrent()
ob = scn.objects.new(cu)
return ob
m =Mathutils
v=[m.Vector(3,2,1), m.Vector(5,5,5),m.Vector(7,-8,7)]
bezList2Curve(v)
```

-amdbcg