| |

VerySource

 Forgot password?
 Register
Search
View: 783|Reply: 4

How should this procedure be done?

[Copy link]

2

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-29 15:00:01
| Show all posts |Read mode
Write a program to make a small red ball on the form move in a circle. Given the circular trajectory equation:
x = rsina
y = rcosa
r is the radius of the circle, a is the center angle
Reply

Use magic Report

0

Threads

15

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-3-2 15:45:01
| Show all posts
Create a Timer to implement non-stop motion
Count the two small ball coordinates in the Timer event
Then Graphic.Draw comes out.
Reply

Use magic Report

1

Threads

18

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-3-4 17:45:01
| Show all posts
Set a Timer timer, draw a ball every tick, since you know the trajectory equation, it is not difficult.
Reply

Use magic Report

0

Threads

56

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 China

Post time: 2020-3-6 23:00:02
| Show all posts
Agree upstairs
Reply

Use magic Report

2

Threads

29

Posts

16.00

Credits

Newbie

Rank: 1

Credits
16.00

 China

Post time: 2020-3-10 15:45:01
| Show all posts
A timing thread, you can calculate the trajectory by yourself, and you can draw it. It is recommended to use double buffering.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list