找回密码
 注册
搜索
楼主: aufalpen

[工作记录] workshop的成果(适用于膜结构)

[复制链接]
发表于 2010-12-25 22:18:03 | 显示全部楼层
谢谢楼主积极分享~
回复

使用道具 举报

发表于 2011-1-1 10:32:26 | 显示全部楼层
谢谢楼主分享,顶起好东西!
回复

使用道具 举报

发表于 2011-1-2 15:55:05 | 显示全部楼层
貌似见到同学了,等站内短信!
回复

使用道具 举报

发表于 2011-1-3 15:06:54 | 显示全部楼层
processing怎么能和建筑设计联系在一起啊,最近在写ESSAY,Is there a way to create a softer,more human interface to building through computer.OR In what ways script can be used to improve the design process~~希望能得到LZ的帮助啊,痛哭流涕不胜感激
回复

使用道具 举报

发表于 2011-1-4 12:37:42 | 显示全部楼层
1# aufalpen 很希望能多接触这方面的东西。
回复

使用道具 举报

发表于 2011-1-8 15:00:06 | 显示全部楼层
1# aufalpen 下载学习~
回复

使用道具 举报

发表于 2011-1-11 10:39:53 | 显示全部楼层
感谢分享~!
回复

使用道具 举报

发表于 2011-1-12 21:28:53 | 显示全部楼层
看到同学了,注册个号来支持下。 seminar后来我们分小组设计,没有征求过其他小组成员的意见,不好把目前的成果发上来。下面是小组讨论前我的初稿,刚接触processing,不成熟,权当抛砖引玉。(说明:部分代码源于老师 Mr. Ahlquist 给的文件,特别是Tab "cylinder" 里的内容;基本结构参考workshop里的文件,就是楼主上传的那个。) 附件是截图和文件。 Surface.tif (115.7 KB, 下载次数: 14) Surface.rar (1.43 KB, 下载次数: 12) 我把代码也复制一份在下面,方便大家查阅。 首先需要两个library:particles 和 peasycam, 下载后直接拖到processing安装地址的libraries文件夹里。 第一页代码: import peasy.test.*; import peasy.org.apache.commons.math.*; import peasy.*; import peasy.org.apache.commons.math.geometry.*; import simong.*; import simong.particles.*; PeasyCam cam; ParticleSystem ps; cylinderStructure cy; void setup(){ size(921,691,P3D); smooth(); cam = new PeasyCam(this, 0, 0, 0, 1000); ps= new ParticleSystem(this); ps.drawForces=true; ps.setGravity(0,0,-0.1); ps.defaultMass=0.01; ps.defaultSpringDamping=0.01; ps.defaultSpringRestLength=0.3; strokeWeight(1); stroke(0,150); cy = new cylinderStructure(); } void draw(){ background(255); ps.draw(); cy.update(); } 新建一个Tab(文件里名为cylinderStructure): class cylinderStructure{ cylinder[] cyds; cylinderStructure(){ cyds = new cylinder [8]; cyds[0] = new cylinder(ps, 24, 24, -300, -300, 0); cyds[1] = new cylinder(ps, 24, 24, 0, -300, 0); cyds[2] = new cylinder(ps, 24, 24, 300, -300, 0); cyds[3] = new cylinder(ps, 24, 24, 300, 0, 0); cyds[4] = new cylinder(ps, 24, 24, 300, 300, 0); cyds[5] = new cylinder(ps, 24, 24, 0, 300, 0); cyds[6] = new cylinder(ps, 24, 24, -300, 300, 0); cyds[7] = new cylinder(ps, 24, 24, -300, 0, 0); } void update(){ for (int i=0;i<24; i++) { for (int j=0;j<24;j++) { for (int m = 0; m <8; m+=2) { cyds[m].pArr[j].unfix(); if (i==0){ if (j==3)cyds[m].pArr[j].fix(); if (j==9) cyds[m].pArr[j].fix(); if (j==15) cyds[m].pArr[j].fix(); if (j==21) cyds[m].pArr[j].fix(); } else if (i==23){ if (j==3) cyds[m].pArr[j].fix(); if (j==9) cyds[m].pArr[j].fix(); if (j==15) cyds[m].pArr[j].fix(); if (j==21) cyds[m].pArr[j].fix(); } } } } for (int i=0;i<24; i++) { for (int j=0;j<24;j++) { for (int n = 1; n <8; n+=2) { cyds[n].pArr[j].unfix(); if (i==0){ if (j==3)cyds[n].pArr[j].fix(); if (j==9) cyds[n].pArr[j].fix(); if (j==15) cyds[n].pArr[j].fix(); if (j==21) cyds[n].pArr[j].fix(); } else if (i==23){ if (j==3) cyds[n].pArr[j].fix(); if (j==9) cyds[n].pArr[j].fix(); if (j==15) cyds[n].pArr[j].fix(); if (j==21) cyds[n].pArr[j].fix(); } } } } } } 新建一tab(文件里名为cylinder): class cylinder{ ParticleSystem ps; Particle [][] pArr; Spring [] sArr; int rCt; int cCt; float aInc; float radius=200.0; float step = 15.0; float xpos, ypos, zpos; public cylinder(ParticleSystem defPS, int definedrCt, int definedcCt, float x, float y, float z ){ this.ps = defPS; this.rCt = definedrCt; this.cCt = definedcCt; this.xpos = x; this.ypos = y; this.zpos = z; this.createMeshPoints(); this.createMeshEdges(); } void createMeshPoints(){ pArr = new Particle[rCt][cCt]; aInc=360/cCt; for (int i=0;i[j]=new Particle(ps,sin(aRad)*radius+xpos,cos(aRad)*radius+ypos,i*step+zpos); pArr[j].visible=false; if (i==0 || i==rCt-1) { pArr[j].fix(); pArr[j].visible=true; } } } } void createMeshEdges(){ sArr = new Spring[10000]; int k=0; for (int i=0;i[j],pArr[i+1][j]); k++; if (j[j],pArr[j+1]); k++; if (i==rCt-2) { sArr[k]=new Spring(pArr[i+1][j],pArr[i+1][j+1]); k++; } } else { sArr[k]=new Spring(pArr[j],pArr[0]); k++; if (i==rCt-2) { sArr[k]=new Spring(pArr[i+1][j],pArr[i+1][0]); k++; } } } } } } OK,到此为止。
回复

