02.05.2014 Views

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Geometry<br />

You can also use a constructor that takes a point on the plane and a direction normal to<br />

the plane pointing up from the positive face of the plane.<br />

A plane constructed with a given normal will not be equal to a plane constructed with a<br />

normal pointing in the opposite direction.<br />

Point3 pt = new Point3(10.0, 10.0, 20.0) ;<br />

Direction3 normal = new Direction3(100.0, 50.0, 0.0);<br />

Plane3 myPlane = new Plane3(pt, normal);<br />

Here is construction from three points:<br />

Plane3 myPlane = new Plane3(ptA, ptB, ptC);<br />

The points must be given a counter-clockwise order, since computation of the normal<br />

defining the plane will be done using the cross product of the vectors AB and AC, where<br />

AC must be oriented in a counter-clockwise direction from AB. If the three points are colinear,<br />

or are mutually equal, then the plane will be defined using point A and will have a<br />

zero direction (i.e. the plane is degenerate).<br />

The public properties for Plane3 include:<br />

DefiningPoint - This property gets a point on the plane used to define the plane.<br />

Point3 pt1 = new Point3(10, 10, 10);<br />

Direction3 di1 = new Direction3(5, 5, 5);<br />

Plane3 pl1 = new Plane3(pt1, di1);<br />

Point3 defPt = pl1.DefiningPoint;<br />

//defPt is {(10,10,10)}<br />

Normal - This property gets the direction normal to the plane used to define the plane.<br />

Direction3 dir = pl1.Normal;<br />

//dir is {(5,5,5)}<br />

IsDegenerate - This property returns true if the plane is degenerated to a point.<br />

Point3 pt1 = new Point3(10, 10, 10);<br />

Point3 pt2 = new Point3(20, 20, 20);<br />

Point3 pt3 = new Point3(30, 30, 30);<br />

Plane3 pl2 = new Plane3(pt1, pt2, pt3);<br />

bool result = pl2.IsDegenerate;<br />

//result is true;<br />

<strong>Schlumberger</strong> Private<br />

<strong>Ocean</strong> Services 4-179

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!