Line intersections

Line intersections - An example of translation of a function from Matlab to Smath - Сообщения

#1 Опубликовано: 05.12.2017 14:02:05
MBe

MBe

2 сообщений из 21 понравились пользователям.

Группа: User

Just an exercise on Smath to test functionalities and capabilities.
Try the attached file and play with it.

Thanks
Marco
InterX.sm (85 КиБ) скачан 168 раз(а).
1 пользователям понравился этот пост
Jean Giraud 18.02.2018 22:46:00
#2 Опубликовано: 05.12.2017 19:15:42
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Thanks Marco, works fine 6179,
Great piece of work !
#3 Опубликовано: 06.12.2017 05:59:02
NDTM Amarasekera

NDTM Amarasekera

130 сообщений из 352 понравились пользователям.

Группа: User

Hi,
I get this error in SS 6528 (latest), and runs indefinitely?

InterX.jpg
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#4 Опубликовано: 06.12.2017 06:21:31
MBe

MBe

2 сообщений из 21 понравились пользователям.

Группа: User

Hello ndtma,

L1 is defined just near tt. You may try to move the tt definition a bit below in the page, to be sure that L1 definition comes first.
Regarding indefinite running, please be advised that due to the more complicate example that comes below in the sheet, the full worksheet takes 6,5 minutes on a pretty good hardware. Other hardwares may require more time, that could seem an indefinite time...
Try deleting the more complicate example, leaving only the simple one.
It should run in less than 1 minute.

Thanks
Marco
#5 Опубликовано: 06.12.2017 06:50:40
sergio

sergio

115 сообщений из 329 понравились пользователям.

Группа: User

Ndtma,

maybe that's why:

Some plugins are required and in particular:
- Matlab C++ Math Library

Attention: to my knowledge,this plugin only works with 32 bit version of Smath.
I am using 0.98 build 6484 dated 02 Oct 2017.

sergio
#6 Опубликовано: 06.12.2017 07:37:54
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

the full worksheet takes 6,5 minutes on a pretty good hardware



... ~ 21 min on my laptop [1.66 GHz]

#7 Опубликовано: 06.12.2017 10:05:24
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Marco,

Just a detail: often we have to optimize project based on piecewise timing.
Smath accesses Microsoft internal timer, like this [attached].
Expect ~ 45 sec on your machine ... on mine => 1.6 min

Jean

Contour Butterfly.sm (14 КиБ) скачан 76 раз(а).
#8 Опубликовано: 06.12.2017 10:31:03
MBe

MBe

2 сообщений из 21 понравились пользователям.

Группа: User

Jean,

this is a fantastic feature I was not aware of!
I still have to look into the details but I think it is something like an animated GIF.
I'll go deeper in your worksheet later on to discover details.
Thanks for this hint!

Marco
#9 Опубликовано: 06.12.2017 12:46:09
MBe

MBe

2 сообщений из 21 понравились пользователям.

Группа: User

Jean,

looking at your last post I have learnt a lot of things:

1) I didn't know that plots could be animated. This was a very nice example on this feature.

2) I didn't realize that placeholders can contain any kind of object. This means that definitions can be placed in a vector/matrix and treated as data. So instructions and data are on the same level (lisp docet!).
This opens the door to any kind of "black magic" like the simple example here attached.

3) Ahh..by the way I also understood about timing of code chunks...:d

For all the above... thx!

Marco

BlackMagic.sm (7 КиБ) скачан 74 раз(а).
#10 Опубликовано: 06.12.2017 12:48:50
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

Jean,

this is a fantastic feature I was not aware of!
I still have to look into the details but I think it is something like an animated GIF.
I'll go deeper in your worksheet later on to discover details.
Thanks for this hint!

Marco



Few more typical animations. The Grand Champion Animate is Collab BER7.
He takes my dead cat and up dancing, isn't nice !
Once all the FRAMES are done, you set the FRAMES rate and save as *.GIF
You can pass to any Windows user and animation survives [a Windows feature].

Jean

0Anim Brownian.sm (9 КиБ) скачан 64 раз(а).
0Anim Cheval.sm (21 КиБ) скачан 62 раз(а).
0Anim Gozilla.sm (11 КиБ) скачан 61 раз(а).
Rotate Eol.sm (28 КиБ) скачан 61 раз(а).


1 пользователям понравился этот пост
Fridel Selitsky 07.12.2017 06:46:00
#11 Опубликовано: 07.12.2017 14:50:54
Fridel Selitsky

