Monthly Archives: November 2013

class Polygons

The objects of type Polygons do not do something fancy. They simply collect polygons in an array and call their methods. Yet this is important. As an example, to show all triangles of the dual tiling in blue you could … Continue reading

Posted in programming | Tagged , | Leave a comment

class Polygon – the code

class Polygon{   Line[] sides;                           //   attention: we do not know their orientation   Point dualPoint;     Polygon(Line[] theseSides){            //  dual point does not exist yet     sides=theseSides;   }     //  drawing the polygon as a shape … Continue reading

Posted in programming | Tagged , , | Leave a comment

class Polygon

This class defines a polygon as being made up of its sides given by an array of Lines and its dual point. Maybe one could use the class Lines for the sides of the polygon. We have several methods to … Continue reading

Posted in programming | Tagged , , | Leave a comment

class Lines – the code

class Lines{   Line[] lines;     Lines(){     lines=new Line[0];   }     void add(Line l){     lines=(Line[])(append(lines,l));   }     void eliminateUndefined(){        lines=eliminateUndefinedLines(lines);   }   void eliminateUndefinedDuals(){        for (int i=0;i<lines.length;i++){       … Continue reading

Posted in programming | Tagged , , | Leave a comment

class Lines

An object of type “Lines” collects objects of type “Line”. This may be the lines of the original tiling or its dual. Apart from the usual methods to add and show lines we have the method “eliminateUndefined” to eliminate undefined … Continue reading

Posted in programming | Tagged , , | Leave a comment

class Line – the code

class Line{   Point endPointA,endPointB;   Line dualLine;     Line(Point ap,Point bp){              // with known endpoints     if(ap==bp) {       println( ” *********** new Line: IDENTICAL endpoints,  a==b, NO LINE”);       return;     }     endPointA=ap;     endPointB=bp;   … Continue reading

Posted in programming | Tagged , , | Leave a comment

class Line

For each line we need to know its endpoints and its dual line. Their references (endPointA, endPointB and dualLine) make up the data of the object of type Line. The endpoints of a line may not be defined, then they … Continue reading

Posted in programming | Tagged , | Leave a comment