Khalimsky Signed Cell Visualization (with Board3DTo2D)
Khalimsky Signed Cell Visualization (with Board3DTo2D)
#include "DGtal/io/boards/Board3DTo2D.h"
#include "DGtal/base/Common.h"
#include "DGtal/helpers/StdDefs.h"
#include "DGtal/shapes/Shapes.h"
using namespace std;
using namespace Z3i;
{
K.init( plow, pup,
true );
board << SetMode3D(
domain.className(),
"Paving" );
SCell voxelB =
K.sCell(
Point(1,1,3));
board << voxelB << voxelA;
SCell surfelA =
K.sCell(
Point( 2, 1, 3 ) );
SCell surfelB =
K.sCell(
Point( 1, 0, 1 ),
false );
SCell surfelD =
K.sCell(
Point( 1, 1, 0 ) );
board << surfelA << surfelB << surfelC << surfelD << surfelE;
SCell linelB =
K.sCell(
Point(2,2 ,1));
SCell linelC =
K.sCell(
Point(1,2 ,2),
false);
board << linelA << linelB << linelC;
SCell ssurfelXZ =
K.sCell(
Point( 5, 6, 5 ),
false );
SCell ssurfelXY =
K.sCell(
Point( 5, 5, 6 ),
false );
SCell ssurfelZY =
K.sCell(
Point( 6, 5, 5 ),
false );
SCell ssurfelXZo =
K.sCell(
Point( 5, 4, 5 ),
false );
SCell ssurfelXYo =
K.sCell(
Point( 5, 5, 4 ),
false );
SCell ssurfelZYo =
K.sCell(
Point( 4, 5, 5 ),
false );
board << ssurfelXZ << ssurfelXY << ssurfelZY;
board << ssurfelXZo << ssurfelXYo << ssurfelZYo;
SCell pointelB =
K.sCell(
Point(4, 4, 4),
true);
SCell pointelC =
K.sCell(
Point(6, 4, 4),
false);
SCell linelAC =
K.sCell(
Point(5, 4, 4),
false);
board << pointelA << pointelB << pointelC << linelAC;
board << CameraPosition(3.49239, 3.04746, -1.40276)
<< CameraDirection(-0.605129, -0.454197, 0.653853)
<< CameraUpVector(0.516135, -0.84913, -0.112173);
board.saveCairo("dgtalBoard3DTo2D-KSCell.png", Board3DTo2D<Space, KSpace>::CairoPNG, 600, 400);
}
Point center(const std::vector< Point > &points)
DGtal is the top-level namespace which contains all DGtal functions and types.
int main(int argc, char **argv)
HyperRectDomain< Space > Domain