Hello everybody,

i wouls like to plot a 2d-curve given aparametrically and color it by using 
its curvature function. I've managed to do something similar in 3d plots 
(coloring them by height, using this piece of code

cmsel = [colormaps['autumn'](i) for i in sxrange(0,1,0.05)]
S=plot3d(f,(x,-2, 2), (y,-1, 1),adaptive=True, color=cmsel)
show(S, axes=True)

But the same idea doe not work for 3d parametric plots

var('t')
cmsel = [colormaps['autumn'](i) for i in sxrange(0,1,0.05)]
x(t)=cos(t)
y(t) = 3*sin(t)
k(t) =abs(diff(x,t)*diff(y,t,2) - diff(x,t,2)*diff(y,t))/(diff(x,t)^2+ 
diff(y,t))^(3/2)
C=parametric_plot([cos(t),3*sin(t)], (t,0,2*pi),color=cmsel)
C.show()

gives an error (and in fact I would like to use k(x) as coloring function.

Any suggestion?

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to