## plottools[line] coords=spherical option does not w...

Using plottools[line], the option for coords does not work.  It remains in cartesian coordinates regardless of the coords specification.

## Transforming a polar plot from 2D into 3D...

I am using MAPLE 2016.1.

I have created an animation of points on a polarplot (2D), but would like it to be projected into 3D, with time t being the 3rd axis.  Here is my code for the polarplot animation:

with(plots);
Repltlist := proc (t) options operator, arrow; [[sin(t), 0], [cos(t), (1/3)*Pi], [cos(2*t), (2/3)*Pi]] end proc;
Impltlist := proc (t) options operator, arrow; [[-sin(3*t), 0], [-2*cos(t), (1/3)*Pi], [-cos(4*t), (2/3)*Pi]] end proc;
titleName := "Polar representation of time-dependence of degrees of freedom in configuration space"; captionName := "Re - red, Im - blue";
P := animate(polarplot, [Repltlist(t), color = "Red"], t = -Pi .. Pi, symbol = solidcircle, style = point, color = red, symbolsize = 12, frames = 100, gridlines = true);
Q := animate(polarplot, [Impltlist(t), color = "Blue"], t = -Pi .. Pi, symbol = solidcircle, style = point, color = blue, symbolsize = 12, frames = 100, gridlines = true);
R := display([P, Q], title = titleName, caption = captionName); R;

I have been trying use the plots[transform] to 'lift' this polarplot into 3D:

with(plottools); with(plots);

plrPt(2); f := proc (tt) options operator, arrow; plottools:-transform(proc (r, theta) options operator, arrow; [r, theta, tt] end proc) end proc; display((f(2))(plrPt(2)));

but the last command gives no output.

Can anyone help?

MRB
PS:  I am now attemptiing to do the lift to 3D by using a cylinderplot but would like know why the transform function is not able able to lift the polarplot into 3D.

## Attempt to create an animation zooming in on axis...

I want to apologize if this being neither necessarily a minimal working example for one question nor just one question is uncomfortable. The "MWE" was created on and is designed for Linux machines including ImageMagick. The problem itself should be obvious to all users though, as the subfolder and creation of the gif are just conveniences. I have three sections concerning the different problems occuring in my attempts.

(which I was told is not doable in maple ... hence the gif)

The goal was to create an animation that zooms in on a function. As maple just wouldn't allow scaling of axis in animations I decided to export single frames and then convert those with ImageMagick. Maple offers ssystem(„...“) which allows for command line usage.

The problem (may as well be a bug) occurs when I try to export images in a for loop with exportplot(...). If the path as well as previously exported images exist, it won't output an error but still not export the desired images. Exporting frames separately works just fine, as well as doing the very same operation in a separate for loop.

(see the first red comment and export section)

After using the workaround in a second for loop. I couldn't figure out how to import the images and then create an animation from them. The main obstacle is the fact that the imported pictures are put into plot-functions.

(see the second red comment)

 > restart;
 > with(plottools): f1 := s -> sin(2*s): max_frame := 10: # = number of steps for k from 0 to max_frame do     pic[k] := plot(f1(x), x=-Pi*(1-k/max_frame)..Pi*(1-k/max_frame),                     filled=true, #color = ["Orange"],                     color = ColorTools:-Color([0,                                               floor(128*k/max_frame),                                               floor(255*k/max_frame)                                               ]),                     view=[-Pi*(1-k/max_frame)..Pi*(1-k/max_frame), -1..1]                     ): end do: path := FileTools:-TemporaryDirectory(); path_list := ssystem("pwd"); path := path_list[2]; ssystem("mkdir ./pics"); # creates a subfolder path := FileTools:-JoinPath([path, "pics"]); # need to change path to subfolder plotsetup(window, plotoptions="width=480, height=600"); for k from 0 to max_frame do     file[k] := FileTools:-JoinPath([path,                                      MapleTA:-Builtin:-strcat("frame_",                                                               convert(k, string),                                                               ".jpg")                                     ]);     # exportplot(file[k], pic[k]); # does not work end do:
 > exportplot(file[0], pic[0]); # works
 > # ===================================================================================== # export # ===================================================================================== for k from 0 to max_frame do   exportplot(file[k], pic[k]); od; # also works
 > # ===================================================================================== # import # ===================================================================================== for k from 0 to max_frame do     reimported_pic[k] := importplot(file[k]); # this might take a while (depending on the amount of frames) end do: # import works but [Length of output exceeds limit of 1000000] whattype(reimported_pic[0]); #seems to create a plot function show := convert(reimported_pic,list): #Error, while processing result #There is no help page available for this error
 > show[1]; # works
 > # ===================================================================================== # create an animated gif at least # ===================================================================================== delay_time := ceil(evalf(100/max_frame)); command_for_gif := MapleTA:-Builtin:-strcat("convert -delay ",                                             convert(delay_time, string),                                             " -loop 0 ", # -reverse ",                                             FileTools:-JoinPath([path, "frame_*.jpg "]),                                             FileTools:-JoinPath([path, "animation.gif"])                                             ); ssystem(command_for_gif);
 >

I would be grateful for any suggestions. Moreover I have run accross

`?DocumentTools:-Components:-VideoPlayer`

which I could not figure out how to use by the help pages (I tried to create an avi and import that). If someone has informations on that, please share!

