# Send of 3 small code (I start in python)

I start in python. I try to make 3 small code in python to plot curve:
Say me what do you think, I thank you.

*************** code 1 *****************import Blender
from Blender import *
from Blender import NMesh
from math import pi, cos, sin, tan

print ‘______________________’

d=20
angle = 2*pi/d
angleini = angle/2

#le nouveau mesh
m=NMesh.GetRaw()

#boucle de construction des sommets
for n in range(2*d+1):
angle = angle + angleini
yn=tan(angle)
xn=1/cos(angle)
vert=NMesh.Vert(xn,yn,0.0)
m.verts.append(vert)

for n in range(2*d):

NMesh.PutRaw(m,‘courbe’)
for vertice in m.verts:
print 'Les coordonnees du vertice d’index ', vertice.index,
print 'sont ', vertice.co
print ‘Il y a’, len(m.verts)

Blender.Redraw()

********************* code 2 ***********************

import Blender
from Blender import *
from Blender import NMesh

print ‘______________________’

#le nouveau mesh
m=NMesh.GetRaw()

#le point de départ des calculs
tn=0.18
d=8
prog= 0.5
#boucle de construction des sommets
for n in range(2d+1):
if tn < 0.3:
prog = 0.05
elif tn >= 0.3 and tn < 1:
prog= 0.25
else :
prog = 0.5
yn=1/tn
xn=tn
vert=NMesh.Vert(xn,yn,0.0)
m.verts.append(vert)
tn=tn+prog
for n in range(2
d):

NMesh.PutRaw(m,‘courbe’)
for vertice in m.verts:
print 'Les coordonnees du vertice d’index ', vertice.index,
print 'sont ', vertice.co

Blender.Redraw()

*************************** code 3 ***********************

import Blender
from Blender import *
from Blender import NMesh

print ‘______________________’

m=NMesh.GetRaw()

#le point de départ des calculs
tn=-1
d=10
prog= 0.1
#boucle de construction des sommets
for n in range(2d+1):
yn=d
tntn
xn=d
tn
vert=NMesh.Vert(xn,yn,0.0)
m.verts.append(vert)
tn=tn+prog

for n in range(2*d):