This commit is contained in:
Patrick Stevens
2021-04-03 11:43:46 +01:00
parent 18b7b0a21b
commit 0487ef0e20
12 changed files with 286 additions and 9 deletions

View File

@@ -0,0 +1,22 @@
namespace RayTracing
[<RequireQualifiedAccess>]
module SampleImages =
let gradient (progressIncrement : float<progress> -> unit) : float<progress> * Image Async =
let pixelAt i j =
{
Red = (byte i)
Green = (byte j)
Blue = 64uy
}
256.0<progress>,
async {
return Array.init 256 (fun i ->
let output = Array.init 256 (pixelAt i)
progressIncrement 1.0<progress>
output
)
|> Image
}