NCF参数化建筑论坛

标题: 练习一个 求高手过来指点 [打印本页]

作者: panhao1    时间: 2011-6-1 13:02
标题: 练习一个 求高手过来指点
import peasy.org.apache.commons.math.*; import peasy.*; import peasy.org.apache.commons.math.geometry.*; import processing.opengl.*; import toxi.geom.*; import toxi.geom.mesh.*; import toxi.volume.*; import toxi.math.noise.*; import processing.opengl.*; int DIMX=100; int DIMY=100; int DIMZ=100; float ISO_THRESHOLD = 0.02; float NS=0.05; Vec3D SCALE=new Vec3D(DIMX,DIMY,DIMZ).scaleSelf(1); boolean isWireframe=false; float currScale=1; VolumetricSpace volume=new VolumetricSpace(SCALE,DIMX,DIMY,DIMZ); IsoSurface surface=new IsoSurface(volume); TriangleMesh mesh; PeasyCam cam; void setup() { size(800,600,OPENGL); hint(ENABLE_OPENGL_4X_SMOOTH); cam = new PeasyCam(this, 200); cam.setMinimumDistance(50); cam.setMaximumDistance(500); float[] volumeData=volume.getData(); for(int z=0,index=0; z 作者: panhao1    时间: 2011-6-1 13:03
本帖最后由 panhao1 于 2011-9-18 04:08 编辑 前三图是线框模式 后面的填充模式效果很不好~~~~ 所以我提的问题针对最后一张图 新版本toxic的代码 import peasy.org.apache.commons.math.*; import peasy.*; import peasy.org.apache.commons.math.geometry.*; import processing.opengl.*; import toxi.geom.*; import toxi.geom.mesh.*; import toxi.volume.*; import toxi.math.noise.*; import processing.opengl.*; int DIMX=100; int DIMY=100; int DIMZ=100; float ISO_THRESHOLD = 0.02; float NS=0.05; Vec3D SCALE=new Vec3D(DIMX,DIMY,DIMZ).scaleSelf(1); boolean isWireframe=false; float currScale=1; VolumetricSpaceArray volume=new VolumetricSpaceArray(SCALE,DIMX,DIMY,DIMZ); IsoSurface surface=new ArrayIsoSurface(volume); TriangleMesh mesh; PeasyCam cam; void setup() { size(800,600,OPENGL); hint(ENABLE_OPENGL_4X_SMOOTH); cam = new PeasyCam(this, 200); cam.setMinimumDistance(50); cam.setMaximumDistance(500); float[] volumeData=volume.getData(); for(int z=0,index=0; z 作者: huoge003    时间: 2011-6-1 16:17
牛人啊》》》》》》》》
作者: mahuan    时间: 2011-6-1 17:07
好炫啊,牛人
作者: wonderland_lmj    时间: 2011-6-1 17:32
好牛啊 怎么弄的啊
作者: 时间敲冰    时间: 2011-6-1 20:58
才学processing,代码大部分看不懂
作者: yndlzzx    时间: 2011-6-1 22:00
请问你学了代码之后是否发现其在建筑设计中的优势?
作者: rainfish    时间: 2011-6-1 23:29
楼主好牛啊,。。。。。
作者: panhao1    时间: 2011-6-2 01:10
7# yndlzzx 优势很大,至少对甲方吹水时不容易被揭穿。 内涵一下 勿喷{:3_57:}
作者: lutar    时间: 2011-6-2 12:33
能指点pan神的没啥人吧。。。。
作者: darklight    时间: 2011-6-2 19:57
先看看学习学习
作者: claudemit    时间: 2011-6-3 05:36
下载了library为啥还运行不了{:3_63:} 是这里下么http://hg.postspectacular.com/toxiclibs/downloads/
作者: licml    时间: 2011-6-3 14:35
本帖最后由 licml 于 2011-6-3 14:37 编辑 opgl不太懂, 用triangleMesh类的saveAsOBJ导出obj格式,然后导入maya,smooth之后,再渲染貌似可以,正在实验2段代码的拼凑。ps:我是新手啊
作者: todstods    时间: 2011-6-3 15:39
指点不了,Orz{:3_65:}
作者: emma.i.s    时间: 2011-6-4 08:48
这个看得不是很懂~
作者: giggs163    时间: 2011-6-5 23:01
啊~~~~~~~~~汗颜
作者: w7623504    时间: 2011-6-7 19:00
厉害,旁观!~代码无助啊
作者: x5115x    时间: 2011-7-14 07:41
潘H玩这个的确有天赋,toxi的这个例子我看了好久都没想到可以这么玩,还有那个渲白色立柱的也很有想法,赞~!
作者: lyt225    时间: 2011-8-1 22:56
漂亮啊 LZ威武
作者: weiwei    时间: 2011-9-14 02:13
無法給予解釋,這已經超出我能力範圍了!! 太牛了大大
作者: STL2000    时间: 2011-9-20 04:53
很给力~支持了~
作者: 38K08    时间: 2011-9-28 23:59
交流学习~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
作者: JuJu    时间: 2011-10-5 08:31
好像运行不了
作者: rainfish    时间: 2011-10-9 09:27
漂亮啊,很帅。。。
作者: 影之匿    时间: 2011-10-9 10:25
学习 学习
作者: 影之匿    时间: 2011-10-9 10:30
学习 学习
作者: 307126445    时间: 2011-11-22 21:41
好难懂啊{:3_50:}




欢迎光临 NCF参数化建筑论坛 (http://www.ncf-china.com/) Powered by Discuz! X3.2