Advertisement
PonaFly

Untitled

May 23rd, 2019
1,116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scheme 0.70 KB | None | 0 0
  1. (define (SearchMiddle x1 y1 x2 y2 x3 y3) ;ПЯТАЯ ИЗ НОВЫЙ ЫЫЫЫ
  2.    (define (Func z zx zy)
  3.      (cons (/ (- zx) (* 2 z)) (/ zy (* 2 z))))
  4.   (Func (- (* (- x1 x2) (- y3 y1)) (* (- y1 y2) (- x3 x1)))
  5.         (+ (* (- y1 y2) (+ (* x3 x3) (* y3 y3))) (* (- y2 y3) (+ (* x1 x1) (* y1 y1))) (* (- y3 y1) (+ (* x2 x2) (* y2 y2))))
  6.          (+ (* (- x1 x2) (+ (* x3 x3) (* y3 y3))) (* (- x2 x3) (+ (* x1 x1) (* y1 y1))) (* (- x3 x1) (+ (* x2 x2) (* y2 y2))))))
  7. (define (Tri lst) ; ВТОРАЯ ИЗ НОВОЙ :))
  8.   (define vr (car lst))
  9.   (define (DelTr lst1 res)
  10.     (if (empty? (cdr lst1)) res
  11.         (DelTr (cdr lst1) (cons (list vr (car lst1) (cadr lst1)) res))))
  12.   (DelTr (cdr lst) '()))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement