Maplesoft Blog

The Maplesoft blog contains posts coming from the heart of Maplesoft. Find out what is coming next in the world of Maple, and get the best tips and tricks from the Maple experts.

Latest Posts Latest Blog Posts Feed

MapleSim has been delivering unique advantages in physical modeling and system simulation for many years. Today we release the latest iteration: MapleSim 5. Looking back at some of the earlier versions of our software, it is hard to believe that this is the same product; from the user interface to the component libraries to the simulation engine, every part of the system has experienced a striking evolution.

Like its predecessors, MapleSim 5 is based on the Maple mathematical...

Pendulum Waves...

June 06 2011 Samir Khan 524 MapleSim

I recently stumbled upon a hypnotic video of 15 out-of-phase pendulums from a physics experiment at Harvard University.

The...

 

 

This is the Classroom Tips & Techniques article for the May, 2011 Maplesoft Reporter, which, after publication, finds...

Another feature added to Maple 15 partially in response to the MaplePrimes forums is the new/improved ?HTTP package.  It provides one-step commands for fetching data from the web: much simpler than using the ?Sockets package directly. In most cases, the command ?HTTP,Get is what you would use:

 (s, page, h) := HTTP:-Get("http://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors"):

The above fetches the HTML source of a page from Wikipedia and stores it as a string 'page'. The other two outputs are 's', and integer HTTP status code and 'h' a table of the headers returned in the HTTP response from the server.  Compare this to the amount of code needed to fetch data in my Baby Names application for Maple 12, for example.

In part due to a large number of requests on MaplePrimes, the command ?plottools,getdata was added to Maple 15. This new command gives programmers a better way to access the internals of plots and do things with the data they contain.

I was trying to come up with something really fun to do with this command, and another recent obsession came to mind: the game Minecraft.  Minecraft is nice, since like Maple it is written in Java and runs on lots of platforms!  For the uninitiated, Minecraft is a a sort of mostly unstructured "sandbox" game. The player starts in alone in a procedurally generated landscape consisting of blocks. They player can collect blocks with their hands or with tools and they use them to build new things. The wide array of things that people create in Minecraft is staggering.

So, I thought I would write some commands to export 3D plots in Maple to block structures in Minecraft.

Classic Triangle Peg Board GameIn high school I was briefly fascinated by a triangular "jump all but one" game, commonly found at Cracker Barrel restaurants.  The basic premise is that any peg can "jump" over an adjacent peg to occupy the empty hole next to the jumped peg.  The jumped peg is then removed.  The goal is to continue jumping pegs until there is only one left.  


The instructions on the face of the Cracker Barrel version of this game say, "LEAVE ONLY ONE -- YOU'RE A GENIUS".  Wanting to claim the right to call myself a genius, unlike ordinary kids, who might just play the game a few times, I sat down on my Turbo-XT and started writing BASIC code.  The algorithm I came up with ran a bit slow, so I directed output to my printer and let it run over night.  In the morning the program was still chugging along.  I advanced the paper feed on the dot-matrix lineprinter -- the kind that used continuous feed paper with perforated edges and holes on each side.   Into view came 3 solutions represented by a string of numbers.   A quick check verified that I was now a genius.  

Now that Maple 15 is out, I thought I should share this little application I made: GoalTracker.mw. It is an application partially inspired by the BMI tracker in Nintendo's WiiFit application; you could easily use it to track a weight loss goal. But it could also be used to track other quantifiable goals. I am posting it here mostly because it takes advantage of two new features in Maple 15.

Introducing Maple 15...

April 07 2011 laurent 680 Maple

I am pleased to announce that Maple 15 will be available on April 13. We are very proud of this new release of Maple, which has been twelve months in the making, and I...

Each of my two previous two blog posts (Maple Gems, More Maple Gems) contained five "gems" from my Little Red Book of Maple Magic, a red ring-binder in which I record...

Back when I was working at the University of Waterloo, I found several copies of a VHS tape sitting on a dusty bookshelf full of old Maple boxes and manuals. The tape's cover had a line drawing of Issac Newton on it and the title "Maple V: The Future of Mathematics".

There was...

I had originally planned for a light-hearted post on a recent customer visit that I recently made in Europe but in light of the events in Japan these past few days, it somehow seemed terribly inappropriate. Around the world, people are coming to grips with this recent series of disasters, but for us at Maplesoft, being part of the global Cybernet corporate team, there are very personal dimensions.

