module special.geometry_polygone

Inheritance diagram of ensae_teaching_cs.special.geometry_polygone

Short summary

module ensae_teaching_cs.special.geometry_polygone

defines a polyline

source on GitHub

Classes

class

truncated documentation

GeometryPolygone

A sequence of point, the last one is connected to the first one.

Methods

method

truncated documentation

barycentre

circle

convex

in_convex

we assume the polygone is convex and the result of function convex (points sorted by angle we check then if a point …

Documentation

defines a polyline

source on GitHub

class ensae_teaching_cs.special.geometry_polygone.GeometryPolygone[source]

Bases : list

A sequence of point, the last one is connected to the first one.

source on GitHub

barycentre()[source]
Renvoie

the barycentre

source on GitHub

circle()[source]
Renvoie

a list of points ordered by angle taken to the barycenter (works only dimension 2)

source on GitHub

convex()[source]
Renvoie

the convex envelop

only in 2 dimensions right now

source on GitHub

in_convex(p)[source]

we assume the polygone is convex and the result of function convex (points sorted by angle we check then if a point p belongs to the envelop (only 2-dimension)

Paramètres

p – point

Renvoie

boolean

source on GitHub