) ( ( dis r) (princ "Point selected lies outside circle") ) ( (< dis r) (princ "Point selected lies inside circle") ) ( (= dis r) (princ "Point lies on circle") ) ) ) ******************OUTPUT******************** C:PROG5 Command: PROG5 Select center of circle: Enter radius of circle: 5 Select any point on the screen: Point selected lies outside circle
NAME ROLL NO PROGRAM 6 ( defun c:PROG6() (setq a (entget (car (entsel "Select object: ")))) (cond ( (= (cdr (assoc 0 a)) "LINE") (setq pt1 (cdr (assoc 10 a))) (setq pt2 (cdr (assoc 11 a))) (princ "End coordinates are ") (princ pt1) (princ pt2) (setq len (distance pt1 pt2)) (princ "Length of line is ") (princ len) ) ( (= (cdr (assoc 0 a)) "CIRCLE") (setq c (cdr (assoc 10 a))) (princ "Center of circle is ") (princ c) (setq r (cdr (assoc 40 a))) (princ "Radius of circle is ") (princ r) ) ) (princ) ) *************OUTPUT*************************** C:PROG6 Command: PROG6 Select object: Center of circle is (25.3331 13.5295 0.0) Radius of circle is 6.15538
NAME ROLL NO PROGRAM 7 ( defun c:PROG7() (setq c (getpoint "Select center of circle: ")) (setq r (getreal "Enter radius of circle: ")) (command "circle" c r) (setq opt (getint "Select option for hatching 1 or 2 : ")) (if (= opt 1) (progn (command "bhatch" "select") (setq a (entsel "Select object to hatch: ")) (command a "" "") ) (progn (command "bhatch" "internal" "") (setq b (getpoint "Select internal point for hatching: ")) (command b "") ) ) ) ************OUTPUT******************** Command: PROG7 Select center of circle: Enter radius of circle: 5 Select option for hatching 1 or 2 : 1
NAME ROLL NO PROGRAM 8 ( defun c:PROG8() (setq c1 (getpoint "Select center of arc: ")) (setq pt1 (getpoint "Select start point of arc: ")) (setq pt2 (getpoint "Select end point of arc: ")) (command "arc" "c" c1 pt1 pt2) (setq ang (angle c1 pt1)) (princ "Included angle is ") (princ ang) (princ) (setq r (distance c1 pt1)) (setq angd (/ ang 5)) (setq i 1) (setq ang1 angd) (command "line" c1 pt1 "") ( while ( dismid dispt3) (princ "Selected point is to the left of midpoint of line") ) ( (< dismid dispt3) (princ "Selected point is to the right of midpoint of line") ) ( (= dismid dispt3) (princ "You have selected the midpoint") ) ) ) *****************OUTPUT************************ Command: PROG10 Select starting point of line: Select endpoint of line: Select a point on the line: Selected point is to the right of midpoint of line
NAME ROLL NO. PROGRAM 11 ( defun c:PROG11_2() (setq x (getint "Enter series variable: ")) (setq n (getint "Enter length of series: ")) (setq i 1) (setq sum 0) ( while (
Thank you for interesting in our services. We are a non-profit group that run this website to share documents. We need your help to maintenance this website.