Hello,

I try to use minimization function of sage but I didn't understand how 
minimize with a function.

I want construct a hermite curve and I have p array of 4 control points. I 
would try to find alpha and beta scalar value so that the curve 
have the minimimun curvature in some points.
I would like find the alpha and beta value but I don't know how use 
minimize function in this case.



p=[vector([9,4,0]),vector([9,1,0]),vector([3,3,0]),vector([2,1,0])]

def minimumHermite(alpha,beta):
     # varing tangent 1
     p[2]=p[2]*alpha
     # varing tangent 2
     p[3]=p[3]*beta
     # build the hermite curve from contro point p
     curveHermite=HermiteCurve(p)               
     curvatureH=curvature(curveHermite)
     best=0
     # calculate curvature value at some points and minimize this value 
rispect to alpha and beta
     for i in range(1,11):
         square=curvatureH.substitute(t==0.1*i).norm()
         best=best+square*square
     return best 


Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.


Reply via email to