Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions images-lib/images/private/deep-flomap-render.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@

(: beckmann-distribution (Flonum Flonum -> Flonum))
(define (beckmann-distribution cos-θ m)
(define x (/ (tan (acos cos-θ)) m))
(define x (/ (tan (flacos cos-θ)) m))
(define m*cos^2-θ (* m cos-θ cos-θ))
(/ (exp (- (* x x))) (* pi m*cos^2-θ m*cos^2-θ)))
(/ (flexp (- (* x x))) (* pi m*cos^2-θ m*cos^2-θ)))

;; ===================================================================================================
;; Pass 1: tracing from a directional light source
Expand Down
4 changes: 2 additions & 2 deletions images-lib/images/private/flomap-transform.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,13 @@
(define ((orthographic-projection α) d)
(define f (/ d 2.0 (sin (* 0.5 (real->double-flonum α)))))
(projection-mapping (λ (ρ) (* (sin ρ) f))
(λ (r) (asin (/ r f)))))
(λ (r) (flasin (/ r f)))))

(: equal-area-projection (Real -> Projection))
(define ((equal-area-projection α) d)
(define f (/ d 4.0 (sin (* 0.25 (real->double-flonum α)))))
(projection-mapping (λ (ρ) (* 2.0 (sin (* 0.5 ρ)) f))
(λ (r) (* 2.0 (asin (/ r 2.0 f))))))
(λ (r) (* 2.0 (flasin (/ r 2.0 f))))))

(: stereographic-projection (Real -> Projection))
(define ((stereographic-projection α) d)
Expand Down