The Edinburgh International Festival has officially launched with a spectacular light and animation show being projected on to the side of Edinburgh Castle.

Thousands of spectators packed into Castle Terrace for the late-night 20-minute display on Sunday.

Edinburgh Castle and its rocky foundation acted as a vast canvas for digitally animated projections charting 350 million years of the deep geological history of the unique location.

The free, ticketed event, called Deep Time, was played to a specially-composed soundtrack by Scottish band Mogwai and marked the start of a three-year partnership between EIF and sponsor Standard Life.

The show is one of the largest architectural mapping projects created by 59 Productions who worked on the London 2012 Olympic opening ceremony, and world-wide hit stage play, War Horse.

It follows last year's curtain-raiser, The Harmonium Project, which attracted thousands of festival-goers onto Lothian Road to see the transformation of the Usher Hall.

The event which was also available to view online via a live stream on Facebook and Periscope required 15km of cabling and 42 projectors.

Fergus Linehan, EIF director, said: "I think it's very important that the international festival celebrates the genres that we always have - opera, theatre and dance but obviously there have been changes in that with digital media and this incredible sound engineering that's possible now.

"And using that technology we're creating an incredible 3D artwork on castle rock and Edinburgh castle itself to create something that is both spectacular but has also got some really nice ideas behind it about the whole issue of deep time and geological formations."

Leo Warner, director of 59 productions, said Edinburgh has one of the most "distinctive topographies" in the world and the event was a celebration of the city and this distinctive architecture.

He said: "This event pushed our team beyond where we went with The Harmonium Project - the projector count alone, and the mounting positions on roofs, present a practical challenge which far surpasses the projection challenges of even the Olympic opening ceremony.

"In terms of scale, it's three times bigger than The Harmonium Project, but then, it had to be epic for Edinburgh."

Edinburgh's world-renowned festival season got under way over the weekend with events taking place for three of the city's biggest events. EIF, Festival Fringe and the Royal Edinburgh Military Tattoo all got proceedings under way in the Scottish capital.

August, which will also see the launch of the Edinburgh International Book Festival next week, marks the peak of the city's year-round festivals calendar and the height of its tourist season.

The programme for the three-and-a-half week EIF involves performances from almost 2,450 artists from 36 nations.