> More generally, the way sage.plot is built seems to be dedicated
> mostly to function graphs. Is it possible to attach geometric objects
> to an underlying space? meaning that if I have a Square attached to
> the euclidean plane, I would like to be able to act on it with a
> matrix like in the following
> {{{
> sage: p = Polygon([(0,0),(0,1),(1,1)])
> sage: m = matrix([[1,1],[0,1]])
> sage: m*p # the polygon made of the points (0,0), (1,1), (2,1)
> }}}
> e.g. to see a Polygon more as a subset of an homogeneous space with a
> complete metric than a plot object.
>
I think that would be cool, even just from the standpoint of teaching
linear algebra or calc 3 and playing with linear transformations. And I
don't see why you'd need to limit it to things like Polygons. It would
be cool if you could do:
p=plot(whatever)
m*p # transform each coordinate
I think it would be very straightforward to do this using the underlying
2d matplotlib library, which has a very nice transformation framework
builtin [1] (in other words, we could probably easily just save up the
transformations, like we currently do with 3d plots, and then apply the
transformations on output, which should just be a matter of one or two
matplotlib calls at the very end right before drawing). On the 3d side,
Sage has a transformation framework, so it should be straightfoward to
make m*p do something cool there too.
I wonder if it would help if the graphics were inside the coercion system.
Jason
[1] http://matplotlib.sourceforge.net/devel/transformations.html
In fact, it would be cool if you could do nonlinear transformations as
well. Suppose you defined (for example) the polar coordinate transform
T(r,theta)=(r*cos(theta), r*sin(theta)). Then T(some plot) or T*plot or
plot.transform(T) or something could do the same sort of thing as above
(for example, if the plot was the horizontal line r=1, then T(plot) or
T*plot or whatever would be a plot of a circle of radius 1).
Jason
I wonder if Helena Verrill, who wrote a very nice package for drawing
fundamental domains in Magma, would be interested? I will ask her.
I also have a student (Maite Aranes) doing related things with 3D
hyperbolic geometry, using Sage notebooks to draw projections of
fundamental regions (but not 3D regions yet). She will be at SD23 in
Leiden.
John
> --
> To post to this group, send an email to sage-...@googlegroups.com
> To unsubscribe from this group, send an email to
> sage-devel+...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>
I think it would be great to have those things in Sage!
Thanks,
Jason
Could you give a lightening talk about the math behind this tomorrow
at Sage Days?
> PS: I do not (want to) know any Java. I was able to use H. Verrill
> work because she wrote things in english. But the Maryland team
> softares seem to be very interesting.
>
> --
> To post to this group, send an email to sage-...@googlegroups.com
> To unsubscribe from this group, send an email to sage-devel+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>
--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org