Also available:

## How to animate the rotation of a PLOT3D data struc...

I have Imported a CAD model (.sty) into maple. What I want to do is rotate the model along several axes. At first I want to rotate it around its center. This can be done via

`rotate(Zylinder, 2, 3, 56)`

where Zylinder is the Object I importet via

`Zylinder := Import("C:/...")`

this works fine, but I want the rotation to be a continuous animation. I tried:

`animate(rotate(Zylinder, A, 0, 0), A = 0 .. 360)`

but that does not work. Can you please tell me how to make it work? And it would be great if the aproach would work for rotations around an axis away from the center, too.

## I am looking for a "rotate" type command that acce...

My last series of questions have been to do with animations. Have had some really good help. I am using a rotation type matrix so I can't readilly use the rotate command. That means painfully breaking up the body into its individual components to apply the matrix to. The matrix is derived from some very nolinear functions. I have just included a general Euler rotation matrix here. Have looked inside the rotate command but don't  have enough experience to develop my own. Now I know this sort of command would not be limited to rotating the body as a general 3x3 matrix would transform the body. That would not be a problem, could be useful for other things.

In Mathematica there is a command "GeometricTransformation" that does this.

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

## How to rotate a 3d plot or 3d animation plot in th...

I uploaded this file AnimationTest.mw to the Maple Cloud. One a 3d animation and one just a 3d plot. When I open the file in the Maple Cloud from my browser,  I cannot rotate either plot with the mouse. Is there a way to change the worksheets so rotation from the browser will be possible?

## Some examples of plot translations

by: Maple

Construction of arabesques of melodic line BACH

Elena, Liya "Construction of arabesques of melodic line BACH", Kazan, Russia, school#57

> restart:
> with(plots):with(plottools):

The setting and visualization of line BACH: B - note b-flat, A - note la, C - note do, H - note si.
> p0:=plot([[0,1],[2,0],[4,1.5],[6,1]],thickness=4,color=cyan,scaling=constrained);
>
>   p0 := PLOT(
>
>         CURVES([[0, 1.], [2., 0], [4., 1.500000000000000], [6., 1.]])
>
>         , SCALING(CONSTRAINED), THICKNESS(4), AXESLABELS( ,  ),
>
>         COLOUR(RGB, 0, 1.00000000, 1.00000000),
>
>         VIEW(DEFAULT, DEFAULT))
>
> plots[display](p0);
> r_i:=seq(rotate(p0,i*Pi/4),i=1..8):
> p1:=display(r_i,p0):plots[display](p1,scaling=constrained);

> c1:=circle([0,0],6,color=blue,thickness=2):
> plots[display](c1,p1,scaling=constrained);
> p_c:=plots[display](c1,p1,scaling=constrained):

> pt_i_2:=seq(translate(p1,0,2*6*i),i=0..4):
> plots[display](pt_i_2,scaling=constrained);
> pt_i_22:=seq(translate(p1,0,6*i),i=0..4):
> plots[display](pt_i_22,scaling=constrained);
> pt_i_222:=seq(translate(p1,0,1/2*6*i),i=0..4):
> plots[display](pt_i_222,scaling=constrained);

> pr:=rotate(p1,Pi/8):
> plots[display](pr,scaling=constrained);
> plots[display](p1,pr,scaling=constrained);
> pr_i:=seq(rotate(p1,Pi/16*i),i=0..8):
> plots[display](pr_i,scaling=constrained);

> pt_1:=translate(p1,0,2*6):
> pr_1_i:=seq(rotate(pt_1,Pi/3.5*i),i=0..6):
> plots[display](pr_1_i,scaling=constrained);
> pr_11_i:=seq(rotate(pt_1,Pi/5*i),i=0..10):
> plots[display](pr_11_i,scaling=constrained);
> pr_111_i:=seq(rotate(pt_1,Pi/6.5*i),i=0..12):
> plots[display](pr_111_i,scaling=constrained);

## Designing of islamic arabesques

by: Maple

Elena, Liya "Designing of islamic arabesques", Kazan, Russia, school #57

