Hatch and Fill snippets - Functions for decorating area between two functions in 2d plots - Messages
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
WroteWell, 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.
Wrote[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.

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 (44 KiB) downloaded 114 time(s).
FillRnd_0.97_matrix.sm (44 KiB) downloaded 102 time(s).
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
nope, it doesn't works for me too...
WroteHello 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.
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 (24 KiB) downloaded 113 time(s).
WroteIn regards to hatch and fill - do we have a Smath code that can hatch a closed polygon?
this might help?
WroteIn 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
File not found.File not found.
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 (52 KiB) downloaded 99 time(s).
WroteIn 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 (6 KiB) downloaded 138 time(s).
-
New Posts
-
No New Posts