Hello, here is the code:
It does not work..can anybody help me?
(There is no errormessage, the programm runs, and the screen stays white, no drawing is created..)
- ArrayList pointList;
- void setup()
- {
- size(1024,768,P3D);
- pointList = new ArrayList();
- importTextFile();
- }
- void draw()
- {
- background(255,255,255);
- stroke(0,0,0);
- for(int i = 0; i < pointList.size(); ++i){
- for(int y = i+1; y < pointList.size(); ++y){
- PVector V = (PVector) pointList.get(i);
- PVector B = (PVector) pointList.get(y);
- line(V.x, V.y, V.z, B.x, B.y,B.z);
- }
- }
- }
- void importTextFile(){
- String[] Coorddessin = loadStrings("Coorddessin.txt");
- for(int i = 0; i < Coorddessin.length; ++i){
- String[] arrTokens = split(Coorddessin[i], ',');
- float xx = float(arrTokens[0]);
- float yy = float(arrTokens[1]);
- float zz = float(arrTokens[2]);
- pointList.add( new PVector(xx,yy,zz) );
- }
- }
It does not work..can anybody help me?
(There is no errormessage, the programm runs, and the screen stays white, no drawing is created..)
1