SlideShare una empresa de Scribd logo
1 de 14
Generative Art
Phillip Trelford
F#unctional Londoners
2013
Generative Art: Que?
Generative artists are chaos artists
…embrace the chaos & learn to love it
Modern Art: Procedurally Generated
Modern Art: Animated
Animated Gifs
Happy endings
// Generate text from Philippe Decrauzat's D.T.A.B.T.W.H.A.H.E. 2010
let print (s:string) =
[|for y in 0..s.Length-1 ->
[|for x in 0..y-1 -> s.[x]
for x in y..s.Length-1 -> s.[y]
|]
|> fun cs ->
System.String(cs) +
System.String(cs |> Array.rev |> Seq.skip 1 |> Seq.toArray)
|]
|> fun ys -> [|yield! ys; yield! (Array.rev ys |> Seq.skip 1)|]
|> String.concat "rn"
print "A HAPPY ENDING"
Choose your own adventure
SmallSharp: Lines
open Library
do GraphicsWindow.Show()
GraphicsWindow.BrushColor <- red
for i in 0..5..200 do
GraphicsWindow.DrawLine(i,0,n-i,n)
GraphicsWindow.DrawLine(0,i,n,n-i)
Deviant Art: Bubbles
Rothko / Async Rectangles
let rec waiting() = async {
let! md = Async.AwaitObservable(main.MouseLeftButtonDown)
let rc = new Canvas(Background = transparentGray)
main.Children.Add(rc)
do! drawing(rc, md.GetPosition(main)) }
and drawing(rc:Canvas, pos) = async {
let! evt = Async.AwaitObservable(main.MouseLeftButtonUp, main.MouseMove)
match evt with
| Choice1Of2(up) ->
rc.Background <- SolidColorBrush(colorSelect.CurrentColor)
do! waiting()
| Choice2Of2(move) ->
moveControl rc pos (move.GetPosition(main))
do! drawing(rc, pos) }
Mandelbrot
let (|Escaped|DidNotEscape|) (cx,cy) =
let rec compute (zx,zy) i =
if i = maxIteration then DidNotEscape
elif zx * zx + zy * zy > 4.0 then Escaped i
else compute (zx*zx - zy*zy + cx, 2.0*zx * zy + cy) (i+1)
compute (cx,cy) 0
Turing Drawings
match action with
| Action.Left ->
xPos <- xPos + 1
if xPos >= mapWidth then xPos <- xPos - mapWidth
| Action.Right ->
xPos <- xPos - 1
if (xPos < 0) then xPos <- xPos + mapWidth
| Action.Up ->
yPos <- yPos - 1
if (yPos < 0) then yPos <- yPos + mapHeight
| Action.Down ->
yPos <- yPos + 1
if yPos >= mapHeight then yPos <- yPos - mapHeight
Inspirational Sites
This is Colossal Deviant Art Zen Bullets
F# Libraries
http://smallsharp.codeplex.com (Graphics)
http://funscript.info (F# -> JS)
http://www.pinksquirrellabs.com (CYAO Type Provider)

Más contenido relacionado

Destacado

Cross platform physics games - NDC 2014
Cross platform physics games - NDC 2014Cross platform physics games - NDC 2014
Cross platform physics games - NDC 2014Runegri
 
EastBay.NET - Introduction to MonoTouch
EastBay.NET - Introduction to MonoTouchEastBay.NET - Introduction to MonoTouch
EastBay.NET - Introduction to MonoTouchmobiweave
 
Multyplatform and mono part 2 - Matteo Nicolotti
Multyplatform and mono part 2 - Matteo Nicolotti Multyplatform and mono part 2 - Matteo Nicolotti
Multyplatform and mono part 2 - Matteo Nicolotti Codemotion
 
Cross-platform Game Dev w/ CocosSharp
Cross-platform Game Dev w/ CocosSharpCross-platform Game Dev w/ CocosSharp
Cross-platform Game Dev w/ CocosSharpAlexey Strakh
 
