Hi guys! How could I reflect the plot on the other side of the axe y (like the image) so I can work on two wheels? Is there any method of Mathematica or...?
Quadrilatero[q_, xA_, yA_, Lc_, L2_, L3_, modo_, xD_, yD_] :=
Module[
{xB, yB, L5, \[Theta]5, c, \[Alpha], \[Theta]2, xC, yC, \[Theta]3},
xB = xA - Lc;
yB = yA;
L5 = Sqrt[(xD - xB)^2 + (yD - yB)^2];
\[Theta]5 = ArcTan[xD - xB, yD - yB];
c = (L5^2 + L2^2 - L3^2)/(2 L5 L2);
If[modo > 0, \[Alpha] = ArcCos[c], \[Alpha] = -ArcCos[c]];
\[Theta]2 = \[Theta]5 + \[Alpha];
xC = xB + L2 Cos[\[Theta]2];
yC = yB + L2 Sin[\[Theta]2];
\[Theta]3 = 0;
{\[Theta]3, \[Theta]2, {{xA, yA}, {xB, yB}, {xC, yC}, {xD, yD}}}
]
Manipulate[
Module [{sol, coordinate, qq, xD, xA, yD, yA, modo, q},
q = \[Pi];
xD = -0.75;
yD = 0;
xA = s;
yA = 0.30;
modo = 1;
sol = Quadrilatero[q, xA, yA, Lc, L2, L3, modo, xD, yD];
coordinate = sol[[3]];
Show[
(* Plot Traiettoria Nera *)
ParametricPlot[
Quadrilatero[qq, xA, yA, Lc, L2, L3, modo, xD, yD][[3]][[2]],
{qq, 0, q + 0.00001},
PlotRange -> {{-1, 1}, {-.2, .4}},
AspectRatio -> .5,
PlotStyle -> {Black, Dashed}],
(* Plot Traiettoria Blu *)
ParametricPlot[
Quadrilatero[qq, xA, yA, Lc, L2, L3, modo, xD, yD][[3]][[3]],
{qq, 0, q + 0.00001},
PlotRange -> {{-1, .2}, {-.2, .4}},
AspectRatio -> .5,
PlotStyle -> {Blue, Dashed}],
(* Plot Aste *)
ListLinePlot[coordinate,
PlotRange -> {{-1, .2}, {-.2, .4}},
AspectRatio -> .5,
PlotStyle -> Thick],
(* Plot Ruota *)
ListLinePlot[{coordinate[[3]], coordinate[[4]]},
PlotRange -> {{-1, .2}, {-.2, .4}},
AspectRatio -> .5,
PlotStyle -> {Thickness[0.1], Opacity[0.08], Red}
],
Graphics[
{
(*LightBlue,Opacity[0.2],Rectangle[{-0.75,-0.2},{0.75,0.4}],*)
Gray, Thick, Disk[{xA, yA}, .02], Disk[sol[[3]][[4]], .02],
Orange, Thick, Disk[sol[[3]][[2]], .02], Disk[sol[[3]][[3]], .02]
}
]
]
],
{{s, -0.035}, 0.04, -0.075, Appearance -> "Open"},
{{Lc, .1}, 0.04, 0.14, Appearance -> "Open"},
{{L2, 0.7}, 0, 2, Appearance -> "Open"},
{{L3, .1}, 0, .25, Appearance -> "Open"}
]
I attatched even the .nb file, but I don't know why I get a lot of errors when I open the file and still I don't "Evaluate Notebook", why?
Attachments: