Changeset 28431 in project


Ignore:
Timestamp:
02/24/13 04:01:30 (7 years ago)
Author:
Ivan Raikov
Message:

cell-geometry updates and beginnings of test suite

Location:
release/4/cell-geometry/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/cell-geometry/trunk/cell-geometry.scm

    r28430 r28431  
    2121
    2222;; TODO: genpointset: a set of genpoints with bb
    23 ::       pointset: a set of points with bb
    24 
    25 (module 9ML-cell-geometry
     23;;       pointset: a set of points with bb
     24
     25(module cell-geometry
    2626
    2727        (
    2828         verbose
    2929
    30          bounds? bounds-empty bounds-add bounds-translate
    31          layer-boundary
    32          genpoint? genpoint-coords genpoint-parent-index genpoint-parent-distance
     30         bounds? make-bounds bounds-empty bounds-add bounds-translate
     31         layer-boundary? Bounds BoundsXZ BoundsYZ
     32         genpoint? make-genpoint genpoint-coords genpoint-parent-index genpoint-parent-distance
     33         originpoint? make-originpoint originpoint-coords originpoint-index
    3334         cell-type cell-index cell-origin cell-compartments
    3435         
     
    9495        (define point->list f64vector->list)
    9596
     97        (define (pointset? x) (every point? x))
    9698
    9799        (define-record-type bounds
     
    105107
    106108
     109        (define-record-type originpoint (make-originpoint index coords)
     110          originpoint?
     111          (coords originpoint-coords)
     112          (index originpoint-index)
     113          )
     114
    107115        (define-record-type genpoint (make-genpoint coords parent-index parent-distance)
    108116          genpoint?
     
    112120          )
    113121
     122        (define (genpointset? x) (every genpoint? x))
    114123
    115124        (define-record-type cell (make-cell ty index origin compartments)
     
    164173                 ))
    165174            t))
    166 
    167175
    168176
     
    277285          (let* ((label  (gensym 'curve))
    278286                 (c      (translate-curve
    279                           (point->list origin)
     287                          (append (point->list origin) (list 0.0))
    280288                          (linear-curve n k (list x-coeffs y-coeffs z-coeffs r-coeffs) 0. 1. )))
     289                 (_      (d "c = ~A~%" c))
     290                 (_      (d "bbox-curve c = ~A~%" (bbox-curve c)))
    281291                 (bb     (match-let (((x1 y1 z1 r1 x2 y2 z2 r2) (bbox-curve c)))
    282292                                    (list (- x1 r1) (- y1 r1) (- z1 r1)
    283293                                          (+ x2 r2) (+ y2 r2) (+ z2 r2))))
    284294                 )
    285 
    286295            (let ((point-data (iterate-curve c n)))
    287296              (let ((x (coord 0 origin))
     
    291300                       (map
    292301                        (lambda (p)
    293                           (make-genpoint p parent-index (sqrt (dist2 pp origin))))
     302                          (make-genpoint p parent-index (sqrt (dist2 p origin))))
    294303                        point-data))
    295304                       )
     305                  (d "linear-curve: pts = ~A~%" pts)
    296306                  (list pts bb)
    297307                  ))
     
    364374              (d "pointset/axisline: n = ~A~%" n)
    365375             
    366               (fold (lambda (ip pts)
    367                       (let ((i (car ip))
    368                             (p (cadr ip)))
     376              (fold (lambda (op pts)
     377                      (assert (originpoint? op))
     378                      (let ((i (originpoint-index op))
     379                            (p (originpoint-coords op)))
     380                        (d "pointset/axisline: p = ~A~%" p)
    369381                        (cons
    370382                         (linear-curve->genpoints.bb i k n p x-coeffs y-coeffs z-coeffs r-coeffs)
  • release/4/cell-geometry/trunk/cell-geometry.setup

    r28430 r28431  
    44  (make-pathname #f fn ##sys#load-dynamic-extension))   
    55
    6 (compile -O2 -d0 -s cell-geometry.scm -j cell-geometry)
    7 (compile -O2 -d0 -s cell-geometry.import.scm)
     6(compile -O -d2 -s cell-geometry.scm -j cell-geometry)
     7(compile -O -d2 -s cell-geometry.import.scm)
    88
    99(install-extension
Note: See TracChangeset for help on using the changeset viewer.