00001 #ifndef P_CURVE_H
00002 #define P_CURVE_H
00003
00004 #include "primitive.h"
00005 #include "function.h"
00006 #include "color.h"
00007
00008 namespace glot {
00009
00019 class p_curve : public primitive {
00020
00021 public:
00022
00023 color c;
00024
00032 p_curve(const function& x_f, const function& y_f, const color& col, double t0 = 0, double tf = 1) : primitive(col), x_function(x_f), y_function(y_f), tstart(t0), tfinal(tf) {};
00033
00045 p_curve(function::double_function x_f, function::double_function y_f, const color& col, double t0 = 0, double tf = 1) : primitive(col), x_function(x_f), y_function(y_f), tstart(t0), tfinal(tf) {};
00046
00047 double x(double t);
00048
00049 double y(double t);
00050
00051 void dl_gen(const screen& s);
00052
00053 protected:
00054
00055
00056 function x_function, y_function;
00057 double tstart, tfinal;
00058
00059 };
00060
00061 }
00062
00063 #endif