示例#1
0
func (p *Plane) mergeTemporary() {
	var poly dioid.Poly
	for _, v := range p.temporary {
		poly = append(poly, dioid.Gd{G: v.G(), D: v.D()})
	}
	p.SetDioid(dioid.SerieOplus(p.dioid, dioid.Serie{P: poly}))
}
示例#2
0
func (p *Plane) star(set ...*vertex) {
	var poly dioid.Poly
	for _, v := range set {
		p.dioid = p.dioid.RemoveGd(v.G(), v.D())
		poly = append(poly, dioid.Gd{G: v.G(), D: v.D()})
	}
	p.SetDioid(dioid.SerieOplus(p.dioid, dioid.PolyStar(poly)))
}