Python Forum
Animation with polygon points not working
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Animation with polygon points not working
#2
In your loop where you apply the sine, add a before/after print, like so:
    before = gPlane_p2_y
    for degree in range(361):
        y_value = math.sin(pi / 180 * degree)
        gPlane_p2_y += y_value
    print("{0} => {1}".format(before, gPlane_p2_y))
You'll quickly see that gPlane_p2_y (the only value you change) is pretty much always 360, which explains why you don't see any movement... because none of the numbers are changing.
Reply


Messages In This Thread
RE: Animation with polygon points not working - by nilamo - Jun-28-2017, 03:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  using python with QGIS to disseminate CSV data on a polygon wissam1974 0 1,499 Jun-10-2020, 10:13 AM
Last Post: wissam1974
  Looking for algorithm to tranverse a polygon dspal 0 2,257 May-07-2018, 08:46 PM
Last Post: dspal

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020