Am 23.10.2016 um 07:39 schrieb Waldek Hebisch:

> 
> BTW1: AFAICS C part can handle all RGB values, and it would be
> good to get of limitation on number of colors on Spad side.
> 
Would be nice to have, but certainly not pressing?

> BTW2: At least one part of C code for graphis cleverly uses
> X windows routines for color handling.  The effect is that
> it is impossible to produce Postscript images without connection
> to X server :(
> 
Yes, that's a pity, however, it looks like that there are work-arounds without
to endanger current functionality.



BTW in "draw.spad" there's something strange with the creation of defaults for
'title' and 'style'.


draw : (PPC, BIND, L DROP) -> VIEW2
      ++ draw(curve(f(t), g(t)), t = a..b, l) draws the graph of the parametric
      ++ curve \spad{x = f(t), y = g(t)} as t ranges from \spad{min(a, b)} to
      ++ \spad{max(a, b)}; \spad{(f(t), g(t))} is the default title, and the
      ++ options contained in the list l of the domain \spad{DrawOption}
      ++ are applied.

** Title and style defaults are malformed in most draw and makeObject routines
(see example below). Are those defaults necessary at all? I'd prefer to set
style="" and title (if at all) to the full function expression as in the
docstring indicated (possibly truncated if really too long). What do you think?


For instance: draw.spad, makeObject page 837 ff.
      -- create title if necessary
      if not option?(l, 'title) then
        s : String := unparse(convert(f)@InputForm)
        if sayLength(s)$DisplayPackage > 50 then
          l := concat(title "FriCAS3D",l)
        else l := concat(title s, l)
      -- indicate draw style if necessary
      if not option?(l, 'style) then
        l := concat(style unparse(convert(f)@InputForm), l)


---
v1:=draw(cos(x*y),x=-3..3,y=-3..3)

   (1)  ThreeDimensionalViewport: "cos(x*y)"
                                               Type: ThreeDimensionalViewport
(2) -> options v1

   (2)  [style = "cos(x*y)",title = "cos(x*y)"]
                                                       Type: List(DrawOption)
---
v2:=draw(curve(5*cos(t), 5*sin(t),t), t=-12..12)

   (3)  ThreeDimensionalViewport: "5*cos(t)"
                                               Type: ThreeDimensionalViewport
(4) -> options v2

   (4)  [style = "5*cos(t)",title = "5*cos(t)"]
                                                       Type: List(DrawOption

---
v3:=draw(curve(5*cos(t), 5*sin(t),t), t=-12..12,title=="T",style=="")

   (5)  ThreeDimensionalViewport: "T"
                                               Type: ThreeDimensionalViewport
(6) -> options v3

   (6)  [title = "T",style = ""]

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to