Games with Win 8 Style by Neneng
Games with Win 8 Style by NenengGames with Win 8 Style by Neneng
Games with Win 8 Style by NenengAgate Studio
 
Introduction to CocosSharp
Introduction to CocosSharpIntroduction to CocosSharp
Introduction to CocosSharpJames Montemagno
 
Generative Art - Functional Vilnius 2015
Generative Art - Functional Vilnius 2015Generative Art - Functional Vilnius 2015
Generative Art - Functional Vilnius 2015Phillip Trelford
 
Monogame and xna
Monogame and xnaMonogame and xna
Monogame and xnaLee Stott
 
Intro to Gaming- MonoGame/CocosSharp/UrhoSharp
Intro to Gaming- MonoGame/CocosSharp/UrhoSharpIntro to Gaming- MonoGame/CocosSharp/UrhoSharp
Intro to Gaming- MonoGame/CocosSharp/UrhoSharpVidyasagar Machupalli
 
Flappy bird game in c#
Flappy bird game in c#Flappy bird game in c#
Flappy bird game in c#Comstas
 
Tips & Tricks that every game developer should know
Tips & Tricks that every game developer should knowTips & Tricks that every game developer should know
Tips & Tricks that every game developer should knowGorm Lai
 
UniteKorea2014 - Making flappy bird workshop
UniteKorea2014 - Making flappy bird workshopUniteKorea2014 - Making flappy bird workshop
UniteKorea2014 - Making flappy bird workshopGukHwan Ji
 
Smyowl - desenvolvimento games win8
Smyowl - desenvolvimento games win8Smyowl - desenvolvimento games win8
Smyowl - desenvolvimento games win8Mauricio Alegretti
 
Desenvolvendo Jogos 2D em HTML5 - Cocos2d-x
Desenvolvendo Jogos 2D em HTML5 - Cocos2d-xDesenvolvendo Jogos 2D em HTML5 - Cocos2d-x
Desenvolvendo Jogos 2D em HTML5 - Cocos2d-xPedro Kayatt
 

Destacado (18)

CocosSharp_XHackNight_07feb
CocosSharp_XHackNight_07febCocosSharp_XHackNight_07feb
CocosSharp_XHackNight_07feb
 
Cross platform physics games - NDC 2014
Cross platform physics games - NDC 2014Cross platform physics games - NDC 2014
Cross platform physics games - NDC 2014
 
EastBay.NET - Introduction to MonoTouch
EastBay.NET - Introduction to MonoTouchEastBay.NET - Introduction to MonoTouch
EastBay.NET - Introduction to MonoTouch
 
Multyplatform and mono part 2 - Matteo Nicolotti
Multyplatform and mono part 2 - Matteo Nicolotti Multyplatform and mono part 2 - Matteo Nicolotti
Multyplatform and mono part 2 - Matteo Nicolotti
 
Cross-platform Game Dev w/ CocosSharp
Cross-platform Game Dev w/ CocosSharpCross-platform Game Dev w/ CocosSharp
Cross-platform Game Dev w/ CocosSharp
 
Games with Win 8 Style by Neneng
Games with Win 8 Style by NenengGames with Win 8 Style by Neneng
Games with Win 8 Style by Neneng
 
Introduction to CocosSharp
Introduction to CocosSharpIntroduction to CocosSharp
Introduction to CocosSharp
 
Gaming in Csharp
Gaming in CsharpGaming in Csharp
Gaming in Csharp
 
Generative Art - Functional Vilnius 2015
Generative Art - Functional Vilnius 2015Generative Art - Functional Vilnius 2015
Generative Art - Functional Vilnius 2015
 
Monogame and xna
Monogame and xnaMonogame and xna
Monogame and xna
 
Intro to Gaming- MonoGame/CocosSharp/UrhoSharp
Intro to Gaming- MonoGame/CocosSharp/UrhoSharpIntro to Gaming- MonoGame/CocosSharp/UrhoSharp
Intro to Gaming- MonoGame/CocosSharp/UrhoSharp
 
