home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p067 / 2.img / HD / HDD87.LSP < prev    next >
Encoding:
Text File  |  1994-01-31  |  3.2 KB  |  112 lines

  1. (defun HDD87 ()
  2. (setvar "CMDECHO" 0)
  3. (command "vslide" "\\house1\\sld\\s702")
  4.    (command "layer" "n" "b0" "s" "b0")
  5.    (setq nl 0)
  6.    (while (and (/= y1 "e") (/= y1 "E"))
  7.        (setq lo (strcat "b" (itoa nl)))
  8.     (setq ln (strcat "b" (itoa (1+ nl))))
  9.     (command "layer" "n" ln "ln" "s" "ln" "")
  10.     (setq y2 "y")
  11.     (while (and (/= y2 "s") (/= y2 "S"))
  12.        (command "vslide" "\\house1\\sld\\s47g")
  13.        (setq nc (getstring "\n╩Σ╚δ╤í╘±╧ε<1-5>: "))
  14.        (command "redraw") 
  15.        (setq formula (strcat "trans" nc))
  16.        (cond ((= formula "trans1") (trans1))
  17.               ((= formula "trans2") (trans2))
  18.                ((= formula "trans3") (trans3))
  19.                ((= formula "trans4") (trans4))
  20.              ((= formula "trans5") (trans5))
  21.         )
  22.         (command "layer" "s" lo "")
  23.        (command "layer" "on" lo "")
  24.        (command "layer" "off" ln "")
  25.        (setq y2 (getstring "\n╝╠╨°<C>╗≥═ú╓╣<S>: "))
  26.     )
  27.      (command "layer" "s" ln "")
  28.     (command "layer" "off" lo "")
  29.     (command "layer" "on" ln "")
  30.     (setq nl (1+ nl))
  31.     (setq y1 (getstring "\n╝╠╨°╝≥╗»<C>╗≥╜ß╩°<E>: "))
  32.    )
  33.    (setq z (getreal "\nresistance: "))
  34.    (setq v (getreal "\nvoltage: "))
  35.    (setq i (/ v z))
  36. (check 'hdd70 "hdd70")
  37. )
  38. (defun trans1()
  39. (setq j 1)
  40. (setq x 0)
  41. (while (/= j 0)
  42. (setq w (getreal "\n╩Σ╚δ╫Φ┐╣╓╡╗≥<0>╜ß╩°: "))
  43. (setq x (+ x w))
  44. (setq j w)
  45. )
  46. (command "layer" "s" ln "")
  47. (command "layer" "off" lo "")
  48. (command "layer" "s" ln "")
  49. (setq p (getpoint "\n╩Σ╚δ▓σ╚δ╡π: "))
  50. (command "insert" "t1" p 1 1 0 x)
  51. )
  52. (defun trans2()
  53. (setq j 1)
  54. (setq y 0)
  55. (while (/= j 0)
  56.        (setq w (getreal "\n╩Σ╚δ╫Φ┐╣╓╡╗≥<0>╜ß╩°: "))
  57.        (setq y (+ y (/ 1 w)))
  58.        (setq j w)
  59. )
  60. (setq x (/ 1 y))
  61. (command "layer" "s" ln "")
  62. (command "layer" "off" lo "")
  63. (command "layer" "on" ln "")
  64. (setq p (getpoint "╩Σ╚δ▓σ╚δ╡π: "))
  65. (command "insert" "t2" p 1 1 0 x)
  66. )
  67. (defun trans3()
  68. (setq x12 (getreal "\n╩Σ╚δ x12= : "))
  69. (setq x23 (getreal "\n╩Σ╚δ x23= : "))
  70. (setq x31 (getreal "\n╩Σ╚δ x31= : "))
  71. (setq x1 (/ (* x12 x31) (+ x12 (+ x23 x31))))
  72. (setq x2 (/ (* x12 x23) (+ x12 (+ x23 x31))))
  73. (setq x3 (/ (* x23 x31) (+ x12 (+ x23 x31))))
  74. (command "layer" "s" ln "")
  75. (command "layer" "off" lo "")
  76. (command "layer" "on" ln "")
  77. (setq p (getpoint "╩Σ╚δ▓σ╚δ╡π: "))
  78. (command "insert" "t3" p 1 1 0 x1 x2 x3)
  79. )
  80. (defun trans4()
  81. (setq x1 (getreal "\n╩Σ╚δ x1= : "))
  82. (setq x2 (getreal "\n╩Σ╚δ x2=: "))
  83. (setq x3 (getreal "\n╩Σ╚δ x3=: "))
  84. (setq x12 (+ x1 (+ x2 (/ (* x1 x2) x3))))
  85. (setq x23 (+ x2 (+ x3 (/ (* x2 x3) x1))))
  86. (setq x31 (+ x3 (+ x1 (/ (* x3 x1) x2))))
  87. (command "layer" "s" ln "")
  88. (command "layer" "off" lo "")
  89. (command "layer" "on" ln "")
  90. (setq p (getpoint "╩Σ╚δ▓σ╚δ╡π: "))
  91. (command "insert" "t4" p 1 1 0 x12 x23 x31)
  92. )
  93. (defun trans5()
  94. (setq x1 (getreal "\n╩Σ╚δ x1=: "))
  95. (setq x2 (getreal "\n╩Σ╚δ x2=: "))
  96. (setq x3 (getreal "\n╩Σ╚δ x3=: "))
  97. (setq x4 (getreal "\n╩Σ╚δ x4=: "))
  98. (setq y (+ (/ 1 x1) (+ (/ 1 x2) (+ (/ 1 x3) (+ (/ 1 x4))))))
  99. (setq x12 (* x1 (* x2 y)))
  100. (setq x23 (* x2 (* x3 y)))
  101. (setq x34 (* x3 (* x4 y)))
  102. (setq x41 (* x4 (* x1 y)))
  103. (setq x13 (* x1 (* x3 y)))
  104. (setq x24 (* x2 (* x2 y)))
  105. (command "layer" "s" ln "")
  106. (command "layer" "off" lo "")
  107. (command "layer" "on" ln "")
  108. (setq p (getpoint "\n▓σ╚δ╗∙╡π: "))
  109. (command "insert" "t5" p 1 1 0 x12 x23 x34 x41 x13 x24)
  110. )
  111. (hdd87)
  112.