[sage-support] Re: [sage-devel] Re: [sage-support] Re: sage and sudoku
On Feb 4, 2007, at 08:56 , Timothy Clemans wrote: Alec is your code suppose to be able to generate any nth normal magic square? sage: print magicsquare_normal(4) [ 9 15 1 7] [14 4 6 12] [ 3 5 11 13] [ 8 10 16 2] I think his code just deals with odd 'n' (witness the terms (1 +/- n)/2 in the third line). Justin -- They said it couldn't be done but sometimes it doesn't work out that way. - Casey Stengel -- --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: [sage-devel] Re: [sage-support] Re: sage and sudoku
Oh ok then in the code you should write n = 2*n-1 which means if n is 2 then 3 will be used. That's not the right way - the argument of the function should be the size of the square. If you want to avoid the case of even sizes, that could be done by testing the parity - something like if n%2==0: print The argument should be odd; return Alec --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: [sage-devel] Re: [sage-support] Re: sage and sudoku
From: Timothy Clemans [EMAIL PROTECTED] My function clearly stated magicsquare_normal_odd by being called that so its fine and I would just call yours that too. In the docstring I would say computes nth odd normal magic square. This function is for a special case of normal magic squares. AFAICT, there is no such thing as a normal magic square. What do you mean by normal? I used 'Siamese' to specify the particular well-known case. If other algorithms are planned for including, a better name may be magic_square.Siamese , I think. The docstring may be For an odd n, returns $n\times n$ Siamese magic square. Alec --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] openGL in SAGE
Just for the heck of it, why is openGL not supported in SAGE? It is cross-platform and is popular. There are several books on it. Heck the Wikipedia on openGL is good. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: openGL in SAGE
On Sun, 04 Feb 2007 16:20:07 -0800, Timothy Clemans [EMAIL PROTECTED] wrote: Just for the heck of it, why is openGL not supported in SAGE? It is cross-platform and is popular. There are several books on it. Heck the Wikipedia on openGL is good. I don't understand your question exactly. How would you want to support openGL in SAGE? What does that mean? Do you mean Python bindings so that people can program OpenGL apps from SAGE? If so, I'm sure they (and probably several) already exist, which one could install into SAGE. William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---