Class Stripes – the code

// a class for working with stripes/sets of parallel lines
// lines defined ba ax+by=shift+k; where k is integer

// this makes sets of parallel lines as 
//  used in "projection method-geometry and maths"

// see the post "How to shift the design" for translations by (xTrans,yTrans)

class Stripes{
  float a,b,shift;
  int kmax;

  Stripes(float angle,float sp){
    // determine lines ax+by=c at corners of screen - maximum value for kmax=c-shift
// get k-value (real number) for a given point (class Vector) p
float getK(Vector p){
  return a*p.x+b*p.y-shift;

//  get intersection with  line of other stripe set with choosen k-values
Vector intersection(Stripes stripe,int k,int ki){
  float x,y,den;
  return new Vector(x,y);
This entry was posted in programming and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s