2d到3d-如何在圆柱周围缠绕图形
|
我有在3d空间中旋转的图形(具有x和y坐标的点的数组):
http://www.motiondraw.com/md/as_samples/Testing/_mindreader/main.html
就像现在一样,工程图看起来好像包裹在一个立方体上,在角落里有一个令人讨厌的90度角。相反,它看起来应该好像包裹在圆柱体上。
在开始旋转之前,我调用了一个函数(在ActionScript中)\'bendDrawing \',该函数为每个点设置了初始z值:
for(var j = 0; j
var wid = 350;// this could be the radius of the cylinder // NOTE: suboptimal, as the image gets a 90° corner in the center, at its highest point // what it should look like: as if the image was wrapped around a cylinder, i.e. in a circular shape // is that pythagoras? draw triangle, calc distance from base, add to this to c? var z = wid - distFromCenter; shape[i].points[j].z = Math.abs( z);} 我只是无法解决这个问题;-) 任何指针非常感谢! 安德烈亚斯·韦伯
没有找到相关结果
已邀请:
1 个回复
系漏