FORMULA_SURFACE
This element creates a surface defined by a mathematical formula (z=f(x,y)).
Attributes brief detailed show all inherited
Examples
The code below creates a surface that is displayed on a 3D graph.

- <!-- The formula that defines the surface -->
- <FORMULA_SURFACE id="demo_surface" formula="tanh(y)*tanh(x*3)" x_min="-2" x_max="2" x_default="0" y_min="-2" y_max="2" y_default="0" z_min="-1" z_max="1" z_default="0"/>
- <!-- The 3D Viewer -->
- <VIEW_3D id="my_3d_view" width="400" height="250" x_ratio="1" y_ratio="0.8" z_ratio="0.8" transform.tx="0.02" transform.ty="0.02" transform.tz="-1.6" transform.rx="30" transform.ry="0" transform.rz="40" cursor="system::open_hand" persistent_viewpoint="false">
- <!-- Grid object -->
- <GRID_3D id="my_3d_view.grid" x_param_info_id="demo_surface.x_info" y_param_info_id="demo_surface.y_info" z_param_info_id="demo_surface.z_info" y_positions_count="11" x_positions_count="11" z_positions_count="11" x_position="-0.5" y_position="-0.5" z_position="-0.5" opacity="0.4" />
- <!-- The Color surface-->
- <COLOR_SURFACE_3D id="my_3d_view.surface" surface_id="demo_surface" visible="true" draw_style="solid" high_color="#ff0000" low_color="#000030" opacity=".8" x_positions_count="100" y_positions_count="100" x_position="-.5" y_position="-.5" z_position="-.5"/>
- </VIEW_3D>
Related elements
Also see GL_OBJECT_3D, GRID_3D, VIEW_3D.
Comments
Please, authorize to view and post comments.