 C: <spring> spring
 
 : end-points ( spring -- b-pos a-pos )
-  [ spring-node-b pos>> ] [ spring-node-a pos>> ] bi ;
+  [ node-b>> pos>> ] [ node-a>> pos>> ] bi ;
 
 : spring-length ( spring -- length ) end-points v- norm ;
 
 : stretch-length ( spring -- length )
-  [ spring-length ] [ spring-rest-length ] bi - ;
+  [ spring-length ] [ rest-length>> ] bi - ;
 
 : dir ( spring -- vec ) end-points v- normalize ;
 

! 
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

: hooke-force-mag ( spring -- mag ) [ spring-k ] [ stretch-length ] bi * ;

: hooke-force ( spring -- force ) [ dir ] [ hooke-force-mag ] bi v*n ;

: hooke-forces ( spring -- a b ) hooke-force dup vneg ;

: act-on-nodes-hooke ( spring -- )
  [ spring-node-a ] [ spring-node-b ] [ ] tri hooke-forces swapd
  apply-force
  apply-force ;


! node
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

TUPLE: node < vel mass elas force ;

C: <node> node

: node-vel ( node -- vel ) vel>> ;

