Changeset 30709 in project


Ignore:
Timestamp:
04/15/14 09:14:39 (7 years ago)
Author:
Ivan Raikov
Message:

parametric-curve: additional compose-curve test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/parametric-curve/trunk/tests/run.scm

    r30691 r30709  
    185185
    186186(define sc (line-segment 3 (list 10 10 10)))
    187 (define pc
     187(define pc1
    188188    (simple-curve
    189189     10 1
     
    196196
    197197
     198
     199(define (make-harmonic amp period phase n)
     200  (let* ((freq (/ (* 2 PI) (/ 1.0 period)))
     201         (c (simple-curve
     202             (inexact->exact n) 1
     203             (list (lambda (t) (* amp (cos (+ (* freq t) phase))))
     204                   (lambda (t) t)
     205                   (lambda (t) 0.0))
     206             0.0 1.0)))
     207    c
     208    ))
     209       
     210(define pc2 (make-harmonic 5.0 28.0 0.0 50))
     211
     212
    198213(print "line segment = " )
    199214(pp (iterate-curve sc 10))
    200 (print "perturbation curve = " )
    201 (pp (iterate-curve pc 10))
    202 (print "perturbed line segment = " )
    203 (pp (iterate-curve (compose-curve (list + + +) pc sc) 10))
     215(print "perturbation curve 1 = " )
     216(pp (iterate-curve pc1 10))
     217(print "perturbed line segment 1 = " )
     218(pp (iterate-curve (compose-curve (list + + +) pc1 sc) 10))
     219(print "perturbation curve 2 = " )
     220(pp (iterate-curve pc2 50))
     221(print "perturbed line segment 2 = " )
     222(pp (iterate-curve (compose-curve (list + + +) pc2 sc) 10))
Note: See TracChangeset for help on using the changeset viewer.