Reducing dimensionality of data that covary in piecewise way

The measured data are vector data in 3D space.
At some maximum value of x=x_{max}\ , our data have 0 magnitude: |\vec{y}|=0

We can define our data using spherical coordinates so that the components of our vector covary linearly up until the changepoint i.e. if x_{c}<x<x_{max} then:
y_0 = f(x)sin(\theta_1)cos(\phi_1)
y_1 = f(x)sin(\theta_1)sin(\phi_1)
y_2 = f(x)cos(\theta_1)
Where for this segment, f(x)=|\vec{y}| and \theta_1, \phi_1 represent the direction of our vector.

At our changepoint x=x_c, we define \vec{y}= \vec{y_c}. Here our direction changes so that it is described by \theta_2, \phi_2.

Then when x_d<x<x_c
y_0 = (f(x)-f(x_c))sin(\theta_2)cos(\phi_2)+ y_{c_0}
etc.

The idea is to find f, or at least the discrete values of f at the data points. f could be approximated using the general form 1- BetaCDF(\alpha, \beta) if it needs to be parameterized. In the example I gave, this would be quite simple to do by drawing a straight line through each of the segments and finding the distance along the set of line segments of each data point.