Popular recipes tagged "area"http://code.activestate.com/recipes/tags/area/2017-07-17T05:53:45-07:00ActiveState Code RecipesShoelace Formula for polygonal area (Python)
2017-07-17T05:53:45-07:00Paddy McCarthyhttp://code.activestate.com/recipes/users/398009/http://code.activestate.com/recipes/580812-shoelace-formula-for-polygonal-area/
<p style="color: grey">
Python
recipe 580812
by <a href="/recipes/users/398009/">Paddy McCarthy</a>
(<a href="/recipes/tags/2d/">2d</a>, <a href="/recipes/tags/area/">area</a>).
</p>
<p>Copied, by author from "Paddy3118 Go deh!: Python investigation of the Shoelace Formula for polygonal area <a href="http://paddy3118.blogspot.com/2017/07/python-investigation-of-shoelace.html#ixzz4n43Dqhaa" rel="nofollow">http://paddy3118.blogspot.com/2017/07/python-investigation-of-shoelace.html#ixzz4n43Dqhaa</a> " Where there is more meat on the bone (under a different license though).</p>
3D polygon area (Python)
2012-10-01T16:29:26-07:00Jamie Bullhttp://code.activestate.com/recipes/users/4183059/http://code.activestate.com/recipes/578276-3d-polygon-area/
<p style="color: grey">
Python
recipe 578276
by <a href="/recipes/users/4183059/">Jamie Bull</a>
(<a href="/recipes/tags/3d/">3d</a>, <a href="/recipes/tags/area/">area</a>, <a href="/recipes/tags/geometry/">geometry</a>, <a href="/recipes/tags/polygon/">polygon</a>).
</p>
<p>Function for finding the area of a polygon in a 3D co-ordinate system.</p>
2D polygon area (Python)
2012-10-01T16:22:13-07:00Jamie Bullhttp://code.activestate.com/recipes/users/4183059/http://code.activestate.com/recipes/578275-2d-polygon-area/
<p style="color: grey">
Python
recipe 578275
by <a href="/recipes/users/4183059/">Jamie Bull</a>
(<a href="/recipes/tags/2d/">2d</a>, <a href="/recipes/tags/area/">area</a>, <a href="/recipes/tags/geometry/">geometry</a>, <a href="/recipes/tags/polygon/">polygon</a>).
</p>
<p>Function for finding the area of a polygon in a 2D co-ordinate system.</p>
3 Point Area Finder (Python)
2009-09-08T14:08:14-07:00Daniel Sahahttp://code.activestate.com/recipes/users/4171644/http://code.activestate.com/recipes/576896-3-point-area-finder/
<p style="color: grey">
Python
recipe 576896
by <a href="/recipes/users/4171644/">Daniel Saha</a>
(<a href="/recipes/tags/area/">area</a>, <a href="/recipes/tags/coordinates/">coordinates</a>, <a href="/recipes/tags/triangles/">triangles</a>).
</p>
<p>Plug in three coordinates to triArea(a,b,c), and it will return the area of the triangle.
some common variable letters transfer into these meanings:
m: slope
y,c: y intercept
a: x's coefficient
b: y's coefficient </p>
Gaussian integration with or without Log singularity (Python)
2009-09-09T21:03:10-07:00Gabriel Genellinahttp://code.activestate.com/recipes/users/924636/http://code.activestate.com/recipes/576900-gaussian-integration-with-or-without-log-singulari/
<p style="color: grey">
Python
recipe 576900
by <a href="/recipes/users/924636/">Gabriel Genellina</a>
(<a href="/recipes/tags/algorithms/">algorithms</a>, <a href="/recipes/tags/area/">area</a>, <a href="/recipes/tags/integration/">integration</a>, <a href="/recipes/tags/math/">math</a>).
</p>
<p>The Gaussian quadrature is among the most accurate integration scheme for smooth integrands. It replaces a integral by a sum of sampled values of the integrand function times some weight factors.</p>
<p>This is strictly a minor rewrite of <a href="http://code.activestate.com/recipes/52292/">recipe 52292</a>, just to make it compatible with Python 2.4 and above. 2to3 converts it perfectly to be used with Python 3.x</p>
<p><em>All</em> credit is due to the original author, Alexander Pletzer.</p>