6
$\begingroup$

I have a problem where I am given a curve in two dimensions. I must plot this curve on a given plane with the starting point of the curve on a certain point on the plane. I have no problems plotting the plane but I do not understand how to move a curve and tilt it so it lies on the plane.

The curve is defined by {x[t], y[t]} = {t Cos[2 t], t Sin[2 t]}. The equation of the plane is 3 (x + 1) + 4 (y - 2) + (z - 2) = 0. The spiral must be centered at {-1, 2, 2}.

$\endgroup$
1
  • 1
    $\begingroup$ Show the code for what you havre tried. What defines the plane, curve, and point? $\endgroup$
    – Bob Hanlon
    Commented Oct 7, 2016 at 21:08

3 Answers 3

7
$\begingroup$

Since the given plane is already in a convenient form, we can easily extract the center point and the normal of the plane to use with RotationTransform[] and InfinitePlane[]. Thus,

With[{pt = {-1, 2, 2}, nrm = {3, 4, 1}}, 
     Show[ParametricPlot3D[pt + RotationTransform[{{0, 0, 1}, nrm}][
                           {t Cos[2 t], t Sin[2 t], 0}] // Evaluate, {t, 0, 2 π}], 
     Graphics3D[{{Red, AbsolutePointSize[8], Point[pt]},
                 {LightBlue,
                  InfinitePlane[pt, Rest[Orthogonalize[{nrm, {1, 0, 0}, {0, 1, 0}}]]]}}], 
  Lighting -> "Neutral"]]

spiral in a plane

$\endgroup$
5
$\begingroup$

The point:

p = {-1, 2, 2};
point = ListPointPlot3D[{p}, PlotStyle -> {Blue, PointSize[Large]}]

The plane:

eqPlane = 3 (x + 1) + 4 (y - 2) + (z - 2) == 0;

f[x_, y_] := z /. First @ Solve[eqPlane, z]

f[x, y]

7 - 3 x - 4 y

plane = ParametricPlot3D[{x, y, f[x, y]}, {x, -10, 10}, {y, -10, 10}, Mesh -> None, BoxRatios -> 1]

The spiral:

{a[t_], b[t_], c[t_]} := {t Cos[2 t], t Sin[2 t], f[a[t], b[t]]}

Origin of the spiral:

s0 = {a[0], b[0], c[0]}

{0, 0, 7}

Plot of the spiral moved to the point p:

spiral = ParametricPlot3D[{a[t], b[t], c[t]} - s0 + p, {t, 0, 2 π}, PlotStyle -> Red, BoxRatios -> 1]

Simplify[eqPlane]

3 x + 4 y + z == 7

view = Coefficient[Simplify[First@eqPlane], #] & /@ {x, y, z}

{3, 4, 1}

Result:

Show[spiral, plane, point, ViewPoint -> view]

enter image description here

$\endgroup$
0
$\begingroup$

An uninspiring way:

{x[t], y[t]} = {t Cos[2 t], t Sin[2 t]};
 p = ({x, y, z} /. First@Solve[(x + 1) + 4 (y - 2) + (z - 2) == 0, z])
q = p /. {x -> x[t], y -> y[t]};
Show[Plot3D[Evaluate[p[[3]]], {x, -10, 10}, {y, -10, 10}, 
  Mesh -> None, PlotStyle -> {LightBlue, Opacity[0.5]}], 
 ParametricPlot3D[Evaluate[q], {t, 0, 2 Pi}, PlotStyle -> Red]]

enter image description here

$\endgroup$

Your Answer

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

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