明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1479|回复: 2

x方向上非线性放大圆思路,请帮忙修改,谢谢!

[复制链接]
发表于 2004-1-23 15:13:00 | 显示全部楼层 |阅读模式
请教:这是一个在x,方向上非线性放大圆思路,因为知识有限,请大虾们帮忙修改。谢谢!
这个非线性方程是关于同样纵坐标下,圆上两点横坐标的差值(它是变量,即不同的y,差值不同)。

(DEFUN testbb (/ obj circle )
(vl-load-com)
(SETQ obj (VLAX-ENAME->VLA-OBJECT (CAR (ENTSEL "\nPick the circle: "))))
   
(setq rad (vla-get-radius obj));get the radius of circle
(setq cen (vla-get-center obj));here center is (0,0,0)
(setq pt (vla-get-point circ-obj);get the points of circle
      
if for (cadr pt(i))=(cadr pt(+(i)n);for the same y coordinate of two different points on circle
(setq leng ( ABS(-(car pt(i))(car pt(+(i)n)))));calculate the subtraction of their x coordinates
(setq leng1 (+(expt leng 2)1);bring the subtraction into nonlinear function to largen
(setq newx (/ leng1 2);then divide by 2
(setq newx1 (- newx)      
(vlax-put-property newx1 (car pt(i));take above value as new x coordinates of that two points,put back negative one to point1
(vlax-put-property newx (car pt(+(i)n)));put back positive one to point2
                                        ;Here short of one line: according to those points,get a polyline.
  (command "_.extrude" (entlast) "" z "");extrude the polyline at a height to get cylinder
  
  (PROMPT "\nBlock has been scaled.")
  (PRINC)
)
发表于 2004-1-23 22:22:00 | 显示全部楼层
x方向上非线性放大圆就是椭圆
圆形就是长短轴相同的椭圆
 楼主| 发表于 2004-1-23 23:33:00 | 显示全部楼层
它是一个近似椭圆的东东,用的可能是创造椭圆的机理,但是又不同于椭圆,它在横向上的宽度遵循一个非线性方程,不是按椭圆得到的宽度。
谢谢你的回贴!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-10-2 03:16 , Processed in 0.168470 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表