Home > Commands -> Vector Functions of Curves

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

  • Vector functions of a curve have 1 parameter, i.e. 1 variable (regardless of the number of components).
  • Vector functions can have 1, 2, 3 or more components. The components are separated by commas.
  • In sage, you must use DOUBLE parentheses to define a vector function!
  • The top section has to do with defining and plotting vector (parametric) functions of curves.
  • The next section has to do with commands:
    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 curve

Step 1: Declare the variable
Step 2: Define the function. Use DOUBLE parentheses!
Step 3: Use parametric_plot.

Example 1 - vector function with 2 components and 2D plot

var ('t')

Example 2 - vector function with 3 components and 3D plot

var ('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 curve

  • Components of vector functions are numbered like arrays starting with [0], [1],...
  • The components are functions.

Example 3 - Projecting a 3d parametric curve onto the x0y plane and

var ('t')

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 that adding 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.)

  • You must have ALSO plot 3d vector function (set opacity=0 if you do not want to see it)!
  • Set the plot controls (e.g. region and aspect_ratio) in the 3d plot!
  • (Of course you can just add a 3rd component: z=0)

var ('t')

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))

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