Replies to Waldek's ones (in non-chronological order):



Sorry, not replotting is the feature.  It is impossible to "undo"
spurious replot.  On fast displays spurious replots merely waste
time but on slow ones can create ugly artifacts.  So quality
plotting routines must give user control of replotting.

The main point of the proposal was homogeneity of user interface (UI). 
Presently viewpoint(vp,1,2,3) and rotate(vp,3.14/4.0,3.14/4.0) actually redraw 
so homogeneity of UI and your feature argument would imply to shut-off these 
anti-feature... but mine was a weak suggestion, so it is ok to stay here.

Some unsolicited thoughts "pour parler":

I assume that guaranteeing a user-friendly and as-simple-as-possible UI is 
among FriCAS mandatory targets. I hope for the survival of FriCAS that this is 
the case :)

Viewport UI is not very homogeneous among 2D and 3D: many names, semantics, and 
options are different.

I'm happy to see that there are other packages in development (Scene and 
GnuDraw) but again new UI and, especially for Scene, new concepts and new names 
(sadly violating the full-words naming convention used in Axiom/FriCAS).

Would not be useful to have a few categories that impose a minimal "2D, 3D 
scientific plotting" UI that past, present, and future drawing packages must honor 
(and of course extend if they wish)? This way a user might smoothly move from one package 
to another, and learn the whole details of a package if more functionalities were needed. 
It would encourage developers to test new ways without burdening the users.

Just as a stupid example (with no pretensions, one has to think carefully to 
names, functionalities, options,....)

Plot2DShowCategory():Category with
  plot2DFunction
  plot2DCurve
  plot2DPoints
  show2DPlots

Plot2DFormats ==> Union(SVG, Postscript, GnuPlot,....)

Plot2DToXCategory( F:Plot2DFormats ):Category
  plot2DFunctionTo
  plot2DCurveTo
  plot2DPointsTo
  show2DPlotsTo

... analog in 3d ...


end of "pour parler".



but ATM I do not see why anybody would want such a routine.

Well, as a benchmark of FriCAS present scientific graphical capabilities I was 
trying to reproduce
https://et.wikipedia.org/wiki/Fail:Gamma_abs_3D.png
with the same parameters:

ViewPoint -> {-2, -2.5, 1}

ie position (x,y,z) of an observer looking toward the object.



Probably first we need to know what those angles really mean.
Saying longitude and latitude avoids real question: what is their
role in display.

You are right. The problem is that src/graph is a jungle...

I'm wondering if the time that it would take to understand all the details of 
src/graph and maintain it is not comparable to that that an experienced C/C++ 
programmer (which excludes me) could take to reconstruct from scratch a minimal 
viewport interface (possibly with more than 9 plots allowed and vector 
graphics...), maybe extracting it form an open source project, ie the Qt based 
https://en.wikipedia.org/wiki/FreeMat

Anyway, at a first sight I would say that a necessary condition is the 
understanding of the omnipresent global macro ROTATE and friends:

void
ROTATE(float xxR[4][4])
{
  xxR[0][0]= -(cosTheta); xxR[0][1]= -(-sinTheta*cosPhi); xxR[0][2]= 
-(sinTheta*sinPhi);  xxR[0][3]= 0.0;
  xxR[1][0]= -(sinTheta); xxR[1][1]= -(cosTheta*cosPhi);  xxR[1][2]= 
-(-cosTheta*sinPhi); xxR[1][3]= 0.0;
  xxR[2][0]= 0.0;         xxR[2][1]= -(sinPhi);           xxR[2][2]= -(cosPhi); 
          xxR[2][3]= 0.0;
  xxR[3][0]= 0.0;         xxR[3][1]= 0.0;                 xxR[3][2]= 0.0;       
          xxR[3][3]= -(1.0);
}

https://github.com/fricas/fricas/blob/master/src/graph/view3D/transform3d.c#L90


The problem is that a search gives more definitions of these 
sinTheta/cosTheta/...:
https://github.com/fricas/fricas/search?q=cosTheta&unscoped_q=cosTheta

I guess that the one which interest us are in
https://github.com/fricas/fricas/blob/master/src/graph/view3D/viewport3d.c

more on this later....

Riccardo

--
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 [email protected].
To post to this group, send email to [email protected].
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