3b1b / 3b1b/manim

Low resolution when applying nonlinear transformation

オープン
#386 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
93.9k
フォーク
7.7k
平均マージ
2日 13時間
マージ済み PR(30日)
4

説明

I want to apply a **nonlinear** transformation to a number plane but...it won't give a correct result.(No problem with linear transformation)
Expected:
![image](https://user-images.githubusercontent.com/22100064/50556626-7ed76e00-0d16-11e9-9693-9d97aaa3d910.png)
What I've got instead:
![1](https://user-images.githubusercontent.com/22100064/50556663-08873b80-0d17-11e9-9f8b-a70bf374c91f.png)
,then
![2](https://user-images.githubusercontent.com/22100064/50556664-091fd200-0d17-11e9-9cdb-bddfee299e94.png)
and, finally,
![final](https://user-images.githubusercontent.com/22100064/50556665-091fd200-0d17-11e9-8264-b22d4d43aaea.png)

------

I'm using the latest version of manim with **Python 3.7**, and here is my code.
```python
#!/usr/bin/env python
from big_ol_pile_of_manim_imports import *

class Scene1(Scene):
def construct(self):
pl = NumberPlane()
x_axis = NumberLine()
y_axis = NumberLine()
y_axis.rotate(np.pi / 2)
rt = Rectangle(height=4, width=8)
rt.set_fill(GREEN, opacity=0.5)
self.play(ShowCreation(pl), ShowCreation(x_axis), ShowCreation(y_axis))
self.play(FadeIn(rt))

self.play(
*[ApplyPointwiseFunction(lambda point: complex_to_R3(R3_to_complex(point) ** 2),mob) for mob in self.mobjects]
)
self.wait()
```

As you can see in the last picture, the transformation has been **correctly** applied to **the rectangle and the axies**(`NumberLine`), but those grid lines tend to be still straight, I mean not smooth.

It seems that there's no problem with the transformation function itself, right (I guess)?

What the author 3b1b used in that video may be just grid lines (`Grid`), and it can produce the correct result. But how can I apply a pointwise function to the whole `NumberPlane`, or, something like `ComplexPlane` ?
Thanks.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。