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

Notification

Icon
Error

2 Pages<12
Options
Go to last post Go to first unread
Offline Jean Giraud  
#21 Posted : 07 June 2016 18:41:34(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,589
Canada

Was thanked: 778 time(s) in 618 post(s)
Thanks Alvaro.

I love this one variable in the XY directions.
I didn't understand your "lele" function [does not work in Smath 5346].
I think it's not posible to hatch a closed shape unless in two parts like some circle definitions.
You can rescue like in the example filling random the partially filled reservoir [posted few days ago].

Jean
Offline Davide Carpi  
#22 Posted : 07 June 2016 18:49:32(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 1142 time(s) in 747 post(s)
Originally Posted by: Razonar Go to Quoted Post
Well, works fine in last nightly build, but you're right, in others don't. I try to modify, but have a lot of issues. For instance, attached seems to work in last portable version, but can take a very long time for fill(phi(2), ...) , I suspect for some problem with the lele function

Nice work. lele from CustomFunctions is just a wrapper for booleans, nothing special behind. The problem probably is simply that you are using chained assignments inside matrices, that is an official feature only since one of the 0.98 relases, previously you have to reverse the order of the assignments inside the matrices or use a line.

Edited by user 07 June 2016 18:52:18(UTC)  | Reason: Not specified

If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
Online Razonar  
#23 Posted : 08 June 2016 05:00:19(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 465
Uruguay

