Page 231

//odd for(int i=1;i<allScaf.size();i+=2) { ArrayList xlinepts=(ArrayList)allScaf.get(i); for(int n=0;n<xlinepts.size();n++) { VerletParticle me=(VerletParticle)xlinepts.get(n); float alldis=0; allIncY=0; allIncZ=30; R=0; D=0; for(int j=0;j<oddatt.size();j++) { VerletParticle attPt=(VerletParticle)oddatt.get(j); float d=me.distanceTo(attPt); if(d<ranNum) { incY=ranY*(cos(PI*d/ranNum)+1)/2; if(attPt.y>me.y) { incY=-incY; } allIncY+=incY;

void fixedSetting(){ //setup camera size(800, 600, OPENGL); this.frame.setTitle(“mushroom”); cam = new PeasyCam(this, 100,50,0,2200); Setup translate(0,0,-500); } void showAxis(){ //show axis colorMode(RGB,255); strokeWeight(0.1); stroke(255,0,0);//z-red line(0,0,0,0,0,1000); stroke(0,255,0);//y-green line(0,0,0,0,1000,0); stroke(0,0,255);//x-blue line(0,0,0,1000,0,0); //show box colorMode(RGB,255); strokeWeight(0.1); stroke(102,102,102); int wDim = 1000; //equal 10m int lDim = 2000; // equal 10m int hDim = 50; // equal 5 m pushMatrix(); translate(wDim/2, lDim/2,hDim/2); box(wDim,lDim,hDim); popMatrix();

//z incZ=ranZ*(cos(PI*d/ranNum)+1)/2; allIncZ+=incZ;

} } for(int j=0;j<att.size();j++) { VerletParticle attPt=(VerletParticle)att.get(j); float d=me.distanceTo(attPt); if(d<ranNum) { incY=k*ranY*(cos(PI*d/ranNum)+1)/2; if(attPt.y>me.y) { incY=-incY; } allIncY+=incY;

}

//z incZ=k*ranZ*(cos(PI*d/ranNum)+1)/2; allIncZ+=incZ;

me.y=me.y+(allIncY); me.z=(allIncZ);

AADRL PROTODESIGN V.2

}

}

}

}

mycoFARMX

}

// Camera

231

mycoFARMX_Living Architecture  

mycoFARMX IS A PROPOSAL FOR A PROTOTYPE OF A SEASONAL RECREATION AND MYCOPARK IN KUNMING, THE CAPITAL OF YUNNAN IN SOUTHERN CHINA. PRESENTLY...

mycoFARMX_Living Architecture  

mycoFARMX IS A PROPOSAL FOR A PROTOTYPE OF A SEASONAL RECREATION AND MYCOPARK IN KUNMING, THE CAPITAL OF YUNNAN IN SOUTHERN CHINA. PRESENTLY...

Advertisement