my "lin" variable is a function of 2 variables: alpha and p1x.
ptes = Solve[{x1, y1} \[Element]
lin[alpha0, p1x0] && {x1, y1} \[Element] rec1, {x1, y1}]
At the moment I perform the whole following operation for alpha=alpha0 and p1x=p1x0, saving the variables as such:
soltes = {x1, y1} /. ptes;
{p1xtes, p1ytes, p2xtes, p2ytes} = Flatten[soltes];
Dtes = ((p1xtes - p2xtes)^2 + (p1ytes - p2ytes)^2)^0.5
I have been making a few attempts at modifying the code so that Dtes remains a variable of alpha and p1x, without the slightest success. I am not sure on how to modify the code to carry on the variables dependence into Dtes, in other words to obtain Dtes[alpha_,p1x_]:= something[alpha,p1x]