-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Sorry to respond so late. The best way to do this is to use triangle_small.align_to(triangle_big, DL) and you can also use triangle_small.next_to(triangle_big.get_vertices()[1], aligned_edge=DL, buff=0)
triangle_small.shift(triangle_big.get_vertices()[1] - triangle_small.get_vertices()[1])
triangle_small.scale(0.5, about_point=triangle_big.get_vertices()[1]) btw, if you want to learn more about position in manim, you can watch this video. (Although this video is in Chinese, it has no great influence on learning the content. You can just watch the screen and ignore the Chinese subtitles.) |
Beta Was this translation helpful? Give feedback.
Sorry to respond so late.
Is this what you want?
The best way to do this is to use
align_to
method:and you can also use
next_to
orshift
:get_vertices
method get the vertices (a list of points) of the triangle, and the indexes of the list of vertices are:So the vertice in the lower left corner is
triangle.get_vertices()[1]
.And you can also directly put the small triangle to the target position by using the
about_point
parameter ofscale
: