3b1b / 3b1b/manim

Lines and curves rendered in a strange way

未关闭
#2,043 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
93.8k
派生
7.7k
PR 合并指标
PR 指标待抓取

描述

### Describe the error

Today I uninstalled my old manimgl installed from pypi and installed manimgl from master. Then I rendered my old video project. However, I got a unexpected effect. Every line seems to be faded in and faded out, includes sides of polygon, arrows, number lines. What's more, curves are sectionally faded out, which makes it looks like dashed... Not only my project but the examples did so.

### Code and Error
**Code**:

```python
# Hope my code is easy looking... I didn't write notes
def construct(self):
axes1 = Axes(x_range=(-1, 2), y_range=(0, 6), height=4.8, width=2.4)
axes1.to_edge(LEFT)
coord_a = axes1.c2p(2, math.sqrt(32))
coord_b = axes1.c2p(0, 0)
coord_c = axes1.c2p(2, 0)
coord_d = axes1.c2p(2, math.sqrt(2))
dot_a = Dot(coord_a, fill_color=BLUE_C)
dot_b = Dot(coord_b, fill_color=BLUE_C)
dot_c = Dot(coord_c, fill_color=BLUE_C)
dot_d = Dot(coord_d, fill_color=BLUE_C)
label_a = Text("A", slant=ITALIC, font_size=36)
label_b = Text("B", slant=ITALIC, font_size=36)
label_c = Text("C", slant=ITALIC, font_size=36)
label_d = Text("D", slant=ITALIC, font_size=36)
label_a.next_to(dot_a, UP)
label_b.next_to(dot_b, DOWN)
label_c.next_to(dot_c, DOWN)
label_d.next_to(dot_d, RIGHT)
triangle_abc = Polygon(coord_a, coord_b, coord_c)
triangle_abc.set_stroke(BLUE_C, width=4)
rectangle = Square(0.24)
rectangle.set_stroke(BLUE_C, width=2)
rectangle.set_fill(BLUE_C, opacity=0.25)
rectangle.move_to(axes1.c2p(1.85, 0.15))
segment_cd = Line(coord_c, coord_d, color=YELLOW_C)
segment_cd.set_opacity(0.5)
length_cd = Tex(r"\sqrt{2}", font_size=36)
length_cd.next_to(segment_cd)
geometry_graph = VGroup(triangle_abc, dot_a, dot_b, dot_c, dot_d,
label_a, label_b, label_c, label_d,
rectangle, length_cd)

axes2 = Axes(x_range=(0, 13, 2), y_range=(0, 20, 2), height=6, width=3.9,
axis_config={"stroke_width": 2, "include_tip": False})
# axes2.add_coordinate_labels(font_size=60)
axes2.to_edge(RIGHT) # .scale(0.3)
lable_position = axes2.c2p(10, 19.5)
function_graph = axes2.get_graph(lambda x: (x - 4) ** 2 + 2,
color=RED_C, x_range=[2, 8])

def graph_label(tex: str) -> Tex:
label = Tex(tex, font_size=32)
label.set_color(RED_C)
label.move_to(lable_position)
return label
func_label = graph_label('S=(t-4)^2+2')
func_label_mid = graph_label('S=a(t-4)^2+2')
func_label_orig = graph_label('S=a(t-h)^2+k')

self.wait()
self.play(FadeIn(geometry_graph, DOWN), Write(axes2), run_time=3)
self.wait(3)

self.play(ShowCreation(function_graph))
self.wait()
self.play(Write(func_label_orig))
self.wait()
self.play(ReplacementTransform(func_label_orig, func_label_mid))
self.wait()
self.play(ReplacementTransform(func_label_mid, func_label))
self.wait(3)
```

**Error**:

The final scene to be like this:
![faded out lines and dashed curves](https://github.com/3b1b/manim/assets/89085899/26ab93aa-3da3-43c7-9ab7-65865f52b500)

### Environment
**OS System**: Windows 11 22H2 22621.1265
**manim version**: master after pypi ver uninstalled
**python version**: Python 3.11.1
**Graph card**: HD4400

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。