Skip to content

Connect lines into an open polygon #2731

Answered by behackl
SeverinoDaDalt asked this question in Q&A
Discussion options

You must be logged in to vote

Heya! It is a bit easier to help if you share a snippet of how you have been approaching your animation so far, but from what I can see your analysis is spot-on. It looks like you are first trying to transform a Line into a VGroup, and then the VGroup into (larger) VGroups of Lines.

Transform basically tries to match mobjects onto (sub)mobjects, which explains why in the first played animation the complete line transforms into the first segment, and the two others transform out of "thin air".

One way to make this more natural instead, is to transform between specialized mobjects:

def construct(self):
    initial_line = VMobject(color=RED).set_points_as_corners([[0,0,0], [1, 1, 0]])
    ne…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@SeverinoDaDalt
Comment options

Answer selected by SeverinoDaDalt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants