Pipe Example


(pipe (listobject (inside-diameter real)
                  (outside-diameter real)
                  (length real)
                  (material material)
                  (nxt (^ pipe)))
  views ((inside-circle  circle
              (radius (inside-diameter / 2)))
         (outside-circle circle
              (radius (outside-diameter / 2))) )
  prop  ((cross-section
            (  (area (outside-circle self))
             - (area (inside-circle self)))))
  adj   ((floats 
           ( (area (outside-circle self))
              >  (cross-section self)
                 * (density (material self))))) )

(gldefun t10 ((p pipe)) (floats p))

result type: BOOLEAN
(LAMBDA (P)
  (>  (EXPT (CADDR P) 2)
     (* (- (EXPT (CADDR P) 2) (EXPT (CADR P) 2))
        (GET (FIFTH P) 'DENSITY))))

Contents    Page-10    Prev    Next    Page+10    Index