ManimCommunity / ManimCommunity/manim

GrowArrow() function not working for Arrow3D()

Open
#3,481 7 comments 0 reactions 1 assignee View on GitHub

@RishabhSaini is already working on this.

Since Dec 3, 2023.

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

Description

## Description of bug / unexpected behavior

GrowArrow() function not working for Arrow3D()

## Expected behavior

GrowArrow() function should work for Arrow3D() as it does for Arrow()

## How to reproduce the issue

self.play(GrowArrow(Arrow3D(LEFT,RIGHT)))
Code for reproducing the problem

```py
from manim import *

class BUG(ThreeDScene):
def construct(self):
self.play(GrowArrow(Arrow3D(LEFT,RIGHT)))
self.wait(2)
```

## Additional media files

Images/GIFs

## Logs
Terminal output

```
DEBUG Hashing ... hashing.py:350
[12/01/23 20:31:11] DEBUG Hashing done in 6.788668 s. hashing.py:362
DEBUG Hash generated : hashing.py:365
2550307886_3715879681_223132457
INFO Animation 0 : Using cached cairo_renderer.py:78
data (hash :
2550307886_3715879681_22313245
7)
DEBUG List of the first few cairo_renderer.py:87
animation hashes of the scene:
['2550307886_3715879681_223132
457']
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /home/hassamrajpoot/.local/lib/python3.10/site-packages/manim/cli/render/com │
│ mands.py:115 in render │
│ │
│ 112 │ │ │ try: │
│ 113 │ │ │ │ with tempconfig({}): │
│ 114 │ │ │ │ │ scene = SceneClass() │
│ ❱ 115 │ │ │ │ │ scene.render() │
│ 116 │ │ │ except Exception: │
│ 117 │ │ │ │ error_console.print_exception() │
│ 118 │ │ │ │ sys.exit(1) │
│ │
│ /home/hassamrajpoot/.local/lib/python3.10/site-packages/manim/scene/scene.py │
│ :223 in render │
│ │
│ 220 │ │ """ │
│ 221 │ │ self.setup() │
│ 222 │ │ try: │
│ ❱ 223 │ │ │ self.construct() │
│ 224 │ │ except EndSceneEarlyException: │
│ 225 │ │ │ pass │
│ 226 │ │ except RerunSceneException as e: │
│ │
│ /home/hassamrajpoot/Desktop/Manim_Project/experiment3.py:5 in construct │
│ │
│ 2 │
│ 3 class BUG(ThreeDScene): │
│ 4 │ def construct(self): │
│ ❱ 5 │ │ self.play(GrowArrow(Arrow3D(LEFT,RIGHT))) │
│ 6 │ │ self.wait(2) │
│ 7 │
│ │
│ /home/hassamrajpoot/.local/lib/python3.10/site-packages/manim/scene/scene.py │
│ :1080 in play │
│ │
│ 1077 │ │ │ return │
│ 1078 │ │ │
│ 1079 │ │ start_time = self.renderer.time │
│ ❱ 1080 │ │ self.renderer.play(self, *args, **kwargs) │
│ 1081 │ │ run_time = self.renderer.time - start_time │
│ 1082 │ │ if subcaption: │
│ 1083 │ │ │ if subcaption_duration is None: │
│ │
│ /home/hassamrajpoot/.local/lib/python3.10/site-packages/manim/renderer/cairo │
│ _renderer.py:93 in play │
│ │
│ 90 │ │ ) │
│ 91 │ │ │
│ 92 │ │ self.file_writer.begin_animation(not self.skip_animations) │
│ ❱ 93 │ │ scene.begin_animations() │
│ 94 │ │ │
│ 95 │ │ # Save a static image, to avoid rendering non moving objects. │
│ 96 │ │ self.save_static_frame_data(scene, scene.static_mobjects) │
│ │
│ /home/hassamrajpoot/.local/lib/python3.10/site-packages/manim/scene/scene.py │
│ :1208 in begin_animations │
│ │
│ 1205 │ │ """Start the animations of the scene.""" │
│ 1206 │ │ for animation in self.animations: │
│ 1207 │ │ │ animation._setup_scene(self) │
│ ❱ 1208 │ │ │ animation.begin() │
│ 1209 │ │ │
│ 1210 │ │ if config.renderer == RendererType.CAIRO: │
│ 1211 │ │ │ # Paint all non-moving objects onto the screen, so they d │
│ │
│ /home/hassamrajpoot/.local/lib/python3.10/site-packages/manim/animation/tran │
│ sform.py:204 in begin │
│ │
│ 201 │ │ │ self.mobject.align_data_and_family(self.target_copy) │
│ 202 │ │ else: │
│ 203 │ │ │ self.mobject.align_data(self.target_copy) │
│ ❱ 204 │ │ super().begin() │
│ 205 │ │
│ 206 │ def create_target(self) -> Mobject: │
│ 207 │ │ # Has no meaningful effect here, but may be useful │
│ │
│ /home/hassamrajpoot/.local/lib/python3.10/site-packages/manim/animation/anim │
│ ation.py:194 in begin │
│ │
│ 191 │ │ method. │
│ 192 │ │ │
│ 193 │ │ """ │
│ ❱ 194 │ │ self.starting_mobject = self.create_starting_mobject() │
│ 195 │ │ if self.suspend_mobject_updating: │
│ 196 │ │ │ # All calls to self.mobject's internal updaters │
│ 197 │ │ │ # during the animation, either from this Animation │
│ │
│ /home/hassamrajpoot/.local/lib/python3.10/site-packages/manim/animation/grow │
│ ing.py:192 in create_starting_mobject │
│ │
│ 189 │ │
│ 190 │ def create_starting_mobject(self) -> Mobject: │
│ 191 │ │ start_arrow = self.mobject.copy() │
│ ❱ 192 │ │ start_arrow.scale(0, scale_tips=True, about_point=self.point) │
│ 193 │ │ if self.point_color: │
│ 194 │ │ │ start_arrow.set_color(self.point_color) │
│ 195 │ │ return start_arrow │
│ │
│ /home/hassamrajpoot/.local/lib/python3.10/site-packages/manim/mobject/mobjec │
│ t.py:1224 in scale │
│ │
│ 1221 │ │ :meth:`move_to` │
│ 1222 │ │ │
│ 1223 │ │ """ │
│ ❱ 1224 │ │ self.apply_points_function_about_point( │
│ 1225 │ │ │ lambda points: scale_factor * points, **kwargs │
│ 1226 │ │ ) │
│ 1227 │ │ return self │
╰──────────────────────────────────────────────────────────────────────────────╯
TypeError: Mobject.apply_points_function_about_point() got an unexpected keyword
argument 'scale_tips'

```

## 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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.