#13279: Improve documentation for `animate`
------------------------------+---------------------------------------------
Reporter: benjaminfjones | Owner: jason, was
Type: enhancement | Status: new
Priority: minor | Milestone: sage-5.3
Component: graphics | Keywords: documentation animate
graphics
Work issues: | Report Upstream: N/A
Reviewers: | Authors:
Merged in: | Dependencies:
Stopgaps: |
------------------------------+---------------------------------------------
The docstring for the top level `animate` function is spare. It should be
improved with more examples that illustrate existing functionality.
For example, missing from the docstring are examples of superimposing
(using `+`) and concatenating (using `*`) animate objects.
Here is an example of superimposing frames which comes from the
ask.sagemath question http://ask.sagemath.org/question/1604/making-an-
array-of-animations.
{{{
sin_frames = []
circ_frames = []
circ_x = -1.5 # offset center of the circle
circ_y = 0
for i in srange(0,2*pi,0.2):
singraph = point((i,sin(i)), color="green", size=50)
singraph += plot(sin(x),(0,2*pi), xmin=0, xmax=7, ymin=-1, ymax=1,
figsize=[2,2], axes=False)
unitcircle = point((cos(i)+circ_x,sin(i)+circ_y), color="green",
size=50)
unitcircle += circle((circ_x,circ_y),1, color="blue", figsize=[2,2],
axes=False)
sin_frames.append(singraph)
circ_frames.append(unitcircle)
A1 = animate(sin_frames)
A2 = animate(circ_frames)
show(A1+A2) # superimpose frames
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13279>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
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-trac?hl=en.