Ronan

1187 Reputation

14 Badges

12 years, 189 days
East Grinstead, United Kingdom

MaplePrimes Activity


These are replies submitted by Ronan

@vv Hi. Yes rotate works. The original question was that I have the rotation matrix not the original w1 w2 w3. I just threw in the Euler rotation matrix here as it is easy to produce for this example.

In my reply to you above I tried applying the transform command to the matrix (Rot). That I couldn't get to work. I dont think I did that correctly. I basicially used 

f:=t->plottools:-transform((x,y,z)->convert(Rot.Vector(3,[x,y,z]), list)): 

f2 := plots:-animate(plots:-display, [('f(t)')(Body2)], t = 0 .. 8*Pi, frames = 100, scaling = constrained)

This either produces an empty animation (10 frames)   or output exceeds 10000000   (100 frames) I tried unevaluation quotes around plots:-display.


 

@Kitonum  Tried this.

Either it gives empty plot or for 100 frames `[Length of output exceeds limit of 10000000]`. Tried the usual combinations of delay evaluation quotes. No luck.

f := proc (t) options operator, arrow; transform(proc (x, y, z) options operator, arrow; convert(Rot . Vector(3, [x, y, z]), list) end proc) end proc

f2 := plots:-animate(plots:-display, [('f(t)')(Body2)], t = 0 .. 8*Pi, frames = 100, scaling = constrained)

@Scot Gould  Thanks for the useful info. Yes I know a lot of pros. use the worksheet format. I home thought so started off on the pretty interface.

@vv That make it simple. I confused rotate with the Rotate command in Image tools. It uses lefthand rule. Odd but not a shot stopper.

@acer  Firstly I replyed to this hours ago but it never appeared here. You have masterful insight/experience with Maple. I tested your solutions under the following condition. I replaced, e.g sin(0.25 t) with sin(w t), then defined w later after the display/animate commands. The 'point' produces an error still, 'line' works fine. Worksheet posted, I made before I saw your posts.

      I have included the OriginalBody. I wanted to rotate this without having to define the functions inside the plot/display/animate commands. What I have done works but I certainly don't like the level of workaround required.

restart

with(plots):

with(plottools):

NULL
OriginalBody := display([point([1, -.2, 0], colour = red, symbolsize = 50, symbol = solidsphere), point([-1, -.2, 0], colour = red, symbolsize = 50, symbol = solidsphere), point([0, 1, 0], colour = purple, symbolsize = 50, symbol = solidsphere), line([0, 0, 0], [1, -.2, 0]), line([0, 0, 0], [-1, -.2, 0]), line([0, 0, 0], [0, 1, 0]), line([0, 0, 0], [.5, 0, 0], colour = red, thickness = 4), line([0, 0, 0], [0, .5, 0], colour = yellow, thickness = 4), line([0, 0, 0], [0, 0, .5], colour = blue, thickness = 4)], scaling = constrained)

 

``

``

c1 := Vector(3, [1, -.2, 0]):

c2 := Vector(3, [-1, -.2, 0]):

c3 := Vector(3, [0, 1, 0]):

c4 := Vector(3, [1, -.2, 0]):

c5 := Vector(3, [-1, -.2, 0]):

c6 := Vector(3, [0, 1, 0]):

c7 := Vector(3, [.5, 0, 0]):

c8 := Vector(3, [0, .5, 0]):

c9 := Vector(3, [0, 0, .5]):

c := [seq(c || n, n = 1 .. 9)]

[Vector[column](%id = 18446744074369140486), Vector[column](%id = 18446744074369140606), Vector[column](%id = 18446744074369140726), Vector[column](%id = 18446744074369140846), Vector[column](%id = 18446744074369140966), Vector[column](%id = 18446744074369141086), Vector[column](%id = 18446744074369141206), Vector[column](%id = 18446744074369141326), Vector[column](%id = 18446744074369141446)]

(1)

Rot1 := Matrix(3, 3, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = cos(w1*t), (2, 3) = -sin(w1*t), (3, 1) = 0, (3, 2) = sin(w1*t), (3, 3) = cos(w1*t)})

