The following code is used to draw circles;
pts={{0.02,0.44},{0.08,0.58},{0.22,0.57},{0.3,0.9},{0.39,0.24},{0.44,0.79},{0.65,0.19},{0.82,0.93},{0.93,0.7},{0.95,0.11}}
r = 0.2;
Show[Graphics[{Blue, Circle[#, r] & /@ pts, Black, Point[pts],
FaceForm[Opacity[.5,LightBlue]],EdgeForm[{Thick,Darker@Blue}],disks}]]
The output would be as the following image;
I want to do the following;
- Label the circles' centers according to the order of the pts points; e.g. circle with center pts of {0.02,0.044} has the label of X1 and so on for other circles.
- Draw multiple lines that have start point (0,0) with different angles (0:5:90).
- For each line;
- Get the number of circles, intersected with that line.
- Get the indices of circles that intersected with that line.
- Get intersection points' values that resulted from the intersection between that line and the circles which intersected with that line.
- Sort these intersection points ascending x-coordintes.
So, the output would be like the following image; But adding also tool-tip; So, by clicking on each line; I should get the output like that;
For example; By clicking on the line of degree(0); it should give the following output;
- Line of degree: 0
- no. of circles intersected with that line: 2
- Indices of circles intersected with that line: X7 , X8
- Points of intersection values ,sorted ascending to x-axis:
- Points with line and circle X7
C1(x1,y1),C1(x2,y2)
: {{0.5878,0},{0.71222,0}}- Points with line and circle X8
C2(x1,y1),C2(x2,y2)
: {{0.78307,0},{1.117,0}}
- Then make loop as following to get value of L;
Where;
m: is the number of circles intersected with each line.
C: is the intersection points.
j: is the index of each circle j=1,.....,m.
Any suggestions for code to do that??