## Unknown error when the program starts...

Hello, when you run an error occurs:

Error, (in plots:-display) unknown plot object: circle
Error, (in plots:-display) expecting plot structure but received: P[0]
Error, (in plots:-display) expecting plot structure but received: PP

Programm: https://dropmefiles.com/Qnkzn

## Both sides of the polygon in 3d

by: Maple 15

polygon_2_color.mw

Imitation coloring both sides of the polygon in 3d.  We  build a new polygon in parallel with our polygon on a very short distance t. (We need any three points on the polygon plane, do not lie on a straight line.) This place in the program is highlighted in blue.

Paint the polygons are in different colors.

## Conditions in plottools:-transform...

In Maple 15 it seems that plottools:-transform only accepts this form of conditional statement:

`if`(conditional expression, true expression, false expression).

Is there any way to have plottools:-transform process more than one condition? Do later versions of Maple permit this?

## Nonintersecting random cylinders ...

How to produce such a plot with Maple?

The difficulty is that the geom3d package does not include a command for a cylinder whereas
the plottools package has the cylinder command, but does not have a tool to determine whether
two random cylinders intersect.

## Ploottools in Maple 17...

Hello all!

I did

with(plottools):

display(pieslice([0,0],5,Pi/4..7Pi/4,color=yellow))

but I don't know how to do "Animating Pacman". Can you help me? I read it on Mapleprimes but I don't really understand. Can you explain it to me? Thank you so much! Sorry, My English is not very good

## Shading of a plottools object...

Shading is not valid as an option in the command defining a plottools object e.g. a parallelepiped, and yet shading can be selected in the actual display of the object. Is there a way to code for shading when creating the object?

## What causes that error?...

Hi all,

I'm trying to implement the smithChart on Maple, but this error "Error, (in unknown) invalid transform: output is not 2 or 3 element" keeps popping up for some reason. I have no idea how to fix it. Can anyone help me with this? Here is the smithChart:

smithChart.mw

smithChart := proc(r)
local i, a, b, c;
a := PLOT(seq(plottools[arc]([-i*r/4, 0], i*r/4, 0..Pi),
i = 1..4),

plottools[arc]([0, r/2], r/2,
Pi-arcsin(3/5)..3*Pi/2),
plottools[arc]([0,r], r, Pi..Pi+arcsin(15/17)),
plottools[arc]([0, 2*r], 2*r,
Pi+arcsin(3/5)..Pi+arcsin(63/65)),
plottools[arc]([0,4*r], 4*r,
Pi+arcsin(15/17)..Pi+arcsin(63/65)));

b := plottools[transform]((x, y) -> [x-y])(a);
c := plottools[line]([0,0], [-2*r, 0]):
plots[display](a, b, c, axes = none, scaling = constrained, args[2..nargs]);
end proc:

smithChart(1);
Error, (in unknown) invalid transform: output is not 2 or 3 elements

## How to import STL geometry as 3-D Plot object of t...

I'm importing a STL geometry with plottools[importplot].

The result is a PLOT3D data structure. Applying "op" to the structure reveals that it is formed by POLYGONS structures.

How can I import the same STL geometry, and, instead of getting a POLYGONS structure, getting a POINTS structure?

I think it should be direct for Maple, because in the plot view configs one can select the style to be surface, contour and even point.

If the conversion has to be by hand, does someone know a not too painful method? For me it's being painful, as I'm trying a solution all the day.

## Export nodal points from a plot...

Hi all,

I ploted the cylinder like this:

with(plottools);
with(plots);
display(cylinder([1, 1, 1], 1, 3), orientation = [45, 70], scaling = constrained, grid = [2, 2, 2]);

Is it possible to export nodal points of the plot?

Thank a lot.

## Combining different size matrices...

Hi,

plot([[F(0,0.8)(y),y,y=0..3],[F(0.1,0.8)(y),y,y=0..3],[F(0.2,0.8)(y),y,y=0..3]],numpoints=25,color=[red,green,blue],view=[-0.3..0.5,0..2.5]);

p1:=%:

data:=plottools:-getdata~([p1]):

dm1:=op([1,-1],data);

dm1 := Vector(4, {(1) = ` 36 x 2 `*Matrix,

(2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order})

dm2:=op([2,-1],data);

dm2 := Vector(4, {(1) = ` 32 x 2 `*Matrix,

(2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order})

dm3:=op([3,-1],data);

dm3 := Vector(4, {(1) = ` 28 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage:                                         `*rectangular, (4) = `Order: `*Fortran_order})

How to combine these three matrices into a single one with four columns (y, F(0,0.8)(y), F(0.1,0.8)(y), F(0.2,0.8)(y) )?

Thanks

## Change Plotting order...

Is it possible to change the order of which polygons are plot? I searched a lot on the internet but I don't find a useful answer. It seems to be logical that they are plot in the order they are given to the command "display", but it don't seem to work.

I try to plot different polygons, like you can see in the images below:

The red planes should form a pyramid but the black ground plane is front of it, so it should be plotted before the four red planed (polygons) are plotted.

In the code, the black plane (pp6) comes before the red planes (pp7->pp10) as input of the display command. If I change the order, nothing changes in the plot.

Is it possible to tell Maple that some polygons should be on the foreground and some on the background?

Here is a link to the file if necessary: translatie_stn.mw