draw-function.scm

To graph the trigonometric function sin(θ) or cos(θ) on the image

Author web site: http://xoomer.alice.it/lwcon/gimp/

Script Tutorial: http://xoomer.alice.it/lwcon/gimp/script-fu/draw-function.htm

AttachmentSize
draw-function-2.4.zip1.43 KB

Comments

This script needs to be updated for Gimp 2.6

See "Backwards Compatibility" section at http://gimp.org/release-notes/gimp-2.6.html
As-is, the script generates an error due to uninitialized values in the let* structure.


$ diff -u draw-function-2.4/draw-function.scm ../.gimp-2.6/scripts/draw-function.scm
--- draw-function-2.4/draw-function.scm Thu Jul 2 13:34:13 2009
+++ ../.gimp-2.6/scripts/draw-function.scm Thu Jul 2 14:01:32 2009
@@ -23,15 +23,15 @@

(define (script-fu-draw-function inImage inLayer Curva xa ya Radius Inclination Length deltaX inAngle scala)

- (let* ( (segment)
+ (let* ( (segment 0)
(segment (make-vector 4))
- (npoint)
- (beta)
- (gamma)
- (alfa)
- (kappa)
- (xzero)
- (yzero)
+ (npoint 0)
+ (beta 0)
+ (gamma 0)
+ (alfa 0)
+ (kappa 0)
+ (xzero 0)
+ (yzero 0)
)

(set! npoint 4)