Flappy bird game in c#
Flappy bird game in c#Flappy bird game in c#
Flappy bird game in c#
 
Tips & Tricks that every game developer should know
Tips & Tricks that every game developer should knowTips & Tricks that every game developer should know
Tips & Tricks that every game developer should know
 
Building a game in a day
Building a game in a dayBuilding a game in a day
Building a game in a day
 
Mobile F#un
Mobile F#unMobile F#un
Mobile F#un
 
UniteKorea2014 - Making flappy bird workshop
UniteKorea2014 - Making flappy bird workshopUniteKorea2014 - Making flappy bird workshop
UniteKorea2014 - Making flappy bird workshop
 
Smyowl - desenvolvimento games win8
Smyowl - desenvolvimento games win8Smyowl - desenvolvimento games win8
Smyowl - desenvolvimento games win8
 
Desenvolvendo Jogos 2D em HTML5 - Cocos2d-x
Desenvolvendo Jogos 2D em HTML5 - Cocos2d-xDesenvolvendo Jogos 2D em HTML5 - Cocos2d-x
Desenvolvendo Jogos 2D em HTML5 - Cocos2d-x
 

Más de Phillip Trelford

How to be a rock star developer
How to be a rock star developerHow to be a rock star developer
How to be a rock star developerPhillip Trelford
 
FSharp eye for the Haskell guy - London 2015
FSharp eye for the Haskell guy - London 2015FSharp eye for the Haskell guy - London 2015
FSharp eye for the Haskell guy - London 2015Phillip Trelford
 
Beyond lists - Copenhagen 2015
Beyond lists - Copenhagen 2015Beyond lists - Copenhagen 2015
Beyond lists - Copenhagen 2015Phillip Trelford
 
F# for C# devs - Copenhagen .Net 2015
F# for C# devs - Copenhagen .Net 2015F# for C# devs - Copenhagen .Net 2015
F# for C# devs - Copenhagen .Net 2015Phillip Trelford
 
24 hours later - FSharp Gotham 2015
24 hours later - FSharp Gotham  201524 hours later - FSharp Gotham  2015
24 hours later - FSharp Gotham 2015Phillip Trelford
 
Building cross platform games with Xamarin - Birmingham 2015
Building cross platform games with Xamarin - Birmingham 2015Building cross platform games with Xamarin - Birmingham 2015
Building cross platform games with Xamarin - Birmingham 2015Phillip Trelford
 
Beyond Lists - Functional Kats Conf Dublin 2015
Beyond Lists - Functional Kats Conf Dublin 2015Beyond Lists - Functional Kats Conf Dublin 2015
Beyond Lists - Functional Kats Conf Dublin 2015Phillip Trelford
 
FSharp On The Desktop - Birmingham FP 2015
FSharp On The Desktop - Birmingham FP 2015FSharp On The Desktop - Birmingham FP 2015
FSharp On The Desktop - Birmingham FP 2015Phillip Trelford
 
F# for C# devs - NDC Oslo 2015
F# for C# devs - NDC Oslo 2015F# for C# devs - NDC Oslo 2015
F# for C# devs - NDC Oslo 2015Phillip Trelford
 
F# for C# devs - Leeds Sharp 2015
F# for C# devs -  Leeds Sharp 2015F# for C# devs -  Leeds Sharp 2015
F# for C# devs - Leeds Sharp 2015Phillip Trelford
 
Build a compiler in 2hrs - NCrafts Paris 2015
Build a compiler in 2hrs -  NCrafts Paris 2015Build a compiler in 2hrs -  NCrafts Paris 2015
Build a compiler in 2hrs - NCrafts Paris 2015Phillip Trelford
 
24 Hours Later - NCrafts Paris 2015
24 Hours Later - NCrafts Paris 201524 Hours Later - NCrafts Paris 2015
24 Hours Later - NCrafts Paris 2015Phillip Trelford
 
