## 827 Reputation

11 years, 199 days

## Reason for not doing it this way...

@Kitonum  Hi, I was looking for a way not to directly place the transformation formulas inside the plot function. This is what post question was about.

## Good, Progress! but points?...

@vv Thank you. Wouldn't have thought of that. Any idea whay that works. Now it won't work for a point. Any Idea on that?

ff := unapply(display(point([d[1][1], d[1][2], d[1][3]], colour = red, symbolsize = 50, symbol = solidsphere)), t)

Error, (in plottools:-point) incorrect arguments for creating points structure, try providing the dimension option

## Change of direction i.e. I need to appro...

@tomleslie  Very interesting, At this point animating an STL might be a bit ambisious for me. Can't get Maple to read my STL. I made a simple model. It is so long since I did an animation can't get anything working. Slmple one, line([0,0,0],[sin(t),0,0]) say t=0..3. Obiviously the line length should cannge with time.  Bisicially I want to rotate the model. I can apply a rotation matrix. I  am just not quite getting what to do.

 (1)

 (2)

 (3)

## Understand you now....

@Preben Alsholm  Firstly the 1st part was my copy and past carelessness. So Theta(t) is the displacement say 0.5rads. So solve

the for t. Took a while to understand. Like the animation.

## Thank you...

@Preben Alsholm Most informative.

## Works, andif?...

@Preben Alsholm  Thank you that worked well. If I solved it without using initial conditions. Then slove for the 1st constant. then differentiate I am also having trouble solving for  he second constant  even using  D(Theta)(0) = Vmax or  D(Theta)(0) := Vmax. I am asking this too not to be diffiicult but I am exploring/learning different approaches.

## Got it working a follows...

@Carl Love  Thank you. This is my intrepretation of you advice. It works well.

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

 (9)

 (10)

 (11)

 (12)

 (13)

 (14)

 (15)

 (16)

## I Failed you...

@Markiyan Hirnyk I ran it for 15hrs. Still no answer. CPU was maxed most of the time. Had to kill the process. Yes I meant "solvable".

Regards

Ronan

## Is it Solubable?...

I have your worksheet running as you posted it. 4+ hours now. CPU is hitting 100% on 2.9GHz 1st gen I7. Total memory usage on computer 4.75Gig. Maple memory 833.93M.  Pyhsical memory of computer 12Gig.

## Programming manual...

@Mac Dude Ok. Have downloaded it. Will work on it over the next week. Sure I'll have a few questions.

## Some understanding but questions...

```restart;

MyTypes := {algebraic, ''[algebraic\$_], 'Vector(_, algebraic)'''\$_ = 2 .. 3};

MyProc := proc (Q1::(depends(And(MyType, satisfies(proc (Q1) options operator, arrow; andmap(proc (T) options operator, arrow; Q1::T implies Q2::T and Q3::T end proc, MyTypes) end proc)))), Q2, Q3) if Q1::algebraic then print('algebraic*inputs') elif Q1::[algebraic\$2] then print('List*inputs', 2, 'elements') elif Q1::[algebraic\$3] then print('List*inputs', 3, 'elements') elif Q1::'Vector(2, algebraic)' then print('vector', 2) else Q1::'Vector(3, algebraic)'; print('vector', 3) end if end proc;
MyProc(sqrt(1-2*x), 2*x, 3);
algebraic inputs
MyProc([1, x], [2, 3], [1, sqrt(1-2*x)]);
List inputs, 2, elements
MyProc([1, x, 1], [2, 3, 2], [1, sqrt(1-2*x), 2]);
List inputs, 3, elements
MyProc(`<,>`(1, 1), `<,>`(2, 3), `<,>`(1, 2));
vector, 2
MyProc(`<,>`(1, 2), `<,>`(2, 3), `<,>`(1, 2));
proc(n, f, t)  ...  end;, 2
MyProc(`<,>`(1, 2, 3), `<,>`(2, 3, 6), `<,>`(1, -5, 2));
proc(n, f, t)  ...  end;, 3
MyProc(`<,>`(1, x, 1), `<,>`(2, 3, 3), `<,>`(1, 2, 7));
proc(n, f, t)  ...  end;, 3
MyProc(sqrt(1-2*x), 2, [3, 1]);
Error, invalid input: MyProc expects its 1st argument, Q1, to be of type And(MyType, satisfies(proc (Q1) options operator, arrow; andmap(proc (T) options operator, arrow; Q1::T implies Q2::T and Q3::T end proc, MyTypes) end proc)), but received (1-2*x)^(1/2)
MyProc([1, `<,>`(2)], [sqrt(1-2*x), 3], [1, 2]);
Error, invalid input: MyProc expects its 1st argument, Q1, to be of type And(MyType, satisfies(proc (Q1) options operator, arrow; andmap(proc (T) options operator, arrow; Q1::T implies Q2::T and Q3::T end proc, MyTypes) end proc)), but received [1, Vector(1, {(1) = 2})]

```

@Carl Love I have made some progress with understanding this. I can see how it works. It does seem to have a problem with Vectors. Get this as an output.

proc(n, f, t)  ...  end;, 2
Sometimes it works with  vectors.

I want to put this set of "types" into Packege. Obiviously the most efficient thing is the types get defined globally at the start of the package and then can be used as needed in individual procedures in the package. I tried placing part of your 1st answer into the package.

uses TT= TypeTools;
global _T1, _T2L, _T2V, _T3L, _T3V, _MyType;
local
MyTypes:= {_T1, _T2L, _T2V, _T3L, _T3V},
AllMyTypes:= MyTypes union {_MyType},

local
g, #iterator over module globals
e
;
#op([2,6], ...) of a module is its globals.
for g in op([2,6], thismodule) do
e:= eval(g);
if g <> e and e in AllMyTypes then
error "The name %1 must be globally available.", g
end if
end do;
end proc,

That didn't work. I don't know how much of it I need. Do I need to use all of the module on procedures that check input types

You 1st answer works fine with the tested inputs on the vectors. I found if I only enter 2 parameters it crashes Maple, looses kernel connection.

This leads to another question. Can a procedure have a variable number of imputs? Outside of putting them in a list first. An axample here would be angle formed be 3 points or 2 vectors or 2 lines.

Could an input be allowed to be Null? Or C takes on a default value is not entered.

Just to note here. Only some of the procedures in the package need to test the input parameters and usually not all types would need to be tested.

## Nice Look but experiencing fustrations...

Good basic overhaul on the look for the forum. Others have suggested improvements on this so don't need to recover that ground.

Have been experiencing some problems.

Some times when I hit return I loose my reply or it jumps to the end of the discussion i.e off the reply window. I am having problems posting a worksheet, nothing happens. The insert contents button seems frozen. How do you insret code (like the way Car Love and others do)? I tried copy and paste but it looked a mess.

## Simple and Effective...

@Joe Riel That works well and is simple to impliment. One thing I dont understand, how does the test produce an error on mixed input types. It only appears to test the 1st eleme A but on mixed input types produces the error as required. Haven't tested for vectors yet.

## A Great step forward....

@Mac Dude  Thank you.  Got it to work. I manually made a folder on the C drive "libR". Then ran the work sheet. That created the help file and added the 2 document. Great. I Underatand to edit the help contents delete the .help file and after modyfing the worksheets run the "help edit to databse" again. All good so far.

One more question on this.

This first worksheet added opens in the browser when searched for. The second one opens as a worksheet in Maple.

Any Idea why?

Edit:- I fixed the problem additional help files not opening in the browser. This is what the document properties "Active"= true opens the help as the maple worksheet, false opens the help in the browser.

I have not tried moving the  .help file to where the .mla file is yet. Is that important?

 (1)

 (2)

 (3)

 (4)

 (5)