Wrong curve when using Manim Ellipse
- 主要語言
- Python
- 星號
- 93.9k
- 分支
- 7.7k
- 平均合併
- 2 天 13 小時
- 30 天內合併 PR
- 4
描述
### Describe the bug
**The curve of the ellipse is too small!**
The curve must interpolate the four vertices A,B,C,D but it doesn't!
**Code**:
```
from manim import *
class EllipseExample(Scene):
def construct(self):
w, h = 3.0, 2.0
ellipse_1 = Ellipse(width=w*2, height=h*2, color=BLUE_B)
self.add(ellipse_1)
A, B, C, D = Dot([-w,0,0]), Dot([w,0,0]), Dot([0,-h,0]), Dot([0,h,0])
self.add(A, B, C, D)
self.add(Line([-w*1.1, 0, 0], [w*1.1, 0, 0], color=GRAY))
self.add(Line([0, -h*1.1, 0], [0, h*1.1, 0], color=GRAY))
```
**Wrong display or Error traceback**:
### Additional context
Apparently **the internally used points are wrong**, see get_shader_data().
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
此問題出在 Ellipse 類別;先檢查 get_shader_data() 方法,查看頂點如何計算。將計算出的點與預期頂點 (-w,0), (w,0), (0,-h), (0,h) 比較。執行提供的程式碼以重現視覺差異,然後調整頂點產生或插值邏輯。檢查 ellipse 渲染的測試檔案,以確保修正不會破壞現有測試。
由索引模型根據 Issue 內容生成。
評估
- 領域
- computer-graphics
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 65/100