Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Function1, Function2, Baseline

First function/curve delimiting hatch

Value Summary

Baseline, Function1, Function2MandatoryText string

Graphics Primitives

ObjectsDefault Values
plot::Hatch, plot::Integral 

Description

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.

Function1 points to a function object of type plot::Function2d or a curve object of type plot::Curve2d.

Function1 is usually set implicitly by plot::Hatch to the Name attribute of its first argument.

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.

Function2 is usually set implicitly by plot::Hatch to the Name attribute of its second argument.

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.

Examples

Example 1

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:

h::Function1, h::Function2

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

plot(f1, h)

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

plot(f1, h)

delete f1, f2, h, c:

See Also

MuPAD Functions

Was this topic helpful?