作者 主题: 在txt中写入数据,然后processing导入txt,画出立体图形,这个过程如何实现  (阅读 4306 次)

processinglearner

  • Newbie
  • *
  • 帖子: 9
我在txt中输入的数据,包括窗口大小。位置方向,视角,等请问这个txt应该怎么写
loadstrings导入之后,如何实现画出我需要的立体图形。谢谢

如果我需要把他变成动画显示,又需要加入什么样的代码

vinjn

  • SuperManager
  • Hero Member
  • *****
  • 帖子: 586
你这个问题太抽象了
一个可视化过程包括
数据本身,数据的输入,数据的处理,数据的输出与交互
怎么感觉你每个部分都要求助。。


processinglearner

  • Newbie
  • *
  • 帖子: 9
是啊
我正在解决,暂时每个部分都要求助。 有时间的话 就说说

processinglearner

  • Newbie
  • *
  • 帖子: 9
对于txt里面的内容
xres yres
px py pz ux uy uz vx vy vz nx ny nz
near far top bottom left right
r g b rx ry rz sx sy sz tx ty tz meshname.sff
... [more 'r g b rx ry rz sx sy sz tx ty tz meshname.sff' entries]

第二行的数据是代表 的意思不太明白,大家可以详细说说他的意思么(下面有介绍),但是对于每个参数的意思不清楚

the first line contains xres,yres of the output window

the second line contains the camera specification (location, orientation). Note - in the corresponding lecture slide, the camera location (px,py,pz) is refered to as the position vector 'r'.

the third line specifies the six view volume limits for perspective projection
from the fourth line on, there are one or more entries that specify the object(s) [meshes] in the scene. 'r g b' specifies the mesh color. rx, ry and rz specify rotation angles expressed as radians, about the X, Y and Z axes respectively (and are applied in that order: X, Y, then Z). sx, sy and sz specify scaling. tx, ty and tz specify translation. Finally, meshname.sff indicates the polymesh object undergoing the transformations just mentioned. There can be more meshes in the scene, specified using additional lines similar to the one just described. These .sff meshes are separate, independent files on disk.

Tags: