Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

mmailliw

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?

  • one year ago
  • one year ago

  • This Question is Open
  1. mmailliw
    Best Response
    You've already chosen the best response.
    Medals 0

    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.

    • one year ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.