Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Search for

# rectangle_ex1.cpp File Reference

`#include <SyFi.h>`

Go to the source code of this file.

## Functions
int | main ()

## Function Documentation

int main | ( |  | ) |

| Definition at line 5 of file rectangle_ex1.cpp. References Rectangle::integrate(), ReferenceRectangle::integrate(), Rectangle::repr(), ReferenceRectangle::repr(), x, y, and z.
    00005            {
    00006
    00007   ex f = x*y;
    00008   ReferenceRectangle rectangle;
    00009
    00010   ex repr = rectangle.repr();
    00011   cout <<"s.repr "<<repr<<endl;
    00012
    00013   ex intf = rectangle.integrate(f);
    00014   cout <<"intf "<<intf<<endl;
    00015
    00016
    00017
    00018   ex p0 = lst(0.0,0.0);
    00019   ex p1 = lst(1.0,1.0);
    00020
    00021   Rectangle rectangle2(p0,p1);
    00022
    00023   ex repr2 = rectangle2.repr();
    00024   cout <<"s2.repr "<<repr<<endl;
    00025
    00026   ex intf2 = rectangle2.integrate(f);
    00027   cout <<"intf2 "<<intf2<<endl;
    00028
    00029   ex f3 = (x+1)*y*z;
    00030   p0 = lst(0.0,0.0,1.0);
    00031   p1 = lst(0.0,1.0,0.0);
    00032
    00033   Rectangle rectangle3(p0,p1);
    00034
    00035   ex repr3 = rectangle3.repr();
    00036   cout <<"s3.repr "<<repr3<<endl;
    00037
    00038   ex intf3 = rectangle3.integrate(f3);
    00039   cout <<"intf3 "<<intf3<<endl;
    00040
    00041   return 0;
    00042 }