[ascoders] Re: Transform Points in Bounding Quad
- From: "Mario Klingemann" <ascoders@xxxxxxxxxxxxx>
- To: <ascoders@xxxxxxxxxxxxx>
- Date: Thu, 3 Jun 2004 16:22:21 +0200
Hier ist der Teil daraus der Dich interessieren dürfte:
// xMin,..yMax are the top lef and bottom right corners of original
rectangle.
// x0,..y3 are all four corners of transformed rectangle, starting at
xMin,yMin and
// working clockwise to x3,y3
ASVDrawing.createFreeform = function(xMin, yMin, xMax, yMax,
x0,y0,x1,y1,x2,y2,x3,y3){
var w = xMax - xMin;
var h = yMax - yMin;
var w2_0 = x1-x0;
var w2_1 = x2-x3;
var h2_0 = y1-y0;
var h2_1 = y2-y3;
return function(x,y){
var gx = (x-xMin)/w;
var gy = (y-yMin)/h;
var bx = x0 + gy*(x3-x0);
var by = y0 + gy*(y3-y0);
return {x: bx + gx*((x1+gy*(x2-x1))-bx), y: by + gx*((y1+gy*(y2-y1))-by)};
}
}
----- Original Message -----
From: "Mario Klingemann" <ascoders@xxxxxxxxxxxxx>
To: <ascoders@xxxxxxxxxxxxx>
Sent: Thursday, June 03, 2004 4:19 PM
Subject: [ascoders] Re: Transform Points in Bounding Quad
> Ist es nicht der link hier?
>
> http://www.peterjoel.com/ActionScript/ASVDrawingTransformFunction.as
>
> Mario
>
>
> ----- Original Message -----
> From: "Andre Michelle" <ascoders@xxxxxxxxxx>
> To: <ascoders@xxxxxxxxxxxxx>
> Sent: Thursday, June 03, 2004 4:17 PM
> Subject: [ascoders] Transform Points in Bounding Quad
>
>
> >
> > hi,
> >
> >
> > hat jemand einen Algorithmus, mit dem ich eine Ansammlung (Array) mit
> Punkten an einem angebundenen Viereck verzerren kann.
> > Peter Joel hat das hier gemacht:
> >
>
http://www.peterjoel.com/ActionScript/index.php?go=asvdrawingtransformfunction
> >
> > Allerdings ist sein Link auf die verwendete Klasse down:
> > http://www.waxpraxis.org/images/transform.as
> >
> > Ich denke, dass ist schon sehr oft gemacht und wollte mir die
Entwicklung
> sparen.
> >
> >
> > Gruss
> > aM
> >
> >
> > --
> > aM
> >
> > * Diese Mitteilung wurde in coldflash.de mit dem Benutzernamen Andre
> Michelle (am@xxxxxxxxxxxxxxxxxx) gepostet
> >
> > ------------------------------------------------------
> > Archiv : http://www.freelists.org/archives/ascoders/
> > Optionen : http://www.freelists.org/list/ascoders
> > ------------------------------------------------------
> >
>
> ------------------------------------------------------
> Archiv : http://www.freelists.org/archives/ascoders/
> Optionen : http://www.freelists.org/list/ascoders
> ------------------------------------------------------
>
------------------------------------------------------
Archiv : http://www.freelists.org/archives/ascoders/
Optionen : http://www.freelists.org/list/ascoders
------------------------------------------------------
- Follow-Ups:
- [ascoders] Re: Transform Points in Bounding Quad
- From: André Michelle
- References:
- [ascoders] Transform Points in Bounding Quad
- From: Andre Michelle
- [ascoders] Re: Transform Points in Bounding Quad
- From: Mario Klingemann
Other related posts:
- » [ascoders] Transform Points in Bounding Quad
- » [ascoders] Re: Transform Points in Bounding Quad
- » [ascoders] Re: Transform Points in Bounding Quad
- » [ascoders] Re: Transform Points in Bounding Quad
- » [ascoders] Re: Transform Points in Bounding Quad
- » [ascoders] Re: Transform Points in Bounding Quad
- » [ascoders] Re: Transform Points in Bounding Quad
- [ascoders] Re: Transform Points in Bounding Quad
- From: André Michelle
- [ascoders] Transform Points in Bounding Quad
- From: Andre Michelle
- [ascoders] Re: Transform Points in Bounding Quad
- From: Mario Klingemann