ManimCommunity / ManimCommunity/manim
render problem 3d camera distance
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
## Description of bug / unexpected behavior
If setting the distance in camera orientation too close to 3d axes
white frames are rendered and the axes are curved.
This can be bypassed by setting the distance further away
or probably with some tricks in scaling, but can be surprising and hard
to debug also.
## Expected behavior
Distance of 3d camera shouldn't create rendering problems and not bend the axes.
## How to reproduce the issue
Code for reproducing the problem
```py
def construct(self):
self.set_camera_orientation(
phi=80 * DEGREES,
theta=45*DEGREES,
distance=2 # causes trouble
)
axes = ThreeDAxes()
s = Sphere()
self.add(axes)
self.play(Write(s))
self.begin_ambient_camera_rotation(rate=0.2)
self.wait(10)
```
## Additional media files
Images/GIFs

## Logs
Everything goes fine even with log level debug.
## System specifications
System Details
- OS Fedora 33
- RAM: 16GB
- Python version: 3.9.1
FFMPEG
Output of `ffmpeg -version`: 4.3.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided construct example with set_camera_orientation, ThreeDAxes, Sphere, and ambient camera rotation at distance=2. Inspect the camera-orientation and 3D rendering paths involved in the reproduction. Done means the example no longer produces white frames or visibly curved axes at the reported distance, with regression coverage added where the relevant rendering behavior is tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100