|
|
发表于 2005-12-6 21:17:00
|
显示全部楼层
Re:求助:如何把一根曲线(如正弦)旋转一周得到一封闭几何
没做过,不过思路如下,不知道是否正确
y=sin(x) x=<x0,x1>
z=0
假定绕x轴旋转
则曲面方程为
x=x;
y=sin(x)*cos(theta);
z=sin(x)*sin(theta);
theta=<0,360>
x=<x0,x1>
//////////////////////
//code
for(_x......segment number?)
for(theta.....slice)
{
x=_x;
y=sin(_x)*cos(theta);
z=sin(_x)*sin(theta);
//store the vetices
...........
}
//只不过这个在边界的地方要缝合而已
//................................................
//顶点可用 vertices[segments*slices]这种存储
//然后再索引连起来就可以
//..............
|
|