Plotting 3d Fields

Description

Sage can plot 3D vector fields with the plot_vector_field3d command. The command takes these arguments:

  • functions: A list of 3 functions representing the x, y or z coordinate of a vector.
  • xrange, yrange and zrange: Each a tuple of the form (var, start, stop) containing the independent variable and range for each function
  • plot_points: Either a number or list of 3 numbers defining how many points are plotted for each axis. Defaults to 5.
  • center_arrows: Defaults to False. If True, centers the arrow on each point. If False, draws the arrow with the tail end on the point.

Sage Cell

Code

var('x y z')
plot_vector_field3d(functions=[x^2, y^(1/2), 2*z], xrange=(x, 1, 5), yrange=(y, 1, 5), zrange=(z, 1, 5), plot_points=4, center_arrow=True)

Options

none

Tags

Primary Tags:

Secondary Tags:

A list of possible tags can be found at The WeBWorK Open Problem Library. For linear algebra tags see the Curated Courses Project.

Related Cells

Any related cells go here. Provide a link to the page containing the information about the cell.

Attribute

Permalink:

Author:

Date: 11 Aug 2019 15:45

Submitted by: Zane Corbiere

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License