How do I find the middle(1/2), 1/3, 1/4, etc, of a line?

67.6k Views Asked by At

Similar to this question: How to calculate the middle of a line? where it's explained how to find the middle of a line (x,y), so that's half the line 1/2, but I also need to find one third of the line, one fourth, and so on.

I tried dividing by 4 instead of 2 to get 1/4 but it didn't seem to work:

1/2 (works):

$x = \dfrac{x_1 + x_2}{2}$ $y = \dfrac{y_1 + y_2}{2}$

1/4 (doesn't work):

$x = \dfrac{x_1 + x_2}{4}$ $y = \dfrac{y_1 + y_2}{4}$

4

There are 4 best solutions below

0
On BEST ANSWER

Think about the formula for the midpoint of a line as $$x = \frac{1}{2}x_{1} + \frac{1}{2}x_{2}.$$ We find the midpoint by taking equal contributions from either end of the line.

If we want to find a point which is one third of the way along the line we should use the following $$x = \frac{2}{3}x_{1} + \frac{1}{3}x_{2}$$ where we take uneven contributions from the two endpoints.

The point one quarter of the way along the line can be found using $$x = \frac{3}{4}x_{1} + \frac{1}{4}x_{2}.$$

The y-coordinates are found in a similar manner.

0
On

Divide your segment into even parts.

segment

From the last point you can find that $$ x_2 = x_1 + n\Delta \implies \Delta = \frac {x_2 - x_1}n $$ You need to find second point in that division, so $$ x' = x_1 + \Delta = x_1 + \frac {x_2-x_1}n = \frac {n-1}n x_1 + \frac 1n x_2 $$ So, let's say you want to divide your segment into 2 even parts, then $n = 2$ and $$ x' = \frac {x_1}2 + \frac {x_2}2 $$ If $n = 3$ (3 even parts) $$ x' = \frac 23 x_1 + \frac 13 x_2 $$ $n = 4$ (4 even parts) $$ x' = \frac 34 x_1 + \frac 14 x_2 $$

0
On

Treat $x_1$ as the offset, and $x_2-x_1$ as the distance that needs sectioning: $$x=x_1+\frac{x_2-x_1}n\quad,\quad y=y_1+\frac{y_2-y_1}n\quad,\quad z=z_1+\frac{z_2-z_1}n$$ For $x_1=y_1=z_1=0$, the result becomes self-evident.

0
On

Let $P$ and $Q$ be two distinct points and define the (ruler) function $f : \mathbb R \to \overleftrightarrow{PQ}$, from the set of real numbers into the line $\overleftrightarrow{PQ}$, by $f(t) = (1-t)P + tQ$. This function lays a ruler over the line $\overleftrightarrow{PQ}$ such that the ordinate of $P$ is $0$ ($f(0)= P$) and the ordinate of $Q$ is $1$ $(f(1) = Q)$. So, for example, the point $\dfrac34$ of the way from $P$ to $Q$ is $f\left( \dfrac 34 \right) = \dfrac 14 P + \dfrac 34 Q$.