Skip to content

Temporarily fix boolean operation bug#1724

Merged
3b1b merged 1 commit into
3b1b:masterfrom
TurkeyBilly:patch-2
Jan 31, 2022
Merged

Temporarily fix boolean operation bug#1724
3b1b merged 1 commit into
3b1b:masterfrom
TurkeyBilly:patch-2

Conversation

@TurkeyBilly

@TurkeyBilly TurkeyBilly commented Jan 31, 2022

Copy link
Copy Markdown
Contributor

#1711

Motivation

solution full credits to @widcardw
Just helping to upload this

class DifferenceExample(Scene):
    def construct(self):
        cir1 = Circle(radius=3).move_to(LEFT * 1.5)
        cir2 = cir1.copy().move_to(RIGHT * 1.5)
        d = Difference(cir1, cir2, color=YELLOW, fill_opacity=0.4)
        self.add(cir1, cir2, d)

9d2657aed6b748337d4fac4d7536084

class ExclusionExample(Scene):
    def construct(self):
        cirs = VGroup(*[
            Circle(radius=2).move_to(1.5 * np.array([
                np.cos(i / 3 * TAU), np.sin(i / 3 * TAU), 0
            ])) for i in range(3)
        ])
        e = Exclusion(*cirs, color=YELLOW, fill_opacity=0.4)
        self.add(cirs, e)

3772702db9a05f643a0c00355ae69cc

class IntersectionExample(Scene):
    def construct(self):
        cir1 = Circle(radius=3).move_to(LEFT * 1.5)
        cir2 = cir1.copy().move_to(RIGHT * 1.5)
        i = Intersection(cir1, cir2, color=YELLOW, fill_opacity=0.4)
        self.add(cir1, cir2, i)

624458b4d0c1d8a91b7b120789ad022

class UnionExample(Scene):
    def construct(self):
        cir1 = Circle(radius=3).move_to(LEFT * 1.5)
        cir2 = cir1.copy().move_to(RIGHT * 1.5)
        u = Union(cir1, cir2, color=YELLOW, fill_opacity=0.4)
        self.add(cir1, cir2, u)

e14a60911b74dc63cfba64e1e72e6c2

Proposed changes

Test

Code: same code

Result:
494fa7515676520c2b5cbb6e3a83aee
849829392a14ffa195667533d52f23d
f0b662fb841dc5bd9515136595b51e2
0de1b6cd67706b1ef2afbdabed39c9a

@TonyCrane

Copy link
Copy Markdown
Collaborator

Similar to #1713, but I don't know why.

@TonyCrane
TonyCrane requested a review from 3b1b January 31, 2022 15:45
@3b1b
3b1b merged commit 1e2a6ff into 3b1b:master Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants