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

Notification

Icon
Error

4 Pages123>»
Options
Go to last post Go to first unread
Offline Andrey Ivashov  
#1 Posted : 12 February 2014 01:34:50(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,383
Man
Russian Federation

Was thanked: 1620 time(s) in 543 post(s)
Modeller Region


First of all I want to say that this region allows to do magic things with SMath Studio and I believe that this is the most powerfull part of the program. I spend on it many time, I did demos of it to many people in order to find out the best approaches can be made. Because of this region I developed Viewer next to SMath Studio and integrated it as a simple to use plug-in. But I'm still in the middle of its implementation. It is really a big and interesting job!

Idea of this region is very simple: user should be able to draw data and SMath Studio must recognize it to perform appropriate calculations. Great! Good idea is everything developer needs Biggrin

So, how it works:


  1. Modeller Region is not built-in into standard SMath Studio package. It should be installed using Extensions Manager (Tools > Plugins > Online Gallery).


  2. Modeller Region available via Insert menu, so lets try to add it to the worksheet;


  3. Modeller requires output variable to be set. Try to evaluate this variable after Region to see its value. 0 - means no data drawn.


  4. Ok. Now we should specify objects can be used inside Modeller. This objects called Templates. Every Template is a row-vector with several parameters inside. All templates should be composed within single sys() function as shown below.


  5. In the simplest layout you are able to set the name of Template and its path. Path is a matrix with two columns - pairs of coordinates of points. It is absolutely the same as supported by Plot Region.


  6. Now we neeed to link Templates with a Modeller Region. It can be simply done with Context menu.


  7. After it is done you will see a Shape appeared at right of Modeller and while this Shape is hovered you will see a hint with Shape's name.


  8. That is all we need to start. Now you can drag'n'drop shapes from the palette at right to the Modeller canvas.


  9. Check out output variable. Do you see how butifull it is? Indeed, it contains full description of Shapes drawn inside Modeller! Now we can do whatever we want with this data!
    - Column #1: Number of Template used for the Shape;
    - Column #2: X-coordinate of the Shape;
    - Column #3: Y-coordinate of the Shape;
    - Column #4: Width of the Shape;
    - Column #5: Height of the Shape;
    - Column #6: Determins whether Shape is active (focused);
    - Column #8: Unique id of the Shape;
    - Other columns I will discribe later.


  10. We need more Templates!


  11. As for me, I can play with it all day long Good


  12. All Shapes are in vectors, so we can zoom in and out using mouse scroll.


  13. By the way, to delete drawn Shape just focus it by mouse and press Del on keyboard. You can also update Shape properties by double click on it Wink try it by yourself. For the start you can use example I created for this intro:
    modeller-demo.sm

  14. Modeller Region is fully compatible with SMath Viewer, so you can create very powerfull applications now! For example there are 2 applications available via Extensions Manager.


The only a part of functionality described above, but this one the most important.
Glad if you'll find Modeller Region usefull and interesting. And of course I'm trilled to see how you will use it! Share results if it is possible! Thank you!

Best regards, Andrey Ivashov.

Edited by user 12 February 2014 01:47:58(UTC)  | Reason: Not specified

thanks 6 users thanked Andrey Ivashov for this useful post.
on 12/02/2014(UTC),  on 12/02/2014(UTC),  on 12/02/2014(UTC),  on 12/02/2014(UTC),  on 12/02/2014(UTC),  on 12/02/2014(UTC)
Offline mkraska  
#2 Posted : 12 February 2014 02:39:25(UTC)
mkraska


Rank: Advanced Member

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

Was thanked: 823 time(s) in 523 post(s)
That really seems to be a whole new space of opportunities. Will take a while to explore them.
One of them: Usage as multidimensional slider...

Martin Kraska

Pre-configured portable distribution of SMath Studio: https://en.smath.info/wi...th%20with%20Plugins.ashx
Offline Davide Carpi  
#3 Posted : 12 February 2014 03:04:09(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 1121 time(s) in 732 post(s)
Originally Posted by: mkraska Go to Quoted Post
That really seems to be a whole new space of opportunities. Will take a while to explore them.
One of them: Usage as multidimensional slider...

I agree Biggrin

