35 #include "DGtalCatch.h"
36 #include "DGtal/helpers/StdDefs.h"
37 #include "DGtal/shapes/parametric/Lemniscate2D.h"
41 using namespace DGtal;
47 std::uniform_real_distribution<double>& unif,
48 std::default_random_engine& re )
54 while ( res == Approx(0.) );
59 std::uniform_real_distribution<double>& unif,
60 std::default_random_engine& re )
67 std::uniform_real_distribution<double> unif(-10000,10000);
68 std::default_random_engine re;
72 const RealPoint center(unif(re),unif(re));
73 Shape shape( center, unif(re) );
77 SECTION(
"Lower and upper bounds")
79 Shape shape( unif(re), unif(re), unif(re) );
83 SECTION(
"x() with Pi parameter.")
85 Shape shape( unif(re), unif(re), unif(re) );
86 REQUIRE_NOTHROW( shape.
x(M_PI) );
89 SECTION(
"x() with Pi parameter -> division by 0.")
91 Shape shape( unif(re), unif(re), unif(re) );
92 REQUIRE_NOTHROW( shape.
x(M_PI) );
95 SECTION(
"xp() with Pi parameter -> division by 0.")
97 Shape shape( unif(re), unif(re), unif(re) );
98 REQUIRE_NOTHROW( shape.
xp(M_PI) );
101 SECTION(
"xpp() with Pi parameter -> division by 0.")
103 Shape shape( unif(re), unif(re), unif(re) );
104 REQUIRE_NOTHROW( shape.
xp(M_PI) );
RealPoint getLowerBound() const
RealPoint x(const double t) const
RealVector xp(const double t) const
RealPoint getUpperBound() const
Aim: Model of the concept StarShaped represents a lemniscate.
Aim: Implements basic operations that will be used in Point and Vector classes.
Space::RealPoint RealPoint
DGtal is the top-level namespace which contains all DGtal functions and types.
TEST_CASE("Lemniscate2D")
RealPoint notNullRealPoint(std::uniform_real_distribution< double > &unif, std::default_random_engine &re)
double notNullValue(std::uniform_real_distribution< double > &unif, std::default_random_engine &re)
Lemniscate2D< Space > Shape
SECTION("Testing constant forward iterators")
REQUIRE(domain.isInside(aPoint))