Previous Page Next Page Contents

plot::inequality -- generate a 2D plot of inequalities

Introduction

plot::inequality([f1, f2,...], left..right, bottom..top) serves for displaying points (x,y) in the rectangle Q=[left,right] x [bottom, top] satisfying the inequalities

f1(x,y)>=0 and f2(x,y)>=0 and ..


Call(s)

plot::inequality([f1, f2...], left..right, bottom..top <, n> <Colors = [c1, c2, c3]>)

Parameters

f1, f2... - real valued functions of two variables: procedures
left, right, bottom, top - real numerical values
n - a nonnegative integer determining the mesh size. The default value is 6.

Options

Colors = [c1, c2, c3] - each of the colors c1, c2, c3 must be an RGB specification, i.e., a list of three real numerical values between 0 and 1. The default colors are c1 = RGB::Green, c2 = RGB::Yellow, c3 = RGB::Red.

Returns

an object of the domain type plot::Group.

Details

Example 1

>> f1:= (x,y) -> x^2 + y^2 - 1:
   p1:= plot::inequality([f1], -1..1, -1..1, 5)
                               plot::Group()
>> plot(p1, Scaling = Constrained, Axes = Box)
>> f2:= (x,y) -> cos(x) - y: f3:= (x,y) -> cos(x) + y:
   p23:= plot::inequality([f2, f3], -PI..PI, -2..2, 5)
                               plot::Group()
>> plot(p23, Scaling = Constrained, Axes = Box)
>> p123:= plot::inequality(
            [f1, f2, f3], -2..2, -1..1, 5,
            Colors = [RGB::Red, RGB::Black, RGB::White])
                               plot::Group()
>> plot(p123, Scaling = Constrained, Axes = Box)

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000