The good news is that all of our colleagues at Cybernet Systems, headquartered...

In a recent blog post, I discussed five "gems" in my Little Red Book of Maple Magic, a notebook I use to keep track of the Maple wisdom I glean from interactions with the Maple programmers in the building. Here are five more such "gems" that appeared in a Tips & Techniques column in a recent issue of the ...

 

Update - April 4, 2011: I corrected a typo in Table 2, first column, bottom row.  What was sqrt(6) has been changed to sqrt(5).

 

Since coming to Maplesoft in 2003, I've kept a notebook of "gems" I've gleaned from consulting with the programmers in the building. I call it my "Little Red Book of Maple Magic." It really is red. The first spiral-bound notebook was little, and it was red. When it overflowed, I moved the notes to a red ring-binder. But it's not so little any more.

This post will explain how to configure the compiler and other tools that will be necessary for you to build the External Calling examples that will come in later posts.  This is an advanced topic and so this post is fairly complex.

First, I am going to be using the compilers via the command line, so you will need to familarize yourself with the terminal program on your particular OS.  You'll have to do this for yourself, but here are a few starting points:

Windows

Apple

I am going to assume that Linux and Solaris users are familar with using the terminal.

For Linux, Apple and Solaris, I am going to use gcc as the compiler.  For Linux you should use your distribution's package management system to get it, for Apple you need to install Xcode and for Solaris, well, gcc is probably already installed or you'll want to talk to you sys admin to have it installed (or if you are your own sys admin, you probably know how to install gcc for yourself).  For Windows, you need to install the Windows Software Development Kit.  If you already have a copy of Visual Studio C++ (Express or Professional) installed, then you already have these tools.

I am also going to use the "make" program to manage the building of the examples, thus you will need to install a version of make as well (you won't need to learn how make works unless you want to modify the examples).  I will be using gnu make, which should be easy to install on Linux and Solaris (similar to how you installed gcc) and it is included in Xcode for Apple.  For Windows, use this:

http://gnuwin32.sourceforge.net/packages/make.htm

Installing 32 bit make on 64 bit windows is fine.

Now you'll need to launch a terminal.  For Linux, Apple and Solaris this should be easy, on Windows go to the Windows SDK folder (or Windows Visual Studio folder) on the Start menu, there should be an icon for Windows SDK Command Prompt.  Click that to launch the terminal.  This version of the terminal has the environment configured to run the compiler.

On Windows you'll also have to add the location you installed make to your path, which can be done on 32 bit windows like this:

path=%PATH%;C:\Program Files\GnuWin32\bin

and on 64 bit Windows like this:

path=%PATH%;C:\Program Files (x86)\GnuWin32\bin

assuing you used the default install location for make.

You can test this by running "make" in the terminal.  If everything is set up correctly, make should run but not find a Makefile and it will raise an error.  If the path is not set properly, make won't be found you'll get a message saying that.

Path not set properly:

C:\Program Files\Microsoft SDKs\Windows\v7.1>make
'make' is not recognized as an internal or external command,
operable program or batch file.

Set the path:

C:\Program Files\Microsoft SDKs\Windows\v7.1>path=%PATH%;"C:\Program Files (x86)
\GnuWin32\bin"

Make is now found, but there is no makefile in the current directory

C:\Program Files\Microsoft SDKs\Windows\v7.1>make
make: *** No targets specified and no makefile found.  Stop.

As a final test, I've attached a small example (test.zip) that contains a Makefile and a simple source file.  If you extract the files to a new directory, go to that new directoy in the terminal and run make (with make added to the path as described above) it should build an executable (test or test.exe).  You can run the executable by executing "test" on the command line.

By default the Makefile is configured for Windows, so Windows users won't need to change it, however other users will need to comment out the

WINDOWS=true

line in Makefile by changing it to

#WINDOWS=true

I know this is a little confusing, especially if you are not familar with the command line interface, therefore I encourage you post replies if you have problems.  Hopefully we will be able to answer your questions.  Once everyone has figured out how to get this simple example to compile and run on their system, the upcoming external calling examples will be (relatively) easy.

Good Luck!

Darin

2 3 4 5 6 7 8 Last Page 4 of 15