使用道具 举报

发表于 2011-1-12 21:41:18 | 显示全部楼层
不知道为什么,上面复制的代码有错误 许多应该是[i][j]的地方只显示[j] 大家看附件吧
回复

使用道具 举报

 楼主| 发表于 2011-1-13 03:36:39 | 显示全部楼层
30# wshopro 你重新发个帖,以免别人错过这么好的资源。
回复

使用道具 举报

发表于 2011-1-14 06:36:46 | 显示全部楼层
31# aufalpen 刚注册,不知道怎么发帖,显示"对不起,本版块只有特定用户组可以发新话题,请返回。"或者你把那文件再发个帖也行。
回复

使用道具 举报

发表于 2011-2-9 22:10:48 | 显示全部楼层
再一个初稿 tab roof import peasy.org.apache.commons.math.*; import peasy.*; import peasy.org.apache.commons.math.geometry.*; import processing.opengl.*; import processing.dxf.*; import simong.particles.*; //define the SystemParamater PeasyCam cam; ParticleSystem ps; membranen m1; void setup() { //define the SystemParamater size(921,691,P3D); //define the CameraParamater cam = new PeasyCam(this, 0,0,0,1000); //define the ParticleSystem ps= new ParticleSystem(this); ps.drawForces=true; ps.setGravity(0,0,0); ps.defaultMass=0.01; ps.defaultSpringDamping=0.1; ps.defaultSpringRestLength=5; strokeWeight(1); stroke(0,150); m1 = new membranen(); } void draw() { background(255); ps.draw(); }
回复

使用道具 举报

发表于 2011-2-9 22:11:59 | 显示全部楼层
Tab Membranen class membranen{ int n, N; int r, R; int h, H; int c, C; int d, D; float L1, L2; float[][] xpos ; float[][] ypos ; float[][] zpos ; float[] z0; float[] zn ; Particle[][] Points; Spring[][] meshEdges_1; Spring[][] meshEdges_2; membranen(){ createPoints(); createMesh(); } void createPoints(){ n = 10; N = 180; r = 100; R = 500; h = 50; H = 240; d = 25; D = 60; //c = d*h/r; C = D*H/R; L1 = (PI * 2 * r) / N; L2 = (PI * 2 * R) / N; xpos = new float [N][(n+1)]; ypos = new float [N][(n+1)]; zpos = new float [N][(n+1)]; z0 = new float [N]; zn = new float [N]; Points = new Particle[N][(n+1)]; for(int i = 0; i
回复

使用道具 举报

发表于 2011-2-9 22:16:08 | 显示全部楼层
无法上传附件 文件分两个Tab,可以将两页代码拷贝到processing运行
回复

使用道具 举报

发表于 2011-2-9 22:16:46 | 显示全部楼层
Tab Membranen class membranen{ int n, N; int r, R; int h, H; int c, C; int d, D; float L1, L2; float[][] xpos ; float[][] ypos ; float[][] zpos ; float[] z0; float[] zn ; Particle[][] Points; Spring[][] meshEdges_1; Spring[][] meshEdges_2; membranen(){ createPoints(); createMesh(); } void createPoints(){ n = 10; N = 180; r = 100; R = 500; h = 50; H = 240; d = 25; D = 60; //c = d*h/r; C = D*H/R; L1 = (PI * 2 * r) / N; L2 = (PI * 2 * R) / N; xpos = new float [N][(n+1)]; ypos = new float [N][(n+1)]; zpos = new float [N][(n+1)]; z0 = new float [N]; zn = new float [N]; Points = new Particle[N][(n+1)]; for(int i = 0; i
回复

使用道具 举报

发表于 2011-2-28 23:44:04 | 显示全部楼层
先学习学习,提高一下processing。。。。
回复

使用道具 举报

发表于 2011-3-12 01:19:05 | 显示全部楼层
感谢分享 资源很好
回复

使用道具 举报

发表于 2011-3-19 20:12:06 | 显示全部楼层
学习中 谢谢分享作品!!!!
回复

使用道具 举报

发表于 2011-8-16 19:56:23 | 显示全部楼层
这玩意pr里面的example就有啊
回复

使用道具 举报

发表于 2011-9-7 13:10:16 | 显示全部楼层
感谢分享 资源很好
回复

使用道具 举报

NCFZ微信公众号

手机版|小黑屋|NCF参数化建筑论坛 ( 浙ICP备2020044100号-2 ) 辽公网安备21021102000973号

GMT+8, 2026-11-23 18:18 , Processed in 0.047550 second(s), 25 queries , Gzip On.

Powered by Discuz! X5.0 Licensed

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表