|
-
Nov 16th, 2001, 10:04 PM
#1
Thread Starter
Lively Member
location in a circle
I am writing a program to do single plane balancing using the vector method. I am trying to compare two locations in a circle. An initial and a trial location. What I need to do is, compare the relationship between the two and decide which way from the trial location is. If the initial location is at 90. 270 is 180 from it. And if the trial would fall on 260 it would be CW, 280 would be CCW. Which ever way the trial goes, it will never be more than 180 from the initial location. Is there an easy way to test the user inputs?
-
Nov 16th, 2001, 10:10 PM
#2
OK. Are you saying that, from a location on a circumferance of a circle, you're trying to find out how many degrees {the smallest number} you are from it? In comparison to another {test} point on the circumferance?
-Lou
-
Nov 16th, 2001, 10:21 PM
#3
Thread Starter
Lively Member
pretty much. The problem I am having is, when it goes past zero. If my initial reading is 100 and my trian is 355. It was a CCW move. But I cant figure out how to say it because it went to a number higher than 100. If that makes any sense. Both of these numbers can fall anywhere on the circumference, but they will never go more than 180 from the initial run. When I ad weight to my spindle ( lathe at work) and do a trial run, the balancer will only show a shift of 180 and stop. Telling me to add less weight. But the phase angle can go either way.
-
Nov 16th, 2001, 10:29 PM
#4
Hmm, What was that called?
ever hear of the law of cosines?
Maybe that could help out?
Although, I think that requires All three sides.
Hmmm,
2 points on a circle, from the origin, 2 sides of the triangle = R.
But, you know X,Y of both points.
Ahhh, Angles are additive.
Using Sin = O/H, Cos = A/H, you CAN find the angle of each.
Hmmm, Just have to figure if you add or sub.
Let me think.
Be back Tomorrow
-
Nov 18th, 2001, 04:39 PM
#5
transcendental analytic
Consider the isosceles triangle initial-trial-center, the angle in the center being trialangle-initialangle and the base angle (trialangle-initialangle)/2
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 18th, 2001, 04:54 PM
#6
PowerPoster
Hi
I am guessing that it wasnt really that complicated and was merely a numerical calc of numbers between 0 and 360 with a maximum difference of 180 clockwise or ccw. Anyways, it was also posted on general qtns here...
http://www.vbforums.com/showthread.p...ighlight=angle
Regards
Stuart
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
|