Make the most out of any wiki by using our free sister product, Blendspace by TES, to create interactive lessons and presentations!

Portions not contributed by visitors are Copyright 2016 Tangient LLC TES: The largest network of teachers in the world |

Loading...

Home > Commands ->

Vector Functions of Curves## EXAMPLES ON MY SAGE PAGE: Vector Functions of Curves in Sage

curve have 1 parameter, i.e. 1 variable (regardless of the number of components).DOUBLEparentheses to define a vector function!definingandplottingvector (parametric) functions of curves.evaluating r[t=3], extracting components r[0], magnitude abs(r), norm(r), derivatives diff(r)

See also: Parametric Plot Command

See also

YouTubes: What's a Curve, What's a Parameter?, What do we need to parameterize?, Parameterize in 2D,Parameterize unit circle, Parameterize any circle, Parameterize any ellipse, Parameterize a piece of ellipse, Parameterize Curve in 3D 1, Parameterize Curve in 3D 2

Define and plot a vector function of a curveStep 1: Declare the variable

Step 2: Define the function. Use

DOUBLEparentheses!Step 3: Use parametric_plot.

Example 1 - vector function with 2 componentsand 2D plotvar ('t')

r=vector((t,t^2))

parametric_plot(r,(t,-2,2))

Example 2 - vector function with 3 componentsand 3D plotvar ('t')

r=vector((sin(t),cos(t),t))

parametric_plot(r,(t,-2*pi,2*pi),color='purple',thickness=3, aspect_ratio=(3,3,1))

Extract component functions of vector function of a curveExample 3 - Projecting a 3d parametric curve onto the x0y plane andvar ('t')

r=vector((sin(t),cos(t),t))

r2=vector((r[0],r[1]))

p2=parametric_plot(r2,(t,-2*pi,2*pi),rgbcolor=(1,0,0),thickness=2, aspect_ratio=1)

show(p2, figsize=3)

Example 4 - Plot 2d curve in 3d -it appears thatadding a plot of a 3d vector function will force a 3d plot!Notice that you CAN plot a 2d vector function in 3d. (It will plot at z=0.)

var ('t')

r=vector((sin(t),cos(t),t))

r2=vector((r[0],r[1]))

p3=parametric_plot(r,(t,-2*pi,2*pi),color='purple',thickness=3, aspect_ratio=(3,3,1))

p2in3=parametric_plot(r2,(t,-2*pi,2*pi),color='red',thickness=5, aspect_ratio=(3,3,1))

show(p3+p2in3)

Keywords: sage, vector, curve, function, parameter, parametric_plot