Passion Fruit!

Vrinda Vasavada's Blog

Travelling Mousey: Using Classes and Processing to Simulate Travel

on July 3, 2014

Objective: Mousey wants to visit lots of places in the world (shown by the ellipses on the map) and return to say thank you to us for arranging his cheesesticks! Help him map and plan the shortest route to all of these places.

Programs: Processing, JavaScript

Steps for Coding:

This problem is very similar to the Travelling Salesman Problem. We must make a class for the coordinates to prevent repetition and draw the circles at each point. Then, we have to write for loops for searching for the shortest path from each point. Finally, we have to make sure that the program draws the path when it finds a minimum value, or shortest path.

I reached the step that finds the distances between all of the points and finds the minimum value and am still working on printing the lines and fixing bugs. Mousey’s trip will shortly be all planned out!

Smile and wave, Vrinda Vasavada 🙂


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: