functional image synthesis. pan an image synthesis “language” images are functions continuous...
TRANSCRIPT
![Page 1: Functional Image Synthesis. Pan An image synthesis “language” Images are functions Continuous and infinite Embedded in a functional host language Reusable](https://reader036.vdocument.in/reader036/viewer/2022062417/551b6771550346d31b8b5b77/html5/thumbnails/1.jpg)
Functional Image Synthesis
![Page 2: Functional Image Synthesis. Pan An image synthesis “language” Images are functions Continuous and infinite Embedded in a functional host language Reusable](https://reader036.vdocument.in/reader036/viewer/2022062417/551b6771550346d31b8b5b77/html5/thumbnails/2.jpg)
Pan
• An image synthesis “language”
• Images are functions
• Continuous and infinite
• Embedded in a functional host language
• Reusable optimizing compiler
![Page 3: Functional Image Synthesis. Pan An image synthesis “language” Images are functions Continuous and infinite Embedded in a functional host language Reusable](https://reader036.vdocument.in/reader036/viewer/2022062417/551b6771550346d31b8b5b77/html5/thumbnails/3.jpg)
Examples
![Page 4: Functional Image Synthesis. Pan An image synthesis “language” Images are functions Continuous and infinite Embedded in a functional host language Reusable](https://reader036.vdocument.in/reader036/viewer/2022062417/551b6771550346d31b8b5b77/html5/thumbnails/4.jpg)
What’s an image?
• Assignment of color to points:
R2 Color
• Infinite, but color may be transparent
• Useful generalization:
R2
![Page 5: Functional Image Synthesis. Pan An image synthesis “language” Images are functions Continuous and infinite Embedded in a functional host language Reusable](https://reader036.vdocument.in/reader036/viewer/2022062417/551b6771550346d31b8b5b77/html5/thumbnails/5.jpg)
Expressing functions
• Use -calculus (Church, Curry, etc):
• Or, non-anonymously:
• Currying isomorphism:
( )
Good for partial application
![Page 6: Functional Image Synthesis. Pan An image synthesis “language” Images are functions Continuous and infinite Embedded in a functional host language Reusable](https://reader036.vdocument.in/reader036/viewer/2022062417/551b6771550346d31b8b5b77/html5/thumbnails/6.jpg)
Spatial transforms
![Page 7: Functional Image Synthesis. Pan An image synthesis “language” Images are functions Continuous and infinite Embedded in a functional host language Reusable](https://reader036.vdocument.in/reader036/viewer/2022062417/551b6771550346d31b8b5b77/html5/thumbnails/7.jpg)
Images
![Page 8: Functional Image Synthesis. Pan An image synthesis “language” Images are functions Continuous and infinite Embedded in a functional host language Reusable](https://reader036.vdocument.in/reader036/viewer/2022062417/551b6771550346d31b8b5b77/html5/thumbnails/8.jpg)
Higher-order functions
Apply filter “about” a point:
![Page 9: Functional Image Synthesis. Pan An image synthesis “language” Images are functions Continuous and infinite Embedded in a functional host language Reusable](https://reader036.vdocument.in/reader036/viewer/2022062417/551b6771550346d31b8b5b77/html5/thumbnails/9.jpg)
Examples
![Page 10: Functional Image Synthesis. Pan An image synthesis “language” Images are functions Continuous and infinite Embedded in a functional host language Reusable](https://reader036.vdocument.in/reader036/viewer/2022062417/551b6771550346d31b8b5b77/html5/thumbnails/10.jpg)
Programming example
![Page 11: Functional Image Synthesis. Pan An image synthesis “language” Images are functions Continuous and infinite Embedded in a functional host language Reusable](https://reader036.vdocument.in/reader036/viewer/2022062417/551b6771550346d31b8b5b77/html5/thumbnails/11.jpg)
Another
![Page 12: Functional Image Synthesis. Pan An image synthesis “language” Images are functions Continuous and infinite Embedded in a functional host language Reusable](https://reader036.vdocument.in/reader036/viewer/2022062417/551b6771550346d31b8b5b77/html5/thumbnails/12.jpg)
Some details
![Page 13: Functional Image Synthesis. Pan An image synthesis “language” Images are functions Continuous and infinite Embedded in a functional host language Reusable](https://reader036.vdocument.in/reader036/viewer/2022062417/551b6771550346d31b8b5b77/html5/thumbnails/13.jpg)
Another
![Page 14: Functional Image Synthesis. Pan An image synthesis “language” Images are functions Continuous and infinite Embedded in a functional host language Reusable](https://reader036.vdocument.in/reader036/viewer/2022062417/551b6771550346d31b8b5b77/html5/thumbnails/14.jpg)
Implementation
• An “embedded language”, but compiled.
• Programs manipulate expression trees.
• Almost transparent, via overloading.
• Automatic full inlining.
• Simplification via smart constructors.
• First-order CSE and loop hoisting.
• Easy to reuse for new “language”.
![Page 15: Functional Image Synthesis. Pan An image synthesis “language” Images are functions Continuous and infinite Embedded in a functional host language Reusable](https://reader036.vdocument.in/reader036/viewer/2022062417/551b6771550346d31b8b5b77/html5/thumbnails/15.jpg)
More examples
![Page 16: Functional Image Synthesis. Pan An image synthesis “language” Images are functions Continuous and infinite Embedded in a functional host language Reusable](https://reader036.vdocument.in/reader036/viewer/2022062417/551b6771550346d31b8b5b77/html5/thumbnails/16.jpg)
Conclusions
• Modular & efficient image synthesis• DSL design & implementation technique:
– Simple, computable semantics– Embed in functional host language– Reusable optimizer & code generator
• To try: sound, 3D, …• Freely available – try it out:
http://research.microsoft.com/~conal/pan