Skip to content

Sampler Fattal [ANH*17]

Description

The sampler from [FAT*11]
For a more precise description of this sampler and its performances in terms of aliasing and discrepancy, please refer to the following web bundle https://liris.cnrs.fr/ldbn/HTML_bundle/index.html.

Files

src/samplers/Fattal.cpp  
include/utk/samplers/SamplerFattal.hpp
externals/Fattal/*

Usage


Fattal sampler
Usage: ./Fattal [OPTIONS]

Options:
  -h,--help                   Print this help message and exit
  -n UINT REQUIRED            Number of points
  -d UINT                     UNUSED ! Here for compatibility with others.
  -s,--seed UINT              UNUSED ! Here for compatibility with others.
  -m UINT [1]                 Number of pointsets
  -o,--out TEXT [out.dat]     Output file (format). {i} splits outputs in multiple files and token is replaced by index.
  -t,--temperature FLOAT [0.5] 
                              Temperature
  -l,--level UINT [2]         Levels
  --silent                    Silence UTK logs
#include <utk/utils/PointsetIO.hpp>
#include <utk/utils/Pointset.hpp>
#include <utk/samplers/SamplerFattal.hpp>

int main()
{
    utk::Pointset<double> pts;
    utk::SamplerFattal fattal(0.5 /* temperature */, 2 /* levels */);    
    // Check for no errors
    if (fattal.generateSamples(pts, 1024 /* Number of points */))
    {
        write_text_pointset("fattal.dat", pts);
    }
}
import pyutk

fattal = pyutk.Fattal(
  0.5, # temperature
  2,   # levels
)
samples = fattal.sample(1024) # This is a numpy array !

Results

License

See Licence.md file. Author code from ‘Raanan Fattal’ is provided without license.