bonjour j'ai fait un petit lisp sur un system d'quation à 2inconnues pour savoir si j'avais compri le langage pouvez vous me donner vos inpretions @ + cloclo26200 (defun c:eqxy ( / a b c d e f x y y1 y2 y3 y4 pt1 pt2 pt3 pt4 ) ;; Cette fonction resoud une equation du premier degre a 2 inconnus x et y ;; de la forme ax + by = c ;; dx + ey = f ;; ;;;;;;;;;;;;;;;saisie des valeurs des valeurs a b c d e f g (command "_erase" "_all" "") (initget 1) (setq a (getreal "\n a: ")) (initget 1) (setq b (getreal "\n b: ")) (initget 1) (setq c (getreal "\n c: ")) (initget 1) (setq d (getreal "\n d: ")) (initget 1) (setq e (getreal "\n e: ")) (initget 1) (setq f (getreal "\n f: ")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;calcul de x et y (prompt"x et y =======> ") (setq x (/ (- (* b f) (* e c)) (- (* b d) (* e a)))) (setq y (/ (- f (* d x)) e)) (prompt (strcat "\n X = " (rtos x 2 4))) (prompt (strcat "\n y = " (rtos y 2 4))) ;;;;;;;;;;;;;;;;;;;;;;calcule des trois points pt1 pt2 pt3 avec x y (setq y1 (/ (+ (* a 1 -1) c) b)) (setq y2 (/ (+ (* a 2 -1) c) b)) (setq y3 (/ (+ (* d 1 -1) f) e)) (setq y4 (/ (+ (* d 2 -1) f) e)) (setq pt1 (list 1 y1)) (setq pt2 (list 2 y2)) (setq pt3 (list 1 y3)) (setq pt4 (list 2 y4)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;tracé des deux droites (setq pt0 (list x y)) (command "layer" "make" "droite" "color" "red" "droite" "") (command "color" "yellow") (command "_.xline" (list 0 0) (list 0 2) (list 2 0) "") (command "color" "blue") (command "_.xline" pt1 pt2 "") (command "color" "green") (command "_.xline" pt3 pt4 "") (command "color" "magenta") (command "text" pt0 "0.15" "0" (strcat "X = " (rtos x 5))) (command "text" "" (strcat "Y = " (rtos y 5))) (command "color" "cyan") (command "point" pt0) (setq ae (/ 180 pi)) (setq a1 (angle pt0 pt2)) (setq a2 (angle pt0 pt4)) (command "text" pt1 ".15" (* a1 ae) (strcat "a"(rtos x 5)"+b"(rtos y 5)"="(rtos c 5))) (command "text" pt3 ".15" (* a2 ae) (strcat "d"(rtos x 5)"+e"(rtos y 5)"="(rtos f 5))) (command "zoom" "e" "") (prompt"equation du premier degre a 2 inconnus x et y") (command "color" "bylayer") (command "color" "bylayer") (prompt "\nExecution du programme, taper : eqxy suivi de Return\n") (prin1) )