I'm tasked with reverse-engineering and re-writing as a web app of some old application that draws 2D projections of some object's motion. The new application should draw the 2D projection into SVG file. Unfortunately, I have only a database this application took it's data from and some anecdotal evidence of the results of it's work. The database looks like this:
X | Y | Z | TX | TY | TZ | IL | OL
-1592230 | 320625 | -746861 | -0.438616 | 0.0813375 | -0.894986 | 0 | 285881
-1533060 | 317357 | -1121620| 0.987579 | -0.15187 | 0.0402869 | 166892 | 166892
-603228 | 168038 | -710739 | 0.856184 | -0.223186 | 0.46598 | 236837 | 236837
-316197 | -178 | -460032 | 0.360688 | -0.418025 | 0.833762 | 94539 | 94540
-394543 | -67750 | -238922 | 0.388296 | -0.0668057 | 0.91911 | 61101 | 61101
-171692 | -24852 | -124014 | 0.932395 | 0.219512 | 0.287149 | 104016 | 104016
186959 | 68516 | -57856 | 0.88598 | 0.09613 | 0.45365 | 104814 | 104814
385436 | 34972 | 161513 | 0.725843 | -0.240304 | 0.64452 | 106239 | 106239
650071 | -83219 | 353026 | 0.613531 | -0.0606496 | 0.787338 | 94903 | 94903
733640 | 0 | 610697 | -0.305968 | 0.0194756 | 0.951843 | 81686 | 81686
500343 | -73922 | 819620 | -0.919641 | -0.000713402| 0.39276 | 92282 | 92282
225262 | 0 | 830066 | -0.874518 | 0.465081 | 0.137547 | 90421 | 90421
26785 | 0 | 1073810 | -0.31395 | 0.949439 | -0.000541939| 112498 | 112498
12857 | 0 | 1470760 | 0.118519 | 0.992952 | 0 | 102865 | 102865
...
X, Y, Z are, obviously, coordinates. TX, TY, TZ are some sort of rotation transformations, defining the direction of the "shoulder" of the Bezier curve. And IL, OL are the length of same "shoulder" (it's symmetric here, while the first point has IL=0, and the last OL=0).
The problem is, I need to convert those into point coordinates to use in SVG.
I made a simple chart in Excel using coordinates from the first three columns:
and my client said that the result should look like this (using the X-Z plane), but the curves are off in some points due to Excel smoothing the line differently.
I've googled about 3D motion and graphics, but those TX-TY-TZ are not looking like quaternions or Euler angles or spherical coordinates. Any ideas, what are those, and how should I convert them to X-Y-Z coordinates to be used in SVG notation?
One simple and plausible way is to convert the data into cubic Bezier segments. Given $n$ 3D-points $P_i$, unit tangents $T_i$ at those points, incoming $IL_i$ and outgoing $OL_i$ length of the tangents, we can get $n-1$ 3D-cubic Bezier segments, placing the missing control points at the ends of the tangents.
For $i$ from $0$ to $n-2$ \begin{align} A_i&=P_i ,\\ D_i&=P_{i+1} ,\\ B_i&=A_i+T_i \cdot OL_i ,\\ C_i&=D_i-T_i \cdot IL_i . \end{align}
Then $X-Z$ 2D projection of the path looks line