3b1b / 3b1b/manim

Minor issue related to rotate method.

Aberta
#2,451 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
93.9k
Forks
7.7k
Merge médio
2d 13h
PRs com merge (30d)
4

Descrição

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.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

Olhe o método rotate em mobjects.py, especificamente como apply_points_function é chamado. Entenda a lógica de atualização da bounding box e quando works_on_bounding_box é definido. Teste a rotação em torno de um ponto diferente do centro do objeto para ver o problema. Determine se é viável detectar automaticamente quando atualizar a bounding box.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Domínio
backend-api-design
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
45/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.