Machine learning from disaster - GL.Net 2015
Machine learning from disaster  - GL.Net 2015Machine learning from disaster  - GL.Net 2015
Machine learning from disaster - GL.Net 2015Phillip Trelford
 
F# for Trading - QuantLabs 2014
F# for Trading -  QuantLabs 2014F# for Trading -  QuantLabs 2014
F# for Trading - QuantLabs 2014Phillip Trelford
 
Write Your Own Compiler in 24 Hours
Write Your Own Compiler in 24 HoursWrite Your Own Compiler in 24 Hours
Write Your Own Compiler in 24 HoursPhillip Trelford
 
FParsec Hands On - F#unctional Londoners 2014
FParsec Hands On -  F#unctional Londoners 2014FParsec Hands On -  F#unctional Londoners 2014
FParsec Hands On - F#unctional Londoners 2014Phillip Trelford
 

Más de Phillip Trelford (20)

How to be a rock star developer
How to be a rock star developerHow to be a rock star developer
How to be a rock star developer
 
F# eXchange Keynote 2016
F# eXchange Keynote 2016F# eXchange Keynote 2016
F# eXchange Keynote 2016
 
FSharp eye for the Haskell guy - London 2015
FSharp eye for the Haskell guy - London 2015FSharp eye for the Haskell guy - London 2015
FSharp eye for the Haskell guy - London 2015
 
Beyond lists - Copenhagen 2015
Beyond lists - Copenhagen 2015Beyond lists - Copenhagen 2015
Beyond lists - Copenhagen 2015
 
F# for C# devs - Copenhagen .Net 2015
F# for C# devs - Copenhagen .Net 2015F# for C# devs - Copenhagen .Net 2015
F# for C# devs - Copenhagen .Net 2015
 
24 hours later - FSharp Gotham 2015
24 hours later - FSharp Gotham  201524 hours later - FSharp Gotham  2015
24 hours later - FSharp Gotham 2015
 
Building cross platform games with Xamarin - Birmingham 2015
Building cross platform games with Xamarin - Birmingham 2015Building cross platform games with Xamarin - Birmingham 2015
Building cross platform games with Xamarin - Birmingham 2015
 
Beyond Lists - Functional Kats Conf Dublin 2015
Beyond Lists - Functional Kats Conf Dublin 2015Beyond Lists - Functional Kats Conf Dublin 2015
Beyond Lists - Functional Kats Conf Dublin 2015
 
FSharp On The Desktop - Birmingham FP 2015
FSharp On The Desktop - Birmingham FP 2015FSharp On The Desktop - Birmingham FP 2015
FSharp On The Desktop - Birmingham FP 2015
 
F# for C# devs - NDC Oslo 2015
F# for C# devs - NDC Oslo 2015F# for C# devs - NDC Oslo 2015
F# for C# devs - NDC Oslo 2015
 
F# for C# devs - Leeds Sharp 2015
F# for C# devs -  Leeds Sharp 2015F# for C# devs -  Leeds Sharp 2015
F# for C# devs - Leeds Sharp 2015
 
Build a compiler in 2hrs - NCrafts Paris 2015
Build a compiler in 2hrs -  NCrafts Paris 2015Build a compiler in 2hrs -  NCrafts Paris 2015
Build a compiler in 2hrs - NCrafts Paris 2015
 
24 Hours Later - NCrafts Paris 2015
24 Hours Later - NCrafts Paris 201524 Hours Later - NCrafts Paris 2015
24 Hours Later - NCrafts Paris 2015
 
Real World F# - SDD 2015
Real World F# -  SDD 2015Real World F# -  SDD 2015
Real World F# - SDD 2015
 
F# for C# devs - SDD 2015
F# for C# devs - SDD 2015F# for C# devs - SDD 2015
F# for C# devs - SDD 2015
 
Machine learning from disaster - GL.Net 2015
Machine learning from disaster  - GL.Net 2015Machine learning from disaster  - GL.Net 2015
Machine learning from disaster - GL.Net 2015
 
