Post Reply 
Python graphic module: observations, assumptions, suggestions
12-02-2021, 05:46 PM
Post: #4
RE: Python graphic module: observations, assumptions, suggestions
The graphic module is the same as in KhiCAS for the TI Nspire CX/CX2, Numworks and Xcas MicroPython. It uses the drawing routines from the CAS, that were implemented because they were not available on other calculators. Some command names are synonyms of Numworks kandinsky module commands (this explains some redundancy). Some commands are not available or will not work on the Prime because I lacked time to do that properly with Cyrille. Some commands will not do anything, they are here so that you can run the same Python program on the HP Prime, TI Nspire CX/CX2 or Numworks and Xcas, something you won't be able to do with commands of the hpprime module.

A few comments:
1/ draw_rectangle is a synonym of fill_rectangle for some reasons explained above, you can use draw_polygon for an unfilled rectangle.
2/ if fill_arc has a 8th argument, then it is assumed you want to fill a segment of circle instead of an arc.

The source code of the graphic module of Xcas is available in the giac source code (giac-1.7.0/micropython-1.12/xcas/graphic.c and numworks, nspire, ports/javascript for the Numworks and emscripten JS ports), feel free to propose enhancements!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Python graphic module: observations, assumptions, suggestions - parisse - 12-02-2021 05:46 PM



User(s) browsing this thread: 1 Guest(s)