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

Refactoring / rewriting #11

Open
wants to merge 71 commits into
base: main
Choose a base branch
from
Open

Conversation

Emmanuel-R8
Copy link
Contributor

While keeping the overall structure intact, it is a big refactoring, bordering on rewrite. Given the scope of the changes, no offence taken if it is disregarded.

  • breaking things down in many smaller files.
  • No more x, y. Just row/height. No more flipping of coordinates.
  • A lot of comments to follow the meanings of the various fields / numerical signs. Especially the signs of luminosity excess versus velocity flow. Explanation (after check) of the find_minimum_t function.
  • A lot of vectorisation, which means paying special attentions to matrices sizes (usual posts & fences)
  • Different presentation of the 'divergence of gradient' calculation as a difference of differences instead of the one in the blog post.
  • Quiver plotting and saving still work.
  • Field $\phi$ is reset to mean = 0.0 at each iteration (only its gradient matters). It avoids very high / low values.
  • Clipping the moves of points to a few pixels to avoid unbalanced explosions in one area of the pictures.
  • Generous use of @assert to track unusual situations when debugging. Convergence is fast, so they are not onerous.

Ultimately, the aim is to:

  • be able to raytrace the block.
  • Explore the possibility to get something in colour by having multiple faces and accounting for varying diffractions at varying colour frequencies (use chromatic aberrations to instead avoiding them).
  • Use existing libraries for mesh manipulations.
  • Constrain the optimisation to generate something accounting for the constraints of the CNC (e.g. limit curvature as second-order variations to match the size/shape of the drill).

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

Successfully merging this pull request may close these issues.

3 participants