1
$\begingroup$
ContourPlot[
Power[(x), 3/2] - Power[1.65, 0.5]*(x) + ((y))^2 == 
 0, {x, -20, 20}, {y, -20, 20}, PlotPoints -> 100, 
MaxRecursion -> 1]  

I can get enter image description here

Then I need to rotate and move this object to the below position enter image description here

I know RotationMatrixcan rotate,but how to move object with mathematica function?

$\endgroup$
  • $\begingroup$ The parameter b is not defined in your code. I assume b = 1/3? $\endgroup$ – JEM_Mosig Mar 7 '18 at 4:23
  • $\begingroup$ @JEM_Mosig,b just make plot bigger, I edited question. $\endgroup$ – kittygirl Mar 7 '18 at 4:27
0
$\begingroup$

It is more clear if we rewrite your code as follows:

b = 1/3;
f[{x_, y_}] := Power[b*(x), 3/2] - Power[1.65, 0.5]*b*(x) + (b*(y))^2;

ContourPlot[f[{x, y}] == 0, {x, -20, 20}, {y, -20, 20}, 
  PlotPoints -> 100, 
  MaxRecursion -> 1
]

This produces your original figure, but we have defined an explicit function f, for convenience. Now we can define the geometric transformation that rotates your figure about {0,0} by 105° and then moves it by {-10, 5} in the (x,y) plane.

tf = RotationTransform[105 Degree, {0, 0}]@*TranslationTransform[-{-10, 5}];

Now

ContourPlot[f[tf@{x, y}] == 0, {x, -20, 20}, {y, -20, 20}, 
  PlotPoints -> 100, 
  MaxRecursion -> 1
]

gives your desired result.

$\endgroup$
  • $\begingroup$ I cannot repeat your script,nothing display. $\endgroup$ – kittygirl Mar 7 '18 at 4:38
  • 1
    $\begingroup$ @kitty, what version are you using? If you are using a version older than 10, try this instead: ContourPlot[f[AffineTransform[{RotationMatrix[105 °], {10, -5}}] @ {x, y}] == 0 // Evaluate, {x, -20, 20}, {y, -20, 20}, PlotPoints -> 100, MaxRecursion -> 1] $\endgroup$ – J. M. is away Mar 7 '18 at 5:36
  • $\begingroup$ @J.M.version 11.2.I guess something wrong in your f[{x_, y_}] := Power[b*(x), 3/2] - Power[1.65, 0.5]*b*(x) + (b*(y))^2; $\endgroup$ – kittygirl Mar 7 '18 at 7:03
  • $\begingroup$ Did you define b = 1/3? I just copied your code there. $\endgroup$ – JEM_Mosig Mar 7 '18 at 22:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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