1 страниц (3 вхождений)
Plotting a vector with arrow head as a function? - Arrow with head as a polygon, rotated moved - Сообщения
#1 Опубликовано: 24.03.2018 12:36:32
Dear experts,
Sorry if this question is stupid, but I am new to SMATH.
In order to plot some simple vector diagrams (using the SMATH built in diagram) I did the following.
I want to plot the vector from a given start point with given length and angle.
So for the arrow I created a polygon, rotaded and moved it. This works quite well. I als can put the formulars into the plotting input area.

But it would be nicer to define a function e.g. Arrow(start_x; start_y; length; angle).
Is this possible? What would be the syntax?
Is there maybe a smarter way of doing this?
Thanks in advance!
Ralf
arrow1.sm (11 КиБ) скачан 73 раз(а).
Sorry if this question is stupid, but I am new to SMATH.
In order to plot some simple vector diagrams (using the SMATH built in diagram) I did the following.
I want to plot the vector from a given start point with given length and angle.
So for the arrow I created a polygon, rotaded and moved it. This works quite well. I als can put the formulars into the plotting input area.
But it would be nicer to define a function e.g. Arrow(start_x; start_y; length; angle).
Is this possible? What would be the syntax?
Is there maybe a smarter way of doing this?
Thanks in advance!
Ralf
arrow1.sm (11 КиБ) скачан 73 раз(а).
#2 Опубликовано: 24.03.2018 13:02:49
Hello Ralf,
welcome in the community
Simply put a function name on the LHS (left hand side) of the assignment operator
![2018-03-24 16_56_50-SMath Studio - [arrow1.sm_].png](/ru-RU/file/MgCoWa/2018-03-24-16_56_50-SMath-Studio---_arrow1_sm___png)
arrow1 (r1).sm (12 КиБ) скачан 88 раз(а).
Once you have done it if you want to rename a variable inside the function you can do it at once using the F8 key when the text cursor is inside the variable you want to rename.
welcome in the community

Simply put a function name on the LHS (left hand side) of the assignment operator
arrow1 (r1).sm (12 КиБ) скачан 88 раз(а).
Once you have done it if you want to rename a variable inside the function you can do it at once using the F8 key when the text cursor is inside the variable you want to rename.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
frapuano 24.03.2018 16:02:00
#3 Опубликовано: 24.03.2018 17:30:48
WroteI want to plot the vector from a given start point with given length and angle.
Gorgeous application of the 2D rotation matrix.
Few more in there.
Jean
Circle_rkfixed Arrow.sm (27 КиБ) скачан 105 раз(а).
1 страниц (3 вхождений)
-
Новые сообщения
-
Нет новых сообщений