[sage-support] Re: Another possible bug in parametric_plot/show

2008-02-16 Thread bill purvis

On Saturday 16 February 2008, Alex Ghitza wrote:

> Sorry I don't have any feedback on your actual question, but
> there is an easier way to get the contents of your worksheet
> than what you describe: on the upper right side of the page
> there are 6 blue buttons.  The third one is called "Text"; if
> you press that, you get a plain text version of your worksheet,
> which you can then copy/paste/etc.
>
> Best,
> Alex
Many thanks,
that's another new thing I learned today!

Bill
-- 
+---+
| Bill Purvis, Amateur Mathematician|
|  email: [EMAIL PROTECTED]  |
|  http://bil.members.beeb.net  |
+---+

--~--~-~--~~~---~--~~
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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Another possible bug in parametric_plot/show

2008-02-16 Thread bill purvis

On Saturday 16 February 2008, Carl Witty wrote:
> On Feb 16, 6:59 am, "bill.p" <[EMAIL PROTECTED]> wrote:
> > def f(x):
> >   y = 1729 - x^3
> >   return sgn(y) * abs(y)^(1/3)
>
> ...
>
> > f = parametric_plot((x,line((12,1),(9,10),x)),8,18)
>
> You are defining f twice, first as a function then as a graphics
> object.  You need to pick a different name for one or the other.
>
> Carl
>
Must be old age creeping on! Many thanks for spotting that.

Bill
-- 
+---+
| Bill Purvis, Amateur Mathematician|
|  email: [EMAIL PROTECTED]  |
|  http://bil.members.beeb.net  |
+---+

--~--~-~--~~~---~--~~
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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Another possible bug in parametric_plot/show

2008-02-16 Thread Alex Ghitza

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

bill.p wrote:
| Sorry, Carl, it's
|   http://www.billp.org/Fermat_1729.sws
|
| Here's my transcript of the notebook for David. Firefox wouldn't let
| me copy/paste from the notebook!
| Ended up pressing the 'print' link, then doing File/save-as on that
| and then editing out
| all the HTML junk.
Hi Bill,

Sorry I don't have any feedback on your actual question, but
there is an easier way to get the contents of your worksheet
than what you describe: on the upper right side of the page
there are 6 blue buttons.  The third one is called "Text"; if
you press that, you get a plain text version of your worksheet,
which you can then copy/paste/etc.

Best,
Alex

- --
Alexandru Ghitza
Assistant Professor
Department of Mathematics
Colby College
Waterville, ME 04901
http://bayes.colby.edu/~ghitza/
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHtwATdZTaNFFPILgRAm+dAJ0ffl2bse+abrMeuOdU6po2XpXFywCfaG55
MRkz/XxY51TaVxl6dnNEdd4=
=U3Ed
-END PGP SIGNATURE-


--~--~-~--~~~---~--~~
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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Another possible bug in parametric_plot/show

2008-02-16 Thread Carl Witty

On Feb 16, 6:59 am, "bill.p" <[EMAIL PROTECTED]> wrote:
> def f(x):
>   y = 1729 - x^3
>   return sgn(y) * abs(y)^(1/3)
...
> f = parametric_plot((x,line((12,1),(9,10),x)),8,18)

You are defining f twice, first as a function then as a graphics
object.  You need to pick a different name for one or the other.

Carl

--~--~-~--~~~---~--~~
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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Another possible bug in parametric_plot/show

2008-02-16 Thread bill.p

Sorry, Carl, it's
  http://www.billp.org/Fermat_1729.sws

Here's my transcript of the notebook for David. Firefox wouldn't let
me copy/paste from the notebook!
Ended up pressing the 'print' link, then doing File/save-as on that
and then editing out
all the HTML junk.

