Hi all,
I can't seem to find this in the reference doco. I've found
sage.plot.plot3d.shapes2 but there a line is a graphical object and
may pass through multiple points and may not be straight. Something so
simple as [(x1, y1), (x2, y2) ] might not need it's own class in Sage
but surely there must
re. decorators, I found this example quite illustrative
def memoize(f):
#this is a decorator eg.
cache = {}
def helper(x):
#lexical closure fn.
if x not in cache:
cache[x] = f(x)
return cache[x]
return helper
#fib = memoize(fib)
# <=>
@memoize
Thanks, this is exactly what I want. I do want to be modular. However,
my graphics object
contains 0 graphics primitives
g = Graphics()
def f1(g)
g += polygon(...)
def f2(g)
g += ...
show(g)
Can I not pass g as a parameter and have it returned to outer scope?
--
To post to this group, s
Now I've added $SAGE_ROOT to my PATH and exported SAGE_ROOT and it
echo's OK
but yea, verily it doth appear at this stage that every morning I'll
have to do:
$sage -i sagenb
Off it goes
Extracting package from /home/me
-rw-r--r-- ... spkg/standard/sagenb-0.8.2.spkg
tar: This does not look like
Is it possilbe it's just because "the sage install tree may have
moved"? There seems to be a fair few import errors and a lot not
found. Suse 11 should have the latest gcc shouldn't it? It's not just
a permissions or $PATH thing? Apologies in advance if this is naively
hopeful.
--
To post to this
The doco at:
http://combinat.sagemath.org/doc/reference/sage/plot/polygon.html?highlight=polygon2d#sage.plot.polygon.polygon2d
has lots of example of various polgons but what if I want to do some
tiling and build up a scene of lots of polygons? Do I have to use
show(p1+p2+p3+...)? What if there are
Hi all,
I've just upgraded form Unbuntu 9.10, on which I tried compiling from
source to Ubuntu10.04 on which I installed the pre-fab binary. So, on
10.04 it seemed to be working but I've had a problem with the notebook
disappearing and this is the second time it's happened now.
$sage -n
Please wa