Article View: comp.windows.interviews
Article #530Re: polygon alignment
From: Luis Galleguillos
Date: Wed, 26 Aug 1992 19:12
Date: Wed, 26 Aug 1992 19:12
16 lines
1031 bytes
1031 bytes
Draw aline thrugh the points on a plane. Calculate dy/dx of the line . Calculate the dy/dx of all facets of the poligon.If the desired facet or if one of the facets has the same dy/dx as of the line drawn through the two points then use descriptive geometry to find the translation needed to align them: if abs(Poligonfacet(i)dy/dx) = abs(Planepointsdy/dx) then you can get a,b,a1,b1 of line eq. below: Yfacet= ax +b and Ypoint= a1x+b1y Yfacet = (a+c)x +(b+c)y = a1x+b1y solve for c and move all poits of poligon by this ammount to align with points. Luis
Technical Details
Message-ID:
<9208261912.AA01952@hadar.fai.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!UUNET.UU.NET!luisg%hadarReferences:
<9208261439.AA14099@ninurta.fer.yu>Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.interviews Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!UUNET.UU.NET!luisg%hadar From: luisg%hadar@UUNET.UU.NET (Luis Galleguillos) Subject: Re: polygon alignment Message-ID: <9208261912.AA01952@hadar.fai.com> Sender: news@shelby.stanford.edu (USENET News System) Organization: Internet-USENET Gateway at Stanford University References: <9208261439.AA14099@ninurta.fer.yu> Date: Wed, 26 Aug 1992 19:12:42 GMT Lines: 16