mirror of
https://github.com/3b1b/manim.git
synced 2025-09-19 04:41:56 +00:00
Updates to logo object
This commit is contained in:
parent
f31fcf306c
commit
4ae38cd9b8
1 changed files with 46 additions and 1 deletions
|
@ -769,10 +769,55 @@ class Logo(VMobject):
|
||||||
fill_color=BLACK,
|
fill_color=BLACK,
|
||||||
fill_opacity=1,
|
fill_opacity=1,
|
||||||
stroke_width=0,
|
stroke_width=0,
|
||||||
sheen=0.0
|
sheen=0.0,
|
||||||
|
start_angle=90 * DEGREES,
|
||||||
)
|
)
|
||||||
self.add(self.pupil)
|
self.add(self.pupil)
|
||||||
|
|
||||||
|
def cut_pupil(self):
|
||||||
|
pupil = self.pupil
|
||||||
|
center = pupil.get_center()
|
||||||
|
new_pupil = VGroup(*[
|
||||||
|
pupil.copy().pointwise_become_partial(pupil, a, b)
|
||||||
|
for (a, b) in [(0.25, 1), (0, 0.25)]
|
||||||
|
])
|
||||||
|
for sector in new_pupil:
|
||||||
|
sector.add_control_points([
|
||||||
|
sector.points[-1],
|
||||||
|
*[center] * 3,
|
||||||
|
*[sector.points[0]] * 2
|
||||||
|
])
|
||||||
|
self.remove(pupil)
|
||||||
|
self.add(new_pupil)
|
||||||
|
self.pupil = new_pupil
|
||||||
|
|
||||||
|
def get_blue_part_and_brown_part(self):
|
||||||
|
if len(self.pupil) == 1:
|
||||||
|
self.cut_pupil()
|
||||||
|
# circle = Circle()
|
||||||
|
# circle.set_stroke(width=0)
|
||||||
|
# circle.set_fill(BLACK, opacity=1)
|
||||||
|
# circle.match_width(self)
|
||||||
|
# circle.move_to(self)
|
||||||
|
blue_part = VGroup(
|
||||||
|
self.iris_background[0],
|
||||||
|
*[
|
||||||
|
layer[:layer.brown_index]
|
||||||
|
for layer in self.spike_layers
|
||||||
|
],
|
||||||
|
self.pupil[0],
|
||||||
|
)
|
||||||
|
brown_part = VGroup(
|
||||||
|
self.iris_background[1],
|
||||||
|
*[
|
||||||
|
layer[layer.brown_index:]
|
||||||
|
for layer in self.spike_layers
|
||||||
|
],
|
||||||
|
self.pupil[1],
|
||||||
|
)
|
||||||
|
return blue_part, brown_part
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Cards
|
# Cards
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue