I'm creating a map based on gps location data taken from my phone (the phone is creating .gpx files which for now I'm just copy/pasting into a single text file and reading it manually though later I plan to use a gpx-reading library such as this: http://wiki.processing.org/w/GPS_Data#Reading_and_Displaying_GPS_Data_Using_a_Simple_GPX_Library
I've got it to the point where I can read & draw ellipses to the canvas (in 2d) within setup(), but i'd really like to make the map into an interactive 3d model. However even in 2D, my sketch slows down far too much to interact with when calculating then drawing the points within draw() - I have the gps device set to create points at very regular intervals.
My guess is that I should just be using the gpx data points once to create a set of much simpler (vector?) lines which I could then manipulate in draw() without needing to draw the 20,000 individual points each frame - see images below for example of what i'd like to end up with.
What would be the best method to go about making smoother lines from the thousands of data points?
Many thanks in advance!