-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExampl3d.h
65 lines (58 loc) · 1.55 KB
/
Exampl3d.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef Exampl3d_H
#define Exampl3d_H
#define M_PI 3.141592653589
#include <algorithm>
#include <any>
#include <cmath>
#include <iostream>
#include <random>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
class Point3d {
public:
double x;
double y;
double z;
virtual void GetPoint() {}
virtual void GetFirstDerivative() {}
};
class Circle : public Point3d {
public:
Circle(double radius) : Rad(radius) {}
virtual vector<double> GetFirstDerivative(const double &t);
virtual vector<double> GetPoint(const double &t);
virtual double GetRadius();
private:
virtual double cordX(const double &t);
virtual double cordY(const double &t);
virtual double cordZ(const double &t);
double Rad;
};
class Ellipse : public Point3d {
public:
Ellipse(double radius_A, double radius_B) : RadA(radius_A), RadB(radius_B) {}
virtual vector<double> GetFirstDerivative(const double &t);
virtual vector<double> GetPoint(const double &t);
private:
virtual double cordX(const double &t);
virtual double cordY(const double &t);
virtual double cordZ(const double &t);
double RadA;
double RadB;
};
class Helixe : public Point3d {
public:
Helixe(double radius, double step) : Rad(radius), Step(step) {}
virtual vector<double> GetFirstDerivative(const double &t);
virtual vector<double> GetPoint(const double &t);
private:
virtual double cordX(const double &t);
virtual double cordY(const double &t);
virtual double cordZ(const double &t);
double Step;
double Rad;
};
bool circlcomp(Circle *c1, Circle *c2);
#endif // Exampl3d_H