Field
ABSTRACT
Generates a field mesh based on specified parameters. A field consists of a collection of meshes at various evenly spaced positions.
REMARK
The Field function is pretty versatile. It's suitable for representing scalar or vector fields across a region defined by the specified parameters. However, it can also be used for things outside of a mathematical field, if we just want to place a bunch of meshes at various grid points.
PARAMETERS
x_min | Define the minimum x-coordinate of the field |
x_max | Define the maximum x-coordinate of the field |
y_min | Define the minimum y-coordinate of the field |
y_max | Define the maximum y-coordinate of the field |
x_min | Define the minimum x-coordinate of the field |
x_max | Define the maximum x-coordinate of the field |
y_min | Define the minimum y-coordinate of the field |
y_max | Define the maximum y-coordinate of the field |
x_step | Define the step size for x-coordinate (x-wise separation of adjacent sub_meshes) |
y_step | Define the step size for y-coordinate (y-wise separation of adjacent sub_meshes) |
x_min | Define the minimum x-coordinate of the field |
x_max | Define the maximum x-coordinate of the field |
y_min | Define the minimum y-coordinate of the field |
y_max | Define the maximum y-coordinate of the field |
x_step | Define the step size for x-coordinate (x-wise separation of adjacent sub_meshes) |
y_step | Define the step size for y-coordinate (y-wise separation of adjacent sub_meshes) |
mask(pos) | Function to define the mask for specific positions (whether or not to include a mesh at a particular position). Return a non zero value if it should be used, and zero otherwise. |
mesh_at(pos) | Function to define mesh at specific positions. Pos is a 3-vector consisting of the global x, y, and z positions. |
RETURN
a mesh-tree of the resultant generated meshes. There are no guarantees on the specific shape of the mesh-tree (i.e. whether it is flattened or not)
DECLARATION
func Field([points] {[main] {x_min, x_max, y_min, y_max}, [step] {x_min, x_max, y_min, y_max, x_step, y_step}, [mask] {x_min, x_max, y_min, y_max, x_step, y_step, mask(pos)}}, mesh_at(pos))