4
$\begingroup$

Given two parametric 2D curves:

$c_1=[x_1(a),y_1(a)], \text{ for } a\in[0,1]$

$c_2=[x_2(b),y_2(b)], \text{ for } b\in[0,1]$

I want to find the "sum" of these curves, which I define as the points $[x,y]$ for which there exists $a,b$ such that

  1. $x=x_1(a)+x_2(b)$
  2. $y = y_1(a) = y_2(b)$.

I suspect the result should also be a curve, since there is only one degree of freedom given the constraint $2$). I approached this by brute-forcing it, checking all points $[a,b]$ in a grid and keeping those that satisfy constraint $2$) (with a given margin), and indeed the result $[x,y]$ looks like a curve (see example below, where the right curve shows the "sum" of the two curves on the left).

The brute force solution example

However, extending this to more input curves becomes computationally expensive, since each new curve would add a new dimension to the grid. Notice that it is impossible to add curves sequentially in this way, since the result is a list of sparse points, instead of a parametric curve.

This question has a physical origin: if two physical systems with a non-linear relationship between parameters (e.g., pressure and temperature) are connected in such a way that one of the parameters must be the same in both, what would be the resulting curve for the total system?

Would you know of any more efficient way to get the resulting curve? Or any other way this could be extended to more input curves in an efficient way?

$\endgroup$
10
  • 1
    $\begingroup$ In your second criterion, you write y(a) and y(b). What's y()? $\endgroup$
    – JonathanZ
    Nov 20 at 18:37
  • $\begingroup$ Same thing here - the "since there is only one degree of freedom given the constraint 2)" bit is a bit confusing, too. $\endgroup$
    – dvdgrgrtt
    Nov 20 at 18:54
  • 1
    $\begingroup$ @JonathanZ I'm guessing they meant $y = y_1(a) + y_2(b)$ $\endgroup$ Nov 20 at 19:04
  • 1
    $\begingroup$ not exactly, I meant y=y1(a)=y2(b), wich means that the results whould be those that satisfy this equality condition $\endgroup$
    – Franco
    Nov 20 at 19:17
  • 1
    $\begingroup$ Although note that if $y1$ or $y2$ is constant on an interval, then the sum-curve will not be a curve but will have a portion of a surface. $\endgroup$
    – Stef
    Nov 20 at 20:52

0

You must log in to answer this question.