Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with circle and motion
#1
Hi there.
I am new here, so I say hello to all of you and thanks in advance.

I am a newbie trying to get my hands on Python.
I have some visual problems (myopia and squint, so excuse my writing (maybe I miss a few characters that I do not really see).

Well, I want to help myself by creating a small program to do this:

I need to draw a circle, only the circumference, no painted inside.

Then a need a big dot circling the circle (do you remember the old movies where a sonar tries to get something? some like that, BUT something rounding the circle), not the inner but the outside.

The idea is to get my eyes to follow the dot rounding the circle in order to get my muscles relaxed.

No big deal, BUT I do not have a clue how to start.

SO I split the problem and try to get an approach with some Pseudocode:

Init python
clear screen
get the dimension of the screen
draw a circle as big as the screen
put a dot in the circumference of the circle
start to rotate the dot following the circle from right to left
get a button to reverse from left to right
get a button to stop the exercise and exit gracefully

end


Well, I ask help with some ideas, maybe some libraries or functions, I do not ask the whole code written, I'd like to make it on my own, but some scratch to start from.

Thanks in advance!




my code here
Reply
#2
If you don't have any particular tools or libraries in mind, pygame might be the easiest to use and get up to speed with quickly.
It sounds like you want this to be fullscreen, is that the case?

The pygame docs have a few tutorials on how to get started: http://pygame.org/docs/
We also have a couple tutorials on the forums, I think this is probably a good starting point: https://python-forum.io/Thread-PyGame-Cr...dow-part-1
Reply
#3
I think to use PyGames as basis to get 2/3 full screen circle and 5/6 Dot moving with a stop/GO command would do it.
A 15sec time.sleep interval might be usefull to have the "attention span" not to long.

NOTE:
my best friend has MS and therefore a blurred eye sight and She can do with some excercise :D
Reply
#4
Thanks a lot Ramasen and nilamo, I'll give it a try to Pygame and I'll elt you know the results :)
Reply
#5
You might also want to look at Python's built-inĀ Turtle. Great for beginners.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  motion tracking script ig? k4ne 0 467 Dec-13-2023, 02:00 AM
Last Post: k4ne
  Howto do motion event on solely window and not the widgets on it? janeik 3 836 Jul-11-2023, 12:10 AM
Last Post: deanhystad
  How to plot seaborn heatmap on top of a background circle SriRajesh 0 1,404 Jul-09-2022, 04:00 AM
Last Post: SriRajesh
  drawing moving circle on line with python barrai 1 3,113 Feb-25-2022, 03:33 PM
Last Post: BashBedlam
  Program to move a dot towards a circle center plumberpy 10 4,161 Dec-03-2021, 12:20 PM
Last Post: BashBedlam
  Draw circle from GPS coords, and get GPX file? Winfried 0 2,179 Mar-29-2021, 07:19 PM
Last Post: Winfried
  Creating Data Set for Changing Oscillation Motion jcraw77 0 1,586 Jun-19-2020, 12:25 AM
Last Post: jcraw77
  Detect event by motion/image - Help Zarqua 0 1,522 May-12-2020, 10:41 AM
Last Post: Zarqua
  Pyplot and circle Reldaing 0 1,469 Apr-01-2020, 10:44 AM
Last Post: Reldaing
  Detection Motion Program Adek1243 11 4,350 Mar-23-2020, 10:12 AM
Last Post: Adek1243

Forum Jump:

User Panel Messages

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