Items tagged with image image Tagged Items Feed

How can I do a color inversion on a jpg image in Maple?


What I want is quite simple but I have not seen it implemented anywhere yet. 

I have an explicit map F from the plane into itself. (not an ODE but simply a map) 

Then I have a set X, (something like a line segment or a rectangle in the plane) for which I 

really need to keep track of the images $F(X), F^2(X), F^3(X)$, and so on.

Is there a way to plot the image of a set in Maple? 

Thank you very much for your interests in the question. 



This post is related to the question. There were  proposed two ways of finding the volume of the cutted part of a sphere in the form of a wedge.  Here the procedure is presented that shows the rest of the sphere. Parameters procedure: R - radius of the sphere, H1 - the distance the first cutting plane to the plane  xOy,  H2 -  the distance the second cutting plane to the plane  zOy. Necessary conditions:  R>0,  H1>=0,  H2>=0,  H1^2+H2^2<R^2 . For clarity, different surfaces are painted in different colors.


Pic := proc (R::positive, H1::nonnegative, H2::nonnegative)

local A, B, C, E, F;

if R^2 <= H1^2+H2^2 then error "Should be H1^(2)+H2^(2)<R^(2)" end if;

A := plot3d([R*sin(theta)*cos(phi), R*sin(theta)*sin(phi), R*cos(theta)], phi = arctan(sqrt(-H1^2-H2^2+R^2), H2) .. 2*Pi-arctan(sqrt(-H1^2-H2^2+R^2), H2), theta = 0 .. Pi, color = green);

B := plot3d([R*sin(theta)*cos(phi), R*sin(theta)*sin(phi), R*cos(theta)], phi = -arctan(sqrt(-H1^2-H2^2+R^2), H2) .. arctan(sqrt(-H1^2-H2^2+R^2), H2), theta = 0 .. arccos(sqrt(R^2-H2^2-H2^2*tan(phi)^2)/R), color = green);

C := plot3d([R*sin(theta)*cos(phi), R*sin(theta)*sin(phi), R*cos(theta)], phi = -arctan(sqrt(-H1^2-H2^2+R^2), H2) .. arctan(sqrt(-H1^2-H2^2+R^2), H2), theta = arccos(H1/R) .. Pi, color = green);

E := plot3d([r*cos(phi), r*sin(phi), H1], phi = -arccos(H2/sqrt(R^2-H1^2)) .. arccos(H2/sqrt(R^2-H1^2)), r = H2/cos(phi) .. sqrt(R^2-H1^2), color = blue);

F := plot3d([H2, r*cos(phi), r*sin(phi)], phi = arccos(sqrt(-H1^2-H2^2+R^2)/sqrt(R^2-H2^2)) .. Pi-arccos(sqrt(-H1^2-H2^2+R^2)/sqrt(R^2-H2^2)), r = H1/sin(phi) .. sqrt(R^2-H2^2), color = gold);

plots[display](A, B, C, E, F, axes = none, view = [-1.5 .. 1.5, -1.5 .. 1.5, -1.5 .. 1.5], scaling = constrained, lightmodel = light4, orientation = [60, 80]);

end proc:


Example of use:

Pic(1,  0.5,  0.3);





I'm trying to define a matrix that will have all the possible game results in a 9 team competition in one round. The results are a column in the form [game 1 home team, game 1 away team, game 2 home team, ... , game 9 away team]

This should give me a matrix with 18 rows, and 512 columns, where each column is a possible game result.

In essense, to continue the pattern of this matrix on for all 512 columns.

I've fiddled with for statements, but it ends up getting very messy given the number of nests that are required.

Thoughts? Any help would be much appreciated,

Thanks, Alex, Australia.








Is there any way to remove the empty space that comes under images when printing the project, while using document mode?



Hi every one.

I want to export some plots from maple as images in ".jpg" or ".png" formats. I was wondering that is there a way to specify the resolution of the exported pictures? I need high quality pics.

I came across this website that has their price for furnace oil and Propane.  I thought it would be fairly easy using HTTP[Get] to fish out the prices, but it turns out those values on the page are images in of course a format (PNG) that cannot be read by Maple.  I don't know where that web page is pulling the prices from but it looks like web surgery with Maple will be unable to (at least not easily) wean the numbers out. 

If anyone has any ideas I would be interested in knowing.

According to kernelopts(version), I am using Maple 16.02, X86 64 LINUX, Nov 18 2012, Build ID 7888210 , having just updated

Maple 16.

I have a Maple worksheet with some graphs of 10^5 data points. When I export the worksheet to a pdf for inclusion in a LaTeX document (with pdfpages package, this recognizes page breaks), the file is around 100 Mb, much larger than I would like.

It seems that the file is large as a figure in the pdf is not just an image, the pdf seems to contain all of the information necessary to plot each data point individually.

Is there some way to encourage Maple 16 to treat figures as bitmaps (or something similarly much smaller than the original figures) upon exporting a worksheet to a pdf? I'll be happy for any suggestions.


1. This question was originally for Maple 16.00. Updating to 16.02a has not solved the problem.

2. I am suspicious that there is some bug in how Maple 16 exports figures made with "plot" to a pdf file.

When I try various methods of compressing the pdf that I've seen on the web, such as with pdftk 1.44, or ghostscript 8.70 or 9.07,  or pdf2ps followed by ps2pdf ,

error messages are returned. For example using pdftk:

pdftk input.pdf output.pdf


"Done. Input errors, so no output created"




but if restart the program,the menu of Plot Builder is appear,in same function(x^2+y^2+(1/1000000000)*z-25 = 0),why thing like this happen?

when run the order like this, the menu of Plot builder disapper

Thank you in advance for your help

I really need help!
please help to solve the boundary value problem by method of shooting.
I never met with this problem and I can not quite figure out how to solve this problem in maple
Thanks for the help!

 the problem

Using the two images from the branched question I tried to calculate the offset of the two images.  But it is too cumbersome and slow, can someone figure out a faster way?

Here's what I did,

I created both jpg images into a single row vector and then into an Array.  I then used a for loop with CircularShift to cycle one array and subtract it from the other.  I then took the absolute value and added all the values in the array and stored that value in another array.  The smallest value would indicate the highest probable position that both images have lined up.

Something like...


a:=convert(convert(img1,vector),Array)  #after img1 is padded to 184x184 from Markyan Hirnyk's answer

for i from 1 to 100 do
end do:

The problem is 100 shifts takes a long time, let alone go through the full image.  Is there a faster way to accomplish this?

"Circular segment" is the unfortunate but standard term for the region between a chord and an arc of a circle sharing the same endpoints (see  I say "unfortunate" because the phrase suggests a line segment when it actually means a planar region.

I would like to plot a shaded circular segment using Maple17.  I want the endpoints of the chord & arc to be anything I please, so the chord is not necessarily horizontal, or vertical, or the diameter of the circle, etc.

At the URL

there is an image containing a shaded circular segment, but I don't see what code produced the image.  The image there includes a horizontal chord, and I don't know if the code used to produce that image can be adapted for chords that are not horizontal.

If I have to, I can plot a shaded polygon with a huge number of sides that is indistinguishable from a circular segment.  I have plotted polygons before.  But it would obviously be preferable to plot a shaded circular segment.

If there a way to plot two curves of the form r = f(theta) and shade the region between them?  This would be better than the huge-polygon approach, but not as good as a simple command for plotting a shaded circular segment, if such a command exists.

I am trying to use Maple to produce an image that will be part of a math paper.  The final image must be in .eps format.  Whenever I produce a plot in Maple17 and click on it, it looks like the image has the shape of a square (regardless of what's inside it), perhaps with a lot of empty space.  I want an image without a lot of empty space, and I'd like Maple to do this.  If I crop a square image using some other application, it is not going to improve the quality of the image and might hurt it.  

If the answer to question in the Title is "no", can anyone suggest a good way to produce a good .eps image from a Maple plot that is cropped properly to eliminate as much empty space as possible?  I have Photoshop, but I don't know if this is the best way to go.

I wrote a toy file that plots a simple curve.  I'll upload it and provide a link to it.  If you execute the code and click on the image, you'll see that it is a square with a lot of empty space.












Is there another way to plot 3d intensity levels in an image?  Using matrixplot takes a long time. 





the goal is to check kernel belong to image in Maple

K := {r-x^4,u-(x^3)*y,v-x*y^3,w-y^4};
G := Basis(K, 'tord', degrevlex(r,u,v,w));
R1 := eliminate(G, {r,u,v,w}); # eliminate is the reverse of Basis
Ga := Basis({a*G[1],a*G[2],a*G[3],a*G[4],a*G[5],a*G[6],a*G[7],a*G[8],a*G[9],a*G[10],a*G[11],a*G[12],a*G[13],a*G[14], (1-a)*K[1], (1-a)*K[2], (1-a)*K[3], (1-a)*K[4]}, 'tord', deglex(a,r,u,v,w));
Ga := remove(has, Ga, [x,y,a]);
1 2 3 Page 1 of 3