1997-11-25 06:05:25 +08:00
|
|
|
;
|
|
|
|
; Swirl-tile
|
|
|
|
; produces a (hope-fully) seamlessly tiling swirling effect
|
|
|
|
;
|
|
|
|
; Adrian Likins <aklikins@eos.ncsu.edu>
|
|
|
|
;
|
|
|
|
; http://www4.ncsu.edu/eos/users/a/aklikins/pub/gimp/
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
(define (script-fu-swirl-tile depth azimuth elevation blurRadius height width whirl-amount noise-level bg-color)
|
2006-10-16 09:08:54 +08:00
|
|
|
(let* (
|
|
|
|
(img (car (gimp-image-new width height RGB)))
|
|
|
|
(layer-one (car (gimp-layer-new img width height
|
|
|
|
RGB-IMAGE "TEST" 100 NORMAL-MODE)))
|
|
|
|
(cx (/ width 2))
|
|
|
|
(cy (/ height 2))
|
|
|
|
)
|
2004-09-23 19:16:23 +08:00
|
|
|
|
|
|
|
(gimp-context-push)
|
|
|
|
|
1999-10-17 08:07:55 +08:00
|
|
|
(gimp-image-undo-disable img)
|
2004-11-11 21:59:18 +08:00
|
|
|
|
2011-03-02 15:55:43 +08:00
|
|
|
(gimp-image-insert-layer img layer-one 0 0)
|
2004-09-23 02:43:09 +08:00
|
|
|
(gimp-context-set-background bg-color)
|
2003-10-16 20:47:33 +08:00
|
|
|
(gimp-edit-fill layer-one BACKGROUND-FILL)
|
2007-10-02 03:44:23 +08:00
|
|
|
(plug-in-noisify RUN-NONINTERACTIVE img layer-one FALSE noise-level noise-level noise-level 1.0)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2007-10-02 03:44:23 +08:00
|
|
|
(plug-in-whirl-pinch RUN-NONINTERACTIVE img layer-one whirl-amount 0.0 1.0)
|
|
|
|
(plug-in-whirl-pinch RUN-NONINTERACTIVE img layer-one whirl-amount 0.0 1.0)
|
|
|
|
(plug-in-whirl-pinch RUN-NONINTERACTIVE img layer-one whirl-amount 0.0 1.0)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-06-13 03:23:07 +08:00
|
|
|
(gimp-drawable-offset layer-one TRUE 0 cx cy)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2007-10-02 03:44:23 +08:00
|
|
|
(plug-in-whirl-pinch RUN-NONINTERACTIVE img layer-one whirl-amount 0.0 1.0)
|
|
|
|
(plug-in-whirl-pinch RUN-NONINTERACTIVE img layer-one whirl-amount 0.0 1.0)
|
|
|
|
(plug-in-whirl-pinch RUN-NONINTERACTIVE img layer-one whirl-amount 0.0 1.0)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2007-10-02 03:44:23 +08:00
|
|
|
(plug-in-gauss-rle RUN-NONINTERACTIVE img layer-one blurRadius TRUE TRUE)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2007-10-02 03:44:23 +08:00
|
|
|
(plug-in-bump-map RUN-NONINTERACTIVE img layer-one layer-one azimuth elevation depth 0 0 0 0 FALSE FALSE 0)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
1998-11-04 03:56:18 +08:00
|
|
|
(gimp-display-new img)
|
2004-09-23 19:16:23 +08:00
|
|
|
(gimp-image-undo-enable img)
|
|
|
|
|
2006-10-16 09:08:54 +08:00
|
|
|
(gimp-context-pop)
|
|
|
|
)
|
|
|
|
)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
(script-fu-register "script-fu-swirl-tile"
|
2006-10-16 09:08:54 +08:00
|
|
|
_"Swirl-_Tile..."
|
|
|
|
_"Create an image filled with a swirled tile effect"
|
|
|
|
"Adrian Likins <aklikins@eos.ncsu.edu>"
|
|
|
|
"Adrian Likins"
|
|
|
|
"1997"
|
|
|
|
""
|
2008-01-15 20:26:03 +08:00
|
|
|
SF-ADJUSTMENT _"Depth" '(10 1 64 1 1 0 0)
|
2006-10-16 09:08:54 +08:00
|
|
|
SF-ADJUSTMENT _"Azimuth" '(135 0 360 1 10 0 0)
|
|
|
|
SF-ADJUSTMENT _"Elevation" '(45 0 90 1 10 0 0)
|
|
|
|
SF-ADJUSTMENT _"Blur radius" '(3 0 128 1 10 0 0)
|
|
|
|
SF-ADJUSTMENT _"Height" '(256 0 1024 1 10 0 1)
|
|
|
|
SF-ADJUSTMENT _"Width" '(256 0 1024 1 10 0 1)
|
|
|
|
SF-ADJUSTMENT _"Whirl amount" '(320 0 360 1 10 0 0)
|
2007-07-11 17:07:45 +08:00
|
|
|
SF-ADJUSTMENT _"Roughness" '(0.5 0 1 0.1 0.01 2 1)
|
2006-10-21 01:55:14 +08:00
|
|
|
SF-COLOR _"Background color" "white"
|
2006-10-16 09:08:54 +08:00
|
|
|
)
|
2004-11-19 06:44:28 +08:00
|
|
|
|
|
|
|
(script-fu-menu-register "script-fu-swirl-tile"
|
2008-09-19 20:01:12 +08:00
|
|
|
"<Image>/File/Create/Patterns")
|