DGtal 1.4.0
Loading...
Searching...
No Matches
EllipticHelix.h
1
17#pragma once
18
31#if defined(EllipticHelix_RECURSES)
32#error Recursive header files inclusion detected in EllipticHelix.h
33#else // defined(EllipticHelix_RECURSES)
35#define EllipticHelix_RECURSES
36
37#if !defined EllipticHelix_h
39#define EllipticHelix_h
40
42// Inclusions
43#include <iostream>
44#include <cmath>
45#include "DGtal/base/Common.h"
47
48namespace DGtal
49{
50
52// class EllipticHelix
58template <typename TSpace>
60{
61 // ----------------------- Standard services ------------------------------
62public:
63 typedef TSpace Space;
64 typedef typename TSpace::RealPoint RealPoint;
65 typedef typename TSpace::Point Point;
66
77 EllipticHelix ( long double rr, long double rl, long double bb );
78
79
80 // ----------------------- Interface --------------------------------------
81public:
82
88 RealPoint x ( long double t ) const;
89
95 RealPoint xp ( long double t ) const;
96
102 long double f ( const RealPoint & p ) const;
103
109 long double g ( const RealPoint & p ) const;
110
116 long double h ( const RealPoint & p ) const;
117
118 static double getPeriod();
119
124 void selfDisplay ( std::ostream & out ) const;
125
130 bool isValid() const;
131
132
133 // ------------------------- Protected Datas ------------------------------
134private:
135 // ------------------------- Private Datas --------------------------------
136private:
137 long double r1, r2, b;
138 // ------------------------- Hidden services ------------------------------
139protected:
140
146
147private:
148
154 EllipticHelix ( const EllipticHelix & other );
155
163
164
165 // ------------------------- Internals ------------------------------------
166private:
167
168 static constexpr double PERIOD = M_PI * 2.0;
169
170}; // end of class EllipticHelix
171
172
179template <typename T>
180std::ostream&
181operator<< ( std::ostream & out, const EllipticHelix<T> & object );
182
183
184} // namespace DGtal
185
186
188// Includes inline functions.
189#if !defined(BUILD_INLINE)
190#include "DGtal/geometry/curves/parametric/EllipticHelix.ih"
191#endif
192
193
194// //
196
197#endif // !defined EllipticHelix_h
198
199#undef EllipticHelix_RECURSES
200#endif // else defined(EllipticHelix_RECURSES)
Aim: Implement a parametric curve – elliptic helix.
TSpace::Point Point
long double g(const RealPoint &p) const
inverse function of y
RealPoint xp(long double t) const
bool isValid() const
RealPoint x(long double t) const
long double h(const RealPoint &p) const
inverse function of z
EllipticHelix(long double rr, long double rl, long double bb)
static constexpr double PERIOD
void selfDisplay(std::ostream &out) const
TSpace::RealPoint RealPoint
long double f(const RealPoint &p) const
inverse function of x
EllipticHelix(const EllipticHelix &other)
EllipticHelix & operator=(const EllipticHelix &other)
static double getPeriod()
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)