How to fill with gradient in shader mode?
- Linguagem predominante
- Python
- Estrelas
- 93.8k
- Forks
- 7.7k
- Métricas de merge de PRs
- Métricas de PR pendentes
Descrição
How to fill circle for example with gradient in shader mode? I tried set_color_by_gradient, it results in having different colors for different submobjects.
For example:
```
class Gradient(Scene):
def construct(self):
circle_1 = Circle().move_to(2*RIGHT)
circle_2 = Circle().move_to(2*LEFT)
circles = VGroup(circle_1,circle_2)
self.add(circles.set_color_by_gradient(PINK, YELLOW))
self.wait()
```
The results is:
https://user-images.githubusercontent.com/53943014/102837108-1a97a280-4436-11eb-83cf-72dee1fa1d3b.mp4
What I want is something like this:

All suggestions are highly appreciated. Thank you.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Direção de pesquisa
The issue is about applying a gradient fill to a single shape in shader mode, not across multiple submobjects. Look at the shader mode implementation in manim, particularly how colors and gradients are handled in the rendering pipeline. Examine the set_color_by_gradient method and related shader code to understand the current behavior. The goal is to modify the shader to apply a gradient within a single object like a circle.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- computer-graphics
- Tipo de issue
- Funcionalidade
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100