Fridel Selitsky

520 сообщений из 451 понравились пользователям.

Группа: User

If we add the third coordinate to the worksheet of Jean, we get a 3d animation.

3d Anim Brownian.sm (17 КиБ) скачан 61 раз(а).
1 пользователям понравился этот пост
frapuano 07.12.2017 14:58:00
#12 Опубликовано: 07.12.2017 16:06:14
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Hello Marco,

On that one, for every calculated Ω, click on image, "Reset to original size"

Pattern Brownian Collect Image.sm (25 КиБ) скачан 60 раз(а).
#13 Опубликовано: 08.12.2017 12:52:51
MBe

MBe

2 сообщений из 21 понравились пользователям.

Группа: User

Still on line intersections.
Bug corrected: only lines with same number of points were accepted.
Now lines with different # of points will work.
Also some improvements in efficiency so that runtime is now
approx. -25%.

InterX.r1.sm (45 КиБ) скачан 67 раз(а).
#14 Опубликовано: 08.12.2017 15:45:19
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

Still on line intersections.



Some notes about "Vector partnership"

You mentioned Scilab [what a piece of software !!!], can't manage, removed from my box.
3D colors from whatever source is not available in Smath. Maxima as suggested by Martin,
complains ... useless. For your interest, Scilab should render the famous "Breather".
Attached as well.

Maths InterseX.r1.sm (65 КиБ) скачан 65 раз(а).

Breather for UNI.sm (308 КиБ) скачан 62 раз(а).
Rotate Breather [4 Orientations].sm (1000 КиБ) скачан 66 раз(а).

#15 Опубликовано: 08.12.2017 19:37:56
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

Wrote

Maxima as suggested by Martin,
complains ... useless.



Did I miss the bug report?

2017-12-08 22_51_18-SMath Studio - [Rotate1.sm].png
Rotate1.sm (296 КиБ) скачан 70 раз(а).



Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 пользователям понравился этот пост
frapuano 18.05.2020 14:27:00
#16 Опубликовано: 09.12.2017 09:02:25
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

Did I miss the bug report?


On starting Smath session, some dependencies aren't accessed.

Maxima3D.PNG
#17 Опубликовано: 09.12.2017 10:08:34
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

On starting Smath session, some dependencies aren't accessed.



Starting Smath, always get that error message, close, up running fine.
As it looks, only the Maxima X_Y. 3D surface and those from menu work.
NONE of "draw 2D, 3D, implicit, explicit as you suggest ..." work.

Thanks Martin for being there in Smath Community.

Maxima Plugin.PNG

#18 Опубликовано: 09.12.2017 12:04:09
MBe

MBe

2 сообщений из 21 понравились пользователям.

Группа: User

Jean,

I tried to render the Breather in Scilab.
The code is as small as this:
Breather.PNG

and it runs as fast as this, considering that U and V are given with 100 points each:

Timing.PNG
and this is the result:
Fig1.PNG
from this side seems ok, but moving it a little bit it appears like this:
Fig2.PNG

I am not sure if this is the expected result, but however I spent only 15 min on it up to now.
I'll check better if I messed something.

Thanks
Marco
#19 Опубликовано: 09.12.2017 12:27:18
MBe

MBe

2 сообщений из 21 понравились пользователям.

Группа: User

Ok, using limits shown by Martin [(0, pi/2); (0, 2pi)]
I got something more similar to his result:

BreatherPart.PNG

I'll work to see how to get the level curves.

Being Scilab an open source program, any chance that somebody could develop
a dedicated plugin?:d

Maybe this is more a subject for the "Feature Request" Forum...

Marco
#20 Опубликовано: 09.12.2017 19:06:20
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

Wrote

Wrote

On starting Smath session, some dependencies aren't accessed.



Starting Smath, always get that error message, close, up running fine.
As it looks, only the Maxima X_Y. 3D surface and those from menu work.
NONE of "draw 2D, 3D, implicit, explicit as you suggest ..." work.



Are you using the current stable or development version of SMath?
Older versions won't work with the current plugin, as there were significant changes in the API.

If you follow the link in my signature you find instructions how to install a portable distribution with Maxima. The benefit of having a portable installation is that it won't interfere with an installed version of SMath and can be tested separately. So you don't need to spoil your familiar working environment.

If maxima still won't work, then please report the system information as obtained with Insert> Development tools> System Information.

Thanks for your help.



Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений