Add S-expression based video effects pipeline with modular effect definitions, constructs, and recipe files. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
16 lines
608 B
Common Lisp
16 lines
608 B
Common Lisp
;; Swirl effect - spiral vortex distortion
|
|
;; @param strength float [-10, 10] default 1
|
|
;; @param radius float [0.1, 2] default 0.5
|
|
;; @param center_x float [0, 1] default 0.5
|
|
;; @param center_y float [0, 1] default 0.5
|
|
;; @param falloff string default "quadratic"
|
|
|
|
(define-effect swirl
|
|
((strength 1) (radius 0.5) (center_x 0.5) (center_y 0.5) (falloff "quadratic"))
|
|
(let* ((w (width frame))
|
|
(h (height frame))
|
|
(cx (* w center_x))
|
|
(cy (* h center_y))
|
|
(coords (swirl-displace w h strength radius cx cy falloff)))
|
|
(remap frame (coords-x coords) (coords-y coords))))
|