nope :(
Follwing are the three classes, ie three java files trial, polygon, points
import processing.core.PApplet;
public class trial extends PApplet{
public void setup(){
}
public void draw ()
{ render();
}
void render(){
Point []pts=new Point[4];
if(pts!=null)
{pts[0]=new Point(30,20,0);
pts[1]=new Point(85,20,0);
pts[2]=new Point(85,75,0);
pts[3]=new Point(20,75,0);
}
Polygon boundary=new Polygon(pts);
boundary.render();
}
}
............................................................................................................................
//------ POLYGON ------//
import processing.core.PApplet;
public class Polygon extends PApplet{
Point[] points = new Point[1000];
Polygon(Point[] $points){
this.points=$points;
}
void render(){
for(int i=0;i<4;i++){
System.out.println(points[i].x);
}
beginShape();
if(points!=null)
for(int i=0;i<4;i++){
vertex(points[i].x,points[i].y,points[i].z);
System.out.println(points[i].x);
}
endShape(CLOSE);
}
}
................................................................................................................................................
//------ POINT ------//
import processing.core.PApplet;
public class Point {
int n;
float x,y,z;
Point(float $x,float $y,float $z){
x = $x;
y = $y;
z = $z;
}
}
Any ideas?