hi,

It wud be great if any one of you could let me know or share with me a sample code or how to in finding out the intersection of two arcs and plotting it.

I cud not find any useful info on the Net thru search

Reqeust your concern and consideration, i remain

Harish

Member Avatar for iamthwee

That's too vague, be more specific.

Do you know the radius of the two arcs, and what coordinates their centre points are at?...

Do you know the math behind it? If you know the math then it won't be very hard.

Do you know the math behind it? If you know the math then it won't be very hard.

hi,

I do not havemuch idea about mathematical behind it and also i believe it is still not direct programming from a single formula based. It requires many sub calculation and i wud love to get this program shared from any expert.

Thanking you in advance

Harish

Member Avatar for iamthwee

>I do not havemuch idea about mathematical behind it and also i believe it is still not direct programming from a single formula based.

Instead of searching for intersection of two arcs, try searching for the intersection of circles.

After all an arc is just a part of a circle.

http://www.google.co.uk/search?hl=en&q=intersection+of+two+circles&meta= :eek:

Member Avatar for iamthwee

>...and plotting it.


Drawing it should be simple especially if you use the inbuilt functions from java's 2D graphics.

Drawing Arcs
Using the Arc2D.Float class, the following statement draws an open arc at (100,50) that is 120 degrees long, begins at the 30-degree mark, and has a height and width of 75 each:

Arc2D.Float smile = new Arc2D.Float(100F,50F,75F,75F,30F,120F,Arc2D.Float.OPEN);

Otherwise you can create your own arc function. Some rudimentary math helps...

A circle is given by the equation:

x^2 + y^2= r^2

So plotting the function yeilds...
y=\sqrt{r^2-x^2}

It is relatively simple to translate the unit circle, I'll leave that to you to work out.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.