Skip to main content
deleted 29 characters in body; edited title
Source Link

Plot a rotated elipseellipse displaced from the origin, keeping dimensions constant

I'm trying to plot an ellipse in parametric plot, rotated by some angle and is offset from the origin with respect to the centre. I am almost there, here is my current solution

x[Rx_, Ry_, Cx_, α_, θ_] := 
 Rx Cos[α] Cos[θ] \[Minus] 
 - Ry Sin[α] Sin[θ] + Cx
y[Rx_, Ry_, Cy_, α_, θ_] := 
 Rx Cos[α] Sin[θ] + Ry Sin[α] Cos[θ] + Cy

Manipulate[
 ParametricPlot[{x[10, 5, 0, α, θ], 
   y[10, 5, 3, α, 0.2 π]}, {α, 0, 2 π}, 
  PlotRange -> All], {θ, 0, 2 π}] 

However as you will see by rotating the ellipse, when displaced by the origin, changes the effective radius parameters of the ellipse -- not what I want! I suspect that as the ellipse is rotated, the parameters $R_{x}$ and $R_{y}$ are with respect to the $x-y$ axis and not with the geometry itself, so effectively become a function of rotation.

Can anyone see a way of keeping the shape the same when rotated for any ellipse centre position? There is a solution here but the problem is if one displaces the ellipse it doesn't rotate about the centre of the ellipse, but about the origin.

Plot a rotated elipse displaced from the origin, keeping dimensions constant

I'm trying to plot an ellipse in parametric plot, rotated by some angle and is offset from the origin with respect to the centre. I am almost there, here is my current solution

x[Rx_, Ry_, Cx_, α_, θ_] := 
 Rx Cos[α] Cos[θ] \[Minus] 
  Ry Sin[α] Sin[θ] + Cx
y[Rx_, Ry_, Cy_, α_, θ_] := 
 Rx Cos[α] Sin[θ] + Ry Sin[α] Cos[θ] + Cy

Manipulate[
 ParametricPlot[{x[10, 5, 0, α, θ], 
   y[10, 5, 3, α, 0.2 π]}, {α, 0, 2 π}, 
  PlotRange -> All], {θ, 0, 2 π}] 

However as you will see by rotating the ellipse, when displaced by the origin, changes the effective radius parameters of the ellipse -- not what I want! I suspect that as the ellipse is rotated, the parameters $R_{x}$ and $R_{y}$ are with respect to the $x-y$ axis and not with the geometry itself, so effectively become a function of rotation.

Can anyone see a way of keeping the shape the same when rotated for any ellipse centre position? There is a solution here but the problem is if one displaces the ellipse it doesn't rotate about the centre of the ellipse, but about the origin.

Plot a rotated ellipse displaced from the origin, keeping dimensions constant

I'm trying to plot an ellipse in parametric plot, rotated by some angle and is offset from the origin with respect to the centre. I am almost there, here is my current solution

x[Rx_, Ry_, Cx_, α_, θ_] := Rx Cos[α] Cos[θ] - Ry Sin[α] Sin[θ] + Cx
y[Rx_, Ry_, Cy_, α_, θ_] := Rx Cos[α] Sin[θ] + Ry Sin[α] Cos[θ] + Cy

Manipulate[
 ParametricPlot[{x[10, 5, 0, α, θ], 
   y[10, 5, 3, α, 0.2 π]}, {α, 0, 2 π}, 
  PlotRange -> All], {θ, 0, 2 π}] 

However as you will see by rotating the ellipse, when displaced by the origin, changes the effective radius parameters of the ellipse -- not what I want! I suspect that as the ellipse is rotated, the parameters $R_{x}$ and $R_{y}$ are with respect to the $x-y$ axis and not with the geometry itself, so effectively become a function of rotation.

Can anyone see a way of keeping the shape the same when rotated for any ellipse centre position? There is a solution here but the problem is if one displaces the ellipse it doesn't rotate about the centre of the ellipse, but about the origin.

deleted 131 characters in body
Source Link
corey979
  • 24.3k
  • 7
  • 60
  • 105

I'm trying to plot an ellipse in parametric plot, rotated by some angle and is offset from the origin with respect to the centre. I am almost there, here is my current solution

x[Rx_, Ry_, Cx_, \[Alpha]_α_, \[Theta]_]θ_] := 
 Rx Cos[\[Alpha]]Cos[α] Cos[\[Theta]]Cos[θ] \[Minus] 
  Ry Sin[\[Alpha]]Sin[α] Sin[\[Theta]]Sin[θ] + Cx
y[Rx_, Ry_, Cy_, \[Alpha]_α_, \[Theta]_]θ_] := 
 Rx Cos[\[Alpha]]Cos[α] Sin[\[Theta]]Sin[θ] + Ry Sin[\[Alpha]]Sin[α] Cos[\[Theta]]Cos[θ] + Cy

