PGA Pin Placement
I promised to stop pimping my work around here, but before I do, here’s a little ditty I made in a mad rush to this morning’s opening round of the Senior PGA Championship — course pin placements rendered in Flash.
To preface this, pins are moved every morning before a tournament round begins. Since every round is played on the same course, changing the pin placement helps mix things up a bit.
From a development perspective, you’d hope to get each round’s pin placements in advance, but that’s not how it works — the cups’ coordinates aren’t determined until the night before — so by the time you receive a fax detailing where the pins are, you don’t have a lot of time to get them out on the website.
So the data for each hole and round are stored in multidimensional arrays, which are edited in an external text file. Taking the flat 2D illustration of the hole received from the course, the pins’ coordinates are (visually) translated to the illustration, but as an isometric coordinate. The pin is then placed to that spot, and the other elements draw out from the cup.
Design wise, everything but the tournament logo are vectors, with the hole art traced from the Senior PGA tour book in Illustrator. The flat art was converted to isometric angles, and exported to Flash as a series of swfs. Each hole’s ‘slice’ was loaded into Flash, tweened with ActionScript, and voila — each hole builds itself like a big old sandwich.
This was built very quickly over the past couple of days, so it’ll see a number of improvements and enhancements in future PGA events.