3-component curved vectors for the description of systems.
Paravectors are like polar coordinates with an extra component:
In the local frame, we can represent the upsilon as it's original parabola with:
We can find
So the angle of the line tangent at 0 is:
Thus, for
To find the original coefficient.
We can chain paravectors:
First, to create an
Rearranging and subsituting:
We can use the quadratic formula to solve with
Geometrically,
We can chain the
Paravectors allow you to compress parabolic curvature to a 3-tuple. Since they can approximate functions with the correct parameters, they can be very useful for compressing mathematical functions into chains of serializable data.
My ParaSharp project implements paravectors in C# that can be trained into serialized versions of functions using autodiff.
You can import paravectors into your own project or use it from command line:
from paravectors import Paravector, Chainor:
python paravectors.py(You can change which example it runs in the if name is main block!)
Paravectors expose:
class Paravector:
alpha: float
theta: float
beta: float
def as_local_x(self): ...
def as_global_x(self, h, k): ...
def as_local_y(self): ...
def as_global_y(self, h, k): ...Chains expose:
class Chain:
paravectors: list[Paravector]
def domain_end(self, h): ...
def as_function(self, h: float, k: float, x_compliant: bool = True): ...paravectors also has some plotting functions and examples:
def plot_local(upsilon: Paravector, path: str = None): ...
def plot(upsilon: Paravector, path: str = None): ...
def plot_chain(chain: Chain, path: str = None): ...
def plot_global(*upsilons, path: str = None): ...
def paravector_example(span, theta, beta, show = True): ...
def vector_example(span, theta, show = True): ...
def simple_paravector(show = True): ...
def sin_like_chain1(show = True): ...
def sin_like_chain2(show = True): ...
def happy_face(): ...I realized you could represent curves in terms of the first derivative and got excited because I thought these would be really helpful. They are not.
This could be done in 3D, I assume. You could represent rotations in terms of the parabolic path of a single point, but it would be an approximation at best (elliptical relationships are different from parabolic ones).
You could probably repeat my derivation process for the elliptical relationship but you may not end up with a quadratic to solve. Either way, paravectors approximate better the lower the eccentricity, so you can break it up into smaller segments if you'd like.
If you use this for anything, let me know! I'd love to see your use case.
If I made a mistake somewhere, open an issue and I'll fix it. You can also create PRs to correct the code if you'd like.