Open study

is now brainly

With Brainly you can:

  • Get homework help from millions of students and moderators
  • Learn how to solve problems with step-by-step explanations
  • Share your knowledge and earn points by helping other students
  • Learn anywhere, anytime with the Brainly app!

A community for students.

I am working on the Analog Clock exercise and I am having a hard time getting the clock to animate. (EDIT: I made the clock animate by redrawing it every second but I still want to know if I can rotate a line without redrawing it). Basically, my issue is that to animate the second hand of a clock (say), I would need to move ONE of the hand's endpoints and then redraw the line to reflect that. Although Zelle's graphics library gives a natural way to translate a point or a line and redraw it on the screen (self.move(dx, dy)), there seems to be no natural way to redraw a line by moving one of its endpoints; even changing the endpoint does not redraw the line. Is there a natural way to do what I want?

MIT 6.189 Intro to Programming (Python)
See more answers at brainly.com
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Join Brainly to access

this expert answer

SEE EXPERT ANSWER

To see the expert answer you'll need to create a free account at Brainly

As a specific example, imagine that I have the line pencil = Line(Point(0, 0), Point(100, 0)) drawn to the screen and I want to replace pencil with a line joining Point(0, 0) to Point(100, 5). I could try pencil.move(0, 5), but that would simply replace the line with a line joining Point(0, 5) to Point(100, 5), which is not what I want.
BRUH

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

Not the answer you are looking for?

Search for more explanations.

Ask your own question