Rot2 := Matrix(3, 3, {(1, 1) = cos(w2*t), (1, 2) = 0, (1, 3) = sin(w2*t), (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (3, 1) = -sin(w2*t), (3, 2) = 0, (3, 3) = cos(w2*t)})

Rot3 := Matrix(3, 3, {(1, 1) = cos(w3*t), (1, 2) = -sin(w3*t), (1, 3) = 0, (2, 1) = sin(w3*t), (2, 2) = cos(w3*t), (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1})

Rot := Rot1.Rot2.Rot3

Matrix(%id = 18446744074369136510)

(2)

d := seq(Rot.c[n], n = 1 .. 9)

Vector[column](%id = 18446744074369118686), Vector[column](%id = 18446744074369118806), Vector[column](%id = 18446744074369118926), Vector[column](%id = 18446744074369119046), Vector[column](%id = 18446744074369119166), Vector[column](%id = 18446744074369119286), Vector[column](%id = 18446744074369119406), Vector[column](%id = 18446744074369119526), Vector[column](%id = 18446744074369119646)

(3)

Bdyprt1 := unapply(display(POINTS([d[1][1], d[1][2], d[1][3]]), colour = red, symbolsize = 50, symbol = solidsphere), t); Bdyprt1a := plots:-animate(Bdyprt1, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt2 := unapply(display(POINTS([d[2][1], d[2][2], d[2][3]]), colour = red, symbolsize = 50, symbol = solidsphere), t); Bdyprt2a := plots:-animate(Bdyprt2, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt3 := unapply(plots:-display(POINTS([d[3][1], d[3][2], d[3][3]]), colour = purple, symbolsize = 50, symbol = solidsphere), t):
NULL
Bdyprt3a := plots:-animate(Bdyprt3, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt4 := unapply(display(line([0, 0, 0], [d[4][1], d[4][2], d[4][3]])), t); Bdyprt4a := plots:-animate(Bdyprt4, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt5 := unapply(display(line([0, 0, 0], [d[5][1], d[5][2], d[5][3]])), t); Bdyprt5a := plots:-animate(Bdyprt5, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt6 := unapply(display(line([0, 0, 0], [d[6][1], d[6][2], d[6][3]])), t); Bdyprt6a := plots:-animate(Bdyprt6, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt7 := unapply(display(line([0, 0, 0], [d[7][1], d[7][2], d[7][3]], colour = red, thickness = 4)), t); Bdyprt7a := plots:-animate(Bdyprt7, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt8 := unapply(display(line([0, 0, 0], [d[8][1], d[8][2], d[8][3]], colour = yellow, thickness = 4)), t); Bdyprt8a := plots:-animate(Bdyprt8, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt9 := unapply(plots:-display(plottools:-line([0, 0, 0], [d[9][1], d[9][2], d[9][3]], colour = blue, thickness = 4)), t):

NULL

NULL

w1 := .35; 1; w2 := .45; 1; w3 := .15

.15

(4)

NULL

``

NULL

``

NULL

plots:-display(Bdyprt1a, Bdyprt2a, Bdyprt3a, Bdyprt4a, Bdyprt5a, Bdyprt6a, Bdyprt7a, Bdyprt8a, Bdyprt9a, scaling = constrained)

 

NULL


 

Download Anim_How-2.mw


 

restart

with(plots):

with(plottools):

NULL
OriginalBody := display([point([1, -.2, 0], colour = red, symbolsize = 50, symbol = solidsphere), point([-1, -.2, 0], colour = red, symbolsize = 50, symbol = solidsphere), point([0, 1, 0], colour = purple, symbolsize = 50, symbol = solidsphere), line([0, 0, 0], [1, -.2, 0]), line([0, 0, 0], [-1, -.2, 0]), line([0, 0, 0], [0, 1, 0]), line([0, 0, 0], [.5, 0, 0], colour = red, thickness = 4), line([0, 0, 0], [0, .5, 0], colour = yellow, thickness = 4), line([0, 0, 0], [0, 0, .5], colour = blue, thickness = 4)], scaling = constrained)

 

``

``

c1 := Vector(3, [1, -.2, 0]):

c2 := Vector(3, [-1, -.2, 0]):

c3 := Vector(3, [0, 1, 0]):

c4 := Vector(3, [1, -.2, 0]):

c5 := Vector(3, [-1, -.2, 0]):

c6 := Vector(3, [0, 1, 0]):

c7 := Vector(3, [.5, 0, 0]):

c8 := Vector(3, [0, .5, 0]):

c9 := Vector(3, [0, 0, .5]):

c := [seq(c || n, n = 1 .. 9)]

[Vector[column](%id = 18446744074369140486), Vector[column](%id = 18446744074369140606), Vector[column](%id = 18446744074369140726), Vector[column](%id = 18446744074369140846), Vector[column](%id = 18446744074369140966), Vector[column](%id = 18446744074369141086), Vector[column](%id = 18446744074369141206), Vector[column](%id = 18446744074369141326), Vector[column](%id = 18446744074369141446)]

(1)

Rot1 := Matrix(3, 3, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = cos(w1*t), (2, 3) = -sin(w1*t), (3, 1) = 0, (3, 2) = sin(w1*t), (3, 3) = cos(w1*t)})

Rot2 := Matrix(3, 3, {(1, 1) = cos(w2*t), (1, 2) = 0, (1, 3) = sin(w2*t), (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (3, 1) = -sin(w2*t), (3, 2) = 0, (3, 3) = cos(w2*t)})

Rot3 := Matrix(3, 3, {(1, 1) = cos(w3*t), (1, 2) = -sin(w3*t), (1, 3) = 0, (2, 1) = sin(w3*t), (2, 2) = cos(w3*t), (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1})

Rot := Rot1.Rot2.Rot3

Matrix(%id = 18446744074369136510)

(2)

d := seq(Rot.c[n], n = 1 .. 9)

Vector[column](%id = 18446744074369118686), Vector[column](%id = 18446744074369118806), Vector[column](%id = 18446744074369118926), Vector[column](%id = 18446744074369119046), Vector[column](%id = 18446744074369119166), Vector[column](%id = 18446744074369119286), Vector[column](%id = 18446744074369119406), Vector[column](%id = 18446744074369119526), Vector[column](%id = 18446744074369119646)

(3)

Bdyprt1 := unapply(display(POINTS([d[1][1], d[1][2], d[1][3]]), colour = red, symbolsize = 50, symbol = solidsphere), t); Bdyprt1a := plots:-animate(Bdyprt1, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt2 := unapply(display(POINTS([d[2][1], d[2][2], d[2][3]]), colour = red, symbolsize = 50, symbol = solidsphere), t); Bdyprt2a := plots:-animate(Bdyprt2, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt3 := unapply(plots:-display(POINTS([d[3][1], d[3][2], d[3][3]]), colour = purple, symbolsize = 50, symbol = solidsphere), t):
NULL
Bdyprt3a := plots:-animate(Bdyprt3, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt4 := unapply(display(line([0, 0, 0], [d[4][1], d[4][2], d[4][3]])), t); Bdyprt4a := plots:-animate(Bdyprt4, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt5 := unapply(display(line([0, 0, 0], [d[5][1], d[5][2], d[5][3]])), t); Bdyprt5a := plots:-animate(Bdyprt5, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt6 := unapply(display(line([0, 0, 0], [d[6][1], d[6][2], d[6][3]])), t); Bdyprt6a := plots:-animate(Bdyprt6, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt7 := unapply(display(line([0, 0, 0], [d[7][1], d[7][2], d[7][3]], colour = red, thickness = 4)), t); Bdyprt7a := plots:-animate(Bdyprt7, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt8 := unapply(display(line([0, 0, 0], [d[8][1], d[8][2], d[8][3]], colour = yellow, thickness = 4)), t); Bdyprt8a := plots:-animate(Bdyprt8, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt9 := unapply(plots:-display(plottools:-line([0, 0, 0], [d[9][1], d[9][2], d[9][3]], colour = blue, thickness = 4)), t):

NULL

NULL

w1 := .35; 1; w2 := .45; 1; w3 := .15

.15

(4)

NULL

``

NULL

``

NULL

plots:-display(Bdyprt1a, Bdyprt2a, Bdyprt3a, Bdyprt4a, Bdyprt5a, Bdyprt6a, Bdyprt7a, Bdyprt8a, Bdyprt9a, scaling = constrained)

 

NULL


 

Download Anim_How-2.mw

@acer Very insightful. Points still can cause errors with you solutions if a variable apart from t does not have a numerical value. Line works fine.  I got this working last night using POINTS. My approach is somewhat tedious to program. I would rather be able to apply the rotation matrix to the "OriginalBody" shoun at the start.

restart

with(plots):

with(plottools):

NULL
OriginalBody := display([point([1, -.2, 0], colour = red, symbolsize = 50, symbol = solidsphere), point([-1, -.2, 0], colour = red, symbolsize = 50, symbol = solidsphere), point([0, 1, 0], colour = purple, symbolsize = 50, symbol = solidsphere), line([0, 0, 0], [1, -.2, 0]), line([0, 0, 0], [-1, -.2, 0]), line([0, 0, 0], [0, 1, 0]), line([0, 0, 0], [.5, 0, 0], colour = red, thickness = 4), line([0, 0, 0], [0, .5, 0], colour = yellow, thickness = 4), line([0, 0, 0], [0, 0, .5], colour = blue, thickness = 4)], scaling = constrained)

 

``

``

c1 := Vector(3, [1, -.2, 0]):

c2 := Vector(3, [-1, -.2, 0]):

c3 := Vector(3, [0, 1, 0]):

c4 := Vector(3, [1, -.2, 0]):

c5 := Vector(3, [-1, -.2, 0]):

c6 := Vector(3, [0, 1, 0]):

c7 := Vector(3, [.5, 0, 0]):

c8 := Vector(3, [0, .5, 0]):

c9 := Vector(3, [0, 0, .5]):

c := [seq(c || n, n = 1 .. 9)]

[Vector[column](%id = 18446744074369140486), Vector[column](%id = 18446744074369140606), Vector[column](%id = 18446744074369140726), Vector[column](%id = 18446744074369140846), Vector[column](%id = 18446744074369140966), Vector[column](%id = 18446744074369141086), Vector[column](%id = 18446744074369141206), Vector[column](%id = 18446744074369141326), Vector[column](%id = 18446744074369141446)]

(1)

Rot1 := Matrix(3, 3, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = cos(w1*t), (2, 3) = -sin(w1*t), (3, 1) = 0, (3, 2) = sin(w1*t), (3, 3) = cos(w1*t)})

Rot2 := Matrix(3, 3, {(1, 1) = cos(w2*t), (1, 2) = 0, (1, 3) = sin(w2*t), (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (3, 1) = -sin(w2*t), (3, 2) = 0, (3, 3) = cos(w2*t)})

Rot3 := Matrix(3, 3, {(1, 1) = cos(w3*t), (1, 2) = -sin(w3*t), (1, 3) = 0, (2, 1) = sin(w3*t), (2, 2) = cos(w3*t), (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1})

Rot := Rot1.Rot2.Rot3

Matrix(%id = 18446744074369136510)

(2)

d := seq(Rot.c[n], n = 1 .. 9)

Vector[column](%id = 18446744074369118686), Vector[column](%id = 18446744074369118806), Vector[column](%id = 18446744074369118926), Vector[column](%id = 18446744074369119046), Vector[column](%id = 18446744074369119166), Vector[column](%id = 18446744074369119286), Vector[column](%id = 18446744074369119406), Vector[column](%id = 18446744074369119526), Vector[column](%id = 18446744074369119646)

(3)

Bdyprt1 := unapply(display(POINTS([d[1][1], d[1][2], d[1][3]]), colour = red, symbolsize = 50, symbol = solidsphere), t); Bdyprt1a := plots:-animate(Bdyprt1, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt2 := unapply(display(POINTS([d[2][1], d[2][2], d[2][3]]), colour = red, symbolsize = 50, symbol = solidsphere), t); Bdyprt2a := plots:-animate(Bdyprt2, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt3 := unapply(plots:-display(POINTS([d[3][1], d[3][2], d[3][3]]), colour = purple, symbolsize = 50, symbol = solidsphere), t):
NULL
Bdyprt3a := plots:-animate(Bdyprt3, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt4 := unapply(display(line([0, 0, 0], [d[4][1], d[4][2], d[4][3]])), t); Bdyprt4a := plots:-animate(Bdyprt4, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt5 := unapply(display(line([0, 0, 0], [d[5][1], d[5][2], d[5][3]])), t); Bdyprt5a := plots:-animate(Bdyprt5, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt6 := unapply(display(line([0, 0, 0], [d[6][1], d[6][2], d[6][3]])), t); Bdyprt6a := plots:-animate(Bdyprt6, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt7 := unapply(display(line([0, 0, 0], [d[7][1], d[7][2], d[7][3]], colour = red, thickness = 4)), t); Bdyprt7a := plots:-animate(Bdyprt7, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt8 := unapply(display(line([0, 0, 0], [d[8][1], d[8][2], d[8][3]], colour = yellow, thickness = 4)), t); Bdyprt8a := plots:-animate(Bdyprt8, [t], t = 0 .. 8*Pi, frames = 100)

Bdyprt9 := unapply(plots:-display(plottools:-line([0, 0, 0], [d[9][1], d[9][2], d[9][3]], colour = blue, thickness = 4)), t):

NULL

NULL

w1 := .35; 1; w2 := .45; 1; w3 := .15

.15

(4)

NULL

``

NULL

``

NULL

plots:-display(Bdyprt1a, Bdyprt2a, Bdyprt3a, Bdyprt4a, Bdyprt5a, Bdyprt6a, Bdyprt7a, Bdyprt8a, Bdyprt9a, scaling = constrained)

 

NULL


 

Download Anim_How-2.mw

 

@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.

@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
 

@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.
 

restart

with(plots)

[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, dualaxisplot, fieldplot, fieldplot3d, gradplot, gradplot3d, implicitplot, implicitplot3d, inequal, interactive, interactiveparams, intersectplot, listcontplot, listcontplot3d, listdensityplot, listplot, listplot3d, loglogplot, logplot, matrixplot, multiple, odeplot, pareto, plotcompare, pointplot, pointplot3d, polarplot, polygonplot, polygonplot3d, polyhedra_supported, polyhedraplot, rootlocus, semilogplot, setcolors, setoptions, setoptions3d, shadebetween, spacecurve, sparsematrixplot, surfdata, textplot, textplot3d, tubeplot]

(1)

with(plottools)

[annulus, arc, arrow, circle, cone, cuboid, curve, cutin, cutout, cylinder, disk, dodecahedron, ellipse, ellipticArc, exportplot, extrude, getdata, hemisphere, hexahedron, homothety, hyperbola, icosahedron, importplot, line, octahedron, parallelepiped, pieslice, point, polygon, prism, project, rectangle, reflect, rotate, scale, sector, semitorus, sphere, stellate, tetrahedron, torus, transform, translate]

(2)

``

``

``

"grll:=plot(line([0,0,0],[ sin(t),t=0..2,0,0], , colour=red,thickness=3)) ;  #` ,line`([0,0,0],[0,20*Omega2(t),0],colour=yellow,thickness=3) ,line([0,0,0],[0,0,20*Omega3(t)],colour=blue,thickness=3)]"

Error, invalid function arguments

"grll:=plot(line([0,0,0],[sin(t),t=0..2,0,0],,colour=red,thickness=3)) ;  #` ,line`([0,0,0],[0,20*Omega2(t),0],colour=yellow,thickness=3) ,line([0,0,0],[0,0,20*Omega3(t)],colour=blue,thickness=3)]"

 

``

display(grll)

Error, (in plots:-display) expecting plot structure but received: grll

 

grf := [point([1, -.2, 0], colour = red, symbolsize = 50, symbol = solidsphere), point([-1, -.2, 0], colour = orange, symbolsize = 50, symbol = solidsphere), point([0, 1, 0], colour = green, symbolsize = 50, symbol = solidsphere), line([0, 0, 0], [1, -.2, 0]), line([0, 0, 0], [-1, -.2, 0]), line([0, 0, 0], [0, 1, 0]), line([0, 0, 0], [.5, 0, 0], colour = red, thickness = 4), line([0, 0, 0], [0, .5, 0], colour = yellow, thickness = 4), line([0, 0, 0], [0, 0, .5], colour = blue, thickness = 4)], scaling = constrained

grf := [POINTS(Matrix(1, 3, {(1, 1) = 1.0, (1, 2) = -.2, (1, 3) = .0}, datatype = float[8]), COLOUR(RGB, 1.00000000, 0., 0.), SYMBOL(_SOLIDSPHERE, 50)), POINTS(Matrix(1, 3, {(1, 1) = -1.0, (1, 2) = -.2, (1, 3) = .0}, datatype = float[8]), COLOUR(RGB, .80000000, .19607843, .19607843), SYMBOL(_SOLIDSPHERE, 50)), POINTS(Matrix(1, 3, {(1, 1) = .0, (1, 2) = 1.0, (1, 3) = .0}, datatype = float[8]), COLOUR(RGB, 0., 1.00000000, 0.), SYMBOL(_SOLIDSPHERE, 50)), CURVES([[0., 0., 0.], [1., -.2, 0.]]), CURVES([[0., 0., 0.], [-1., -.2, 0.]]), CURVES([[0., 0., 0.], [0., 1., 0.]]), CURVES([[0., 0., 0.], [.5, 0., 0.]], COLOUR(RGB, 1.00000000, 0., 0.), THICKNESS(4)), CURVES([[0., 0., 0.], [0., .5, 0.]], COLOUR(RGB, 1.00000000, 1.00000000, 0.), THICKNESS(4)), CURVES([[0., 0., 0.], [0., 0., .5]], COLOUR(RGB, 0., 0., 1.00000000), THICKNESS(4))], scaling = constrained

(3)

``

plots:-display(grf)

 

``


 

Download Anim_How.mw

@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.

@Preben Alsholm Most informative.

@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.

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


 

restart

mylibdir := cat(kernelopts(homedir), kernelopts(dirsep), "maple", kernelopts(dirsep), "toolbox", kernelopts(dirsep), "personal", kernelopts(dirsep), "lib")

"C:\Users\Ronan.Ronan-PC\maple\toolbox\personal\lib"

(1)

NULL

``

libname := mylibdir, libname

"C:\Users\Ronan.Ronan-PC\maple\toolbox\personal\lib", "C:\Program Files\Maple 2016\lib", "C:\Users\Ronan.Ronan-PC\maple\toolbox\personal\lib"

(2)

NULL

NULL

NULL

RTest := module () local ModuleLoad; export Sums; option package;  ModuleLoad := proc () global Clr; Clr := B end proc; Sums := proc (p1, p2, c := Clr) if c = B or c = b then p1+p2 elif c = G or c = g then p1-p2 elif c = R or c = r then if p2 = 0 then "Not Valid" else p1/p2 end if else "Error" end if end proc; ModuleLoad() end module;

_m650941920

(3)

NULL

savelib('RTest')

restart

NULL

with(RTest)

[Sums]

(4)

"At This point I want the value of Clr to be automaticially   B"

Sums(2, 3)

5

(5)

RTest:-Sums(2, 3, b)

5

(6)

NULL

RTest:-Sums(2, 3, r)

2/3

(7)

RTest:-Sums(2, 3, g)

-1

(8)

Clr := R

R

(9)

RTest:-Sums(2, 3)

2/3

(10)

Clr := g

g

(11)

RTest:-Sums(2, 3)

-1

(12)

RTest:-Sums(2, 3, r)

2/3

(13)

RTest:-Sums(2, 3, g)

-1

(14)

RTest:-Sums(2, 0, r)

"Not Valid"

(15)

``

RTest:-Sums(2, 3)

-1

(16)

``


 

Download Module_Test_global_Var1.mw

@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

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.

First 22 23 24 25 26 27 28 Page 24 of 29