> restart:
At the theorem of cosines  c^2 = a^2+b^2-2*a*b*cos(phi);
In our case  c=a0 ,  a=1 ,  a=b , phi; - acute angle of a rhombus (the tip of the kalam).
s0 calculated at theorem of  Pythagoras.
(а0 - horizontal diagonal of a  rhombus, s0 - vertical diagonal of a  rhombus)
> a:=1:phi:=Pi/4:
> a0:=sqrt(a^2+a^2-2*a^2*cos(phi));

a0 := sqrt(2 - sqrt(2))

> solve((s0^2)/4=a^2-(a0^2)/4,s0);

sqrt(2 + sqrt(2)), -sqrt(2 + sqrt(2))

The setting of initial parameters : the size of the tip of the pen-kalam and  depending on its - the main module size - point
(а0 - horizontal diagonal of a  rhombus, s0 - vertical diagonal of a  rhombus)
> a0:=sqrt(2-sqrt(2)):
> s0:=sqrt(2+sqrt(2)):
Connection the graphical libraries Maple
> with(plots):with(plottools):
Construction of unit of measure (point) - rhombus - the tip of the kalam
> p0:=plot([[0,0],[a0/2,s0/2],[0,s0],[-a0/2,s0/2],[0,0]],scaling=constrained,color=gold,thickness=3):
> plots[display](p0);

The setting and construction of altitude of alif - the basis of the rules compilation of the proportions      Example, on style naskh altitude of alif amount five points
> p_i:=seq(plot([[0,0+s0*i],[a0/2,s0/2+s0*i],[0,s0+s0*i],[-a0/2,s0/2+s0*i],[0,0+s0*i]],scaling=constrained,color=black),i=0..4):
> pi:=display(p_i):
> plots[display](p_i);
The setting of appropriate circle of diameter, amount altitude of alifd0:=s0+s0*i:
> i:=4:
> d0:=d0:
> c0:=circle([0,d0/2],d0/2,color=blue):
> plots[display](p_i,c0);

Construction of flower by turning "point"r_i:=seq(rotate(p0,i*Pi/4),i=1..8):
> p1:=display(r_i,p0):plots[display](p1,scaling=constrained);

The setting of circumscribed circlec1:=circle([0,0],s0,color=blue,thickness=2):
Construction and the setting of flower inscribed in a circle
> plots[display](c1,p1,scaling=constrained);
> p_c:=plots[display](c1,p1,scaling=constrained):

The setting and construction of arabesque by horizontal parallel transport original flower with different stepspt_i_1:=seq(translate(p1,5*a0*i,0),i=0..4):
> plots[display](pt_i_1);
> pt_i_11:=seq(translate(p1,2*a0*i,0),i=0..4):
> plots[display](pt_i_11);
> pt_i_111:=seq(translate(p1,a0*7*i,0),i=0..4):
> plots[display](pt_i_111);

The setting and construction of arabesque by vertical parallel transport original flower with different stepspt_i_2:=seq(translate(p1,0,2*s0*i),i=0..4):
> plots[display](pt_i_2);
> pt_i_22:=seq(translate(p1,0,s0*i),i=0..4):
> plots[display](pt_i_22);
> pt_i_222:=seq(translate(p1,0,1/2*s0*i),i=0..4):
> plots[display](pt_i_222);
Getting arabesques by turning original flower on different anglespr:=rotate(p1,Pi/8):
> plots[display](pr);
> plots[display](p1,pr);

> pr_i:=seq(rotate(p1,Pi/16*i),i=0..8):
> plots[display](pr_i);

> pt_1:=translate(p1,0,2*s0):
> pr_1_i:=seq(rotate(pt_1,Pi/3.5*i),i=0..6):
> plots[display](pr_1_i);
> pr_11_i:=seq(rotate(pt_1,Pi/5*i),i=0..10):
> plots[display](pr_11_i);
> pr_111_i:=seq(rotate(pt_1,Pi/6.5*i),i=0..12):
> plots[display](pr_111_i);

## Volume of solid of revolution? ...

I saw a presentation Calculus 1 -- I'm pretty sure it was Maple -- that showed how to set up a volume of solid of revolutionvisually rotated the region and looked at it from different points of view.

