I have vector street map data in 2D format as below:
polyline0: dataX = {x00,x01,..,x0n} dataY = {y00,y01,..,y0n}
polyline1: dataX = {x10,x11,..,x1n} dataY = {y10,y11,..,y1n}
polyline2: dataX = {x20,x21,..,x2n} dataY = {y20,y21,..,y2n}
...
polylinem: dataX = {xm0,xm1,..,xmn} dataY = {ym0,ym1,..,ymn}
I can draw polyline0, polyline1,.., polylinem on screen as top down view (2D).
Now I want to draw polyline0, polyline1,.., polylinem on screen as 2.5D view (either perspective projection or isometric projection)
I am looking for algorithm to convert 2D coordinates to 2.5D. I tried to search for this algorithm on the internet but could not find.
What I am looking is just a simple formula that allow me to convert the above 2D data to 2.5D data as below:
take polyline0 as example: for (i = 0; i < n; i++) { dataX[i] in 2.5D = convert2Dto2.5D(dataX[i] in 2D); dataY[i] in 2.5D = convert2Dto2.5D(dataY[i] in 2D); }
I am looking for your help and greatly appreciated your time to help me with a algorithm to convert 2D coordinates to 2.5D.