Items tagged with plottools


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

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:

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?

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.

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)




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,
                    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,
                                                              convert(k, string),
    # 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"])





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


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!

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

I'm not good in Maple. Please help me understand.


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.

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?

How to produce such a plot with Maple?
enter image description here

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.

Hello all!

I did



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 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?

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 := 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,
  plottools[arc]([0,r], r, Pi..Pi+arcsin(15/17)),
  plottools[arc]([0, 2*r], 2*r,
  plottools[arc]([0,4*r], 4*r,

  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:

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

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.

Hi all,

I ploted the cylinder like this:

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.


I'm using Maple 17 on Windows 8 (64-bit).

I have noticed that when I use the 'spacecurve' command and try to display it with the 'display' command, nothing shows up. I made sure that I used 'with(plots)' and 'with(plottools)', still nothing. However 'plot3d' works fine. I think it has something to do with the version of Java I'm using but I don't know what. Any help is welcome, thx

Specifications of my laptop:

Graphics: NVIDIA Geforce GT 740m

Processor: Intel(R) Core(TM) i7-3630QM (2.40GHz)

Ram: 6,00 GB

OS: Windows 8.1






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

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


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

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


                       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) )?




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:

Thanks in advance!

1 2 Page 1 of 2