Is there someplace I could go to find out ho0w to do that.  I am new and in experienced in using Maple.

Tim Wisecarver

Georgetown preparatory School

twisecarver@gprep.org

Hi,

I would need to get access to the values of euler angles defining the orientation of a 3D plot.

I generate the 3D plot with a given orientation, then the user is allowed to rotate it with mouse orbit. How can I get the values of the new euler angles to use them in further computations?

In the plot/structure I cannot find any data concerned with orientation...

Thank you.

Marco

## Plot ellipse with rotation ...

Hi,

I have to plot in 2 different ways an ellipse that has been rotated in a plane. The equation of the ellipse is

3x^2 - 3xy + 6y^2 -6x +7y =9

First of all I use the implicitplot which works great:

restart;
f:=(x,y)->3*x^2-3*x*y+6*y^2-6*x+7*y-9;
with(plots):
implicitplot(f(x,y),x=-10..10,y=-10..10,numpoints=50000,scaling=constrained);

For the second method I really am not sure if what I'm doing is good. I tried with the plot3d, but it gave me some sort of weird shape, I really don't think it is what I am looking for.

restart;
f:=(x,y)->3*x^2-3*x*y+6*y^2-6*x+7*y-9;
with(plots):
plot3d(f(x,y),x=-10..10,y=-10..10);

The I tried to reduce the equation to the form x^2/a^2 + y^2/b^2 = 1, but I could not, maybe because of the rotation. Still, I tried to take the ellipse function from Maple with some empirical numbers I just tried to create an ellipse looking like the first one.

restart;
with(plottools):
with(plots):
a:=2.29:b:=1.38:x0:=0.8:y0:=-0.5:
elli:=ellipse([x0,y0],a,b,color=blue):
display(rotate(elli,0.4),scaling=constrained);
This time I get an ellipse similar to the first, but I don't really think it is legit to do it that way, in a sort of trial-and-error.

So I was wondering if there was another way like implicitplot to create the graph of that ellipse.

## Rotating 2d plot around y-axis...

Hello Primers

I am doing some homework with the software Maple 2015 where I am supposed to design a lamp through creating some line segments and a circle in a 2d coordinate system. But my question is, how do I add a third dimension and rotate all these line segments around the y-axis, so I can get an idea of how it looks like in 3d?

Here is a picture

## Can rotate 3d text like this be done in Maple...

Can we rotate 3d text in Maple like this shown here?

http://mathematica.stackexchange.com/questions/25065/rotating-3d-text

## how to rotate or flip a matrix ?...

i have a work on Magic Squares , and i need to rotate or flip them to all 8 possible directions .
but i am confused to find such special commands in maple for doing my purpose !

may you guide me how can i do this programmaticaly ?

 >
 (1)
 >

## 3-D Cube in Maple...

Hello,

I am trying to make a three dimensional cube in maple by using matrices. I also have to make it rotate about the x,y,z axes, project it with three different origins, and translate it (I'm assuming this means translate it across an axis?). I have already made the cube, but when I try to rotate it across one of the axes by multiplying my matrix by one of the rotation matrices (this is what I put un maple: P1:= matrix([[1,0,0,0],[0,cos(theta),-sin(theta),0],[0,sin(theta),cos(theta),0...

## Plotting a filled semicircle rotated across one ax...

I can't solve probably very easy problem. How to plot a filled semicircle which is rotated across one axis by an angle alpha? I came to the solution which I don't consider as the best one (since e.g. it will not work for alpha=Pi/2*(odd integer)) and I believe someone of you will show me a better approach. Thank you in advance.

My solution:

`alpha := (1/6)*Pi:plot3d([x, y, y*tan(alpha)], x = -1 .. 1, y = 0 .. sqrt(1-x^2)*cos(alpha), axes = normal, labels = ["x", "y", "z"...`

## How to plot S-shape line...

Hello to everyone

Pls help,urgent....

I need to draw the deformation of one story building (for simplicity, 4 columns and 2 floors) whose columns and floors  under influence of external load acting to the left of the building at its intersection point undergo the deform shape like S . So means that when the building moves to the right its intersection point of column and floor has some small rotation.

I am new to Maple environment...

## animation of 3D plot rotation

by: Maple 15

Suppose that you wish to animate the whole view of a plot. By whole view, I mean that it includes the axes and is not just a rotation of a plotted object such as a surface.

One simple way to do this is to call plots:-animate (or plots:-display on a list of plots supplied in a list, with its `insequence=true` option). The option `orientation` would contain the parameter that governs the animation (or generates the sequence).

But that entails recreating the same plot each time. The plot data might not even change. The key thing that changes is the ORIENTATION() descriptor within each 3d plot object in the reulting data structure. So this is inefficient in two key ways, in the worst case scenario.

1) It may even compute the plot's numeric results, as many times as there are frames in the resulting animation.

