Robert Bradshaw wrote :
On Sun, Jan 30, 2011 at 2:55 AM, Loďc <xl...@free.fr> wrote:
You're right, size affects the center too.
Not very intuituive but now, I know it.

I think this behaviour is quite surprising.
For example, with sphere, size doesn't affect center ....

I might go so far to call it a bug...
The others platonic solids have the same default.


It seems that the bug is in prep function
.../lib/python2.6/site-packages/sage/plot/plot3d/platonic.py about lines 70/401

First translate, then multiply all the coordinates
def prep(G, center, size, kwds):
   if center != (0,0,0):
       G = G.translate(center)
   if size != 1:
       G = G.scale(size)
   G._set_extra_kwds(kwds)
   return G

is != from

First multiply the length from the origin, then translate.

I propose :

def prep(G, center, size, kwds):
   if size != 1:    # exchange the 2 tests.
       G = G.scale(size)
   if center != (0,0,0):
       G = G.translate(center)
   G._set_extra_kwds(kwds)
   return G


--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to