Rouben Rostamian

MaplePrimes Activity

These are replies submitted by Rouben Rostamian

The actions you take depend on your ultimate goals.  Are you going to keep the image in a Maple worksheet or are you going to export it to be used elsewhere?

If you are going to keep the images solely within a Maple worksheet.  You can use plots:-arrow or plottools:-arrow to do something like what you want.  Or you can use plottoos:-line and plottools:-polygon to build your own arrows and arrowheads from scratch, and use plots:-textplot to add labels.

If you are going to export the image as something like PNG or EPS, then there are better tools for inserting additional elements in images.  Again that depends on your ultimate goal.  In my case, I frequently export drawings from Maple to include them in PDF documents produced by LaTeX, and use LaTeX's TikZ package for adding arrows and text on drawings.  Others may have other suggestions for doing such things but it's hard to recommend something specific unless you explain what you intend to do with those images.

In addition to responding to acer's question, you may want to make some clarifications:

  1. You say "square matrix M of m rows and n columns".  Does that mean m=n?
  2. Does "below the main diagonal" include the diagonal itself?
  3. Regarding "returns the smallest element" -- what if there are several such elements.  What should the procedure return?

If you can't solve a problem, it's a good strategy to attempt a simpler problem first.  [This is paraphrased from an advice attributed to Polya.]   In your case, why start with a 3D problem?  Can you do it in 2D?

So, consider in the vertical xy plane, a hill given as y = 1 − |x|.  You shoot a ball at x=−1 up the hill with a sufficiently high initial velocity to reach and go past the summit.  How do you expect the ball to behave?  Can you sketch a graph?

I am not asking for mathematical calculations; rather, for what you intuitively feel the solution should look like.  Your answer here will clarify what to expect in the 3D case.

@kambiz1199 I suggest that you use mmcdara's method instead.  It should be more useful to your purposes.

@mmcdara I have converted your Reply to Answer, and voted up.

@kambiz1199 You want to plot the function F*r*sin(theta) - m but you have specified neither the values of F, r, and m, nor the value of the radius of curved axis.  I picked arbitrary values for those parameters and produced the plot that you didn't like.

You have the worksheet. You can either replace my parameters with what you want, or tell me the parameters and I will do that for you.

@kambiz1199 The x coordinate goes from 0 to Pi. The interval [0,Pi] is bent into a semicircle, whose length is also Pi.  So the diagram is correct in terms of scale.  What about it seems to be incorrect to you?

Your system of PDEs is highly nonlinear and a symbolic solution is extremely unlikely.  You will need to solve the system numerically.  But for that you need to supply numerical values for s, epsilon, Pr, lambda, delta.

Even then I seriously doubt the correctness of your equations. The combination du/dt + d^2 u / dy^2 forms a very ill-behaved partial differential operator. Are you sure that the plus sign is correct?  I will feel much more comfortable if it were a minus sign.

Same goes for the theta equation.

Check your equations!

Aside:  You have been posting questions on in this forum for a couple of years now, so I suppose that by now you know how to enter equations in Maple.  It will be helpful to your readers (and you!) if you could actually do that and post your worksheet instead of writing things like  s*Pr*( d)/(dy)theta +lam... which are only subject to interpretation.

If something can be implemented in some programming language, it can also be implemented in Maple.  So the direct answer to your question is YES.

If you are looking for something more specific, then you will have to be more specific.

Making an apple is easy by rotating an ellipse about the z axis.  Adding the stem and leaf is left as an exercise :-;



@jalal The command R[n,phi](u) rotates the vector u about the vector n through an angle phi.  It assumes that the axis of rotation goes through the origin.  In your worksheet your axis doesn't, and that's why you are getting an unexpected result.

Here I have translated the objects in your worksheet so that the rotation axis goes through the origin, and the result is a torus, as expected:

It is not too difficult to modify the proc R so that it performs a rotation about an arbitrarily positioned axis but perhaps the extra headache is not worth the trouble.  It is easier to set things up so that the rotation axis goes through the origin.


@Kitonum There is no need for implicitplot3d for the second graph.  Just plot3d will do:

9*x^2*(3-z)^2+9*y*(3+z)^4 = 16*(-z^2+9)^2;
solve(%, y);
plot3d(%, x=-8..8, z=-3..3, view=-3..3);

or better yet:

9*x^2*(3-z)^2+9*y*(3+z)^4 = 16*(-z^2+9)^2;
solve(%, y);
plot3d([x,%,z], x=-8..8, z=-3..3, view=[-8..8, -3..3, -3..3]);


@vv Thank you very much for that construction.  It certainly produces the desired result.  I don't quite see how it works since I am not familiar with the Iterator package.  I will need to look into that.

@Kitonum Thanks.  That's very good.  I had looked at combinat:-permute, but didn't make the connection.

Hello @mmcdara I can't make sense of that worksheet.  Solving a nonlinear differential equation with finite elements is not exactly trivial.  I don't see anything that resembles a solution in there.

But as I wrote earlier, plugging the equation and boundary conditions into Maple produces a solution with no effort at all.

4 5 6 7 8 9 10 Last Page 6 of 91