我运行了几个对象的刚体模拟,并希望使用povray渲染此模拟。
对象的网格保持不变,所有改变的是每个对象的位置和方向。我可以在每次迭代中编写一个完整的pov文件,然后将它们全部发送到povray,但由于每个网格都非常大,我希望只写一次。有可能吗?
如果有更好的方法,请告诉我...
发布于 2012-05-17 10:15:52
使用#define并为其指定名称,将网格写入到inc文件中。在主.pov文件中,您应该能够定义包含旋转和平移的数组或样条线,然后使用时钟变量对其进行索引并渲染动画。
发布于 2012-09-27 23:09:45
这里有一种方法来充实David Buck的建议,只需要一个.pov文件,并以动画的形式呈现出来。
#include "transforms.inc"
#declare myOriginalObj = /* you do the work here, with mesh aligned to "y axis"*/
#declare newDirection = /* you do the work here: make new alignment vector,
as a function of clock */
#declare newPosition = /*you do the work here: create vector for new position,
as a function of clock */
#declare newObj=object{
myOriginalObj
Reorient_Trans(y,newDirection)
translate newPosition
}
object{newObj}进一步阅读:http://povray.tashcorp.net/tutorials/dd_makesnow/
https://stackoverflow.com/questions/10623387
复制相似问题