Lineart: Difference between revisions
From wikiluntti
(28 intermediate revisions by the same user not shown) | |||
Line 27: | Line 27: | ||
* Convert image array to vectors, and make the linear combination: <math>Ax = b</math>. Solve <math>min_x | Ax-b |^2</math>. | * Convert image array to vectors, and make the linear combination: <math>Ax = b</math>. Solve <math>min_x | Ax-b |^2</math>. | ||
* Problems: | * Problems: | ||
** Line darkness; from step function to some other. | ** Line darkness. Use some antialiasing algorithm; from step function to some other. | ||
** Pseudoinverse gives not binary result. Greedy algorithm. | ** Pseudoinverse gives not binary result. Greedy algorithm. | ||
* FFT in part II gives much better results | * FFT in part II gives much better results | ||
Line 36: | Line 36: | ||
* Make linear transform <math>\rho_{line_1}(\alpha, s) x_1 +\rho_{line_2}(\alpha, s) x_2 + \cdots \approx \rho(\alpha, s)</math> where <math>x_i</math> are the binary weights. | * Make linear transform <math>\rho_{line_1}(\alpha, s) x_1 +\rho_{line_2}(\alpha, s) x_2 + \cdots \approx \rho(\alpha, s)</math> where <math>x_i</math> are the binary weights. | ||
* Need a Radon transform for lines. | * Need a Radon transform for lines. | ||
* max<math>\rho/L</math> because the lines are of different length. | |||
== Michael Crum == | |||
https://michael-crum.com/string_art_generator/ | |||
* Nail and the next nail using greedy algorithm (chooses the one that is best at the current situation). For other method, see https://en.wikipedia.org/wiki/Dynamic_programming | |||
* Gradient descent as a finite difference approximation and minimize L2 error. | |||
* Fix the error function to include the possibility to fix the error later with other color. | |||
* Include the natural blurring of human eye: https://www.sothebys.com/en/articles/pointillism-7-things-you-need-to-know | |||
** Convolution | |||
** Resize the original image such that one pixel corresponds to the diameter of the thread. | |||
** Blurring: Downscale by a factor <math>d</math> and add transparency of <math>1/d</math>. | |||
* Use [https://www.middle-engine.com/blog/posts/2020/07/28/bresenhams-line-algorithm Bresenham's line algorithm] for the line. | |||
* Radon transform and [https://en.wikipedia.org/wiki/Projection-slice_theorem Fourier slice theorem] "''The Fourier Slice Theorem shows that the Fourier Transform of the Radon transform of reading forms a radial "slice" of the 2D FFT of the original image. After using the slices to recreate the 2D FFT, an inverse FFT results in the reconstructed image.''". https://www.researchgate.net/profile/S-Ren-Zhao/publication/3638293_A_new_Fourier_method_for_fan_beam_reconstruction/links/5c02207b92851c63cab2bafd/A-new-Fourier-method-for-fan-beam-reconstruction.pdf | |||
== Datagenetics == | |||
https://datagenetics.com/blog/december12019/index.html | |||
== References == | == References == | ||
Line 53: | Line 71: | ||
* https://www.peterwonka.net/Publications/pdfs/2018.EG.Birsak.StringArt.pdf | * https://www.peterwonka.net/Publications/pdfs/2018.EG.Birsak.StringArt.pdf | ||
* https://yetanothermathprogrammingconsultant.blogspot.com/2024/01/string-art.html | * https://yetanothermathprogrammingconsultant.blogspot.com/2024/01/string-art.html | ||
* https://hackaday.com/2021/03/18/an-algorithm-for-art-thread-portraits/ | |||
* https://circuit4us.medium.com/neopixel-assisted-string-art-weaving-9c34a169b18a Paywall | |||
* https://hackaday.io/project/130951-diy-knit-portrait | |||
** Parameters: Radius, Number of hooks, Number of lines, Contrast, Scale | |||
Art | |||
* http://artof01.com/vrellis/ | |||
** http://artof01.com/vrellis/works/knit.html | |||
Ready-made instructions | |||
* https://www.instructables.com/DIY-String-Art-the-Lion/ https://www.youtube.com/watch?v=DtrYdr4ktvI | |||
https://en.wikipedia.org/wiki/Hough_transform | |||
https://www.youtube.com/watch?v=G5w9RcCLTXs | |||
https://www.youtube.com/watch?v=UsbBSttaJos |
Latest revision as of 10:06, 25 October 2024
Introduction
String art
- Radon transform (inverse of)
- 2d FFT
- Optimization
Radon Transform
The sum of the intensities in each direction (a line integral).
The new image will be
Virtually Passed YT
White canvas with nails around the circumference and add straight black lines between the nails.
Video: The Mathematics of String Art
- Starting nail angle and ending nail angle . Maximum number of lines is
- Convert image array to vectors, and make the linear combination: . Solve .
- Problems:
- Line darkness. Use some antialiasing algorithm; from step function to some other.
- Pseudoinverse gives not binary result. Greedy algorithm.
- FFT in part II gives much better results
Video: How To Make a Computer Create Something Beautiful: String Art
- Radon transform; density function .
- plot sinogram: .
- Make linear transform where are the binary weights.
- Need a Radon transform for lines.
- max because the lines are of different length.
Michael Crum
https://michael-crum.com/string_art_generator/
- Nail and the next nail using greedy algorithm (chooses the one that is best at the current situation). For other method, see https://en.wikipedia.org/wiki/Dynamic_programming
- Gradient descent as a finite difference approximation and minimize L2 error.
- Fix the error function to include the possibility to fix the error later with other color.
- Include the natural blurring of human eye: https://www.sothebys.com/en/articles/pointillism-7-things-you-need-to-know
- Convolution
- Resize the original image such that one pixel corresponds to the diameter of the thread.
- Blurring: Downscale by a factor and add transparency of .
- Use Bresenham's line algorithm for the line.
- Radon transform and Fourier slice theorem "The Fourier Slice Theorem shows that the Fourier Transform of the Radon transform of reading forms a radial "slice" of the 2D FFT of the original image. After using the slices to recreate the 2D FFT, an inverse FFT results in the reconstructed image.". https://www.researchgate.net/profile/S-Ren-Zhao/publication/3638293_A_new_Fourier_method_for_fan_beam_reconstruction/links/5c02207b92851c63cab2bafd/A-new-Fourier-method-for-fan-beam-reconstruction.pdf
Datagenetics
https://datagenetics.com/blog/december12019/index.html
References
- https://elderlawattorneyblog.com/dharruk/circle-string-art-instructions.php
- TOP 5 EASIEST STRING ART PICTURES #1 | DIY TUTORIAL | MANDALA IN CIRCLE | 3 COLOURS https://www.youtube.com/watch?v=5gbwxqFnWek
- https://geometryexpressions.com/downloads/StringArt.pdf
- https://ar5iv.labs.arxiv.org/html/2008.10693
- https://ccicada.org/wp-content/uploads/2023/09/String-Art-Creating-Constructing-and-Computing.pdf
- https://arxiv.org/pdf/2008.10693
- https://quenell.org/PSU/pubpdf/stringart.pdf
- https://www.stringartlaboratory.com/post/beginners-guide-to-string-art-understanding-its-origins-basic-tools-and-materials
- https://chessapig.github.io/files/hyperbolic_string_art.pdf
- https://polypad.amplify.com/lesson/string-art
- https://plus.maths.org/content/bridges-string-art-and-bezier-curves
- https://meangreenmath.com/2023/01/20/parabolas-from-string-art-part-7/
- https://www.peterwonka.net/Publications/pdfs/2018.EG.Birsak.StringArt.pdf
- https://yetanothermathprogrammingconsultant.blogspot.com/2024/01/string-art.html
- https://hackaday.com/2021/03/18/an-algorithm-for-art-thread-portraits/
- https://circuit4us.medium.com/neopixel-assisted-string-art-weaving-9c34a169b18a Paywall
- https://hackaday.io/project/130951-diy-knit-portrait
- Parameters: Radius, Number of hooks, Number of lines, Contrast, Scale
Art
Ready-made instructions
https://en.wikipedia.org/wiki/Hough_transform