I've played a little with the worksheet shared by Andrey and I love how the click and drag works Clapping

Originally Posted by: mkraska Go to Quoted Post
I cannot access the applications from the online gallery, neither in the installer version nor in the (otherwise reliable) portable one.

works for me

Edited by user 12 February 2014 03:08:00(UTC)  | Reason: Not specified

If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
Offline omorr  
#4 Posted : 12 February 2014 17:05:11(UTC)
omorr


Rank: Administration

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

Was thanked: 312 time(s) in 266 post(s)
It seems very interesting, thank you Andrey Good

By the way, It crashes for me (Win7(x64))when choosing "Dependent layout" - see this video
Actually, have no idea what this "layout" means. When I choose it - there is "Syntax is incorrect" error or crash

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline mkraska  
#5 Posted : 12 February 2014 21:35:53(UTC)
mkraska


Rank: Advanced Member

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

Was thanked: 823 time(s) in 523 post(s)
What is the idea for dispaying result-dependent geometry: are we supposed to modify templates or is there a chance to provide input just in the format of the output?
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://en.smath.info/wi...th%20with%20Plugins.ashx
Offline overlord  
#6 Posted : 13 February 2014 00:08:35(UTC)
overlord


Rank: Advanced Member

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

Was thanked: 33 time(s) in 22 post(s)
Originally Posted by: omorr Go to Quoted Post
It seems very interesting, thank you Andrey Good

By the way, It crashes for me (Win7(x64))when choosing "Dependent layout" - see this video
Actually, have no idea what this "layout" means. When I choose it - there is "Syntax is incorrect" error or crash

Regards,
Radovan


below there is an example which i found while messing with, if there is more settings it will be revealed (i hope soGood)

Edited by user 13 February 2014 00:10:19(UTC)  | Reason: Not specified

File Attachment(s):
Page2.sm (6kb) downloaded 112 time(s).
thanks 1 user thanked overlord for this useful post.
on 13/02/2014(UTC)
Offline Andrey Ivashov  
#7 Posted : 13 February 2014 00:21:40(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,383
Man
Russian Federation

Was thanked: 1620 time(s) in 543 post(s)
Radovan, thank you very much. I will fix it soon.

ioan92, you're welcome!

overlord, you are absolutely correct about usage of Predefined/Dependent layouts! I will describe it deeply later (just have no time to do it right now). But here is a small hint - Modeller fully supports units!


Best regards, Andrey Ivashov.

Edited by user 13 February 2014 00:24:15(UTC)  | Reason: Not specified

thanks 1 user thanked Andrey Ivashov for this useful post.
on 13/02/2014(UTC)
Offline Andrey Ivashov  
#8 Posted : 13 February 2014 01:54:30(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,383
Man
Russian Federation

Was thanked: 1620 time(s) in 543 post(s)
Hello again Good

I just created a very simple game based on the modeller Region functionality. It is available as an Example and Application within Extension Manager.


Use Example to see how it works:


I can imagine to create some applications for students with tasks about math, physics or anything else where students should set correct locations of some objects (numbers, resistors etc) to pass the test/exam. Note: that Print button is available in SMath Viewer, so the result can be sent to print out in seconds! Any ideas? Good


Best regards, Andrey Ivashov.

Edited by user 13 February 2014 02:02:27(UTC)  | Reason: Not specified

thanks 3 users thanked Andrey Ivashov for this useful post.
on 13/02/2014(UTC),  on 13/02/2014(UTC),  on 14/02/2014(UTC)
Offline mkraska  
#9 Posted : 13 February 2014 02:46:00(UTC)
mkraska


Rank: Advanced Member

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

Was thanked: 823 time(s) in 523 post(s)
Originally Posted by: smath Go to Quoted Post
I can imagine to create some applications for students with tasks about math, physics or anything else where students should set correct locations of some object to pass the test/exam. Note: that Print button is available in SMath Viewer, so the result can be sent to print out in seconds! Any ideas? Good

Best regards, Andrey Ivashov.

I am using Moodle for homework assignments in engineering mechanics. You can define problems with random individual parameters for each student and ask for a single number (with units support). This number is checked against a reference solution formula, given as a single expression without intermediate variables. Moodle takes care of deadlines, grading and the like.

These formula can be several hundred characters long, just imagine to compute the maximum stress in a compound cross section, where the centroid and moments of inertia need to be calculated from the given data. Kay had the job to create and input these reference formulae - guess what he did: writing a plugin for export of expressions to moodle format.

With interactive graphics at hand, I could imagine to ask for free body diagrams and support reactions with automatic consistency checking.
Or let the students draw shear and moment diagrams from randomly created loads and support conditions.
Or just create graphic problem representations based on parameters.

Moodle has a plugin interface and there seems to be a maxima plugin. However, I am not a moodle administrator and it was quite hard for me to find out how to operate it. The docs explain the buttons and dialogs but do not guide you through common workflows.

An interesting tool for such interactive graphics combined with computer algebra functions is geogebra. This is a tool which can be embedded in web sites, similar to SMath live. It is developed in Austria and in recent releases moves towards computer algebra.

Andrey, I agree that there is plenty of potential. However, for real impact, interfacing with a full featured course management and grading system is required and that is a project on it's own. Designing problems for such systems is considerable investment and one needs to be sure that the features in use are still working with the next moodle update.






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

Pre-configured portable distribution of SMath Studio: https://en.smath.info/wi...th%20with%20Plugins.ashx
Offline Davide Carpi  
#10 Posted : 13 February 2014 02:48:00(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 1121 time(s) in 732 post(s)
Originally Posted by: smath Go to Quoted Post
I can imagine to create some applications for students with tasks about math, physics or anything else where students should set correct locations of some objects (numbers, resistors etc) to pass the test/exam. Note: that Print button is available in SMath Viewer, so the result can be sent to print out in seconds! Any ideas? Good


I can imagine "libraries" of templates and post-processing functions... this open a view in the direction of the skills of programs like powersim (used at university some years ago), I like this plugin very much Clapping

Hope this will encourage more users and developers to play with SMath (and not just to play Wink)
If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
Offline uni  
#11 Posted : 14 February 2014 12:22:31(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 961
Man
Russian Federation

Was thanked: 876 time(s) in 492 post(s)
Hint for the last example (rus): Каждый охотник желает знать, где сидит фазан.
Russia ☭ forever
Viacheslav N. Mezentsev
💰 Support me for plugins development: https://money.yandex.ru/to/410013245578758/100
Offline Andrey Ivashov  
#12 Posted : 15 February 2014 02:17:44(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,383
Man
Russian Federation

Was thanked: 1620 time(s) in 543 post(s)
Thank you for all the comments!

For those who wants to see an example of enhanced controlling of the Modeller's region I've created the following file: http://smath.info/?file=742103. Warning: this file is not a simple one. A way to operate with this region will be simplified in future, so some complexities is absolutely expected for now.

Best regards, Andrey Ivashov.
thanks 3 users thanked Andrey Ivashov for this useful post.
on 15/02/2014(UTC),  on 15/02/2014(UTC),  on 15/02/2014(UTC)
Offline Davide Carpi  
#13 Posted : 18 February 2014 03:22:09(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 1121 time(s) in 732 post(s)
Hi Andrey,

debugging my Table Region plugin I've incidentally encountered a (small) bug in the GetPossibleItemsLists(Store store) function (used in the Modeller and even in other plugins, such as combobox region etc...)

