## 822 Reputation

11 years, 82 days

## MaplePrimes Activity

### These are replies submitted by Ronan

@Ramakrishnan Hello,

The workbook didn't upload. Can you try again please. If it doesn't upload could you describe the solution if there is one.

Ronan.

## Action Reaction. T1 and T2 Balance each ...

Assuming there is no friction. Say the weight is on a pulley. As the pulley is not rotating the forces/torques on the pulley balance.

Each point in the rope is static, i.e is a state of equilibrium. So so the forces balance producing no net motion  So as T1 and T2 act is opposite directions at any given point in the rope they are equal and opposite. T1+T2=0 T2= -T1.  The tension in the rope is just T1. Rope does not break.

This can be hard to see if you are not used to thinking about it. As simpler example would be a vertical rope attached to the ceiling with a weight hang from it. Say 100N. So there is a reaction force of 100N in the opposite direction at the ceiling. You would not sum the the force and reaction force to get 200N tension in the rope. But as the reaction force negative to the applied force each point in the string experiences both forces which sum to zero.  So each point is static.

Hope that helps explain.

## \$include now working.. some additional q...

@John Fredsted Thank you. I got \$include to work. Just had to be specific on the folder to look in.

```TestjEdit:=module()
option package;
export Testr1;
\$include "C:/Users/Ronan/Documents/jEdit/Testr1.mpl"
end module;```

Regerding question 1. Can jEdit be made to automatically indent the code.? That is what I would like or is this all manual?

Regarding 2 read is displaying a procedure ok with or without the ; How do I get it to display the contents of a module?

```read "C:\\Users\\Ronan\\Documents\\jEdit\\TestjEdit.mpl";
TestjEdit :=module(0 ... end module```

which is not informative.

Q3...as I suspected

## Oh...Not insisting on .mla...

@acer I hadn't meant to insist on reading in a .mla. I presume you are refering to my last nights reply "What for the syntax...".

I was posting that before I saw your reply. Rest assured you answer here has dissuaded me from that route. I made the mistake of trying to write a .mpl file to the library archive a few days ago.

As an aside. It is such a pity the search on Primes is so limited. In a couple of years you answers will be burried and almost impossible to find.

## A precision explination...

@acer  Thank you. Your explinations are very well thought out.

Methord 1 is simple though inefficient as you say. I at least I got it to work easily last night.

I gather when you say a plain text file you mean the file was created in a code editor (Emacs, notepad or someother). I thing I understand you reasoning here. So you would not recomend creating a procedure in Worksheet 1 and saving that out as a .mlp then reading or using \$include to get the .mlp into the module because that creates 2 files. I haven't used code editors. Don't have a programming background so my think is probably different to a programmers. Hence my unusual approach, aka lack of knowledge.

Method 2. Yes, I see the neatness. I had tried \$include before but couldn't get it to work inside Maple. Programming guide says use command line to run it.

I downloaded the Codebuilder package at the weekend. Still failed to get \$include to work.  Are you familiar with this package? i posted this question at the weekend https://www.mapleprimes.com/questions/222558-How-Do-I-Use-The-CodeBuilder-Package

I see this would still create 2 files i.e. the CodeBuilder worksheet and the exported .mlp file. But it may get me used to the idea of a code editor and still be insidde Maple, so can test on the fly.

Conclusion I need to learn a simple code editor. Which would you recomend?

## What for the syntax to read a file into ...

@phil2 Ok. Thank you.  I know how to basicially make a package. Hadn't used savelib before though. With your nice example as there are 2 exports f and g, lets keep f as it is (for reference).  Now can you prior to makeing M save g as a proc or module then read/load it into M. Then savelib ('M', lib) , restart, with(M) , f(x) will still work fine but will g work. I have been unable to get g(x) to work. This is the problem I have been having.

## with(...) is causing the problem...

@Mac Dude  Ok, I duplicated what you did and that worked as you showed. I then restarted and loaded package with(Rtestm).  Then the Rtest would not work as shown. Any idea why? At least the problem is narrowed down somewhat.

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

 (9)

 (10)

 (11)

 (12)

## Slowly progressing...

I do have the programming manual. Finding it hard to follow. Getting too mixed up on things here. Thanks for clarifying " ... " for flile names.

\ and / is right quagmire here. Maple gives folder names as follows in windows.

currentdir();
"C:\Users\Ronan\Documents\MAPLE\Rational_Trinonometry"

libname;
"C:\Program Files\Maple 2017\lib",
"C:\Users\Ronan\maple\toolbox\personal\lib"
To enter a command such as read, have to use / else get an error.

I follow what you did in the example module "RatTrig". Now as you have saved "Antisym" as a file previously. Instead of copying the code into the module can you read that file into the module? The programming guide mentions "\$include" to do this but I cant get it to work. Ch 11.4 pages 393-396.

At present I don't see the use/advantage of a code editor. Downloaded Vim last year but just didn't know what to do with it.

## Not quite getting it yet....

This document shows the problem when I read a procedure into a package.

As na aside having a problem with the "." for the file extension. Maple keeps treating it as matrix multiplication.

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

 (9)

 (10)

 (11)

## That solves one problem....

@nm  Ok what does the \\do? It works for reading in the .mpl.

I have now tried this with a couple of other procedures that worked but reading them in, then they don't work. Any ideas on that?

Will get back to it tomorrow night.

## More a suggestion...

@Markiyan Hirnyk Hi. I predomately use a CAD system. Maple is my home hobby to learn more maths out of interest. It would take many months of wor for me to write such code. Here is a link to such an add on package for solidworks. http://www.robotworks-eu.com/apps/cutting.htm

I was following a blog earlier this year on the Dzhanibekov Effect where some of the paths traced out can be described by the intersection of a sphere with an ellipse apparently best parameterised by Eulers equation of motion. http://arkadiusz-jadczyk.eu/blog/2017/02/hardest-concept-grasp-physics/

I have also seen an application of Stewart Gough platforms been used for 5 axes machining.

Here is a post a placed a couple of months ago here for the reverse kinematics of such a platform.  http://www.mapleprimes.com/posts/208301-Stewart-Gough-Reverse-Kinematics

## One Possibility...

@Markiyan Hirnyk  How about the orientation of the end effector of a robot welding or cutting something. And, art for art's sake.

## Home User Licence...

Hello

Maple also do a home user licence. In the UK it is about £180.

## Euler rotation matrix...

Basicially you have an Euler rotation matrix. You decide the  the angles of rotation along with the x,y,z displacements. Then the equations calculate the positions of the platform corners in terms of the Global X,Y,Z.

## Try This...

Stewart_Gough_6-6_Leg_Equations.pdf

This paper will show you how to setup the equations.  Looks like you are calculating the leg length. I.e. the reverse kinematics. Describe you displacements in x,y,z and alpha,beta, gamma. Let me know how you get on with it.