Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

11 Pages123>»
Options
Go to last post Go to first unread
Offline mkraska  
#1 Posted : 20 September 2013 16:30:11(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,173
Germany

Was thanked: 590 time(s) in 397 post(s)
We have uploaded a Maxima plugin to the online gallery.

This plugin tries to silently extend the power of SMath. This means that the function names do not reveal their Maxima nature, the help texts, however, do. The plugin can "hijack" the internal functions int(), diff(), det(), sum() and lim(). This enables us to use the nicely formatted operators.
Due to instability reasons and known issues with sum(), we switch off this takeover by default.

Major features:
  • Symbolic integrals, limits, sums, extended derivative capabilities
  • support for units, greek letters and localization settings (arg and dec separator, function style)
  • Dedicated functions for equation solving and solution handling like Solve(), ODE.2() and Assign()
  • Nearly complete access to the features of the draw package via dedicated functions Draw2D() and Draw3D()
  • Interactive Draw2D and Draw3D regions (scaling, rotating, setting menu)
  • Convenient debugging function MaximaLog()
  • Log, Debug and Settings windows under Insert> Maxima
  • Each SMath instance has a separate Maxima session (communication via socket)
  • Extensive documentation in the Activebook help system of the inofficial portable distribution (see signature), available via the "reference material" button and in the pdf Handbuch, available via Extension Manager inside SMath
  • There is a portable SMath with Maxima distribution. This is the recommended way to use the plugin.
  • Tested under windows only (win7, win8)


The coding work has been done by Kay Graubmann, student of Mechatronics at Brandenburg University of Applied Sciences. Specification, alpha-testing and documentation made by Martin Kraska, teaching Engineering Mechanics and Finite Element Analysis at FHB.