2) It stores as many instances of the grid of computed numeric data as there are frames.

We'd like to do better, if possible, reducing down to a single computation of the data, and a single instance of storage of a grid of data.

To keep this understandable, I'll consider the simple case of plotting a single 3d surface. More complicated cases can be handled with revisions to the techniques.

Avoiding problem 1) can be done in more than one way. Instead of plotting an expression, a procedure could be plotted, where that procedure has `option remember` so that it automatically stores computed results an immediately returns precomputed stored result when the arguments (x and y values) have been used already.

Another way to avoid problem 1) is to generate the unrotated plot once, and then to use plottools:-rotate to generate the other grids without necessitating recomputation of the surface. But this rotates only objects in the plot, and does alter the view of the axes.

But both 1) and 2) can be solved together by simply re-using the grid of computed data from an initial plot3d call, and then constructing each frame's plot data structure component "manually". The only thing that has to change, in each, is the ORIENTATION(...) subobject.

At 300 frames, the difference in the following example (Intel i7, Windows 7 Pro 64bit, Maple 15.01) is a 10-fold speedup and a seven-fold reduction is memory allocation, for the creation of the animation structure. I'm not inlining all the plots into this post, as they all look the same.

```restart:
P:=1+x+1*x^2-1*y+1*y^2+1*x*y:

st,ba:=time(),kernelopts(bytesalloc):

plots:-animate(plot3d,[P,x=-5..5,y=-5..5,orientation=[A,45,45],
axes=normal,labels=[x,y,z]],
A=0..360,frames=300);

time()-st,kernelopts(bytesalloc)-ba;

1.217, 25685408
```
```restart:
P:=1+x+1*x^2-1*y+1*y^2+1*x*y:

st,ba:=time(),kernelopts(bytesalloc):

g:=plot3d(P,x=-5..5,y=-5..5,orientation=[-47,666,-47],
axes=normal,labels=[x,y,z]):

plots:-display([seq(PLOT3D(GRID(op([1,1..2],g),op([1,3],g)),
remove(type,[op(g)],
specfunc(anything,{GRID,ORIENTATION}))[],
ORIENTATION(A,45,45)),
A=0..360,360.0/300)],
insequence=true);

time()-st,kernelopts(bytesalloc)-ba;

0.125, 3538296
```

By creating the entire animation data structure manually, we can get a further factor of 3 improvement in speed and a further factor of 3 reduction in memory allocation.

```restart:
P:=1+x+1*x^2-1*y+1*y^2+1*x*y:

st,ba:=time(),kernelopts(bytesalloc):

g:=plot3d(P,x=-5..5,y=-5..5,orientation=[-47,666,-47],
axes=normal,labels=[x,y,z]):

PLOT3D(ANIMATE(seq([GRID(op([1,1..2],g),op([1,3],g)),
remove(type,[op(g)],
specfunc(anything,{GRID,ORIENTATION}))[],
ORIENTATION(A,45,45)],
A=0..360,360.0/300)));

time()-st,kernelopts(bytesalloc)-ba;

0.046, 1179432
```

Unfortunately, control over the orientation is missing from Plot Components, otherwise such an "animation" could be programmed into a Button. That might be a nice functionality improvement, although it wouldn't be very nice unless accompanied by a way to export all a Plot Component's views to GIF (or mpeg!).

The above example produces animations each of 300 frames. Here's a 60-frame version:

 1 2 Page 1 of 2
﻿