48 auto params = SH3::defaultParameters() | SHG3::defaultParameters();
50 params(
"polynomial",
"3*x^2+2*y^2+z^2-90" )(
"gridstep", 0.25 );
51 auto implicit_shape = SH3::makeImplicitShape3D ( params );
52 auto digitized_shape = SH3::makeDigitizedImplicitShape3D( implicit_shape, params );
53 auto binary_image = SH3::makeBinaryImage ( digitized_shape, params );
54 auto K = SH3::getKSpace( params );
56 auto surfels = SH3::getSurfelRange(
surface, params );
57 auto positions = SHG3::getPositions( implicit_shape,
K, surfels, params );
58 auto normals = SHG3::getNormalVectors( implicit_shape,
K, surfels, params );
59 auto mean_curvs = SHG3::getMeanCurvatures( implicit_shape,
K, surfels, params );
60 auto gauss_curvs = SHG3::getGaussianCurvatures( implicit_shape,
K, surfels, params );
70 surfels,
"Mean Curv", mean_curvs
72 "Gauss Curve", gauss_curvs
81 std::string objectName =
"Surfels 1";
82 viewer.
draw(surfels, objectName);
83 viewer.
addQuantity(objectName,
"Mean Curv", mean_curvs);
84 viewer.
addQuantity(objectName,
"Gauss Curv", gauss_curvs);
93 std::string objectName2 =
"Surfels 3";
97 auto surfIt = surfels.begin();
98 auto mcurveIt = mean_curvs.begin();
99 auto gcurveIt = gauss_curvs.begin();
100 auto ncurveIt = normals.begin();
102 for (; surfIt != surfels.end(); ++surfIt, ++mcurveIt, ++gcurveIt, ++ncurveIt) {
104 viewer <<
WithQuantity(*surfIt,
"Mean Curv", *mcurveIt);
105 viewer.
addQuantity(objectName2,
"Gauss Curve", *gcurveIt);
106 viewer.
addQuantity(objectName2,
"Normals", *ncurveIt);