Example of DSLSubsegment.
#include <iostream>
#include "ConfigExamples.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/base/Common.h"
#include <map>
#include "DGtal/geometry/curves/DSLSubsegment.h"
#include "DGtal/kernel/CPointPredicate.h"
#include "DGtal/arithmetic/IntegerComputer.h"
{
trace.
beginBlock (
"Example exampleDSLSubsegment" );
typedef long double Number;
typedef DSLSubseg::Point
Point;
DSLSubseg D1(2,3,15,A,B,"farey");
std::cout << "a=" << D1.getA() << " b=" << D1.getB() << " mu=" << D1.getMu() << std::endl;
DSLSubsegD D2(0.6666,5,A,B,0.00005);
std::cout << "a=" << D2.getA() << " b=" << D2.getB() << " mu=" << D2.getMu() << std::endl;
return 0;
}
Aim: Given a Digital Straight line and two endpoints A and B on this line, compute the minimal charac...
void beginBlock(const std::string &keyword="")
Point::Coordinate Integer
DGtal is the top-level namespace which contains all DGtal functions and types.
boost::int32_t int32_t
signed 32-bit integer.