A grid of arrows representing a 2D vector field. Each arrow is placed at a grid point and oriented/scaled according to the vector function f(x, y) -> c(vx, vy).
Super classes
manimR::MObject -> manimR::VMobject -> ArrowVectorField
Public fields
funcVector field function f(x, y) -> c(vx, vy)
x_rangec(min, max, step) for sampling grid
y_rangec(min, max, step) for sampling grid
length_funcFunction mapping vector magnitude to arrow length
max_lengthMaximum arrow length in scene units
color_schemeColor scheme ("magnitude", "angle", or single color)
colorsGradient colors for coloring
arrowsList of Arrow submobjects
Methods
Inherited methods
manimR::MObject$add_updater()manimR::MObject$align_to()manimR::MObject$clear_updaters()manimR::MObject$copy()manimR::MObject$generate_target()manimR::MObject$get_bottom()manimR::MObject$get_corner()manimR::MObject$get_height()manimR::MObject$get_left()manimR::MObject$get_right()manimR::MObject$get_top()manimR::MObject$get_width()manimR::MObject$match_color()manimR::MObject$next_to()manimR::MObject$set_opacity()manimR::MObject$to_corner()manimR::MObject$to_edge()manimR::VMobject$add()manimR::VMobject$add_cubic_bezier()manimR::VMobject$add_line()manimR::VMobject$add_submobject()manimR::VMobject$append_points()manimR::VMobject$clear_points()manimR::VMobject$get_all_points()manimR::VMobject$get_arc_length()manimR::VMobject$get_bounding_box()manimR::VMobject$get_center()manimR::VMobject$get_draw_points()manimR::VMobject$get_end()manimR::VMobject$get_num_curves()manimR::VMobject$get_points()manimR::VMobject$get_start()manimR::VMobject$get_submobject()manimR::VMobject$has_points()manimR::VMobject$move_to()manimR::VMobject$point_from_proportion()manimR::VMobject$print()manimR::VMobject$remove()manimR::VMobject$rotate()manimR::VMobject$scale()manimR::VMobject$set_color()manimR::VMobject$set_fill()manimR::VMobject$set_points()manimR::VMobject$set_stroke()manimR::VMobject$set_style()manimR::VMobject$shift()
Method new()
Create an ArrowVectorField
Usage
ArrowVectorField$new(
func,
x_range = c(-5, 5, 0.5),
y_range = c(-3, 3, 0.5),
max_length = 0.5,
color_scheme = "magnitude",
colors = c(BLUE, GREEN, YELLOW, RED),
opacity = 1,
stroke_width = 2,
...
)Arguments
funcFunction(x, y) returning c(vx, vy)
x_rangec(min, max, step) grid range
y_rangec(min, max, step) grid range
max_lengthMaximum arrow length
color_scheme"magnitude", "angle", or a single hex color
colorsGradient colors (for magnitude/angle scheme)
opacityArrow opacity
stroke_widthArrow stroke width
...Additional args