A parametric 3D surface defined by a function f(u, v) -> (x, y, z). The surface is tessellated into a grid of quadrilateral patches, each represented as VMobject submobjects for rendering.
Details
Based on Manim's Surface class. The surface is created by evaluating the parametric function on a regular (u, v) grid and creating a mesh of flat quadrilateral patches. Each patch can be individually colored using a color function.
Super classes
manimR::MObject -> manimR::VMobject -> manimR::ThreeDVMobject -> Surface
Public fields
funcParametric function f(u, v) -> c(x, y, z)
u_rangeRange for u parameter c(min, max)
v_rangeRange for v parameter c(min, max)
u_resolutionNumber of subdivisions in u
v_resolutionNumber of subdivisions in v
color_funcOptional function(x,y,z) -> hex color
checkerboard_colorsTwo-color checkerboard pattern
mesh_linesWhether to draw mesh lines
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()manimR::ThreeDVMobject$apply_shading()manimR::ThreeDVMobject$get_depth()
Method new()
Create a parametric Surface
Arguments
funcFunction(u, v) returning c(x, y, z)
u_rangec(min, max) for u parameter
v_rangec(min, max) for v parameter
u_resolutionGrid resolution in u
v_resolutionGrid resolution in v
colorSurface color
fill_opacitySurface opacity
color_funcOptional per-point coloring function
checkerboard_colorsTwo colors for checkerboard pattern
mesh_linesDraw wireframe mesh
...Additional args
Method set_color_by_z()
Color the surface by z-value using a gradient
Usage
Surface$set_color_by_z(colors = c(BLUE, GREEN, YELLOW, RED), z_range = NULL)