Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
I have no much time to research net, so can somebody derive the formula for calculating the point belonging to the circle?
as u can see we have point 5,-5 and center, and radius and angle. Thanks for advance, i know that isnt programming problem, but I need this to my project. OFC I see thats point 1,-1. but my pc probably will not ;/
For points inside the circle with radius R and center X,Y:
point (x,y) is inside the circle if:
(X-x)^2+(Y-y)^2 < R^2
Is that what you're after? No.
So what you need is a translate - rotate - translate.
So X,Y is the centre, x,y is the point and angle is the angle in degrees
# Translate
x = x-X ; y = y-Y
# Rotate
rad = angle*M_PI/180
xr = x*cos(rad) + y*sin(rad)
yr = -x*sin(rad) + y*cos(rad)
x = xr+X ; y = yr +Y
So if you only want 90 degrees, replace cos(rad) with 0 and sin(rad) with 1.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I have bumped into the following statement in an Engineering journal. The statement is mentioned on right side example.
A 640x480 image with a horizontal FOV of 47 degrees gives focal length
f = 740 pixels.
Please let me know the calculations behind this as I am very new to Computer vision.
AFAIU 740 is not the exact answer for such data but close enough. According to my understanding
f = (width/2) * ctg(HFOV/2)
which give me f = 735.95. And to reverse for f = 740 the HFOV should be 46.77°.
The math behind is following: assume that on their Figure 2 Y1 is actually the top point on the sensor (I'll use vertical field of view here instead of horizontal because it allows me to use that image). Now consider the triangle O-P-Y1. In that triangle ∠P is half of the FOV. On the other hand ctg(∠P) = ctg(FOV/2) is OP/OY1 which is f/(height/2).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I have a camera I'd like to mount on a tripod. I know the FOV dimensions of the camera (22.5 deg V 31 deg H). I'd like to know at what height and what tilt angle to place the camera to be able to capture the two points of interest on the ground. Please see the figure below.
I have attempted a solution using basic trig but am not sure it is correct. Please help!
Your calculations are correct in my view.
If you have to include both the red points, you need to place your camera at an angle such that it encloses both the red points.
So, tan θ = d/hc
=> θ = tan -1 d/hc.
But, as you need to enclose both the points, your angle should be slightly greater than θ ( my suggestion --- some θ+ε, where 0.25 < ε < 1 ) to perfectly capture those 2 red dots.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
This question does not appear to be about programming within the scope defined in the help center.
Improve this question
I have a problem it is like trig and pre calc. We are given vector points for OA which is (6 0) and vector OB (-6 0) and OC (5 root11) and they are all points on a circle with a radius of 6. How exactly do you determine or show that these points lie on the circle?
For any three points which are not mutually co-linear, there is a point equidistant from each member of the set. Finding this point given three arbitrary points (and not given the radius) is a much more informative project if you're learning trigonometry.
In your example, the solution is simple: x2 + y2 = r2. Each of the points you provided have values such that the sum of their squares equals 36, as expected for a circle of radius 6. Your problem is especially easy because the circle in question is already centered on the origin.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm working on a problem, wherein a sphere of known radius is dropped vertically and strikes the edge of a cup. I need to figure out the angle of deflection, which will be a function of where along the sphere contact occurs. I.e., if the contact point is dead-center (the pole), the angle of deflection is 0. The further from the pole that contact is made, the larger the deflection angle.
In the formulation of the entire problem (this is just part of it), I'm strictly using the projection onto the x-y plane, so the only information I have is about the projected circles. I know the location of the center of the ball-circle and cup-circle, their radii, and the size of the (downward projected) overlap.
I can compute the angle of deflection, if I only have the length of the chord from the pole to the contact point. How can I get the length of this chord, working from the x-y projection givens? The attached image shows some of how the problem is formulated.
Answer duplicated from my correct repost on math.stackexchange.com
Thank you very much to my friend Dr. Andrew McHugh for helping me see the solution. I overlooked that I can compute the angle theta by knowing the horizontal distance (X) from the lip of the cup to the ball's vertical axis. Theta is then the arcsin of the ratio of X to the radius (r). In the x-y plane projection, X is the radius - the line connecting the cusps of the overlapping lenticular area (d). Hence, theta = arcsin((r-d)/r).
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Here you can see a representation of the problem I need to solve
http://imageshack.us/photo/my-images/542/002yw.png http://imageshack.us/photo/my-images/542/002yw.png
I've two circles defined by their positions BS1 and BS2.
Now I need to get the position of the point A and the only data I've is the distance from point BS1 that is defined by its radius.
Can someone please tell me how can I find the coordiinates of point A?
Thank you very much
PD: I need to do the same with point B.
For simplicity lets say, on your left side of the image you have a center c1, radius r1, and point A. On the right side center c2, radius r2 and point B..
A = ((s1-s2)/|s1-s2|)*r1 + s1
B = ((s2-s1)/|s1-s2|)*r2 + s2
Do not forget, this are vectors.. If you can not understand this equation, tell me and Ill explain it to you.