ManimCommunity / ManimCommunity/manim

DoubleArrow Incorrect behaviour in 3D

Open
#2,261 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

issue:bug
Dominant language
Python
Stars
40.9k
Forks
3.1k
Avg merge
3d 12h
Merged PRs (30d)
25

Description

## Description of bug / unexpected behavior

A double arrow in the z axis generates a tip pointing in an orthogonal direction

## Expected behavior

Both tips of the arrow should be collinear.

## How to reproduce the issue

Code for reproducing the problem

```py
class TestArrows3D(ThreeDScene):
def construct(self):
self.set_camera_orientation(phi = 70 * DEGREES, theta = -45 * DEGREES,
zoom = 2)
h = 0.5 + 0.1
Lx = DoubleArrow([-0.5,- h ,- 0.5], [0.5,- h ,- 0.5])
Ly = DoubleArrow([h ,- 0.5,- 0.5], [h , 0.5,- 0.5])
# The next double arrow has a wrong tip
Lz = DoubleArrow([0.5 ,h ,- 0.5], [0.5, h , 0.5], color = RED)
self.add(Cube(1), Lx, Ly, Lz)
```

## Additional media files

Images/GIFs

![TestArrows3D_ManimCE_v0 12 0](https://user-images.githubusercontent.com/66566775/140496836-13b27fdc-2102-4fff-8a79-8efb5944c4fa.png)

## Logs
Terminal output

```
PASTE HERE OR PROVIDE LINK TO https://pastebin.com/ OR SIMILAR
```

## System specifications

System Details

- OS (with version, e.g Windows 10 v2004 or macOS 10.15 (Catalina)):
- RAM:
- Python version (`python/py/python3 --version`):
- Installed modules (provide output from `pip list`):
```
PASTE HERE
```

LaTeX details

+ LaTeX distribution (e.g. TeX Live 2020):
+ Installed LaTeX packages:

FFMPEG

Output of `ffmpeg -version`:

```
PASTE HERE
```

## Additional comments

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided TestArrows3D.construct reproduction and inspect the DoubleArrow implementation used by the z-axis case. Compare the generated tips against the x- and y-axis cases, then add or update a regression test if the repository's test location is identified. Done means both tips of a z-axis DoubleArrow are collinear and the reproduction passes.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.