Changeset 30691 in project


Ignore:
Timestamp:
04/11/14 04:32:32 (7 years ago)
Author:
Ivan Raikov
Message:

parametric-curve: exporting compose-surve and added more tests

Location:
release/4/parametric-curve/trunk
Files:
2 edited

Legend:

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

    r30639 r30691  
    2727         simple-curve linear-curve line-segment
    2828         map-curve translate-curve scale-curve
     29         compose-curve
    2930         sample-curve sample-curve*
    30          iterate-curve fold-curve fold-curve*
     31         iterate-curve fold-curve foldi-curve
    3132         bbox-curve arc-length
    3233         )
     
    288289
    289290;; Folds a parametric curve at regular intervals in the range xmin..xmax inclusive.
    290 (define (fold-curve* c n f init)
     291(define (foldi-curve c n f init)
    291292  (let* (
    292293         (gs     (map sample-peq* c))
  • release/4/parametric-curve/trunk/tests/run.scm

    r30639 r30691  
    184184                    )))
    185185
     186(define sc (line-segment 3 (list 10 10 10)))
     187(define pc
     188    (simple-curve
     189     10 1
     190     (list
     191      (lambda (t) 0.0)
     192      (lambda (t) (sin (* 5 t)))
     193      (lambda (t) 0.0)
     194      )
     195     0.0 1.0))
     196
     197
     198(print "line segment = " )
     199(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))
Note: See TracChangeset for help on using the changeset viewer.