Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test implementation of Sample Elimination Algorithm #54

Closed
3 tasks done
WorkGitAccount opened this issue Feb 20, 2024 · 4 comments
Closed
3 tasks done

Test implementation of Sample Elimination Algorithm #54

WorkGitAccount opened this issue Feb 20, 2024 · 4 comments
Assignees
Labels

Comments

@WorkGitAccount
Copy link
Collaborator

WorkGitAccount commented Feb 20, 2024

References #13

The cySampleElim.h class handles the poisson disc sample elimination algorithm. Run and test this class through python.

  • Verify cySampleElim class binding and linking with python
  • Write example code that demonstrates a working Sample Elimination Algorithm
  • Write and verify unit tests including tests for each function:
    - [] WeightedSampleElimination()
    - [] Eliminate()
    - SetTiling()
    - SetWeightLimiting()
    - GetParameters()
    - GetMaxPoissonDiscRadius()
@WorkGitAccount WorkGitAccount self-assigned this Feb 20, 2024
@WorkGitAccount
Copy link
Collaborator Author

WorkGitAccount commented Mar 2, 2024

Stepped through the cySampleElim class paying special attention to data types, syntax, and parameter handling.

The cyCodeBase has been hardcoded to link with matlab and will need to be updated.

It is possible to only link to PcCoarsen2D which calls this class. However linking to cySampleElim will allow the python library to interact and run unit tests. Users will be able to study and engage with the algorithm.

The class and sample elimination algorithm are well documented by the author Cem Yeksel ( Sample Elimination for Generating Poisson Disk Sample Sets ) . The algorithm could be implemented in python with a simple case as a demo. As part of the project documentation, a script to run an animation could help visualize the elimination algorithm and blue noise characteristics.

[t:45]

@WorkGitAccount
Copy link
Collaborator Author

Wrote Python script to generate input sample data focusing on a finite base case. Stepped through matlab data structures created at breakpoints simultaneously with python. Drafted ways to automate this process.

[t:75]

@WorkGitAccount
Copy link
Collaborator Author

Successfully compiled a shared library of just the cySampleElim class with bindings for python for testing. Verified creating an elim object from python and calling member functions.

Added python function to generate input data. Wrote test cases.

[t:200]

@WorkGitAccount
Copy link
Collaborator Author

Got all the bindings to work except Eliminate(). It is an overloaded function that takes a lambda function as the weightfunction when overloaded. The syntax to get this all to work is extremely complicated (binding overloaded function with optional lambda weightfunction).

Eliminate() can be effectively tested when it's calling class PcCoarsen is binded and tested in another task. This simplifies testing and focuses efforts on the first milestone.

[t:240]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant