1 |
#include "circle.h"
|
2 |
#include <math.h>
|
3 |
|
4 |
CIRCLE::CIRCLE(double *cent,double rad):CURVE()
|
5 |
{
|
6 |
center[0]=cent[0];
|
7 |
center[1]=cent[1];
|
8 |
center[2]=cent[2];
|
9 |
radius=rad;
|
10 |
}
|
11 |
|
12 |
CIRCLE::CIRCLE(CIRCLE &mdd):CURVE(mdd)
|
13 |
{
|
14 |
center[0]=mdd.center[0];
|
15 |
center[1]=mdd.center[1];
|
16 |
center[2]=mdd.center[2];
|
17 |
radius=mdd.radius;
|
18 |
}
|
19 |
|
20 |
CIRCLE::~CIRCLE()
|
21 |
{
|
22 |
}
|
23 |
|
24 |
void CIRCLE::evaluer(double t,double *xyz)
|
25 |
{
|
26 |
xyz[0]=center[0]+radius*cos(t);
|
27 |
xyz[1]=center[1]+radius*sin(t);
|
28 |
xyz[2]=center[2];
|
29 |
} |