Skip to content

Sampler Penrose [ODJ04]

Description

The N-Rooks sampler. 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/SamplerPenrose.cpp  
include/utk/samplers/SamplerPenrose.hpp
externals/Penrose/*

Usage


Penrose sampler
Usage: ./Penrose [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.
  --silent                    Silence UTK logs
#include <utk/utils/PointsetIO.hpp>
#include <utk/utils/Pointset.hpp>
#include <utk/samplers/SamplerPenrose.hpp>

int main()
{
    utk::Pointset<double> pts;
    utk::SamplerPenrose penrose;

    // Check for no errors
    if (penrose.generateSamples(pts, 1024 /* Number of points */))
    {
        write_text_pointset("penrose.dat", pts);
    }
}
import pyutk

ndr = pyutk.Niederreiter(d=2, basis=2)
samples = ndr.sample(1024) # This is a numpy array !

Results

License

See Licence.md file. Author code from ‘Charles Donohue’ has no licence but is provided with following header.

File: quasisampler_prototype.h
 Quasisampler prototype.

 This is a toy (non-optimized) implementation of the importance sampling
 technique proposed in the paper:
 "Fast Hierarchical Importance Sampling with Blue Noise Properties",
 by Victor Ostromoukhov, Charles Donohue and Pierre-Marc Jodoin,
 to be presented at SIGGRAPH 2004.

 Implementation by Charles Donohue,
Based on Mathematica code by Victor Ostromoukhov.
Universite de Montreal
18.08.04