[Pixman] [PATCH 1/2] demos: Add quad2quad program

Bill Spitzak spitzak at gmail.com
Mon Mar 26 12:07:25 PDT 2012


Another way to do this that might be shorter is to compute the matrix 
that transforms the 0,0,1,1 square to an arbitrary quad, which I will 
call T(quad). Then the full transform is T(dest)*inverse(t(source))

Søren Sandmann wrote:
> From: Søren Sandmann Pedersen <ssp at redhat.com>
> 
> This program can compute the projective transformation that transforms
> one quadrilateral into another. The code is basically maxima[1] output
> translated into C.
> 
> [1] http://maxima.sourceforge.net/
> ---
>  demos/quad2quad.c | 2183 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 2183 insertions(+), 0 deletions(-)
>  create mode 100644 demos/quad2quad.c
> 
> diff --git a/demos/quad2quad.c b/demos/quad2quad.c
> new file mode 100644
> index 0000000..a8c05b1
> --- /dev/null
> +++ b/demos/quad2quad.c
> @@ -0,0 +1,2183 @@
> +#include <math.h>
> +#include <stdio.h>
> +#include <pixman.h>
> +
> +/* This code is basically the output of Maxima translated into C.


More information about the Pixman mailing list