|
-
Dec 23rd, 1999, 10:07 AM
#1
Thread Starter
New Member
I am having trouble with this one - I need to calculate the points of a circle. For example: If you wanted to make a clock (the kind with hands) and have a line spin around like the hands, I need to calculate the outer points to do that. Can anyone help? thanks.
http://www.angelfire.com/or/cam13
-
Dec 23rd, 1999, 08:30 PM
#2
Fanatic Member
For a clock in particular, have a look at:
http://visualbasic.about.com/compute.../aa112399a.htm
Some of the concepts can be used to determine the points on a circle.
------------------
John Percival
Editor, VB-World.net
[email protected]
-
Dec 24th, 1999, 01:51 AM
#3
Thread Starter
New Member
Thanks for the help, but I forgot to add one thing; I am making a look-alike "radar" and it beeps when the line passes over the dot. Any suggestions on how to detect when it passes? Thanks
-
Dec 25th, 1999, 12:49 PM
#4
Your point (on a circle) should form some angle with the axis point of your radar sweep and the horizontal line going through (say 9 o'clock to the axis point to 3 o'clock--from left to right). If you decide to call 12 o'clock to be NORTH equal to 0 degrees, then 1 o'clock is 30 degrees, 2 o'clock is 60 degrees etc, until you go back to 12 equals 360 degrees which is the same as 0 degrees.
You calculate the angle of the (point on the circle) using this reference; then as the radar sweeps around, you can say
If RadarSweepAngle = PointAngle Then Beep
I trust that you know about Polar and Cartesian Coordinates, so the rest is trivial.
Merry Christmas
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|