# We consider a curve x^3+y^3=m
# This can be transformed into Y^2 = X^3 - 432 * m^2
# So for the Taxicab problem, we have m=1729
#
{{{
m = 1729
E=EllipticCurve([0,-432*m^2]);
|
Elliptic Curve defined by y^2  = x^3 - 1291438512 over Rational Field
}}}
{{{
# transforming points using X=12*m/x+y, Y=36*m*(x-y)/(x+y)
# define map and inverse functions
def mymap(x,y):
return (12*m/(x+y), 36*m*(x-y)/(x+y))

# To invert the transformation we use
# x=(36*m + Y)/(6 * X), y = (36*m - Y)/(6 * X)
def unmap(p):
x, y = p
return ((36*m + y)/(6*x), (36*m - y)/(6*x))
|
}}}
# Taking point (12,1)
PP = E(mymap(12,1)); P=PP.xy(); P
|
(1596, 52668)
}}}
{{{
# Taking point (10,9)
QQ = E(mymap(10,9)); Q=QQ.xy(); Q
|
(1092, 3276)
}}}
{{{
R = PP+QQ; R = unmap(R.xy()); R
|
(-37/3, 46/3)
}}}
{{{
S = PP-QQ; S = unmap(S.xy()); S
|
(-397/26, 453/26)
}}}
{{{
T = QQ-PP; T = unmap(T.xy()); T
|
(453/26, -397/26)
}}}
{{{
U=-PP-QQ; U = unmap(U.xy()); U
|
(46/3, -37/3)
}}}
{{{
def sgn(x):
  if x < 0:
return -1
  return 1

def f(x):
  y = 1729 - x^3
  return sgn(y) * abs(y)^(1/3)

def line(p,q,x):
  x1,y1=p
  x2,y2=q
  return (x-x1) * (y2-y1)/(x2-x1)

t = (1729/2)^(1/3)
}}}
{{{
c = parametric_plot((x,f(x)),-15,t)
d = parametric_plot((f(x),x),-15,t)
e = parametric_plot((x,line((12,1),(10,9),x)),9,15)
f = parametric_plot((x,line((12,1),(9,10),x)),8,18)
|
Exception (click to the left for traceback):d =
parametric_plot((f(x),x),-15,t)
...
TypeError: 'Graphics' object is not callable
}}}
{{{

g = (c+d+e+f)
g.set_aspect_ratio(1)
g.show()
}}}
(Oh, and the print window shows the graph, but it doesn't get printed)

Bill

On Feb 16, 2:46 pm, Carl Witty <[EMAIL PROTECTED]> wrote:
> On Feb 12, 3:47 am, "bill.p" <[EMAIL PROTECTED]> wrote:
>
> > The Notebook is getting rather long now, so I've saved it to a file:
>
> >  http://www.billp.org/Fermat-1729.sws
>
> When I try to download this, I get "ERROR 404: Not Found".
>
> Carl

--~--~-~--~~~---~--~~
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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Another possible bug in parametric_plot/show

2008-02-16 Thread Carl Witty

On Feb 12, 3:47 am, "bill.p" <[EMAIL PROTECTED]> wrote:
> The Notebook is getting rather long now, so I've saved it to a file:
>
>  http://www.billp.org/Fermat-1729.sws

When I try to download this, I get "ERROR 404: Not Found".

Carl

--~--~-~--~~~---~--~~
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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Another possible bug in parametric_plot/show

2008-02-16 Thread David Joyner

Sorry, I don't use the notebook (command-line only), but if you could paste
the code you are trying to run I can look at it and see if I can spot something.


On Feb 16, 2008 5:07 AM, bill.p <[EMAIL PROTECTED]> wrote:
>
> Just a brief note to re-raise this problem. No-one seems interested...
> a pity as I still haven't been
> able to figure out how to work around it.
>
>
> Bill
> >
>

--~--~-~--~~~---~--~~
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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Another possible bug in parametric_plot/show

2008-02-16 Thread bill.p

Just a brief note to re-raise this problem. No-one seems interested...
a pity as I still haven't been
able to figure out how to work around it.

Bill
--~--~-~--~~~---~--~~
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://www.sagemath.org
-~--~~~~--~~--~--~---