Manipulate[
 ParametricPlot[{x[10, 5, 0, \[Alpha]α, \[Theta]]θ], 
   y[10, 5, 3, \[Alpha]α, 0.2 \[Pi]]π]}, {\[Alpha]α, 0, 2 \[Pi]π}, 
  PlotRange -> All], {\[Theta]θ, 0, 2 \[Pi]π}] 

However as you will see by rotating the ellipse, when displaced by the origin, changes the effective radius parameters of the ellipse -- not what I want! I suspect that as the ellipse is rotated, the parameters $R_{x}$ and $R_{y}$ are with respect to the $x-y$ axis and not with the geometry itself, so effectively become a function of rotation.

Can anyone see a way of keeping the shape the same when rotated for any ellipse centre position? There is a solution here but the problem is if one displaces the ellipse it doesn't rotate about the centre of the ellipse, but about the origin.

I'm trying to plot an ellipse in parametric plot, rotated by some angle and is offset from the origin with respect to the centre. I am almost there, here is my current solution

x[Rx_, Ry_, Cx_, \[Alpha]_, \[Theta]_] := 
 Rx Cos[\[Alpha]] Cos[\[Theta]] \[Minus] 
  Ry Sin[\[Alpha]] Sin[\[Theta]] + Cx
y[Rx_, Ry_, Cy_, \[Alpha]_, \[Theta]_] := 
 Rx Cos[\[Alpha]] Sin[\[Theta]] + Ry Sin[\[Alpha]] Cos[\[Theta]] + Cy

Manipulate[
 ParametricPlot[{x[10, 5, 0, \[Alpha], \[Theta]], 
   y[10, 5, 3, \[Alpha], 0.2 \[Pi]]}, {\[Alpha], 0, 2 \[Pi]}, 
  PlotRange -> All], {\[Theta], 0, 2 \[Pi]}] 

However as you will see by rotating the ellipse, when displaced by the origin, changes the effective radius parameters of the ellipse -- not what I want! I suspect that as the ellipse is rotated, the parameters $R_{x}$ and $R_{y}$ are with respect to the $x-y$ axis and not with the geometry itself, so effectively become a function of rotation.

Can anyone see a way of keeping the shape the same when rotated for any ellipse centre position? There is a solution here but the problem is if one displaces the ellipse it doesn't rotate about the centre of the ellipse, but about the origin.

I'm trying to plot an ellipse in parametric plot, rotated by some angle and is offset from the origin with respect to the centre. I am almost there, here is my current solution

x[Rx_, Ry_, Cx_, α_, θ_] := 
 Rx Cos[α] Cos[θ] \[Minus] 
  Ry Sin[α] Sin[θ] + Cx
y[Rx_, Ry_, Cy_, α_, θ_] := 
 Rx Cos[α] Sin[θ] + Ry Sin[α] Cos[θ] + Cy

Manipulate[
 ParametricPlot[{x[10, 5, 0, α, θ], 
   y[10, 5, 3, α, 0.2 π]}, {α, 0, 2 π}, 
  PlotRange -> All], {θ, 0, 2 π}] 

However as you will see by rotating the ellipse, when displaced by the origin, changes the effective radius parameters of the ellipse -- not what I want! I suspect that as the ellipse is rotated, the parameters $R_{x}$ and $R_{y}$ are with respect to the $x-y$ axis and not with the geometry itself, so effectively become a function of rotation.

Can anyone see a way of keeping the shape the same when rotated for any ellipse centre position? There is a solution here but the problem is if one displaces the ellipse it doesn't rotate about the centre of the ellipse, but about the origin.

Source Link
user27119
  • 2.5k
  • 13
  • 35

Plot a rotated elipse displaced from the origin, keeping dimensions constant

I'm trying to plot an ellipse in parametric plot, rotated by some angle and is offset from the origin with respect to the centre. I am almost there, here is my current solution

x[Rx_, Ry_, Cx_, \[Alpha]_, \[Theta]_] := 
 Rx Cos[\[Alpha]] Cos[\[Theta]] \[Minus] 
  Ry Sin[\[Alpha]] Sin[\[Theta]] + Cx
y[Rx_, Ry_, Cy_, \[Alpha]_, \[Theta]_] := 
 Rx Cos[\[Alpha]] Sin[\[Theta]] + Ry Sin[\[Alpha]] Cos[\[Theta]] + Cy

Manipulate[
 ParametricPlot[{x[10, 5, 0, \[Alpha], \[Theta]], 
   y[10, 5, 3, \[Alpha], 0.2 \[Pi]]}, {\[Alpha], 0, 2 \[Pi]}, 
  PlotRange -> All], {\[Theta], 0, 2 \[Pi]}] 

However as you will see by rotating the ellipse, when displaced by the origin, changes the effective radius parameters of the ellipse -- not what I want! I suspect that as the ellipse is rotated, the parameters $R_{x}$ and $R_{y}$ are with respect to the $x-y$ axis and not with the geometry itself, so effectively become a function of rotation.

Can anyone see a way of keeping the shape the same when rotated for any ellipse centre position? There is a solution here but the problem is if one displaces the ellipse it doesn't rotate about the centre of the ellipse, but about the origin.