Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@JoshuaLeiter I cleaned up my Maple code and presented it as a Post.

The code does parametrized surfaces only.  Unfortunately it cannot handle implicitly defined surfaces.

 

@Kitonum I have used essentially what you have shown in order to produce 3D objects on a 3D printer.  Let's name your plot P. We save it as an STL file in Maple through
Export("filename.stl", P);
Then send the file to the 3D printer.

That method works sometimes, and fails at some other times.  Here is why.

The STL file is expected to contain a triangulation of the object's surface.  Maple's Export()  produces that triangulation.  The STL file is also expected to include an outward unit normal associated with each triangle.  Maple's Export() fails to do that — some of its normals point outward and some point inward. That obviously confuses the printer which then produces junk.

One can import the STL file produced in Maple into the freely avaiable mesh viewing/manipulation program MeshLab.  In MeshLab, surfaces which have properly defined outward unit normals are rendered in white.  Surfaces whose normal are incorrect are rendered in black.  I exported your Maple plot to STL and loaded into MeshLab.  Here is what we see:

We see that half of the surfaces and edges are in black, indicating that their normals are incorrect.

I gave up in using Maple's Export() for 3D printing some time ago and wrote my own triangulation and export routines.  They work quite well and I have printed a lot of 3D objects using them.  My Maple code, however, is undocumented and disorganized. I have been meaning to clean it up and post it at some point. Perhaps this discussion will motivate me to do so.

 

@nm Regarding the two differential equation
diff(y(x),x)^2 + y(x)^2 = 1
in my previous message, I must point out that of Maple's solutions y=1, y=−1y=sin(x+c) and y=−sin(x+c), the last two are actually the same sin(x+Pi)=−sin(x).

Furthermore, there are infinitely many other solutions that one may piece together from those. For instance, the colored part of the diagram below represents a solution of the differential equation:

Similarly, in the case of the second differential equation
y(x) = x*diff(y(x),x) + 1/2*diff(y(x),x)^2
whose solutions are y=x^2/2 and y=cx+c^2/2, we may produce infinitely many other solutions by piecing together the graphs of the regular and singular solutions, as shown here:

This latter example has an interesting implication — it allows solving a two-point boundary value problem such as
y(−2)=ay(+2)=b
for reasonable choices of a and b.  This is rather unusual since the equation is of the first order!

@nm Since you are curious about such issues, you may be interested in looking at Maple's solution of
diff(y(x),x)^2 + y(x)^2 = 1
and seeing how you would go about obtaining that by hand.

Once you are done with that, look at this more challenging one:
y(x) = x*diff(y(x),x) + 1/2*diff(y(x),x)^2

 

@Carl Love After dropping the eval:
 

plots:-animate(
   plots:-arrow,
   [p, ptan, width= 0.3, length= 4], s= 0..3,
   background= plots:-spacecurve(p, s= 0..16*Pi, color=red)
);

 

@Carl Love The purpose of the OP's example of the Determinant outside of the proc is to demonstrate that the definition of Determinant is confined to the proc, i.e.., it does not leak.

 

@ecterrab Regarding your suggestion for reorganizing the casesplit help page, I am afraid that's too far beyond my realm of knowledge for me to be of help there.  I don't even know what "differential elimination" means, and that appears to be central to what casesplit does.  Nevertheless, a few examples that I have seen of the uses of casesplit indicate that it's a valuable tool and deserves to be brought to the Maple users' attention.

@ecterrab Thanks for your responsiveness to this and all other issues that are brought to your attention.  You are an invaluable asset to Maplesoft.

 

As Christian Wolinski has already noted, changing sec to seq fixes the error.  But your observation about leakage from the Physics package is real.  This is demonstrated in this minimal example.

restart;

diff(x(t),t);

diff(x(t), t)

doit := proc()
  uses Physics;
end proc:

After executing the proc above, the typesetting form of the output changes.  It shouldn't.

diff(x(t),t);

diff(x(t), t)


 

Download mw.mw

@Carl Love Thanks for your detailed explanation.  In the last couple of days I had been working with C code where arrays are accessed as M[i][j]. When I wrote the equivalent code in Maple, I just copied the M[i][j] without thinking.

The following further illuminates what you have said:

 M := Matrix(3,3);                                                            
                                   [0    0    0]
                                   [           ]
                              M := [0    0    0]
                                   [           ]
                                   [0    0    0]

> M[1] := <a,b,c>;                                                             
                                          [a]
                                          [ ]
                                  M[1] := [b]
                                          [ ]
                                          [c]

> M;                                                                           
                                 [a    b    c]
                                 [           ]
                                 [0    0    0]
                                 [           ]
                                 [0    0    0]

 

@Christian Wolinski I've been staring at this for the last half hour and couldn't see it :-(

Thanks!

 

@nm You wrote:

y''= y-(y')^(1/2)
And if we try to square both sides, or raise to any power, there will remain a term y' with non integer power on the right side. Hence degree is not defined.
 

You may rearrange that equation into (y')^(/1/2)=y-y'' then square both sides to get rid of the fractional exponent.  The degree of the resulting equation may be 2 or may be undefined, depending precisely what is meant by the degree.

I remain unconvinced of the usefulness of the concept of the "degree of a differential equation" but that's a different story.

@Carl Love Thanks for your note regarding *.mpl versus *.maple.

The Maple code that you have shown does not make much sense, and it is difficult to guess from it what it is that you really want to do.

I suggest that instead of showing Maple code, just state your mathematical problem clearly in words or equations. Then someone should be able to show you how to translate that statement into code.

 

@Kitonum That's clever.  A thumb up!

First 46 47 48 49 50 51 52 Last Page 48 of 99