3b1b / 3b1b/manim

Minor issue related to rotate method.

Abierto
#2,451 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
93.8k
Forks
7.7k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

I just wanted to comment on a minor issue I just ran into while using the `rotate()` method of mobjects. I understand the reason why `apply_points_function()` in `rotate()` by default has the option `works_on_bounding_box=False`. This is because rotation with respect to an object's center does not alter it's fixed hitbox. However it leads to some funny issues when you don't update the hitbox and the rotation is not with respect to the object's own center. Maybe the method should include some logic to automatically determine if the bounding box should be updated?
In my case I needed to keep track of the center of an object that was rotating with respect to the origin and do some operations with that position vector through an updater function. Since it calculates the center of an object through the hitbox the calculated center was always the initial position despite the object rotating. Then I realized I had to pass `works_on_bounding_box=True` so that it updates. It is not that big of a deal but I can see it leading to some annoying head scratcher moments for manim newbies like myself.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.