## 170 Reputation

16 years, 245 days

I was a software developer in Math and Research groups in 2007-2012.  I reviewed most of the contributions from Maplesoft's academic research labs.  In addition, I was one of the maintainers of the math library in Maple.  My involvement in Maple started in my undergraduate career when I worked at one of Maplesoft's affiliated academic research labs.

I hold BSc and MSc degrees in Computer Science from The University of Western Ontario, London, Canada.

## Visualizing Sorting Algorithms...

Maple 16

I did not come across with a sorting algorithm animation that allows me to enter my own data, so I decided to write one in Maple.

In this worksheet, you can create an animation on sorting the integers that you have entered. If you let the worksheet to generate the data for you, you can specify the sortedness of the data. This feature allows you to visualize how some algorithms perform better or worse on data of a certain characteristic: The time complexity may not be...

## Animating Pacman...

Maple

I've received a suggestion offline saying that I should animate the Pacman. There are two items to animate: Pacman's mouth and pac-dots. To review how pacman's mouth moves, please have a quick look at Google Pacman doodle.

Pacman's mouth only has three stages: open, half open and close. Let's take the pacman that I created in the previous post. Each frame of the animation is done by adjusting the radian values of the "pie" (aka Pacman's body and mouth).

## Plotting Pacman...

Maple

Just for fun, I've created a Pac-Man using Maple's plot command:

`body := plottools[pieslice]([0, 0], 5, (1/6)*Pi .. 11*Pi*(1/6), color = yellow):eye := plottools[pieslice]([-1, 2], .5, 0 .. 2*Pi, color = black, filled = true):plots[display](eye, body, axes = none);`

The hairpiece for Ms. Pac-Man can be added easily:

## For Netherlands Fans......

Maple

Since the FIFA World Cup final is approaching quickly, I have created this animated Netherlands flag.  It is for my Dutch acquaintances to cheer for their favourite team during game.

`with(plots):p := [ seq(           plot( [ seq((1/4)*sin(x+`if`(j > i, 1, 0))+1+2*i, i = 0 .. 3) ],              x = 0 .. 2*Pi, y = 0 .. 8,               color = [white, blue, white, red], filled = true, axes = none),           j = [0, 1, 2, 3, 4, 3, 2, 1])`
 Page 1 of 1
﻿