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 />

The SphericalPoint class provides a constructor that creates the point from two<br />

angles and the distance from the origin. Here is construction by the theta, phi, and rho<br />

spherical polar coordinates, where:<br />

theta - The angle between the X axis and the line, which is the projection onto the XY<br />

plane of the line of shortest distance connecting the origin of 3D space with the point.<br />

phi - The angle between the XY plane and the line of shortest distance connecting the<br />

origin of 3D space with the point.<br />

rho - The length of the line of shortest distance connecting the origin of 3D space with<br />

the point.<br />

Angle theta = new Angle(0.5);<br />

Angle phi = new Angle(1.0);<br />

double rho = 10.0;<br />

SphericalPoint sp = new SphericalPoint(theta, phi, rho);<br />

Here is the copy constructor that creates a copy of an existing SphericalPoint:<br />

SphericalPoint myPt = new SphericalPoint(SphericalPoint sp);<br />

The public properties for SphericalPoint include:<br />

Phi - This property gets the angle between the XY plane and the line of shortest distance<br />

connecting the origin of 3D space with the point.<br />

SphericalPoint sp = new SphericalPoint(20, 40, 20);<br />

Angle ang = sp.Phi;<br />

//ang is 2.3<br />

Rho - This property gets the length of the line of shortest distance connecting the origin of<br />

3D space with the point.<br />

SphericalPoint sp = new SphericalPoint(20, 40, 20);<br />

double distance = sp.Rho;<br />

//distance is 20<br />

4-192 <strong>Ocean</strong> Application Development Framework 2008.1<br />

<strong>Schlumberger</strong> Private

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

Saved successfully!

Ooh no, something went wrong!