I have a line which is divided into small segments. In the following diagram we have the first segment defined by two points $P_1$ and $P_2$. However, imagine the line having other segments evenly distributed across its length (the distance between points is always the same).

A circle (blue) is placed some distance ($Y_1$) from the line.

Suppose we have a line ($L_1$) drawn from the circle centre to point $P_1$ and another line ($L_2$) drawn from the circle centre to point $P_2$.

Lines $L_1$ will intersect the circle at $(x_1, y_1)$. Line $L_2$ will intersect the circle at $(x_2, y_2)$. Here is a diagram:

enter image description here

and here is a close up of blue circle

enter image description here

Question 1: I want to model how $(x_2-x_1)$ changes as we repeat this for consecutive points on the dotted line. E.g. how can we model $(x_2-x_1)$ for points $P_1$ and $P_2$ then $P_2$ and $P3$ and then $P3$ to $P4$ etc?

Question 2: Another issue is how to adapt the model from Question 1 for changes in distance of the circle from the dotted line e.g. if the circle moves closer to the dotted line e.g. to position $y_2$ (yellow circle).

I would be able to do the calculations to find the intersection points $x_1,y_1$ and $x_2,y_2$ but I was wondering how we model this for the general case.

I was hoping from some help and advice on how to solve this.

Many thanks....

  • $\begingroup$ Can we take radius of blue circle as $a$, coordinates of $P_1$ at start as $H,V$? $\endgroup$ – Narasimham Mar 26 '16 at 17:08
  • $\begingroup$ Yes, the radius of the circle can be constant. The dotted line will be of a constant length and fixed position (we can set the start of the line as a fixed point H, V). The points P1 and P2 (and all other points will also be fixed). The only thing that moves is the distance of the circle to the dotted line. The origin (0,0) can be anywhere. $\endgroup$ – user3079907 Mar 26 '16 at 17:21

It would be easier if we flip your model upside down.

enter image description here

In the diagram, since r, h, d and D are known quantities, $\alpha, \beta$ as well as $\alpha’$ and $\beta’$ can be found in terms of those quantities.

The co-ordinates of P (and also Q) are just functions of those quantities

  • $\begingroup$ Dear Mick, thank you for your solution. It help me to clarify the problem. I have posted workings but I am not sure they are the best way to solve your model. Many thanks for your help. $\endgroup$ – user3079907 Mar 30 '16 at 8:58
  • $\begingroup$ @user3079907 Hope that helps. Will take a look at your work and let you know later. $\endgroup$ – Mick Mar 30 '16 at 9:44

here is what I have based upon the answer provided by Mick. I will accept Mick's answer but my solution based upon his model may be weak. Would you be able to check that I am on the right track or give some suggestions and improvements?

Let me show you the workings:

Let d be the distance between points (segments).

Let the origin (0, 0) be the beginning of the dotted line.

r is the radius of the circle

The circle centre is at (D, h+r)

$$tan (\alpha) = (h+r)/(D-n*d)$$

$$\alpha = arctan((h+r)/(D-n*d))$$ $$tan(\beta) = (h+r)/(D-(n+1)*d)$$ $$\beta = arctan((h+r)/(D-(n+1)*d)$$ Where n is Point number e.g. for n=0 for P1 and n=1 for P2 in original question $$\alpha’ = 90 - arctan((h+r)/(D-n*d))$$ $$\beta’ = 90 - arctan((h+r)/(D-(n+1)*d)$$

The Parametric Equation of a Circle centred at (D, h+r) is $$x = D + r cos(t)$$ $$y = (h+r) + r sin(t)$$ where t is the angle Hence we have $$P = (x1,y1)$$ $$t = 90 - arctan((h+r)/(D-n*d))$$ $$x1 =D + rcos(90 - arctan((h+r)/(D-n*d)))$$ $$y1 = (h+r) + rsin(90 - arctan((h+r)/(D-n*d)))$$ And $$Q=(x2,y2)$$ $$t = arctan((h+r)/(D-(n+1)*d)$$ $$x2 = D + r cos(arctan((h+r)/(D-(n+1)*d))$$ $$y2 = (h+r) + r sin(arctan((h+r)/(D-(n+1)*d))$$

CHANGE in X: $dx = x2-x1$ $$dx = D + r cos(arctan((h+r)/(D-(n+1)*d)) – [D + rcos(90 - arctan((h+r)/(D-n*d)))]$$ $$dx = r cos(arctan((h+r)/(D-(n+1)*d)) - rcos(90 - arctan((h+r)/(D-n*d)))$$

  • $\begingroup$ Referring to my diagram, I think, at the beginning, we should have $\tan \alpha = \dfrac {h + r}{D}$ and $\tan \beta = \dfrac {h + r}{D - d}$ instead. The relation between D and d is D = (n+1)d or D = nd depending on whether you want to chop the line into n+1 equal parts or n equal parts. Choose any two from D, n and d. $\endgroup$ – Mick Mar 30 '16 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.