1
$\begingroup$

Let me just give you a bunch of tables to reproduce the problem. Here they are

factor = {0.21771306781305513`, 0.21268138506316966`, 
   0.21072547572302136`, 0.21280240514184656`};
translation = {{0.07311848609129466`, 
    0.4321749118152892`}, {0.07419850615038676`, 
    0.41942966428645845`}, {0.07495664043451092`, 
    0.4055676791824686`}, {0.075403501661516`, 0.390376772269518`}};
fixed = {{0.15109999999997645`, 
    0.4177298035656685`}, {0.15109999999997636`, 
    0.4050398115591144`}, {0.15109999999997642`, 
    0.39132990005335083`}, {0.15109999999997648`, 0.376458513739336`}};
angles = {-0.2503758967687387`, -0.1877555323951659`, \
-0.12492241866341011`, -0.062224801455231286`};
trans = {0.1983128390296685`, 0.19442477684551443`, 
   0.1897180584133508`, 0.184023014923336`};
angle = {-0.366322981687224`, -0.36996279652454467`, \
-0.3697036572293485`, -0.3636764333664053`};

From the above you should define the following rotation functon:

rotateparametric[parfunc_, fixedpoint_, angle_] := 
  RotationMatrix[angle].(parfunc - fixedpoint) + fixedpoint

This is how the data is used:

Table[
  ParametricPlot[
    rotateparametric[
      factor[[j]]*{Sin[ϕ], -(1 - Cos[ϕ])} + translation[[j]], 
      fixed[[j]], 
      angles[[j]]] - {0, trans[[j]]}, 
    {ϕ, angle[[j]], -angle[[j]]}, 
    PlotRange -> All], 
  {j, 1, Length[factor], 1}]

I have to find the maximum value of this rotated parametric plot. My problem is that I have no idea how to do it. I would normally use MaximumValue or FindMaximum, but due to the rotation, none of the above seems to work. Is there anything I can do?

$\endgroup$
2
  • $\begingroup$ What do you mean by the value of a plot? The y (or x) coordinate? Some other measure? $\endgroup$
    – Michael E2
    Dec 25, 2015 at 16:18
  • $\begingroup$ @MichaelE2 y coordinate! $\endgroup$
    – skrat
    Dec 25, 2015 at 16:19

1 Answer 1

4
$\begingroup$

Does this do what you want?

Table[FindMaximum[
    {0, 1}.(rotateparametric[factor[[j]]*{Sin[ϕ], -(1 - Cos[ϕ])} + 
       translation[[j]], fixed[[j]], angles[[j]]] - {0, trans[[j]]}),
    {ϕ, 0, angle[[j]], -angle[[j]]}],
 {j, 1, Length[factor], 1}]

(*
  {{0.259521, {ϕ -> -0.250376}}, {0.242844, {ϕ -> -0.187756}},
   {0.226868, {ϕ -> -0.124922}}, {0.211446, {ϕ -> -0.0622248}}}
*)
$\endgroup$
2
  • $\begingroup$ This does exactly what I want! Thank you! $\endgroup$
    – skrat
    Dec 25, 2015 at 16:44
  • $\begingroup$ @skrat You're welcome! $\endgroup$
    – Michael E2
    Dec 25, 2015 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.