[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] drawRibbons from the book
From: |
Richard Harke |
Subject: |
Re: [Axiom-developer] drawRibbons from the book |
Date: |
Sun, 5 Nov 2006 19:58:10 -0800 |
User-agent: |
KMail/1.7.2 |
On Sun November 5 2006 15:49, Vanuxem Grégory wrote:
> Le dimanche 05 novembre 2006 à 11:47 -0800, Richard Harke a écrit :
> > I have been working my way through the book. The first version of
> > drawRibbons (Section 10.2, page 487) seems to work as described.
> > The second version (section 10.3, page 489) produces some error
> > messages which I don't understand. The following is the session.
> > (after a )clear all)
> >
> >
> >
> > (1) -> )read ribbons
> > drawRibbons(flist, xrange, yrange) ==
> > sp := createThreeSpace()
> > num := # flist
> > yVar := variable yrange
> > y0:Float := lo segment yrange
> > width:Float := (hi segment yrange - y0)/num
> > for f in flist for color in 1..num repeat
> > makeObject(f, xrange, yVar=y0..y0+width,
> > var2Steps == 1, colorFunction == (x,y) +-> color,
> > space == sp)
>
> ^
> You have to indent this line (it will be be considered as a continuation
> of the previous line) or use an underscore (line continuation
> character), so:
>
> makeObject(f, xrange, yVar=y0..y0+width,
> var2Steps == 1, colorFunction == (x,y) +-> color,
> space == sp)
> or
>
> makeObject(f, xrange, yVar=y0..y0+width,
> var2Steps == 1, colorFunction == (x,y) +-> color,_
> space == sp)
>
> With an underscore the indentation does not matter. I don't know if your
> code used to work in the past.
>
> Greg
Well, that fix does allow the file to load. I have hardbound version
of the book and the underscore is there but is very small and
runs against the line number so I thought it was just a piece of dirt.
I am surprised that the second indenting is required as the line
aboce is at the same nesting level, i.e. parameters to makeObject.
When I try to execute with
drawRibbons([x**i for i in 1..5], x=-1..1, y=0..1)
axiom quietly exits, that is, no error message.
The session looks like
(2) -> drawRibbons([x**i for i in 1..5], x=-1..1, y=0..1)
Loading /usr/lib/axiom-20050201/algebra/UPMP.o for package
UnivariatePolynomialMultiplicationPackage
Loading /usr/lib/axiom-20050201/algebra/SEG.o for domain Segment
Loading /usr/lib/axiom-20050201/algebra/SEGBIND.o for domain
SegmentBinding
Loading /usr/lib/axiom-20050201/algebra/TOPSP.o for package
TopLevelThreeSpace
Loading /usr/lib/axiom-20050201/algebra/FLOAT.o for domain Float
Loading /usr/lib/axiom-20050201/algebra/FPS-.o for domain
FloatingPointSystem&
Loading /usr/lib/axiom-20050201/algebra/RNS-.o for domain
RealNumberSystem&
Loading /usr/lib/axiom-20050201/algebra/DROPT.o for domain
DrawOption
Loading /usr/lib/axiom-20050201/algebra/ANY.o for domain Any
Loading /usr/lib/axiom-20050201/algebra/SEX.o for domain SExpression
Loading /usr/lib/axiom-20050201/algebra/DFLOAT.o for domain
DoubleFloat
Loading /usr/lib/axiom-20050201/algebra/DRAW.o for package
TopLevelDrawFunctions
Loading /usr/lib/axiom-20050201/algebra/VIEW3D.o for domain
ThreeDimensionalViewport
Loading /usr/lib/axiom-20050201/algebra/SPACE3.o for domain
ThreeSpace
Loading /usr/lib/axiom-20050201/algebra/SUBSPACE.o for domain
SubSpace
Loading /usr/lib/axiom-20050201/algebra/POINT.o for domain Point
Loading /usr/lib/axiom-20050201/algebra/COMPPROP.o for domain
SubSpaceComponentProperty
Compiling function drawRibbons with type (List Polynomial Integer,
SegmentBinding Integer,SegmentBinding NonNegativeInteger) ->
ThreeDimensionalViewport
I'd be happy to try to debug this but I don't yet have a clue how to go
about it. My intent was to learn how to use it first, then worry about
changing/maintaining, etc.
Richard
- [Axiom-developer] drawRibbons from the book, Richard Harke, 2006/11/05
- Re: [Axiom-developer] drawRibbons from the book, Vanuxem Grégory, 2006/11/05
- Re: [Axiom-developer] drawRibbons from the book, Vanuxem Grégory, 2006/11/05
- RE: [Axiom-developer] drawRibbons from the book, Bill Page, 2006/11/05
- Re: [Axiom-developer] drawRibbons from the book, Richard Harke, 2006/11/05
- Re: [Axiom-developer] drawRibbons from the book, root, 2006/11/05
- Re: [Axiom-developer] drawRibbons from the book, Richard Harke, 2006/11/05
- Re: [Axiom-developer] drawRibbons from the book, root, 2006/11/05
- RE: [Axiom-developer] drawRibbons from the book, Bill Page, 2006/11/06
- Re: [Axiom-developer] drawRibbons from the book,
Richard Harke <=