These look awesome Hector. Can you add them to the wiki somewhere?
On Fri, Apr 11, 2008 at 2:42 AM, Hector Villafuerte <[EMAIL PROTECTED]> wrote:
> On Thu, Apr 10, 2008 at 6:33 PM, William Stein <[EMAIL PROTECTED]> wrote:
> [...]
>
> > Basically, the above would work and look good, but would require
> > fixing some issues with Sage. Go for it!
> [...]
>
> So, here's how it went :)
> On SAGE terminal:
>
>
> sage: stepJ = float(pi/6)
> sage: stepK = float(0.1)
> sage: A = float(2*pi)
> sage:
> sage: J = srange(-A,A,stepJ)
> sage: K = srange(-A,A,stepK)
> sage:
> sage: V = []
> sage:
>
> sage: for j in J:
> ....: P = point3d([(k,sin(k+j),0) for k in K], size=3,
> viewer='tachyon')
> ....: P += point3d([(k,0,sin(k+j)) for k in K], size=3,
> viewer='tachyon', color='red')
> ....: V.append(P)
> ....:
> sage: #... todavia no esta implementado en el Notebook, solo en la terminal
> sage: L = ceil(float(log(len(V),10)))
> sage: for k in range(len(V)):
> ....: V[k].show(filename=pad_zeros(k,L), viewer='tachyon')
>
>
> In bash terminal:
> $ convert -delay 15 -loop 0 *.png "tr3d-1.gif"
>
>
> And for the second one:
>
> sage: var('x y')
> (x, y)
> sage: f(x) = x*exp(-x^2)
> sage:
> sage: stepJ = float(0.5)
> sage: A = 4
>
> sage: J = srange(-A,A,stepJ)
> sage: V = []
> sage:
>
> sage: for j in J:
> ....: P = plot3d(f(x-j), (x,-A,A), (y,-A,A), viewer='tachyon')
> ....: V.append(P)
> ....:
> sage: #... todavia no esta implementado en el Notebook, solo en la terminal
> sage: L = ceil(float(log(len(V),10)))
> sage: for k in range(len(V)):
> ....: V[k].show(filename=pad_zeros(k,L), viewer='tachyon',
> aspect_ratio=[1,1,1])
>
> In bash terminal:
> $ convert -delay 15 -loop 0 *.png "tr3d-2.gif"
>
>
> Animations are attached. Thanks for your help!
> --
> Hector
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---