Generates shapes using DGtal library.
Usage: shapeGenerator [options] –shape <shapeName> –output <outputBasename>
Allowed options are:
-h,--help Print this help message and exit
-l,--list List all available shapes
-s,--shape TEXT Shape name
-R,--radius FLOAT Radius of the shape
-A,--axis1 FLOAT Half big axis of the shape (ellipse)
-a,--axis2 FLOAT Half small axis of the shape (ellipse)
-r,--smallradius FLOAT=5 Small radius of the shape (default 5)
-v,--varsmallradius FLOAT=5 Variable small radius of the shape (default 5)
-k UINT=3 Number of branches or corners the shape (default 3)
--phi FLOAT=0 Phase of the shape (in radian, default 0.0)
-w,--width FLOAT=10 Width of the shape (default 10.0)
-p,--
power FLOAT=2 Power of the metric (
default 2.0)
-o,--output TEXT Basename of the output file
--signature Display to the standard output the signature (normal, curvature) at each point of the specified shape contour (middle point of each contour linel)
-f,--format TEXT Output format:
Bitmap {pgm, raw}
Vector {svg} (+ {png,pdf}
if libCairo installed) (
default pgm)
T power(const T &aVal, const unsigned int exponent)
You can list the potential shapes:
$ contourGenerator --list
2D Shapes:
ball Ball for the Euclidean metric.
Required parameter(s): --radius [-R]
Required parameter(s): --width [-w]
lpball Ball for the l_power metric (no signature).
Required parameter(s): --radius [-R], --
power [-p]
flower Flower with k petals with radius ranging from R+/-v.
Required parameter(s): --radius [-R], --varsmallradius [-v], --k [-k], --phi
ngon Regular k-gon.
Required parameter(s): --radius [-R], --k [-k], --phi
accflower Accelerated Flower with k petals.
Required parameter(s): --radius [-R], --varsmallradius [-v], --k [-k], --phi
ellipse Ellipse.
Required parameter(s): --axis1 [-A], --axis2 [-a], --phi
Example:
# generate an accflower shape with 6 petals of maximal radius 40 and small radius 10:
shapeGenerator -s accflower -R 40 -v 10 -k 6 -f pgm -o test2
You should obtain such a resulting image:
resulting visualisation of generated shape.
- See also
- shapeGenerator.cpp contourGenerator