Code Monkey home page Code Monkey logo

gon's People

Contributors

georgysk avatar lycantropos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gon's Issues

Voronoi diagram

Following Delaunay triangulation support (issue #5): it is reasonable to have support for Voronoi diagram of polygon vertices.

Reference.

Add scaling support

We need to be able to scale geometries by given factor.

Adding method like

def scale(self,  ratio_x: Coordinate, ratio_y: Optional[Coordinate] = None) -> Geometry:
    if ratio_y is None:
        ratio_y = ratio_x
    ...

will help.

Reference.

Triangulation support

Since it is a very useful techique to decompose polygon into set of simpler ones (and triangles are the simplest polygons), we need a support for it too.

Reference.

Add translation support

We need to be able to translate geometries by given step.

Adding method like

def translate(self, step_x: Coordinate, step_y: Optional[Coordinate] = None) -> Geometry:
    if step_y is None:
        step_y = step_x
    ...

will help.

Reference.

Add check if polygons are disjoint

We need a way to check if polygons do not overlap, or in other words -- if polygons are disjoint.

API may be a method called is_disjoint_with that takes 2 polygons: self & other, similar to __eq__ & other rich comparison methods.

Reference.

Add rotation support

We need to be able to rotate geometries around given point by given angle.

Adding method like

def rotate(self, angle: Coordinate, point: Optional[Point] = None) -> Geometry:
    result = (self
			  if point is None
		 	  # move origin to point
		      self.translate(-point.x, -point.y))
    ... # rotate around origin
    return (result
			if point is None
		 	# move origin back
		    result.translate(point.x, point.y))

will help.

Reference.

Triangulation with holes

Hi,

I am working on a project with character shapes and I need to triangulate some polygons with holes (e.g. the character B). Does your project offer any possibility to solve such a problem?

Cheers,

Distances between geometries

We need to be able to calculate distance between geometries.

Adding method like

def distance_to(self, other: Geometry) -> Coordinate:
    ...

will help.

Reference.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.