乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
楼主: sadefa

[编程交流] lisp多段线

[复制链接]

5

主题

956

帖子

963

银币

初来乍到

Rank: 1

铜币
35
发表于 2022-7-5 20:54:49 | 显示全部楼层
hi motee-z, interesting  the circle mark at the lowest point?
so is equation applicable for road design?
回复

使用道具 举报

0

主题

301

帖子

301

银币

初来乍到

Rank: 1

铜币
0
发表于 2022-7-5 20:58:28 | 显示全部楼层
hanphuc,
 
In road design, Vertical curves are Parabolas.
 
ymg
回复

使用道具 举报

63

主题

242

帖子

181

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
319
发表于 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
回复

使用道具 举报

5

主题

956

帖子

963

银币

初来乍到

Rank: 1

铜币
35
发表于 2022-7-5 21:03:12 | 显示全部楼层
yeah motee-z thanks for sharing
 
 
thanks ymg good knowledge:)
回复

使用道具 举报

0

主题

301

帖子

301

银币

初来乍到

Rank: 1

铜币
0
发表于 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
回复

使用道具 举报

63

主题

242

帖子

181

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
319
发表于 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
回复

使用道具 举报

0

主题

301

帖子

301

银币

初来乍到

Rank: 1

铜币
0
发表于 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_

8

主题

248

帖子

245

银币

初来乍到

Rank: 1

铜币
42
发表于 2022-7-5 21:16:22 | 显示全部楼层
 
1+
 
212146uc5to61s6dr9uozj.jpg
 
 
 
edit: oops
ymg, two minutes later...
回复

使用道具 举报

0

主题

301

帖子

301

银币

初来乍到

Rank: 1

铜币
0
发表于 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.
 
  1. ; catenary.lsp   by ymg                                                       ;; Modified from a program by Hector  Monroy, 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)       )     )   ))
回复

使用道具 举报

63

主题

242

帖子

181

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
319
发表于 2022-7-5 21:24:05 | 显示全部楼层
Thank you ymg3 and GP_ for adding this information
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-12 01:07 , Processed in 0.474365 second(s), 73 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表