First function/curve delimiting hatch
Function1 and Function2 refer to the functions that define the borders of a hatched 2D region of type plot::Hatch.
Baseline is the y value of a straight horizontal border line of a hatch.
Function1, Function2 are very technical attributes that a user will hardly ever use.
If f1, f2 are function objects of type plot::Function2d, the hatch object h := plot::Hatch(f1, f2) stores references to the objects f1, f2 as the slots h::Function1, h::Function2. These are text references (i.e., strings) by which the function objects f1, f2 can be identified, but not the function objects themselves.
When Function1 refers to a curve of type plot::Curve2d, Function2 and Baseline are ignored.
Function2 is the (optional) second border function of a hatch. In the plot, the hatched area is bounded by the two functions refered to by Function1 and Function2.
If Function2 is given, Function1 must refer to a function graph of type plot::Function2d, too.
Baseline is an alternative second delimiter of a hatch. It defines a horizontal border line of the hatch with a y-value given by Baseline. The Baseline expression may be animated.
We hatch the area between the functions and x2:
f1 := plot::Function2d(sqrt(x), x = 0..2, Color = RGB::Black): f2 := plot::Function2d(x^2, x = 0..2, Color = RGB::Blue): h := plot::Hatch(f1, f2): plot(f1, f2, h)
The references to the border functions are stored a strings in the hatch object h:
Baseline serves as an alternative for the special case of a constant border function. The Baseline value can be animated:
h := plot::Hatch(f1, sqrt(2)*a, a = 0 .. 1): h::Baseline
A (closed) curve of type plot::Curve2d may be used as the boundary of the hatch:
f1 := plot::Curve2d([sin(2*x), cos(3*x)], x = 0..2*PI, Color = RGB::Black): h := plot::Hatch(f1): h::Function1
delete f1, f2, h, c: