1

I'm interested in finding a way to smoothly interpolated between graphics curves (and possibly shapes as well). My current solution is not very elegant

(* sample some random points *)
x = RandomPoint[Disk[], 10]; 
y = RandomPoint[Disk[], 10];

(* Linear interpolation *) curveInterp[x_, y_, func_] := Manipulate[Graphics[func[(1 - t) x + t y]], {t, 0, 1}]

(* Example *) curveInterp[x, y, BSplineCurve]

enter image description here

This is fine for specific curves defined using the same number of points, but I would like a more general solution where curves may be defined using different numbers of points or different primitives (Line, BezierCurve, ...).

Any ideas would be appreciated. Thanks

Bonus

Interpolate between regions or meshes i.e circle $\to$ square

user2757771
  • 829
  • 4
  • 9
  • 2
    What you did is pretty much what I did here: https://mathematica.stackexchange.com/a/59477/4999 – Michael E2 Mar 30 '22 at 22:30
  • If we have curves defined by $\phi(u)$ and $\psi(w)$, then a somewhat general interpolation between them has the form $(1-\alpha(t)) \phi(u(t)) + \alpha(t) \psi(w(t))$, where $\alpha(0)=0,,\alpha(1)=1$, $\alpha(t)$ is usually increasing, and $u(t)$ and $w(t)$ run over the domains of $\phi$ and $\psi$ respectively. Often this is easy to do. But that doesn't look like the setup here. We don't have a parametrization like $\phi$; rather, we have an object like BSplineCurve. That looks harder to do. But that is what you want to do, right? – Michael E2 Mar 31 '22 at 21:11
  • @MichaelE2 yes this is the correct setting – user2757771 Apr 05 '22 at 23:11

0 Answers0