# Monthly Archives: August 2013

## Projection method and corner points – the code

float unitLength; float xRange,yRange;     // visible coordinates from -(xy)Range to +(xy)Range float xShift,yShift;     //  shifting one grid to get different parts of the tiling float sqrt2=sqrt(2.),sqrt05=sqrt(0.5); void setup(){   size(600,600);   smooth();   unitLength=30;   xShift=0.01;   yShift=0.05;   ellipseMode(CENTER); … Continue reading

## Projection method and corner points

Earlier I showed you how get the corner points of a quasiperiodic tiling. For the Ammann-Beenker tiling see the posts “An easy way to quasiperiodic tilings” and “How to find these corner points of the tiles“. This is easy to … Continue reading

## Setting up the coordinates

Computer technology determines the coordinates that processing uses. The distance between two pixels is the unit length and the origin lies at the upper left corner. This is not what we need in geometry and mathematics. Fortunately, processing has all … Continue reading

## Iterative method for the Ammann-Beenker tiling – the code

// needs class Vector and saveImage code // for details see Iterative method for the Ammann-Beenker tiling using “Vector” Vector a,b,c; float f; void setup(){   size(600,600);   f=1./(1.+sqrt(2.));   strokeWeight(2);   smooth(); } void draw(){   noLoop(); a=new Vector(-10,-10); b=new … Continue reading

## Iterative method for the Ammann-Beenker tiling using “Vector”

In the earlier post “An efficient iterative method for the Ammann-Beenker tiling” I briefly presented an iterative dissection of rhombs and triangles that gives the Ammann-Beenker tiling. In the next post “Iterative method for the Ammann-Beenker tiling – the code” I … Continue reading

## class Vector – the code

// a class for two-dimensional vectors, similarly as PVector //————————————————————- // //  some important values float vectorSmall=0.0001,vectorSqrt05=sqrt(0.5); float vectorDiameter=8; color vectorColor=color(255);     //rgb mode, for green //  and here’s the class class Vector{   float x,y;     // create a … Continue reading

Posted in programming | Tagged , , | 2 Comments

## class Vector

The basic element of geometry is a point or vector. We could use the PVector class of processing to work with vectors in 2 and 3-dimensional space. However, this is not really efficient for 2-dimensional vectors, because their z-component is … Continue reading