# Extrapolating geometry across a triangle mesh?

Say you have 2 parametric cylinders represented as triangle meshes with very different geometries and you connect them together.

Is there a method that allows you to join them together such that the shapes blend smoothly?

So for example consider these geometries:

let's say you have a cylinder with the geometry of the top left torus and one with that of the bottom right torus. You want to attach them together to get a new cylinder such that that half the cylinder is a normal cylinder, half is a corkscrew cylinder and you have a smooth transition of the geometry from one to the other in the middle.

I am trying to find literature on the topic but I am having little luck.

I'm not sure what you mean by join together the shapes. I assume you mean you want a single torus but at different spots on the torus you want one of either geometry to shine through more. Assuming that parametrisation of the Torus is approximately the same (same $$(u,v)$$ values map to points close together). Then you could try the following:
Assuming both cylinders have some parametrisation $$R^2 \rightarrow R^3$$ with $$(u,v) \in [0,1]$$. We then have two tori: $$T_1(u,v)$$ and $$T_2(u,v)$$. Then we can combine these together with additional blending functions $$\alpha(u,v)$$ and $$\beta(u,v)$$ which have the following properties: $$\alpha(u,v)$$ + $$\beta(u,v) = 1$$ and $$\alpha(u,v)$$, $$\beta(u,v) \in [0,1]$$. Then we can create a blended torus:
$$T_b(u,v) = \alpha(u,v) T_1(u,v) + \beta(u,v) T_1(u,v).$$
Naturally, the question is what are these functions $$\alpha$$ and $$\beta$$ and that is what you have to decide yourself. If you do not really care about where exactly the blend is done you can set $$\alpha$$ to be determined by a Perlin noise function and then setting $$\beta = 1 - \alpha$$. If you require more customization you could try to create a custom height map or create a grid of Bezier patches on the UV plane. Having half of the torus as $$T_1$$ and the other as $$T_2$$ you could use just $$\alpha(u,v) = \begin{cases} 1-2u, & u \in [0, 0.5]\\ 2u - 1, & u \in [0.5, 1]\\ \end{cases}$$ and once again $$\beta(u,v) = 1 - \alpha(u,v)$$ (assuming they are both parametrised with $$u$$ along the toroidal direction). You can create smoother blends by using smoother blending functions.