SMath Studio Forum
»
SMath Studio
»
Questions
»
Plotting a vector with arrow head as a function?
Rank: Newbie
Groups: Registered
Joined: 24/03/2018(UTC) Posts: 3 Location: Germany
|
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 (12kb) downloaded 27 time(s).Edited by user 24 March 2018 18:40:07(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,647 Location: Italy Was thanked: 1329 time(s) in 875 post(s)
|
Hello Ralf, welcome in the community Simply put a function name on the LHS (left hand side) of the assignment operator arrow1 (r1).sm (13kb) downloaded 48 time(s).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. Edited by user 08 April 2018 13:54:05(UTC)
| Reason: marked as SOLVED |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: rana I 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 (28kb) downloaded 55 time(s).
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
Plotting a vector with arrow head as a function?
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.