Defining and Plotting a Parametric Curve in 3D a(t)=(x(t),y(t),z(t)) Clear@"Global`*"DH* clears all previous assingments so we can reuse them *L H* Define vector functions in 3D of one variable t, i.e. a curve in 3D *L H* to typeset the alpha, beta, and sigma using esc alpha esc, ditto beta, ditto sigma *L a@t_D = 8Cos@tD, Sin@tD,t< b@t_D = 8t, 2 * t, 3 * t< s@t_D = 8Cos@tD, Sin@tD,0< H* Plot the curves a,b, s with no plotting options defined *L H* Give the plot an assigned name and use this name in the GraphicsGrid command to plot *L aplot1 = ParametricPlot3D@a@tD, 8t, 0, 2 * Pi<D ; bplot1 = ParametricPlot3D@b@tD, 8t, 0, 2 * Pi<D ; splot1 = ParametricPlot3D@s@tD, 8t, 0, 2 * Pi<D ; H* Plot the curve with some plotting options *L aplot2 = ParametricPlot3D@a@tD, 8t, 0, 2 * Pi<, PlotStyle Ø Directive@Red, Thickness@0.015DD, AxesLabel Ø 8x, y, z<, LabelStyle Ø Directive@Black, 15DD; bplot2 = ParametricPlot3D@b@tD, 8t, 0, 2 * Pi<, PlotStyle Ø Directive@Red, Thickness@0.015D, DashedD, AxesLabel Ø 8x, y, z<, LabelStyle Ø Directive@Black, 15DD; splot2 = ParametricPlot3D@s@tD, 8t, 0, 2 * Pi<, PlotStyle Ø Directive@Red, Thickness@0.015D, DotDashedD, AxesLabel Ø 8x, y, z<, LabelStyle Ø Directive@Black, 15DD; H* Display the two plots side by side *L GraphicsGrid@ D
19
Embed
Defining and Plotting a Parametric Curve in 3D a(t)=(x(t ...math.bu.edu/people/josborne/MA225and230/MA230/notes/Function... · Defining and Plotting a Parametric Curve in 3D a(t)=(x(t),y(t),z(t))
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Defining and Plotting a Parametric Curve in 3D a(t)=(x(t),y(t),z(t))
Clear@"Global`*"D H* clears allprevious assingments so we can reuse them *L
H* Define vector functions in 3D of one variable t,i.e. a curve in 3D *LH* to typeset the alpha, beta,and sigma using esc alpha esc,ditto beta, ditto sigma *La@t_D = 8Cos@tD, Sin@tD, t<b@t_D = 8t, 2*t, 3*t<s@t_D = 8Cos@tD, Sin@tD, 0<
H* Plot the curves a,b,s with no plotting options defined *LH* Give the plot an assigned name and use thisname in the GraphicsGrid command to plot *L
H* ContourPlot3D is how to plot FHx,y,zL=c *LH* ContourPlot3D@8F@x,y,zD==1,F@x,y,zD==4<,8x,-2,2<,8y,-2,2<,8z,-2,2<,ContourStyleØ8Directive@BlueD, Directive@Green,[email protected] < D *L
x2 + y2 + z2
z Cos@xD Sin@yD
BasicPlotting.nb 9
Curve in 2D a(t)=(x(t),y(t)), Curve b(t)=f(a(t)) on Surface z=f(x,y) in 3D
10 BasicPlotting.nb
Clear@"Global`*"D H* clears allprevious assingments so we can reuse them *L
H* Define a functionêsurface z=fHx,yL on which we will "project" a curve *L
f@x_, y_D = x^2 + y^2*Sin@x*yD
H* Define a 2D curve aHtL in the Hx,yL-plane *Lx@t_D = Cos@tDy@t_D = Sin@tDa2@t_D = 8x@tD, y@tD<
H* Trick: Think of the 2D curve aHtLas a 3D curve in the Hx,y,z=0L-plane *L
a3@t_D = 8x@tD, y@tD, 0<
H* Define a 3D curve bHtL=fHaHtLL which is constrained to the surface z=fHx,yL *L
af@t_D = 8x@tD, y@tD, f@x@tD, y@tDD<
H* Plots of the above *La2plot = ParametricPlot@a2@tD, 8t, 0, 2*Pi<,
Bring All The Above Together: Curve of Intersection Problems
ü (In Class Problem) Find the curve of intersection of the two surfaces f(x, y) = x + 2 y - 2 and g(x, y) = 2 x + y + 3.
(Hint: Do the algebra work by hand)(Extra: Come up with plots to check your answer)
12 BasicPlotting.nb
ü
(In Class Problem) Find the curve of intersection of the two surfaces f(x, y) = x + 2 y - 2 and g(x, y) = 2 x + y + 3.
(Hint: Do the algebra work by hand)(Extra: Come up with plots to check your answer)
„ (An Answer) :
Remember that f(x,y)=x+2y-2 g(x,y)=2x+y+3 are explicit functions of x and y which weinterpret to mean z=x+2y-2 and z=2x+y+3. To be an intersection curve the x, y and z'smust all be equal. Our equations scream for us to focus on the zʼs first (since they arealready “solved” for z.
Clear@"Global`*"DH* clears all previous assingments so we can reuse them *L
H* We want to find when the z values equal,so set them equal OR find when their difference is 0 *LSolve@x + 2*y - 2 - H2*x + y + 3L ã 0, xD H* option 1,Solve for x in terms of y, i.e. find xHyL *LSolve@x + 2*y - 2 - H2*x + y + 3L ã 0, yD H* option 2,Solve for y in terms of x, that is find yHxL *L
H* At this point we can write at least two solutions *La@y_D = 8-5 + y, y, 2*H-5 + yL + y + 3 <;H* y is playing the role of the parameter t *Lb@x_D = 8x, 5 + x, x + 2*H5 + xL - 2< ;H* x is playing the role of the parameter t *L
GraphicsGrid@ 88Show@SolutionCurve1, SurfacesPlot D,Show@SolutionCurve2, SurfacesPlot D<< D
88x Ø -5 + y<<
BasicPlotting.nb 13
88y Ø 5 + x<<
PossibleAnswer1 ã 8-5 + t, t, -7 + 3 t<
PossibleAnswer2 ã 8t, 5 + t, 8 + 3 t<
ü (HomeWork 1) Find the curve of intersection of the two surfaces x + 3 y + 4 z - 2 = 0 and (x - 1) + (2 y + 2) - (z - 2) = 0
(Hint : Do the algebra work by hand)(Extra : Come up with plots to check your answer)
„ (An Answer) : So this problem is like the In Class Problem but both surfaces are Implicit.
Donʼt panic when you see an implicit form of a function. As a start, you can always try toturn it into an explicit form by solving for the “easiest” variable.
14 BasicPlotting.nb
Clear@"Global`*"DH* clears all previous assingments so we can reuse them *L
H* So the surfaces are implicit fHx,y,zL=c form,so remedy this "problem" by solving for the explicit form x=fHy,zL. *L