31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

16.12 Rational Planes ( d3 rat plane )<br />

1. Definition<br />

An instance P of the data type d3 rat plane is an oriented rational plane in the threedimensional<br />

space R 3 . It can be defined by a tripel (a,b,c) of non-collinear rational points<br />

or a single rational point a and a normal vector v.<br />

#include < <strong>LEDA</strong>/geo/d3 rat plane.h ><br />

2. Creation<br />

d3 rat plane p;<br />

introduces a variable p of type d3 rat plane initialized to the trivial<br />

plane.<br />

d3 rat plane p(const d3 rat point& a, const d3 rat point& b, const d3 rat point& c);<br />

introduces a variable p of type d3 rat plane initialized to the plane<br />

through (a, b, c).<br />

Precondition: a, b, and c are not collinear.<br />

d3 rat plane p(const d3 rat point& a, const rat vector& v);<br />

introduces a variable p of type d3 rat plane initialized to the plane<br />

that contains a with normal vector v.<br />

Precondition: v.dim( ) = 3 and v.length( ) > 0.<br />

d3 rat plane p(const d3 rat point& a, const d3 rat point& b);<br />

introduces a variable p of type d3 rat plane initialized to the plane<br />

that contains a with normal vector b − a.<br />

3. Operations<br />

d3 rat point p.point1( ) returns the first point of p.<br />

d3 rat point p.point2( ) returns the second point of p.<br />

d3 rat point p.point3( ) returns the third point of p.<br />

integer p.A( ) returns the A parameter of the plane equation.<br />

integer p.B( ) returns the B parameter of the plane equation.<br />

integer p.C( ) returns the C parameter of the plane equation.<br />

integer p.D( ) returns the D parameter of the plane equation.<br />

rat vector p.normal( ) returns a normal vector of p.

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

Saved successfully!

Ooh no, something went wrong!