Was thanked: 264 time(s) in 164 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
[lele from CustomFunctions is just a wrapper for booleans, nothing special behind. The problem probably is simply that you are using chained assignments inside matrices, that is an official feature only since one of the 0.98 relases, previously you have to reverse the order of the assignments inside the matrices or use a line.


Hi Davide. The problem with lele whas related about the parenthesis, not the funciton by itself: sm file saved with the newest nightly version is opened with some troubles in portable version, based in an older version. Also ask to actuallize "math regions plugins", but, obviously the list of plugins is empty. So, probably was not a CustomFunction back compatibility issue, but maybe a SMath one, related with something new in "math region".

What was frustating to me was my inhability to calculate Dy inside the loop, with something like D := max(stack(Dy,abs(F[k-G[k))) (or with Max and withou stack), because times of those arranges (if don't report errors) are up of 3 minutes.

In others attemps, with matrix predimentionation (including R as Nx*Ny by 5, and taking submatrix at the end, from 1 to N-1) taking also times ridicoulous. And offuscate the code, because need to take a new line for each matrix, or prolongate too much to the left the function, just because can use predefined values to the left in matrices (i.e. X = matrix, then F = X, G = X, etc.)

Best regards.

Alvaro.
Offline Davide Carpi  
#24 Posted : 08 June 2016 10:23:10(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 1142 time(s) in 747 post(s)
Hi Alvaro, Good

I guess you are right about parenthesis; I see a problem in φ(x,y) and h(x,y), that are completely messed up (also for these function you cannot copy/paste the whole RHS content from newer to older).

SMath is back compatible, in the sense that in general you can open & run correctly stuff made with older program versions, but the opposite is not guarantee (you can open the worksheet, but it may doesn't run properly; this approach was enforced with the time. In fact since 0.97.5737 when you try to open the worksheet you are warned three times, a first form warn you that the worksheet was made with a newer program version, and the extensions manager is prompted to ask you to update the libraries, but as for now core libraries are not available for such task -> a third form reports that non all the dependancies are resolved; I guess that after this you may expect that something shouldn't run as designed).

I think that as for now (meaning: up to there isn't a way to update the core libraries) if you want to provide something that may works for a wide range of versions, you have to build it with an older program version.

Attached your worksheet "downgraded" to 0.97;
notice that the version that uses line is cross compatible (0.97/0.98) but is much slower even in latest versions (in SMath 0.98, line version runs in 28-30" against 6-7" of your based on matrices), while the version that uses matrices can't be executed correctly in 0.98.

FillRnd_0.97+0.98_line.sm (45kb) downloaded 44 time(s).
FillRnd_0.97_matrix.sm (45kb) downloaded 42 time(s).

Edited by user 08 June 2016 12:01:16(UTC)  | Reason: made confusion with files/SS version, "matrix" file updated

If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
Offline Jean Giraud  
#25 Posted : 08 June 2016 18:25:30(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,589
Canada

Was thanked: 778 time(s) in 618 post(s)
Davide, Alvaro,

I noticed your double integral; the way you write it in the version you are using,
is it supposed to produce result ? example: f(x,y):=e^x *(0.5-y^3)

Jean
Offline Davide Carpi  
#26 Posted : 08 June 2016 19:23:38(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 1142 time(s) in 747 post(s)
Hello Jean,

nope, it doesn't works for me too...
If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
Online Razonar  
#27 Posted : 08 June 2016 20:49:23(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 465
Uruguay

Was thanked: 264 time(s) in 164 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
Hello Jean,

nope, it doesn't works for me too...


Hi. It's just a remember to further use rows (and maybe not only the number) for montecarlo estimating the area. It's not expected to work, even it was desiderable.

Best regards.

Alvaro.
Offline Jean Giraud  
#28 Posted : 09 June 2016 03:12:25(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,589
Canada

Was thanked: 778 time(s) in 618 post(s)
Hello: Alvaro, Davide

My understanding of what you are trying to do is only
slightly pregnant. Here an attempt to double integral.

Jean

Maths Double Triple Integal.sm (25kb) downloaded 42 time(s).
Offline Alex M.  
#29 Posted : 28 March 2017 20:06:57(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)
In regards to hatch and fill - do we have a Smath code that can hatch a closed polygon?
Offline Davide Carpi  
#30 Posted : 28 March 2017 21:47:17(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 1142 time(s) in 747 post(s)
Originally Posted by: Alex M. Go to Quoted Post
In regards to hatch and fill - do we have a Smath code that can hatch a closed polygon?


this might help?
If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
Offline Jean Giraud  
#31 Posted : 29 March 2017 14:59:12(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,589
Canada

Was thanked: 778 time(s) in 618 post(s)
Hello Alex,

Originally Posted by: Alex M. Go to Quoted Post
In regards to hatch and fill - do we have a Smath code that can hatch a closed polygon?


We don't have it yet for the closed polygon.
We can fill "Stem style" and "Radial stem" [pie chart RemToDo].
If you have a polygon from foreign image: you must first digitize
to get a set of coordinates then fill "Stem style". If your polygon
depends upon some line junction: just a matter of discretizing
within the conditional junctions and plot "Stem style".

Jean

2D Fill Stem.sm (13kb) downloaded 32 time(s). 2D Plot Stem Radial Lissajousl.sm (33kb) downloaded 28 time(s).

Offline Jean Giraud  
#32 Posted : 29 March 2017 15:19:49(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,589
Canada

Was thanked: 778 time(s) in 618 post(s)
... experiment this simple digitizer.
You must first capture the image, save BMP in your system
then read back ... done ... next fill "Stem style".
That will do for your polygon from "Autocad created image".

Jean

Digitize.sm (53kb) downloaded 30 time(s).
Offline mkraska  
#33 Posted : 29 March 2017 15:58:50(UTC)
mkraska


Rank: Advanced Member

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

Was thanked: 853 time(s) in 542 post(s)
Originally Posted by: Alex M. Go to Quoted Post
In regards to hatch and fill - do we have a Smath code that can hatch a closed polygon?


Try the gpc wrapper plugin by davide

GPC.sm (7kb) downloaded 50 time(s).

2017-03-29 14_54_45-SMath Studio 0.98.6179 - [Blatt1_].png
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://en.smath.info/wi...th%20with%20Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 12/04/2017(UTC)
Users browsing this topic
2 Pages<12
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.