I Calculating Radial Distance to Midpoint of a Straight Line on an Octagon

  • I
  • Thread starter Thread starter emmasaunders12
  • Start date Start date
  • Tags Tags
    Radial
emmasaunders12
Messages
43
Reaction score
0
Hi perhaps someone can point me in the correct direction.

If I have an Octagon and the co-ordinates of two points on separate faces, example, face 1 (xo,yo) and face 2 (x1,y1). And I draw a straight line connecting the two points. How can I calculate the radial distance to the midpoint of this straight line?

Thanks

Emma
 
Mathematics news on Phys.org
If the points are diametrically opposite each other, then the line passes through the center of the octagon.
If the points are not diametrically opposite, then the line joining the two may pass through the center but may not ...
I think you need more information - like: is it a regular octagon?
 
  • Like
Likes billy_joule
Simon Bridge said:
If the points are diametrically opposite each other, then the line passes through the center of the octagon.
If the points are not diametrically opposite, then the line joining the two may pass through the center but may not ...
I think you need more information - like: is it a regular octagon?

Thanks for the reply, yes its a regular octagon, your correct in stating that the lines won't pass through the centre and I need to figure out the deviation from the centre at the midpoint of the line that connects two faces
 
The distance ##d(P_1,P_2)## between to points ##P_1 = (x_1,y_1)## and ##P_2 = (x_2,y_2)## is

##d(P_1,P_2) = \sqrt{(x_2 - x_1)^2 + (y_2-y_1)^2 }## (see https://en.wikipedia.org/wiki/Distance#Geometry)

The center ##C## of the line between them is ##C = (x_C, y_C ) = (\frac{1}{2} (x_2 + x_1),\frac{1}{2} (y_2 + y_1)).##
 
I'm not sure what you want, can you draw a picture?
 
fresh_42 said:
The center ##C## of the line between them is ##C = (x_C, y_C ) = (\frac{1}{2} (x_2 + x_1),\frac{1}{2} (y_2 + y_1)).##
That is right, but it is not necessarily the point closest to the center of the octagon.

@emmasaunders12: you need more information about the octagon. Where its center is, how long its sides are, where its corners are, or something like that.
 
mfb said:
That is right, but it is not necessarily the point closest to the center of the octagon.
I know, but I interpreted "distance to the midpoint of this straight line" as the distance between the centers of the octagon and the line. It's not automatically the shortest distance to the line as a whole though.
 
This is why a drawing from the OP might be very helpful...
 
Geometrically, draw straight line connecting 2 points. Erect perpendicular to this line passing through center. You want distance from center along perpendicular to original straight line.
 
  • #10
Edit : Cancelled post
 
Last edited:
  • #11
I got it ... you know you have two points on a regular octagon. You want to know the distance between the line through these two points and the center of the octagon. This is similar to finding the distance from a chord to the center of a circle. However, you need three points to uniquely establish the circle ... you certainly need more than two to uniquely establish an octagon. The problem cannot be solved uniquely as stated.
 
  • #12
ok what if the added info is that the origin point is (0,0) and the line to the "midpoint" must be perpendicular
 
  • #13
Perpendicular to the line between your two points? Where is the relevance of the octagon then?

This is just the distance between a line and a point, and it should be easy to find formulas for that on various websites.
 
  • Like
Likes Simon Bridge
Back
Top