X/Y coordinate algorithm

  • Status: Closed
  • Prize: $90
  • Entries Received: 3
  • Winner: vietcompro

Contest Brief

Math formula to create a list of 2D coordinate positions

Background:
I am a TV designer and I have been given a task to produce over 300 pre-prepared computer animations for a game show. The animation is going to be a 2D map "run", in which we see a map pointer traveling between predefined points ("nodes") on a map in a given number of "jumps". The goal is to create an entertaining animation sequence with some sense of suspense as the pointer jumps from location to another until it reaches it's location of the day (the target).

I try to avoid doing the animation by hand and would rather automate that process with a mathematical algorithm but I am not skilled enough to do it myself. I am under impression this could be done with some variant of "nearest neighbour" principle or something similar.

Your task:
Goal is to create a utility program or a script, which would create a textfile (or spreadsheet) containing a sequence of node coordinates which I can use as my source data and create all 300+ animation permutations based on it.

Workflow:
I prepare a textfile containing node names and their coordinates for each permutation, for example:

node | X-pos | Y-pos
--------------------
TAMP | 76.55 | 46.87
HELS | 50.67 | 97.73
OULU | 10.07 | 50.12
.
.
.
.

This source data will hold anything from 7 to 400 node coordinates. The program will prompt/ask for the amount of jumps and then it generates the outputfile in similar file format, containing a full node sequence in the given jumps. The generated output will be used in reverse order, so the starting coordinate then appears as the target position in the final animation.


Requirements:
- number of nodes in the input data: min=7, max=400
- number of jumps: min=number of nodes, max=400
- first node is the starting point
- each jump must be "a node close by" in the coordinate system, but it does not have to be the exact nearest neighbour
- each node has to appear in the sequence at least once
- I need to be able to operate the script/program myself on a Mac or a PC. It can be a shell script, command line application, python script, PHP-website, javascript, Excel macro or something similar.


Please present me:
- your basic mathematical solution principle
- how can you deliver the algorithm for me to run
- when can you deliver

Looking forward to your proposals.

Thank you very much!

Recommended Skills

Employer Feedback

“\"Vietcompro\" understood my brief extremely well and delivered a high quality C++ utility program very quickly and using great communication along the way. Hope to work with him again. Recommended!”

Profile image TwoMore, Finland.

Public Clarification Board

  • TwoMore
    Contest Holder
    • 10 years ago

    Thanks all who submitted their proposals, very smart guys! Thanks.

    • 10 years ago
  • Istehsanimtenan
    Istehsanimtenan
    • 10 years ago

    How could I enter bid for

    • 10 years ago
  • TwoMore
    Contest Holder
    • 10 years ago

    Dear Freelancers, thanks for your submissions so far. I prepared a sample data file, which can be used as the input data for the algorithm, see: https://www.dropbox.com/s/jktgu79xppcxxvu/sample_data_uusimaaProvince.txt. Let's say the amount of jumps would be 40 for example, so by using this as the source, the outcome would be 26 solution files, each having 40 jumps sequence in them and each would start with a different starting node. That should be the name of of the output file as well, so "askola.txt", "hanko.txt" etc... - Thanks again, I will be awarding to job within couple of days.

    • 10 years ago
  • TwoMore
    Contest Holder
    • 10 years ago

    One further requirement:the program should iterate through the datafile as many times as there are nodes available: on each iteration it should automatically set the next node as the start node and generate output file. So, for example: if the source data contains 8 nodes, it should generate 8 output files; one for each starting node.

    • 10 years ago
    1. ArmanEngineer
      ArmanEngineer
      • 10 years ago

      Thank you for your feedback.
      Actually, TSP itself is not very useful but is instead a model for many closely related optimization problems. All these problems have different constraints, just like yours. However, they can all be solved using the same techniques in TSP. Depending on how exactly your problem is formulated (like number of vertices exceeding the number of edges) and how you want the program to generate the outputs (like 8 solution for 8 nodes) the program can produce needed results.
      These are all minor adjustments in the algorithm.

      • 10 years ago

Show more comments

How to get started with contests

  • Post your contest

    Post Your Contest Quick and easy

  • Get tons of entries

    Get Tons of Entries From around the world

  • Award the best entry

    Award the best entry Download the files - Easy!

Post a Contest Now or Join us Today!