0

The attached pic can show very clearly wht i want. The black portion is drawn. The red part is to be drawn. The radius of arc can vary. But it need to cut the circle at the same point where the line intersects the circle

Not Yet Answered # Grraphics Help

Sai Nageswar Discussion Starter gunjannigam 28 Im trying to bind my custom vertical scrollbar to datagridview is this possible.. Please help Thnak you..

0

The attached pic can show very clearly wht i want. The black portion is drawn. The red part is to be drawn. The radius of arc can vary. But it need to cut the circle at the same point where the line intersects the circle

0

The attached pic can show very clearly wht i want. The black portion is drawn. The red part is to be drawn. The radius of arc can vary. But it need to cut the circle at the same point where the line intersects the circle

You can use QuadCurve2D to accomplish the task.It takes two end points as input and a control point for deviation.

The syntax is as follows :

```
Graphics2D g;
QuadCurve2D.Double l = new QuadCurve2D.Double(x0,y0,x1,y1,x2,y2);
g.draw(l);
```

x0,y0 is the first point where line intersects circle and x3,y3 is the other point of line intersection.

x2,y2 is the control point that causes deviation.

0

You can use QuadCurve2D to accomplish the task.It takes two end points as input and a control point for deviation.

The syntax is as follows :

`Graphics2D g; QuadCurve2D.Double l = new QuadCurve2D.Double(x0,y0,x1,y1,x2,y2); g.draw(l);`

x0,y0 is the first point where line intersects circle and x3,y3 is the other point of line intersection.

x2,y2 is the control point that causes deviation.

How do I calculate the control point. I have been given whats the radius of arc. Also do I have perform all the mathematics to calculate the equation of circle and line then find out their intersection point by solving out the quadratic or is there any other way to get the intersection points.The circle is not centered at origin so its gonna be huge calculation otherwise.

This article has been dead for over six months. Start a new discussion instead.

Recommended Articles

i am trying to create a library management system which is supposed to be used to store/keep infp for the library and the library members( book title, author, name and picture for borrower and other stuffs). The app has 6 buttons, delete, save, add,previsous,next, and upload( for upload ...

Hi!

I have two tables, I will call them first-half and second-half (of the year)

```
Table: first
id jan feb mar apr
-----------------------
2 80 90 70 60
3 50 40 60 30
Table: second
id jan feb mar apr
-----------------------
2 50 70 60 90
3 80 60 50 ...
```