ImplicitFunc2d

ABSTRACT

Generates a 2D implicit function mesh based on specified parameters. We use the marching squares algorithm.

REMARK

In general, The granularity is not great and I do not recommend using this function in its current state

PARAMETERS
x_minMinimum x-value for the function's domain
x_maxMaximum x-value for the function's domain
y_minMinimum y-value for the function's domain
y_maxMaximum y-value for the function's domain
x_minMinimum x-value for the function's domain
x_maxMaximum x-value for the function's domain
y_minMinimum y-value for the function's domain
y_maxMaximum y-value for the function's domain
x_stepStep size for the x-coordinate. This dictates the granularity in the x direction.
y_stepStep size for the y-coordinate. This dictates the granularity in the y direction.
f(x,y)The function f(x, y) that defines the 2D implicit function. This should a return a scalar. The generated contour is going to be the boundary of the where this function is <= 0. This may be unexpected as in many cases this adds lines along the boundary of the rectangle (even if the function would not actually be approximately zero there).
tagA vector of numbers used as the mesh's tag
defaultAn enum branch specifying to use the default coloring scheme, white stroke with no fill
strokeA 4-vector representing the color of the stroke
strokeA 4-vector representing the color of the stroke
fillA 4-vector representing the color of the fill. Note that this forces an uprank
RETURN

Generates a 2D mesh representing the specified implicit function over the given domain

DECLARATION
func ImplicitFunc2d([points] {[main] {x_min, x_max, y_min, y_max}, [step] {x_min, x_max, y_min, y_max, x_step, y_step}}, f(x,y), tag, [color] {[default] {}, [stroke] {stroke}, [solid] {stroke, fill}})