MaplePrimes - Newest Posts
http://www.mapleprimes.com/posts
en-us2020 Maplesoft, A Division of Waterloo Maple Inc.Maplesoft Document SystemWed, 08 Jul 2020 08:23:45 GMTWed, 08 Jul 2020 08:23:45 GMTThe latest posts added to MaplePrimeshttp://www.mapleprimes.com/images/mapleprimeswhite.jpgMaplePrimes - Newest Posts
http://www.mapleprimes.com/posts
Really fedup...
https://www.mapleprimes.com/posts/212768-Really-Fedup?ref=Feed:MaplePrimes:New Posts
<p>I'm really fed up with installing the Physics package!</p>
<p>My install directory of Maple is C:\Maths\Maple</p>
<p>I don't want to do it manually each time a new Physics Package is installed.</p>
<p>libname;<br>
"C:\Maths\Maple\lib", "C:\Users\jm\maple\toolbox\GRTensorIII\lib"</p>
<p>Physics:-Version();<br>
The "Physics Updates" version "717" is installed but is not</p>
<p> active. The active version of Physics is within the library</p>
<p> C:\Maths\Maple\lib\maple.mla, created 2020, March 5, 2:36 hours</p>
<p>Please software developpers at Maplesoft do something...Before rel 713 everything was OK.</p>
<p>Thank you and kind regards to each and every one.</p>
<p> </p>
<p>I'm really fed up with installing the Physics package!</p>
<p>My install directory of Maple is C:\Maths\Maple</p>
<p>I don't want to do it manually each time a new Physics Package is installed.</p>
<p>libname;<br />
"C:\Maths\Maple\lib", "C:\Users\jm\maple\toolbox\GRTensorIII\lib"</p>
<p>Physics:-Version();<br />
The "Physics Updates" version "717" is installed but is not</p>
<p> active. The active version of Physics is within the library</p>
<p> C:\Maths\Maple\lib\maple.mla, created 2020, March 5, 2:36 hours</p>
<p>Please software developpers at Maplesoft do something...Before rel 713 everything was OK.</p>
<p>Thank you and kind regards to each and every one.</p>
<p> </p>
212768Sun, 05 Jul 2020 19:35:34 ZJean-Michel CollardJean-Michel CollardRealistic 3D rendering of a complex system
https://www.mapleprimes.com/posts/212756-Realistic-3D-Rendering-Of-A-Complex-System?ref=Feed:MaplePrimes:New Posts
<p>Hi, </p>
<p>I would like to share this work I've done. <br>
No big math here, just a demonstrator of Maple's capabilities in 3D visualization.<br>
<br>
All the plots in the file have been discarded to reduce the size of this post. Here is a screen capture to give you an idea of what is inside the file.<br>
<img src="/view.aspx?sf=212756_post/Image.png"><br>
<a href="/view.aspx?sf=212756_post/3D_Visualization.mw">Download 3D_Visualization.mw</a></p>
<p>Hi, </p>
<p>I would like to share this work I've done. <br>
No big math here, just a demonstrator of Maple's capabilities in 3D visualization.<br>
<br>
All the plots in the file have been discarded to reduce the size of this post. Here is a screen capture to give you an idea of what is inside the file.<br>
<img src="/view.aspx?sf=212756_post/Image.png"><br>
<a href="/view.aspx?sf=212756_post/3D_Visualization.mw">Download 3D_Visualization.mw</a></p>
212756Thu, 02 Jul 2020 20:50:03 ZmmcdarammcdaraNumerical evaluation of integrals over polygons with Monte Carlo method
https://www.mapleprimes.com/posts/212734-Numerical-Evaluation-Of-Integrals-Over?ref=Feed:MaplePrimes:New Posts
<p>Hi, </p>
<p>In a recent post (<a href="https://www.mapleprimes.com/posts/212662-Monte-Carlo-Integration">Monte Carlo Integration</a>) Radaar shared its work about the numerical integration, with the Monte Carlo method, of a function defined in polar coordinates.<br>
Radaar used a raw strategy based on a sampling in cartesian coordinates plus an ad hoc transformation.<br>
Radaar obtained reasonably good results, but I posted a comment to show how Monte Carlo summation in polar coordinates can be done in a much simpler way. Behind this is the choice of a "good" sampling distribution which makes the integration problem as simple as Monte Carlo integration over a 2D rectangle with sides parallel to the co-ordinate axis.<br>
<br>
This comment I sent pushed me to share the present work on Monte Carlo integration over simple polygons ("simple" means that two sides do not intersect).<br>
Here again one can use raw Monte Carlo integration on the rectangle this polygon is inscribed in. But as in Radaar's post, a specific sampling distribution can be used that makes the summation method more elegant.<br>
<br>
This work relies on three main ingredients:</p>
<ol>
<li>The Dirichlet distribution, whose one form enables <strong>sampling the 2D simplex in a uniform way</strong>.</li>
<li>The construction of a 1-to-1 mapping from this simplex into any non degenerated triangle (a mapping whose jacobian is a constant equal to the ratio of the areas of the two triangles).</li>
<li>A tesselation into triangles of the polygon to integrate over.</li>
</ol>
<p><br>
This work has been carried out in Maple 2015, which required the development of a module to do the tesselation. Maybe more recent Maple's versions contain internal procedures to do that.<br>
</p>
<p><a href="/view.aspx?sf=212734_post/Monte_Carlo_Integration.mw">Monte_Carlo_Integration.mw</a></p>
<p> </p>
<p>Hi, </p>
<p>In a recent post (<a href="https://www.mapleprimes.com/posts/212662-Monte-Carlo-Integration">Monte Carlo Integration</a>) Radaar shared its work about the numerical integration, with the Monte Carlo method, of a function defined in polar coordinates.<br>
Radaar used a raw strategy based on a sampling in cartesian coordinates plus an ad hoc transformation.<br>
Radaar obtained reasonably good results, but I posted a comment to show how Monte Carlo summation in polar coordinates can be done in a much simpler way. Behind this is the choice of a "good" sampling distribution which makes the integration problem as simple as Monte Carlo integration over a 2D rectangle with sides parallel to the co-ordinate axis.<br>
<br>
This comment I sent pushed me to share the present work on Monte Carlo integration over simple polygons ("simple" means that two sides do not intersect).<br>
Here again one can use raw Monte Carlo integration on the rectangle this polygon is inscribed in. But as in Radaar's post, a specific sampling distribution can be used that makes the summation method more elegant.<br>
<br>
This work relies on three main ingredients:</p>
<ol>
<li>The Dirichlet distribution, whose one form enables <strong>sampling the 2D simplex in a uniform way</strong>.</li>
<li>The construction of a 1-to-1 mapping from this simplex into any non degenerated triangle (a mapping whose jacobian is a constant equal to the ratio of the areas of the two triangles).</li>
<li>A tesselation into triangles of the polygon to integrate over.</li>
</ol>
<p><br>
This work has been carried out in Maple 2015, which required the development of a module to do the tesselation. Maybe more recent Maple's versions contain internal procedures to do that.<br>
</p>
<p><a href="/view.aspx?sf=212734_post/Monte_Carlo_Integration.mw">Monte_Carlo_Integration.mw</a></p>
<p> </p>
212734Sun, 28 Jun 2020 17:08:59 ZmmcdarammcdaraMaple Animation of 150 Days of Corona in the US (time lapse)
https://www.mapleprimes.com/posts/212705-Maple-Animation-Of-150-Days-Of-Corona-In-The-US-time-Lapse?ref=Feed:MaplePrimes:New Posts
<p>This is an animation of the spread of the COVID-19 over the U.S. in the first 150 days. It was created in Maple 2020, making extensive use of DataFrames. </p>
<p> </p>
<p><a href="https://www.youtube.com/watch?v=XHXeJKTeoRw">https://www.youtube.com/watch?v=XHXeJKTeoRw</a></p>
<p> </p>
<p>The animation of 150 Day history includes COVID-19 data published by the NY Times and geographic data assembled from other sources. Each cylinder represents a county or in two special cases New York City and Kansas City. The cross-sectional area of each cylinder is the area in square miles of the corresponding county. The height of each cylinder is on a logarithmic scale (in particular it is 100*log base 2 of the case count for the county. The argument of the logarithm function is the number of cases per county divided by the are in square miles-so an areal density. Using a logarithmic scale facilitates showing super high density areas (e.g., NYC) along with lower density areas. The heights are scaled by a prefactor of 100 for visualization.</p>
<p>This is an animation of the spread of the COVID-19 over the U.S. in the first 150 days. It was created in Maple 2020, making extensive use of DataFrames. </p>
<p> </p>
<p><a href="https://www.youtube.com/watch?v=XHXeJKTeoRw">https://www.youtube.com/watch?v=XHXeJKTeoRw</a></p>
<p> </p>
<p>The animation of 150 Day history includes COVID-19 data published by the NY Times and geographic data assembled from other sources. Each cylinder represents a county or in two special cases New York City and Kansas City. The cross-sectional area of each cylinder is the area in square miles of the corresponding county. The height of each cylinder is on a logarithmic scale (in particular it is 100*log base 2 of the case count for the county. The argument of the logarithm function is the number of cases per county divided by the are in square miles-so an areal density. Using a logarithmic scale facilitates showing super high density areas (e.g., NYC) along with lower density areas. The heights are scaled by a prefactor of 100 for visualization.</p>
212705Tue, 23 Jun 2020 18:35:11 ZMathFieldMathFieldWhy Staying at Home is Good to Avoid the Spread of a Virus? A tale of fractals, cats and virus.
https://www.mapleprimes.com/posts/212674-Why-Staying-At-Home-Is-Good-To-Avoid?ref=Feed:MaplePrimes:New Posts
<p>Hi. My name is Eugenio and I’m a Professor at the <i>Departamento de Didáctica de las Ciencias Experimentales, Sociales y Matemáticas</i> at the <i>Facultad de Educación</i> of the <i>Universidad Complutense de Madrid (UCM)</i> and a member of the <i>Instituto</i><i> de Matemática Interdisciplinar (IMI) </i>of the <i>UCM</i>.</p>
<p>I have a 14-year-old son. In the beginning of the pandemic, a confinement was ordered in Spain. It is not easy to make a kid understand that we shouldn't meet our friends and relatives for some time and that we should all stay at home in the first stage. So, I developed a simplified explanation of virus propagation for kids, firstly in <em>Scratch</em> and later in <em>Maple</em>, the latter using an implementation of turtle geometry that we developed long ago and has a much better graphic resolution (E. Roanes-Lozano and E. Roanes-Macías. An Implementation of “Turtle Graphics” in Maple V. <em>MapleTech</em>. Special Issue, 1994, 82-85). A video (in Spanish) of the <em>Scratch</em> version is available from the<em> Instituto de Matemática Interdisciplinar (IMI)</em> web page: https://www.ucm.es/imi/other-activities</p>
<p><strong><span style="font-size:16px;">Introduction</span></strong></p>
<p>Surely you are uncomfortable being locked up at home, so I will try to justify that, although we are all looking forward going out, it is good not to meet your friends and family with whom you do not live.</p>
<p>I firstly need to mention a fractal is. A fractal is a geometric object whose structure is repeated at any scale. An example in nature is Romanesco broccoli, that you perhaps have eaten (you can search for images on the Internet). You can find a simple fractal in the following image (drawn with <em>Maple</em>):</p>
<p><img src="/view.aspx?sf=212674_post/Picture1.png"></p>
<p>Notice that each branch is divided into two branches, always forming the same angle and decreasing in size in the same proportion.</p>
<p>We can say that the tree in the previous image is of “depth 7” because there are 7 levels of branches.</p>
<p>It is quite easy to create this kind of drawing with the so called “turtle geometry” (with a recursive procedure, that is, a procedure that calls itself). Perhaps you have used <em>Scratch</em> programming language at school (or <em>Logo</em>, if you are older), which graphics are based in turtle geometry.</p>
<p>All drawings along these pages have been created with <em>Maple</em>. We can easily reform the code that generated the previous tree so that it has three, four, five,… branches at each level, instead of two.</p>
<p>But let’s begin with a tale that explains in a much simplified way how the spread of a disease works.</p>
<p style="text-align: center;">- o O o -</p>
<p>Let's suppose that a cat returns sick to Catland suffering from a very contagious disease and he meets his friends and family, since he has missed them so much.</p>
<p>We do not know very well how many cats each sick cat infects in average (before the order to STAY AT HOME arrives, as cats in Catland are very obedient and obey right away). Therefore, we’ll analyze different scenarios:</p>
<ol>
<li>Each sick cat infects two other cats.</li>
<li>Each sick cat infects three other cats.</li>
<li>Each sick cat infects five other cats</li>
</ol>
<p> </p>
<p><span style="font-size:16px;"><strong>1. Each Sick Cat Infects Two Cats</strong></span></p>
<p>In all the figures that follow, the cat initially sick is in the center of the image. The infected cats are represented by a red square.</p>
<p><strong>·</strong> Before everyone gets confined at home, it only takes time for that first sick cat to see his friends, but then confinement is ordered (depth 1)</p>
<p><img src="/view.aspx?sf=212674_post/pic2.png"></p>
<p>As you can see, with the cat meeting his friends and family, we already have 3 sick cats.</p>
<p><strong>·</strong> Before all cats confine themselves at home, the first cat meets his friends, and these in turn have time to meet their friends (depth 2)</p>
<p><img src="/view.aspx?sf=212674_post/pic3.png"></p>
<p>In this case, the number of sick cats is 7.</p>
<p><strong>·</strong> Before every cat is confined at home, there is time for the initially sick cat to meet his friends, for these to meet their friends, and for the latter (friends of the friends of the first sick cat) to meet their friends (depth 3).</p>
<p><img src="/view.aspx?sf=212674_post/pic4.png"></p>
<p>There are already 15 sick cats...</p>
<p><strong>·</strong> Depth 4: 31 sick cats.</p>
<p><img src="/view.aspx?sf=212674_post/pic5.png"></p>
<p><strong>·</strong> Depth 5: 63 sick cats.</p>
<p><img src="/view.aspx?sf=212674_post/pic6.png"></p>
<p>Next we’ll see what would happen if each sick cat infected three cats, instead of two.</p>
<p> </p>
<p><span style="font-size:16px;"><strong>2. Every Sick Cat Infects Three Cats</strong></span></p>
<p><strong>·</strong> Now we speed up, as you’ve got the idea.</p>
<p><img src="/view.aspx?sf=212674_post/pic7.png"></p>
<p>The first sick cat has infected three friends or family before confining himself at home. So there are 4 infected cats.</p>
<p><strong>·</strong> If each of the recently infected cats in the previous figure have in turn contact with their friends and family, we move on to the following situation, with 13 sick cats:</p>
<p><img src="/view.aspx?sf=212674_post/pic8.png"></p>
<p><strong>·</strong> And if each of these 13 infected cats lives a normal life, the disease spreads even more, and we already have 40!</p>
<p><img src="/view.aspx?sf=212674_post/pic9.png"></p>
<p><strong>·</strong> At the next step we have 121 sick cats:</p>
<p><img src="/view.aspx?sf=212674_post/pic10.png"></p>
<p><strong>·</strong> And, if they keep seeing friends and family, there will be 364 sick cats (the image reminds of what is called a Sierpinski triangle):</p>
<p><img src="/view.aspx?sf=212674_post/pic11.png"></p>
<p> </p>
<p><span style="font-size:16px;"><strong>4. Every Sick Cat Infects Five Cats</strong></span></p>
<p><strong>·</strong> In this case already at depth 2 we already have 31 sick cats.</p>
<p><img src="/view.aspx?sf=212674_post/pic12.png"></p>
<p> </p>
<p><span style="font-size:16px;"><strong>5. Conclusion</strong></span></p>
<p>This is an example of exponential growth. And the higher the number of cats infected by each sick cat, the worse the situation is.</p>
<p>Therefore, avoiding meeting friends and relatives that do not live with you is hard, but good for stopping the infection. So, it is hard, but I stay at home at the first stage too!</p>
<p>Hi. My name is Eugenio and I’m a Professor at the <i>Departamento de Didáctica de las Ciencias Experimentales, Sociales y Matemáticas</i> at the <i>Facultad de Educación</i> of the <i>Universidad Complutense de Madrid (UCM)</i> and a member of the <i>Instituto</i><i> de Matemática Interdisciplinar (IMI) </i>of the <i>UCM</i>.</p>
<p>I have a 14-year-old son. In the beginning of the pandemic, a confinement was ordered in Spain. It is not easy to make a kid understand that we shouldn't meet our friends and relatives for some time and that we should all stay at home in the first stage. So, I developed a simplified explanation of virus propagation for kids, firstly in <em>Scratch</em> and later in <em>Maple</em>, the latter using an implementation of turtle geometry that we developed long ago and has a much better graphic resolution (E. Roanes-Lozano and E. Roanes-Macías. An Implementation of “Turtle Graphics” in Maple V. <em>MapleTech</em>. Special Issue, 1994, 82-85). A video (in Spanish) of the <em>Scratch</em> version is available from the<em> Instituto de Matemática Interdisciplinar (IMI)</em> web page: https://www.ucm.es/imi/other-activities</p>
<p><strong><span style="font-size:16px;">Introduction</span></strong></p>
<p>Surely you are uncomfortable being locked up at home, so I will try to justify that, although we are all looking forward going out, it is good not to meet your friends and family with whom you do not live.</p>
<p>I firstly need to mention a fractal is. A fractal is a geometric object whose structure is repeated at any scale. An example in nature is Romanesco broccoli, that you perhaps have eaten (you can search for images on the Internet). You can find a simple fractal in the following image (drawn with <em>Maple</em>):</p>
<p><img src="/view.aspx?sf=212674_post/Picture1.png" /></p>
<p>Notice that each branch is divided into two branches, always forming the same angle and decreasing in size in the same proportion.</p>
<p>We can say that the tree in the previous image is of “depth 7” because there are 7 levels of branches.</p>
<p>It is quite easy to create this kind of drawing with the so called “turtle geometry” (with a recursive procedure, that is, a procedure that calls itself). Perhaps you have used <em>Scratch</em> programming language at school (or <em>Logo</em>, if you are older), which graphics are based in turtle geometry.</p>
<p>All drawings along these pages have been created with <em>Maple</em>. We can easily reform the code that generated the previous tree so that it has three, four, five,… branches at each level, instead of two.</p>
<p>But let’s begin with a tale that explains in a much simplified way how the spread of a disease works.</p>
<p style="text-align: center;">- o O o -</p>
<p>Let's suppose that a cat returns sick to Catland suffering from a very contagious disease and he meets his friends and family, since he has missed them so much.</p>
<p>We do not know very well how many cats each sick cat infects in average (before the order to STAY AT HOME arrives, as cats in Catland are very obedient and obey right away). Therefore, we’ll analyze different scenarios:</p>
<ol>
<li>Each sick cat infects two other cats.</li>
<li>Each sick cat infects three other cats.</li>
<li>Each sick cat infects five other cats</li>
</ol>
<p> </p>
<p><span style="font-size:16px;"><strong>1. Each Sick Cat Infects Two Cats</strong></span></p>
<p>In all the figures that follow, the cat initially sick is in the center of the image. The infected cats are represented by a red square.</p>
<p><strong>·</strong> Before everyone gets confined at home, it only takes time for that first sick cat to see his friends, but then confinement is ordered (depth 1)</p>
<p><img src="/view.aspx?sf=212674_post/pic2.png" /></p>
<p>As you can see, with the cat meeting his friends and family, we already have 3 sick cats.</p>
<p><strong>·</strong> Before all cats confine themselves at home, the first cat meets his friends, and these in turn have time to meet their friends (depth 2)</p>
<p><img src="/view.aspx?sf=212674_post/pic3.png" /></p>
<p>In this case, the number of sick cats is 7.</p>
<p><strong>·</strong> Before every cat is confined at home, there is time for the initially sick cat to meet his friends, for these to meet their friends, and for the latter (friends of the friends of the first sick cat) to meet their friends (depth 3).</p>
<p><img src="/view.aspx?sf=212674_post/pic4.png" /></p>
<p>There are already 15 sick cats...</p>
<p><strong>·</strong> Depth 4: 31 sick cats.</p>
<p><img src="/view.aspx?sf=212674_post/pic5.png" /></p>
<p><strong>·</strong> Depth 5: 63 sick cats.</p>
<p><img src="/view.aspx?sf=212674_post/pic6.png" /></p>
<p>Next we’ll see what would happen if each sick cat infected three cats, instead of two.</p>
<p> </p>
<p><span style="font-size:16px;"><strong>2. Every Sick Cat Infects Three Cats</strong></span></p>
<p><strong>·</strong> Now we speed up, as you’ve got the idea.</p>
<p><img src="/view.aspx?sf=212674_post/pic7.png" /></p>
<p>The first sick cat has infected three friends or family before confining himself at home. So there are 4 infected cats.</p>
<p><strong>·</strong> If each of the recently infected cats in the previous figure have in turn contact with their friends and family, we move on to the following situation, with 13 sick cats:</p>
<p><img src="/view.aspx?sf=212674_post/pic8.png" /></p>
<p><strong>·</strong> And if each of these 13 infected cats lives a normal life, the disease spreads even more, and we already have 40!</p>
<p><img src="/view.aspx?sf=212674_post/pic9.png" /></p>
<p><strong>·</strong> At the next step we have 121 sick cats:</p>
<p><img src="/view.aspx?sf=212674_post/pic10.png" /></p>
<p><strong>·</strong> And, if they keep seeing friends and family, there will be 364 sick cats (the image reminds of what is called a Sierpinski triangle):</p>
<p><img src="/view.aspx?sf=212674_post/pic11.png" /></p>
<p> </p>
<p><span style="font-size:16px;"><strong>4. Every Sick Cat Infects Five Cats</strong></span></p>
<p><strong>·</strong> In this case already at depth 2 we already have 31 sick cats.</p>
<p><img src="/view.aspx?sf=212674_post/pic12.png" /></p>
<p> </p>
<p><span style="font-size:16px;"><strong>5. Conclusion</strong></span></p>
<p>This is an example of exponential growth. And the higher the number of cats infected by each sick cat, the worse the situation is.</p>
<p>Therefore, avoiding meeting friends and relatives that do not live with you is hard, but good for stopping the infection. So, it is hard, but I stay at home at the first stage too!</p>
212674Tue, 16 Jun 2020 19:58:52 ZMaple 2020.1 update
https://www.mapleprimes.com/posts/212667-Maple-20201-Update?ref=Feed:MaplePrimes:New Posts
<p>We have just released an update to Maple, Maple 2020.1.</p>
<p>Maple 2020.1 includes corrections and improvement to the mathematics engine, export to PDF, MATLAB connectivity, support for Ubuntu 20.04, and more. We recommend that all Maple 2020 users install these updates.</p>
<p>This update is available through <strong>Tools>Check for Updates </strong>in Maple, and is also available from our website on the <a href="http://www.maplesoft.com/support/downloads/m2020_1update.aspx">Maple 2020.1 download page</a>, where you can also find more details.</p>
<p>In particular, please note that this update includes a fix to the <a href="https://www.mapleprimes.com/questions/229102-Maple-2020-Whats-New-Example-Gives">SMTLIB problem</a> reported on MaplePrimes. Thanks for the feedback!</p>
<p>We have just released an update to Maple, Maple 2020.1.</p>
<p>Maple 2020.1 includes corrections and improvement to the mathematics engine, export to PDF, MATLAB connectivity, support for Ubuntu 20.04, and more. We recommend that all Maple 2020 users install these updates.</p>
<p>This update is available through <strong>Tools>Check for Updates </strong>in Maple, and is also available from our website on the <a href="http://www.maplesoft.com/support/downloads/m2020_1update.aspx">Maple 2020.1 download page</a>, where you can also find more details.</p>
<p>In particular, please note that this update includes a fix to the <a href="https://www.mapleprimes.com/questions/229102-Maple-2020-Whats-New-Example-Gives">SMTLIB problem</a> reported on MaplePrimes. Thanks for the feedback!</p>
212667Mon, 15 Jun 2020 20:24:34 Zeithneeithne