glot::p_curve Class Reference

p_curve: a parametric curve to plot More...

#include <p_curve.h>

Inheritance diagram for glot::p_curve:

glot::primitive

List of all members.

Public Member Functions

 p_curve (const function &x_f, const function &y_f, const color &col, double t0=0, double tf=1)
 Constructor.
 p_curve (function::double_function x_f, function::double_function y_f, const color &col, double t0=0, double tf=1)
 Constructor.
double x (double t)
double y (double t)
void dl_gen (const screen &s)
 Display-list generator.

Public Attributes

color c
 The color of the the primitive.

Protected Attributes

function x_function
function y_function
double tstart
double tfinal


Detailed Description

p_curve: a parametric curve to plot

This class takes two functions that accept doubles and return a double. It then samples t in [0,1] and connects the dots with straight lines

See also:
grapher

curve


Constructor & Destructor Documentation

glot::p_curve::p_curve ( const function x_f,
const function y_f,
const color col,
double  t0 = 0,
double  tf = 1 
) [inline]

Constructor.

Parameters:
x_f - the parametric definition of x
y_f - the parametric definition of y
col - the color of the curve
t0 - the beginning of the parameterization
tf - the end of the parameterization

glot::p_curve::p_curve ( function::double_function  x_f,
function::double_function  y_f,
const color col,
double  t0 = 0,
double  tf = 1 
) [inline]

Constructor.

Parameters:
x_f - the parametric definition of x
y_f - the parametric definition of y
col - the color of the curve
t0 - the beginning of the parameterization
tf - the end of the parameterization
Instead of declaring functions and a curve, we anticipate it being useful to just declare a curve with the functions you've already defined


Member Function Documentation

void glot::p_curve::dl_gen ( const screen s  )  [virtual]

Display-list generator.

Parameters:
s - the screen specs
The screen stores the dimensions of the plot, etc. and based on that information, this function generates the geometry for the primitive. Typically this might be stored in a display list, but that is up to the container class, grapher

Implements glot::primitive.

double glot::p_curve::x ( double  t  ) 

double glot::p_curve::y ( double  t  ) 


Member Data Documentation

The color of the the primitive.

Reimplemented from glot::primitive.

double glot::p_curve::tfinal [protected]

double glot::p_curve::tstart [protected]


The documentation for this class was generated from the following file:

Generated on Fri Nov 20 18:09:06 2009 for OpenGLot by  doxygen 1.5.8