F# for Trading - QuantLabs 2014
F# for Trading -  QuantLabs 2014F# for Trading -  QuantLabs 2014
F# for Trading - QuantLabs 2014
 
Write Your Own Compiler in 24 Hours
Write Your Own Compiler in 24 HoursWrite Your Own Compiler in 24 Hours
Write Your Own Compiler in 24 Hours
 
FParsec Hands On - F#unctional Londoners 2014
FParsec Hands On -  F#unctional Londoners 2014FParsec Hands On -  F#unctional Londoners 2014
FParsec Hands On - F#unctional Londoners 2014
 
F# in your pipe
F# in your pipeF# in your pipe
F# in your pipe
 

Último

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 

Último (20)

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 

Generative Art Hands On with F#

  • 2. Generative Art: Que? Generative artists are chaos artists …embrace the chaos & learn to love it
  • 6. Happy endings // Generate text from Philippe Decrauzat's D.T.A.B.T.W.H.A.H.E. 2010 let print (s:string) = [|for y in 0..s.Length-1 -> [|for x in 0..y-1 -> s.[x] for x in y..s.Length-1 -> s.[y] |] |> fun cs -> System.String(cs) + System.String(cs |> Array.rev |> Seq.skip 1 |> Seq.toArray) |] |> fun ys -> [|yield! ys; yield! (Array.rev ys |> Seq.skip 1)|] |> String.concat "rn" print "A HAPPY ENDING"
  • 7. Choose your own adventure
  • 8. SmallSharp: Lines open Library do GraphicsWindow.Show() GraphicsWindow.BrushColor <- red for i in 0..5..200 do GraphicsWindow.DrawLine(i,0,n-i,n) GraphicsWindow.DrawLine(0,i,n,n-i)
  • 10. Rothko / Async Rectangles let rec waiting() = async { let! md = Async.AwaitObservable(main.MouseLeftButtonDown) let rc = new Canvas(Background = transparentGray) main.Children.Add(rc) do! drawing(rc, md.GetPosition(main)) } and drawing(rc:Canvas, pos) = async { let! evt = Async.AwaitObservable(main.MouseLeftButtonUp, main.MouseMove) match evt with | Choice1Of2(up) -> rc.Background <- SolidColorBrush(colorSelect.CurrentColor) do! waiting() | Choice2Of2(move) -> moveControl rc pos (move.GetPosition(main)) do! drawing(rc, pos) }
  • 11. Mandelbrot let (|Escaped|DidNotEscape|) (cx,cy) = let rec compute (zx,zy) i = if i = maxIteration then DidNotEscape elif zx * zx + zy * zy > 4.0 then Escaped i else compute (zx*zx - zy*zy + cx, 2.0*zx * zy + cy) (i+1) compute (cx,cy) 0
  • 12. Turing Drawings match action with | Action.Left -> xPos <- xPos + 1 if xPos >= mapWidth then xPos <- xPos - mapWidth | Action.Right -> xPos <- xPos - 1 if (xPos < 0) then xPos <- xPos + mapWidth | Action.Up -> yPos <- yPos - 1 if (yPos < 0) then yPos <- yPos + mapHeight | Action.Down -> yPos <- yPos + 1 if yPos >= mapHeight then yPos <- yPos - mapHeight
  • 13. Inspirational Sites This is Colossal Deviant Art Zen Bullets
  • 14. F# Libraries http://smallsharp.codeplex.com (Graphics) http://funscript.info (F# -> JS) http://www.pinksquirrellabs.com (CYAO Type Provider)

Notas del editor

  1. Bookshttp://zenbullets.com/book.phpSiteshttp://www.deviantart.com/digitalart/fractals/?order=67108864http://www.thisiscolossal.com/category/art/Toolshttps://smallsharp.codeplex.com/http://tsunami.io/http://tsunami.io/cloud_tsunami.htmlhttp://funscript.info/samples/mandelbrot.html
  2. http://basil4life.deviantart.com/art/Colorful-Bubbles-393039067