Acknowledgements:
- The code re-uses parts of the Maple Wrapper by Viacheslav Mezentsev and was also inspired by the Statistical Tools plugin by Davide Carpi.
- Andrey Ivashov provided the base for all this and helped in the final publishing phase.
- Leo Butler (one of the developers of Maxima) helped with the preliminary fix of a critical error. The current version does not rely on this fix any more (it's GPL was too restrictive for distribution as part of the plugin)

Please report any issue in this forum topic or in the bug tracking system.

[Edit: SVN Sources of Activebook and Maxima Plugin]

Martin Kraska
Kay Graubmann

Edited by user 11 October 2014 00:36:18(UTC)  | Reason: Not specified

mkraska attached the following image(s):
maxima.PNG
Martin Kraska

Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
thanks 5 users thanked mkraska for this useful post.
on 20/09/2013(UTC),  on 20/09/2013(UTC),  on 20/09/2013(UTC),  on 20/09/2013(UTC),  on 20/09/2013(UTC)
Offline Davide Carpi  
#2 Posted : 20 September 2013 16:41:37(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 1,678
Man
Italy
Location: Italy

Was thanked: 862 time(s) in 574 post(s)
I'll test this plugin ASAP, seems a huge work Good

About variable's definition:

Code:
store.AppendDefinition("varible_name", Term[] answer, new Term[0]);

(answer is the RHS)


Best regards,

Davide

Edited by user 20 September 2013 17:09:12(UTC)  | Reason: Not specified

Best regards,

Davide

---
If you like my plugins please consider making a donation to SMath Studio
thanks 1 user thanked Davide Carpi for this useful post.
on 20/09/2013(UTC)
Offline kilele  
#3 Posted : 20 September 2013 18:03:39(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 390

Was thanked: 131 time(s) in 112 post(s)
Originally Posted by: mkraska Go to Quoted Post

  • Due to registring a path to Maxima during setup, SMath is not really portable any more unless you can use the same Maxima path on different systems
    [/list]


  • Thank you very much, Kay and Martin!!
    You may want to contact the author of the portable version of Maxima at portableapps.com
    http://portableapps.com/node/23391

    Some other resources that may help are :

    Swig to interface C/C++ with C#
    http://en.smath.info/for...h-Library.aspx#post10783
    SWIG and Common Lisp
    http://www.swig.org/Doc1.3/Lisp.html
    Simple C++ CAS Maxima API
    http://code.google.com/p/remote-maxima/
    C# code to connect to Maxima
    http://www.math.utexas.e.../maxima/2009/016554.html

    Edited by user 20 September 2013 18:41:27(UTC)  | Reason: Not specified

    thanks 1 user thanked kilele for this useful post.
    on 20/09/2013(UTC)
    Offline omorr  
    #4 Posted : 20 September 2013 21:19:32(UTC)
    omorr


    Rank: Administration

    Groups: Registered, Administrators, Advanced Member
    Joined: 23/06/2009(UTC)
    Posts: 1,572
    Man
    Serbia

    Was thanked: 259 time(s) in 223 post(s)
    Many thanks to Kay and Martin Good

    I really enjoyed browsing the Martin's Handbook with Maxima examples. I can see there are some problems with localization settings, (point, coma <=versus=> coma, semicolon). I had no problems with the Maxima examples until I changed to point as decimal point, and coma as argument separator - see the picture please.

    I did not see this in the ToDo list or Known Issues (maybe I am wrong).

    On the other hand, I suppose that something could be done in order to make this "portable" as kilele mentioned. I know there is software which include some Maxima support but there is not need to install Maxima at all.

    Regards,
    Radovan
    When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
    thanks 1 user thanked omorr for this useful post.
    on 20/09/2013(UTC)
    Offline mkraska  
    #5 Posted : 20 September 2013 22:08:40(UTC)
    mkraska


    Rank: Advanced Member

    Groups: Registered
    Joined: 15/04/2012(UTC)
    Posts: 1,173
    Germany

    Was thanked: 590 time(s) in 397 post(s)
    Maxima-diff() seems to trouble functions from Nonlinear Solvers. I hope this can be fixed, or Davide finds a smart way to adjust to it without rewriting everything. Last resort would be to provide the functions directly based on Maxima. First we should try to fix diff().
    mkraska attached the following image(s):
    taylor.PNG
    Martin Kraska

    Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
    Offline mkraska  
    #6 Posted : 20 September 2013 22:28:30(UTC)
    mkraska


    Rank: Advanced Member

    Groups: Registered
    Joined: 15/04/2012(UTC)
    Posts: 1,173
    Germany

    Was thanked: 590 time(s) in 397 post(s)
    In principle, the arg and dec sep issue as well as function style was meant to be handled, but to be honest - not tested. Should be possible to fix, as proven by many other plugins. The localization issue is quite top on the agenda.

    @Andrey, is there a generic solution coming up soon or should we cope on our own for the time being?

    As to the portable version. Honestly, I would rather focus on convenient and stable operation rather than on installation issues. If non-portability turns out to be prohibitive for otherwise active users, this, of course, should be handled.
    But be aware that Maxima is as big as 30MB in download and 100MB unpacked.

    We also think of generic unicode support (as extension of the translator function) in order to enable e.g. cyrillic letters in expressions.

    Let us know what the priorities are for you.



    Martin Kraska

    Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
    Offline mkraska  
    #7 Posted : 21 September 2013 01:16:41(UTC)
    mkraska


    Rank: Advanced Member

    Groups: Registered
    Joined: 15/04/2012(UTC)
    Posts: 1,173
    Germany

    Was thanked: 590 time(s) in 397 post(s)
    Plugin updated. Now Maxima should be started whenever required (this formerly failed at least for int())

    EDIT: Update did just hide the problem, but did not solve it.

    Edited by user 21 September 2013 02:07:02(UTC)  | Reason: Not specified

    Martin Kraska

    Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
    Offline Davide Carpi  
    #8 Posted : 21 September 2013 01:24:54(UTC)
    Davide Carpi


    Rank: Advanced Member

    Groups: Registered, Advanced Member
    Joined: 13/01/2012(UTC)
    Posts: 1,678
    Man
    Italy
    Location: Italy

    Was thanked: 862 time(s) in 574 post(s)
    To create a Taylor series in a SMath worksheet one can write:

    Taylor(f(x),x.0,degree):line(T(z):sum((diff(f(z),z,n)*{(x-z)^n}/{n!}),n,0,degree),T(x.0),2,1)

    Working from the plugin, NonlinearSolvers build the T(z) RHS, call a symbolic calculation and then replace with a C# while all the z variables with x.0, this is made to leave clean the canvas from internal variables (but maybe there is another way that I don't know or that I've missed)... Maxima probably crashes against the while cycle (but I'm not sure)
    Best regards,

    Davide

    ---
    If you like my plugins please consider making a donation to SMath Studio
    thanks 1 user thanked Davide Carpi for this useful post.
    on 21/09/2013(UTC)
    Offline mkraska  
    #9 Posted : 21 September 2013 10:06:21(UTC)
    mkraska


    Rank: Advanced Member

    Groups: Registered
    Joined: 15/04/2012(UTC)
    Posts: 1,173
    Germany

    Was thanked: 590 time(s) in 397 post(s)
    BUG/Dangerous feature:

    Currently MaximaLog(), int(), diff(), lim() and sum() do not trigger start of a session!

    Maxima must be started explicitly in order to take over the internal functions int(), diff(), lim() and sum().

    Maxima session start can be triggered by one of
    - any VALID MaximaControl() command (valid command strings are shown in the dynamic assistant)
    - Maxima() with any argument accepted by SMath preprocessing
    - one of the functions Solve(), LinSolve() or Algsys()
    Make sure to re-calculate the document if you started the session by adding such a command into an active document.

    This means that documents can behave differently depending on whether Maxima is running or not.

    This is a bug/dangerous feature which we try to fix ASAP.

    Meanwhile it is safe to stick to the recommendation in "Plugin Maxima.sm": Each document should at least do a cleanup at the beginning. This is to avoid interference between different open files in the same SMath instance and makes sure that Maxima is started. Use optimization> "None" or "symbolic" to see the "done".

    MaximaControl("cleanup" )=done

    Edited by user 21 September 2013 12:45:48(UTC)  | Reason: Not specified

    Martin Kraska

    Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
    Offline omorr  
    #10 Posted : 21 September 2013 13:50:35(UTC)
    omorr


    Rank: Administration

    Groups: Registered, Administrators, Advanced Member
    Joined: 23/06/2009(UTC)
    Posts: 1,572
    Man
    Serbia

    Was thanked: 259 time(s) in 223 post(s)
    Regarding to the starting/closing Maxima session, I have some experience with Maxima sessions in other software, and in SMath it happened the same. Sometimes, we can close SMath, end up with/without SMath crash and one or more "maxima.exe" processes remained opened (we could see and should close them in the Task manager, to avoid further problems). I do not know when this happened and why, just wanted to point out how to avoid some possible troubles.

    Regards,
    Radovan
    When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
    thanks 1 user thanked omorr for this useful post.
    on 21/09/2013(UTC)
    Offline kilele  
    #11 Posted : 21 September 2013 15:43:06(UTC)
    kilele


    Rank: Advanced Member

    Groups: Registered
    Joined: 30/03/2011(UTC)
    Posts: 390

    Was thanked: 131 time(s) in 112 post(s)
    killing a process seems to be a bit tricky, the accepted response on this thread could be useful
    http://stackoverflow.com...whether-its-32-or-64-bit
    thanks 1 user thanked kilele for this useful post.
    on 22/09/2013(UTC)
    Offline mkraska  
    #12 Posted : 23 September 2013 01:10:39(UTC)
    mkraska


    Rank: Advanced Member

    Groups: Registered
    Joined: 15/04/2012(UTC)
    Posts: 1,173
    Germany

    Was thanked: 590 time(s) in 397 post(s)
    Originally Posted by: omorr Go to Quoted Post
    I can see there are some problems with localization settings, (point, coma <=versus=> coma, semicolon). I had no problems with the Maxima examples until I changed to point as decimal point, and coma as argument separator - see the picture please.


    Fixed, plugin updated.
    mkraska attached the following image(s):
    point.PNG
    Martin Kraska

    Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
    thanks 1 user thanked mkraska for this useful post.
    on 23/09/2013(UTC)
    Offline mkraska  
    #13 Posted : 23 September 2013 01:16:20(UTC)
    mkraska


    Rank: Advanced Member

    Groups: Registered
    Joined: 15/04/2012(UTC)
    Posts: 1,173
    Germany

    Was thanked: 590 time(s) in 397 post(s)
    Originally Posted by: mkraska Go to Quoted Post
    Maxima-diff() seems to trouble functions from Nonlinear Solvers. I hope this can be fixed, or Davide finds a smart way to adjust to it without rewriting everything. Last resort would be to provide the functions directly based on Maxima.


    Maxima now does not overwrite the functions diff(), lim(), int() and sum(), because of the problems sum() and diff() can cause. Thus, we hope that Maxima now won't interfere with existing sheets as long as you do not ask explicitly by MaximaControl("takeover" ).
    Martin Kraska

    Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
    Offline mkraska  
    #14 Posted : 29 September 2013 03:00:51(UTC)
    mkraska


    Rank: Advanced Member

    Groups: Registered
    Joined: 15/04/2012(UTC)
    Posts: 1,173
    Germany

    Was thanked: 590 time(s) in 397 post(s)
    Plugin updated.

    • pi translation fixed
    • sum() works but yet summation variables must be undefined
    • logging and control improvements
    • translation of scientific number format fixed
    • translation of Maxima lists and lists of lists implemented (translated into matrices)
    • SVN doc updated

    Edited by user 29 September 2013 13:25:43(UTC)  | Reason: Not specified

    File Attachment(s):
    update2.sm (19kb) downloaded 121 time(s).
    Maxima.sm (35kb) downloaded 125 time(s).
    Martin Kraska

    Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
    Offline mkraska  
    #15 Posted : 10 October 2013 01:46:53(UTC)
    mkraska


    Rank: Advanced Member

    Groups: Registered
    Joined: 15/04/2012(UTC)
    Posts: 1,173
    Germany

    Was thanked: 590 time(s) in 397 post(s)
    Plugin updated.

    Now the sum counter is local to the sum (previously, it had to be undefined, thus i could not be used as counter)
    File Attachment(s):
    sum.sm (14kb) downloaded 52 time(s).
    mkraska attached the following image(s):
    sum.PNG
    Martin Kraska

    Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
    thanks 3 users thanked mkraska for this useful post.
    on 10/10/2013(UTC),  on 10/10/2013(UTC),  on 10/10/2013(UTC)
    Offline mkraska  
    #16 Posted : 20 October 2013 19:59:01(UTC)
    mkraska


    Rank: Advanced Member

    Groups: Registered
    Joined: 15/04/2012(UTC)
    Posts: 1,173
    Germany

    Was thanked: 590 time(s) in 397 post(s)
    Plugin updated.

    - Expression size limit is now just by user's patience
    - Maxima questions about sign of variables or expressions in integrals are forwarded as error messages.
    - Units are assumed to be positive in integrals and differential equations.
    File Attachment(s):
    update3a.sm (22kb) downloaded 63 time(s).
    mkraska attached the following image(s):
    update3a.png
    Martin Kraska

    Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
    thanks 2 users thanked mkraska for this useful post.
    on 20/10/2013(UTC),  on 20/10/2013(UTC)
    Offline mkraska  
    #17 Posted : 20 October 2013 20:08:24(UTC)
    mkraska


    Rank: Advanced Member

    Groups: Registered
    Joined: 15/04/2012(UTC)
    Posts: 1,173
    Germany

    Was thanked: 590 time(s) in 397 post(s)
    Serious translation problem with unary minus in exponents.

    Currently, we see no easy way to mitigate that. The attached sheet demonstrates some alternative approaches but they all would involve more than just some regular expressions.

    The reason is in the incompatible operator priority between Maxima and SMath, none of both sides can be blamed for that, except that the very low priority of unary minus in SMath is really unusual and is cause of other problems (try displaying -10°C).
    File Attachment(s):
    unary minus.sm (24kb) downloaded 35 time(s).
    mkraska attached the following image(s):
    unary minus.PNG
    Martin Kraska

    Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
    thanks 1 user thanked mkraska for this useful post.
    on 20/10/2013(UTC)
    Offline mkraska  
    #18 Posted : 27 October 2013 20:57:00(UTC)
    mkraska


    Rank: Advanced Member

    Groups: Registered
    Joined: 15/04/2012(UTC)
    Posts: 1,173
    Germany

    Was thanked: 590 time(s) in 397 post(s)
    Plugin updated.

    - Translation problem with unary minus in exponents solved (thanks to Leo Butler, one of the Maxima developers)
    - Dedicated function ODE.2 for solving second order ODEs (wrapper for ode2())
    - Bi-directional translation of greek uppercase letters
    - Unidirectional (SMath to Maxima) translation of relational and boolean operators
    - Improved error message forwarding
    File Attachment(s):
    update4.sm (34kb) downloaded 81 time(s).
    mkraska attached the following image(s):
    update4.PNG
    Martin Kraska

    Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
    thanks 3 users thanked mkraska for this useful post.
    on 27/10/2013(UTC),  on 27/10/2013(UTC),  on 27/10/2013(UTC)
    Offline mkraska  
    #19 Posted : 09 November 2013 20:11:01(UTC)
    mkraska


    Rank: Advanced Member

    Groups: Registered
    Joined: 15/04/2012(UTC)
    Posts: 1,173
    Germany

    Was thanked: 590 time(s) in 397 post(s)
    Plugin updated.

    - Bidirectional transfer of string constants
    -> more convenient plotting
    -> Maxima string functions can be used
    - Special markup for verbatim Maxima expressions ("$...$" )
    - Special markup for quote character in MaximaLog() output
    - Auxiliary files now reside in the plugin directory
    - Bidirectional handling of different operator priorities in expressions like a^b^c or a^-b*c
    File Attachment(s):
    Update5.sm (34kb) downloaded 75 time(s).
    mkraska attached the following image(s):
    update5.PNG
    Martin Kraska

    Portable SMath with plugins and interactive handbook: http://smath.info/wiki/SMath%20with%20Plugins.ashx
    thanks 2 users thanked mkraska for this useful post.
    on 09/11/2013(UTC),  on 10/11/2013(UTC)
    Offline overlord  
    #20 Posted : 14 November 2013 00:09:47(UTC)
    overlord


    Rank: Advanced Member

    Groups: Registered
    Joined: 23/07/2013(UTC)
    Posts: 30
    Turkey

    Was thanked: 7 time(s) in 6 post(s)
    I don't know if it is only me but since last updates I can not use this plugin. At home my win7 x64 computer finds it and works as it is supposed. But at work I have a win7 x86 computer (non-english) and it can never find where maxima is. I have manually written "maxima.inf" file and it didn't helped. I have written thr MaximaControl ("init";"C:\\Program Files\"Wink command and waited for 50 minutes and nothing happened.

    Edited by user 14 November 2013 01:14:32(UTC)  | Reason: Not specified

    Users browsing this topic
    Similar Topics
    news for Maxima Plugin (Questions)
    by oscampo 27/01/2016 18:39:35(UTC)
    Maxima plugin error (Bugs & Problems)
    by olik 30/11/2015 10:17:28(UTC)
    11 Pages123>»
    Forum Jump  
    You cannot post new topics in this forum.
    You cannot reply to topics in this forum.
    You cannot delete your posts in this forum.
    You cannot edit your posts in this forum.
    You cannot create polls in this forum.
    You cannot vote in polls in this forum.