/*
 * main_test_vector.c
 *
 *  Created on: Jun 9, 2009
 *      Author: Alexander Pimenov
 */


#include "geometry.h"
#include "projective.h"


#define main3 main

int main1 (int argC, char **argV)
{
	vector3Dd v1 = {0.54, -0.7, 6};
	vector3Dd v2 = {5, 0.4, -7};

	vector3Dd v3 = crossProduct(&v1, &v2);
	vectorPrint(&v3);

	//v1: [0.54, -0.7, 6];
	//v2: [5, 0.4, -7];
	//v1~v2;
	//express(%);
	//[2.499999999999999,33.78,3.716]

	return 0;
}

int main2 (int argC, char **argV)
{
	double data[] = {1,2,3,0,1,4,5,6,0};
	projectiveTransform2D M = projective2DCreateFromRaw(data);
	projectiveTransform2D Minv = projective2Dinverse(&M);

	// -24  18   5
	//  20 -15  -4
	//  -5   4   1

	projective2Dprint(&Minv);
	return 0;
}

int main3 (int argC, char **argV)
{
	//// (0,0)-(821,617) : (-3,-1) : (0,1)
	vector2Ds16 start = {-3, -1};
	vector2Ds16 end   = { 0,  1};

	clipCohenSutherland(0, 0, 821, 617, &start, &end);
	return 0;
}
