[sage-support] Re: Function-call syntax deprecation

2021-09-10 Thread Federico Galetto
Thank you both for your suggestions!

The gamma(t)=... solution gave me some other error down the line, while 
appending .function(t) to the definition of gamma worked but raised errors 
from later calls to simplify_full(). In the end, replacing x with t=x in 
the definition of my 'frame' function got rid of all warnings and allowed 
me to keep everything else in place.

Cheers,
Fred.

On Friday, September 10, 2021 at 1:05:11 AM UTC-4 Kwankyu wrote:

> gamma(t) = vector([t,t^2,t^3])
>
> is a bit simpler.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/3e4df9d5-56ce-4766-912f-d4fe3eb2f376n%40googlegroups.com.


[sage-support] Re: Function-call syntax deprecation

2021-09-09 Thread Kwankyu
gamma(t) = vector([t,t^2,t^3])

is a bit simpler.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/b27c5800-9f94-4721-94b2-5f5a74bcf893n%40googlegroups.com.


[sage-support] Re: Function-call syntax deprecation

2021-09-09 Thread Matthias Koeppe
Instead of:
gamma=vector([t,t^2,t^3])
use:
gamma=vector([t,t^2,t^3]).function(t)

Alternatively, keep gamma as is and use gamma(t=x) instead of gamma(x).

On Thursday, September 9, 2021 at 1:18:52 PM UTC-7 Federico Galetto wrote:

> Hello, I get a warning due to function-call syntax deprecation and I don't 
> understand how to fix it despite looking at other similar conversations.
>
> Here is the setup for my code:
>
> t=var('t')
> gamma=vector([t,t^2,t^3])
> curve=parametric_plot(gamma,(t,-2,2),color='black',radius=0.02)
> v=derivative(gamma,t)
> T=v/v.norm()
> Tp=derivative(T,t)
> N=Tp/Tp.norm()
> B=T.cross_product(N)
>
> This code creates the plot of a space curve and computes T,N,B which are 
> unit tangent, normal, and binormal vectors. Now I want to create an 
> interactive 3d plot:
>
> def frame(x):
> pT = T(x).plot(start=gamma(x),radius=0.02)
> pN = N(x).plot(color='red',start=gamma(x),radius=0.02)
> pB = B(x).plot(color='green',start=gamma(x),radius=0.02)
> frenet = pT + pN + pB
> whole = frenet + curve
> return whole
> a = animate([frame(x) for x in srange(-0.5,1.5,.02)])
> a.show()
>
> Although this works, I get the syntax deprecation warning at the line 'a = 
> animate(...'.
>
> Any help is greatly appreciated!
> Fred
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/59eba31c-57f2-4c9b-851a-335526ee2dc6n%40googlegroups.com.