lisp2arx
Visual Programming for AutoLisp Mathématiques en programmation Lisp.. doc2cpp,doc2lsp, sld2lsp, bmp2dcl, free__GifCcapture for all-CAD'platforms..
Lista Forumurilor Pe Tematici
lisp2arx | Reguli | Inregistrare | Login

POZE LISP2ARX

Nu sunteti logat.
Nou pe simpatie:
Profil Manuela25
Femeie
25 ani
Bucuresti
cauta Barbat
25 - 62 ani
lisp2arx / pp_topoglist / pp_topoxcad.vlax - Arien Heron formulas Moderat de zauchan
Autor
Mesaj Pagini: 1
zauchan
Moderator

Inregistrat: acum 13 ani
Postari: 180
The K129 l129 m129 are reals variabiles.

Code:

(Defun dfn_triunghi_arieheron (k129 l129 m129 / $db per2 r prod a b c $db)
   (setq;|a4059855|;
     $db "Now Check the k128 l129 m129 are triangle"
     $rr "Failed you tri-line have WrongDimension"
     k129 (if_real k129 (- 1.0))
     l129 (if_real l129 (- 1.0))
     m129 (if_real m129 (- 1.0))) (if (<  k129 0.0) (setq;|a4060009|;
     $db nil) (if (<  l129 0.0) (setq;|a4060043|;
     $db nil) (if (<  m129 0.0) (setq;|a4060077|;
     $db nil) (if (>  k129 (+ l129 m129)) (setq;|a4060117|;
     $db nil) (if (>  l129 (+ k129 m129)) (setq;|a4060157|;
     $db nil) (if (>  m129 (+ k129 l129)) (setq;|a4060195|;
     $db nil))))))) (if (/= $db nil) (setq;|a4060245|;
     $db (/ (+ k129 l129 m129) 2.0)
     prod (* per2 (- per2 k129) (- per2 l129) (- per2 m129))
     $rr (sqrt (abs prod)))) 
$rr)

Version Unchecked. Please you test your self the equations are fine

Code:

(Defun dfn_triunghi_heronform(k129 l129 m129 / $db per2 r prod a b c $db)
/*c2s: 
       $db="Now Check the k128 l129 m129 are triangle";
       $rr="Failed" you tri-line have WrongDimension";
       k129=if_real(k129,-1.0),
       l129=if_real(l129,-1.0),
       m129=if_real(m129,-1.0);
       if (k129<0.0) $db=nil;
       if (l129<0.0) $db=nil;
       if (m129<0.0) $db=nil;
       if (k129>(l129+m129)) $db=nil;
       if (l129>(k129+m129)) $db=nil;
       if (m129>(k129+l129)) $db=nil;
       if ($db)
          a=k129,
          b=l129,
          c=m129,
          a=a*a,
          b=b*b,
          c=c*c,
          $rr=a+b-c,
          $rr=$rr*$rr,
          $rr=0.25*sqrt(abs(4*a*b-$rr));
*/
$rr)



Code:

(Defun if_real(a108 tzxelse / $rr) ;_ASSERT_OK
   (setq;|a4687509|;
     $rr (if (=  (type a108) (quote SYM)) (eval a108) a108)
     $rr (cond ( (=  (type $rr) (quote INT)) (+ 1.0 (- $rr 1)))( (=  (type $rr) (quote REAL)) $rr)( tzxelse))) 
$rr)



arien heron formulas the k129 l129 m129 are reals (k129 l129 m129 $db per2 prod $db)
 $db "now

28.6KB


_______________________________________
psw: cea de la wjndowsXP gigabyte..

pus acum 4 ani
   
admin
Administrator

Din: Bucharest
Inregistrat: acum 13 ani
Postari: 516
First you  must check the 3reals are made-triangles geometric shape>?
Second you calculate semiperimeter with Sqrt
Third. you  calculate Sqrt() or Sqrt(abs())

Code:

(Defun dfn_triunghi_arieheron(k129 l129 m129 / $db per2 r prod a b c $db) (setq $db"Now Check the k128 l129 m129 are triangle"$rr"Failed you tri-line have WrongDimension"k129(if_real k129(- 1.0) ) l129(if_real l129(- 1.0) ) m129(if_real m129(- 1.0) ) ) (if(< k129 0.0) (setq $db nil) (if(< l129 0.0) (setq $db nil) (if(< m129 0.0) (setq $db nil) (if(> k129(+ l129 m129) ) (setq $db nil) (if(> l129(+ k129 m129) ) (setq $db nil) (if(> m129(+ k129 l129) ) (setq $db nil) ) ) ) ) ) ) (if(/= $db nil) (setq $db(/(+ k129 l129 m129) 2.0) prod(* per2(- per2 k129) (- per2 l129) (- per2 m129) ) $rr(sqrt prod) ) ) $rr) (Defun dfn_triunghi_heronform(k129 l129 m129 / $db per2 r prod a b c $db) (setq $db"Now Check the k128 l129 m129 are triangle"$rr"Failed you tri-lines have WrongDimension"k129(if_real k129(- 1.0) ) l129(if_real l129(- 1.0) ) m129(if_real m129(- 1.0) ) ) (if(< k129 0.0) (setq $db nil) (if(< l129 0.0) (setq $db nil) (if(< m129 0.0) (setq $db nil) (if(> k129(+ l129 m129) ) (setq $db nil) (if(> l129(+ k129 m129) ) (setq $db nil) (if(> m129(+ k129 l129) ) (setq $db nil) ) ) ) ) ) ) (if $db(setq a k129 b l129 c m129 a(* a a) b(* b b) c(* c c) $rr(-(+ a b) c) $rr(* $rr $rr) $rr(* 0.25(sqrt(abs(-(* 4 a b) $rr) ) ) ) ) ) $rr) (Defun if_real(a108 tzxelse / $rr) (setq $rr(if(=(type a108) (quote SYM) ) (eval a108) a108) $rr(cond((=(type $rr) (quote INT) ) (+ 1.0(- $rr 1) ) ) ((=(type $rr) (quote REAL) ) $rr) (tzxelse) ) ) $rr)

27.07=Biserica Sf. Pantelimon, pe Linia troleibuz 86, in intersectia cu bulevardul Dacia.
              Se da pachete de hram in iulie

arien heron formulas first you  must check the 3reals are geometric you calculate with

47.5KB


_______________________________________


pus acum 4 ani
   
Pagini: 1  

Mergi la