Edit: I have reworded the question.


This may be a basic question but I am having trouble figuring out the correct answer. I want to find a local coordinate chart that fits a d-dimensional submanifold in $\mathbb{R}^N$. I am given two points $p\_1, p\_2 \in \mathbb{R}^N$ and corresponding orthonormal bases $(\phi\_1, \phi\_2, \ldots, \phi\_d)$, $(\tau\_1, \tau\_2, \ldots, \tau\_d) \subseteq \mathbb{R}^N$ for their tangent spaces. I would like to find an algorithmic method for finding functions $(f\_1(x\_1,x\_2,\ldots,x\_d), f\_2(x\_1,x\_2,\ldots,x\_d),\ldots f\_N(x\_1,x\_2,\ldots,x\_d))$ that satisfy these conditions. 



Interpolating a "manifold" between two points
This isn't really a formula so much as a conceptual construction.


First suppose that $d=n-1.$ 


Let $T\_1=span(\phi\_1,..., \phi\_{n-1})$ and $T\_2=span(\tau\_1,...,\tau\_{n-1})$ be the tangent subspaces of $T{\mathbb R}^N$ at $p\_1$ and $p\_2,$ respectively. We can think of these as hyperplanes in real N-space so that there is an intersection of half-spaces created by these hyperplanes containing the line segment $l=p\_1 p\_2.$ Choose $r>0$ small enough that the spheres tangent to $T\_1$ and $T\_2$ at $p\_1$ and $p\_2$ with radii equal to $r$ and centers located on $l$ do not intersect. Call these spheres $S\_1$ and $S\_2$. Define a path of spheres by $S\_{1+\lambda}=(1-\lambda)S\_1 + \lambda S\_2$ for $0\leq \lambda \leq 1,$ where addition is given by Minkowski addition of subsets in $N$-space.


The envelope of this path of spheres should be the boundary of a tubular neighborhood of a line segment, which is tangent to $T\_1$ and $T\_2.$


Second suppose that $d$ is strictly less than $n-1.$ Fill in the given orthonormal bases so that we have the above case and make the above construction. Then we let $T\_1$ and $T\_2$ be the subspaces at $p\_1$ and $p\_2$ spanned by the original given orthonormal bases and set $T\_{1+\lambda}=(1-\lambda)T\_1 + \lambda T\_2$. The intersection of $T\_{1+\lambda}$ with the corresponding $(1+\lambda)$-element from the envelope as constructed above should determine a $d$-dimensional submanifold satisfying the desired conditions.


