1

我想知道是否有人可以帮助我。我正在尝试塑造一个椭圆形房间,托梁以 400 毫米的间隔相互平行,从椭圆形的顶点开始和结束 200 毫米。中央托梁落在椭圆中心的 (0,0) 处。

所以椭圆定位在角度 = 0 处,中心为 (0,0)。x方向的长轴为6000mm,y方向的短轴为3500mm。托梁也在 y 方向运行。

我需要找出沿椭圆外边缘的每个托梁的节点。很明显,我知道 x 值将是 -2800、-2400、...、0、...、2000、2400、2800,并且中央托梁在 (0, 1750) 处有一个节点,在 (0, 1750) 处有一个节点(0, -1750),但是如何找到所有其他 x 坐标的 y 值?

非常感谢。

ps 如果你不知道我有非常基本的 MATLAB 技能。

4

1 回答 1

0

It's convenient to work with semi-axes, denoted a and b below. The equation of ellipse is (x/a)^2+(y/b)^2=1, which gives two values of y, positive b*sqrt(1-(x./a)^2) and negative b*sqrt(1-(x./a)^2).

In MATLAB you can compute them this way:

a = 6000/2;
b = 3500/2;
x = -2800:400:2800;
yP = b.*sqrt(1-(x./a).^2);
yN = - yP;

So, yP contains the positive y-coordinates and yN contains negative y-coordinates.

The dots in front of arithmetic operations mean they are performed on vectors componentwise.

于 2015-01-08T04:50:04.147 回答