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)
    y0 := y0 + width
  vp := makeViewport3D(sp, "Ribbons")
  drawStyle(vp, "shade")
  outlineRender(vp, "on")
  showRegion(vp, "on")
  vp

  Line   1: drawRibbons(flist, xrange, yrange) ==
  Line   2:   sp := createThreeSpace()
  Line   3:   num := # flist
  Line   4:   yVar := variable yrange
  Line   5:   y0:Float := lo segment yrange
  Line   6:   width:Float := (hi segment yrange - y0)/num
  Line   7:   for f in flist for color in 1..num repeat
  Line   8:     makeObject(f, xrange, yVar=y0..y0+width,
           ....A.........B
  Error  A: (from #\A and on) Ignored from here
  Error  B: Missing mate.
  Line   9:        var2Steps == 1, colorFunction == (x,y) +-> color,
           .......A
  Error  A: (from #\A up to ) Ignored.
  Line  10:        space == sp)
           .......A..........B
  Error  A: (from #\A up to #\B) Ignored.
  Error  B: Improper syntax.
  Error  B: Improper syntax.
  Error  B: Possibly missing a )
  Error  B: (up to #\B) to here.
  Line  11:     y0 := y0 + width
  Line  12:   vp := makeViewport3D(sp, "Ribbons")
  Line  13:   drawStyle(vp, "shade")
  Line  14:   outlineRender(vp, "on")
  Line  15:   showRegion(vp, "on")
  Line  16:   vp
   8 error(s) parsing


Richard Harke


_______________________________________________
Axiom-developer mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to