hanhphuc 发表于 2022-7-5 20:54:49

hi motee-z, interestingthe circle mark at the lowest point?
so is equation applicable for road design?

ymg3 发表于 2022-7-5 20:58:28

hanphuc,
 
In road design, Vertical curves are Parabolas.
 
ymg

motee-z 发表于 2022-7-5 21:01:19

hi hanhphuc
the routine written for electric cable path between 2 pole which represent a parabola and the circle shows the lowest point in the cable

hanhphuc 发表于 2022-7-5 21:03:12

yeah motee-z thanks for sharing
 
 
thanks ymg good knowledge:)

ymg3 发表于 2022-7-5 21:08:36

motee-z,
 
What you are looking for is a CATENARY,
not a parabola.
 
Although a parabola is not very far and is sometimes used
as an approximation.
 
ymg

motee-z 发表于 2022-7-5 21:11:00

i am civil engineer but electrical engineer inform me that the path of cable of energy power between 2 pole is a parabola as mentioned in the routine

ymg3 发表于 2022-7-5 21:15:11

motee-z,
 
I am sorry but it really is a catenary and dependant on the tension of the cable.
This defines by the unit weight of the conductor and wind loading.
 
Since the sag involved are relatively small, a parabola is actually quite close.
 
Alas you are not alone in doing this mistakes, even Galileo did it,
 
see: http://en.wikipedia.org/wiki/Catenary
 
 
ymg

GP_ 发表于 2022-7-5 21:16:22

 
1+
 

 
 
 
edit: oops
ymg, two minutes later...

ymg3 发表于 2022-7-5 21:21:41

motee-z,
 
Here's a routine I had modified a while ago
that will draw a catenary.
 
However no calculation for windload, temperature
or ice load.
 

; catenary.lsp   by ymg                                                       ;; Modified from a program by HectorMonroy, M.S. Civil Eng.                  ;(defun c:catenary ( / t0 p p1 p2 x1 x2 y1 y2 h c l a v f xv yv pl x)(setq t0 (getreal "\nTension in the cable(In unit of weight):")         p (getreal "\nCable weight per unit length:")      p1 (getpoint "\nInitial point:")      p2 (getpoint p1 "\nEnd point:")                x1 (car p1)      x2 (car p2)i (if (< x1 x2) 1.0 -1.0)      y1 (cadr p1)      y2 (cadr p2)         h (- y1 y2)         c (/ t0 p)         l ( - x2 x1)         a (/ h (* 2 c (sinh (/ l (* 2 c)))))         v (+ (/ l 2) (* c (arcsinh a)))         f (* c (- (cosh (/ v c)) 1))      xv (+ x1 v)      yv (- y1 f) pl (list p2)x x2)(while (if (< x1 x2) (> x x1) (< x x1))   (setq pl (cons (list x (+ (* c (- (cosh (/ (- x xv) c)) 1)) yv)) pl)            x (- x i)   ))(setq pl (cons p1 pl))(mk_lwp pl))(defun cosh (a) (/ (+ (exp a)(exp (- a))) 2))(defun sinh (a) (/ (- (exp a)(exp (- a))) 2))(defun arcsinh (a)(log (+ a (sqrt (+ 1.0 (* a a))))));;******************************************************************************;;; mk_lwp    by Alan J Thompson                                                 ;;; Argument: pl, A list of points (2d or 3d)                                    ;;; Create an LWPolyline at Elevation 0, on Current Layer.                     ;;; Return: Polyline Object                                                      ;;;******************************************************************************;(defun mk_lwp (pl)   (vlax-ename->vla-object   (entmakex      (append (list '(0 . "LWPOLYLINE")                      '(100 . "AcDbEntity")                      '(100 . "AcDbPolyline")                     (cons 90 (length pl))                     '(70 . 0)                )                (mapcar '(lambda (p) (cons 10 (trans (list (car p) (cadr p)) 1 0))) pl)       )   )   ))

motee-z 发表于 2022-7-5 21:24:05

Thank you ymg3 and GP_ for adding this information
页: 1 [2]
查看完整版本: lisp多段线