If there are many variables on the canvas with the same name but different types (where a type is what fit and what don't fit the criteria inside GetPossibleItemsLists), and one variable does the job but is not the last, you have a false positive, because obviously in the end GetDefinitionByName returns the last value assigned to the variable.

(BTW here is not critical, but could be useful for someone)




Best regards,

Davide

Edited by user 18 February 2014 20:45:49(UTC)  | Reason: Not specified

If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
Offline mkraska  
#14 Posted : 18 April 2014 13:56:28(UTC)
mkraska


Rank: Advanced Member

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

Was thanked: 823 time(s) in 523 post(s)
Why is the template ellipse distorted?

Edit: Sorry, I attached an outdated version of the file. There nothing is distorted. But when removing all except the two first elements of the template, then the distortion happens without any obvious reason.

The rectangle in post #1 has no added arguments as well and is not distorted. What is wrong with my example?

Edited by user 18 April 2014 19:32:05(UTC)  | Reason: Not specified

File Attachment(s):
modeller-demo-Kr.sm (7kb) downloaded 74 time(s).
mkraska attached the following image(s):
elli.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://en.smath.info/wi...th%20with%20Plugins.ashx
Offline Andrey Ivashov  
#15 Posted : 14 November 2014 01:04:15(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,383
Man
Russian Federation

Was thanked: 1620 time(s) in 543 post(s)
Just for the info: I've just recorder a small demo: http://smath.info/file/yLAXA - it shows how to start using Modeller in few steps.
thanks 2 users thanked Andrey Ivashov for this useful post.
on 14/11/2014(UTC),  on 14/11/2014(UTC)
Offline mkraska  
#16 Posted : 14 November 2014 01:24:31(UTC)
mkraska


Rank: Advanced Member

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

Was thanked: 823 time(s) in 523 post(s)
Can you please pass some info on how to place text in the region?
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://en.smath.info/wi...th%20with%20Plugins.ashx
Offline RFreund  
#17 Posted : 23 January 2015 05:28:10(UTC)
RFreund


Rank: Advanced Member

Groups: Registered
Joined: 25/09/2013(UTC)
Posts: 296
United States
Location: IL

Was thanked: 18 time(s) in 16 post(s)
How did / do you incorporate units?
Offline 9_82abZ2  
#18 Posted : 14 September 2015 22:56:00(UTC)
9_82abZ2

Rank: Newbie

Groups: Registered
Joined: 14/09/2015(UTC)
Posts: 7

mkraska,

It looks like Modeller Region Can support text (Modeller Region: ver 1.0.5346.33851), just copy and paste what I have below and include it in your template:

texty:mat("Text",mat("TESTR","Green",100,1,3),1,mat(20,40,2,1),mat(10,40,2,1),0,1,1,7)

I don't think you can font or style though...

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
In addition; I found a fatal bug; if I were to enter this into the modeller Region:
texty:mat(1,3,"Test","Green",2,4,5,1,7)

SMath will crash. My guess would be that the code is trying to perform math operations on a string; I would investigate incompatible types but I don't know the code so I'm just taking a shot in the dark at what the problem may be.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Edited by user 14 September 2015 23:52:10(UTC)  | Reason: Not specified

9_82abZ2 attached the following image(s):
Modeller Text Crash.png
Offline Davide Carpi  
#19 Posted : 16 September 2015 00:31:39(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 1121 time(s) in 732 post(s)
Originally Posted by: 9_82abZ2 Go to Quoted Post
just copy and paste what I have below and include it in your template:

texty:mat("Text",mat("TESTR","Green",100,1,3),1,mat(20,40,2,1),mat(10,40,2,1),0,1,1,7)

Nice, it works Clap

Originally Posted by: 9_82abZ2 Go to Quoted Post
SMath will crash. My guess would be that the code is trying to perform math operations on a string


I think is related with SS-132 (wrong templates)


If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
Offline Alex M.  
#20 Posted : 08 March 2016 08:06:47(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 402
Canada

Was thanked: 119 time(s) in 92 post(s)
Andrey,

I know it has been quiet here for a while, but there is little something something I could use modeller for - strut & tie modelling:
http://best.umd.edu/publications/stm.pdf
or in plain words, conceptually separating a chunk of concrete into compression elements (struts) and tension steel rebar elements (ties) in a way that will create a valid load path from the point load to the support or reaction.

The thing with strut & tie is that it is very graphical solution; if you can draw it, it will work.

I was hoping to use modeller to draw a set of interconnected lines. Once drawn, the lines (start & end coordinates) can be extracted to SMath for further processing.

201501121015359155.jpg

Modeller would be a perfect environment for this, except in it current form it cannot draw inclined lines, or lines that will "snap" to the existing node.

Andrey, do you anticipate any further work on this plugin?

Right now I am "drawing" in EXCEL and heck it is not right way of doing this.



Thanks st.sm (100kb) downloaded 122 time(s). st.xlsx (18kb) downloaded 78 time(s).
Users browsing this topic
4 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.