cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Intersections Calculate 2 circles / Analysis / Math

SOLVED
Regular Member

Intersections Calculate 2 circles / Analysis / Math

Hey,

I am from Germany and need some help. I am new with MathCad.

 

I want to calculate the insections of 2 cycles.

 

My Problems:

 

The plot of 2 variables in 1 diagram doesnt work. I tried it on the x-Axis with f(x,y) and on the y axis with x,y. No cycle is shown.

 

Then next problem is to subtract f(x,y) - g(x,y). Whats the Syntax? Can somebody tell me?

 

Is it possible to write a litte programm which calculates me the intersections or tell me the solution?

My program:


m11:=0
m12:=0
r1=8

m21:=7
m22:=8
r2:=3.25


f(x,y):=(x-m11)^2 + (y-m12)^2 - r1^2
g(x,y):=(x-m21)^2 + (y-m22)^2 - r2^2


h(x,y):=f(x,y)-g(x,y)


Thank you.

 

Greetings MM

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Intersections Calculate 2 circles / Analysis / Math

Here is one way (done in Prime 2, so there is no point in providing the worksheet!)

 

circles.JPG

 

Alan

View solution in original post

22 REPLIES 22

Re: Intersections Calculate 2 circles / Analysis / Math

Here is one way (done in Prime 2, so there is no point in providing the worksheet!)

 

circles.JPG

 

Alan

View solution in original post

Re: Intersections Calculate 2 circles / Analysis / Math

First of all: Don't just post pictures, post the Mathcad or Prime worksheet!

 

Its not clear if you just want to plot two circles or if you want to calculate the points of intersection.

 

What you defined with f(x,y):=... ist NOT a circle! Its a surface in 3D, a paraboloid. To plot it you would have to use Primes mediocre 3D-plot capabilities.

 

The circle you probably have in mind has the equation f(x,y)=0 and is the intersection of the paraboloid with the xy-plane.

 

To plot the circle you cant use the equation you created, because Prime unfortunately does not support implicit plots. You may solve f(x,y)=0 for y and plot each of the two solutions in one plot (upper and lower half of the circle) or you define the whole circle using a parameter representation.

 

To calculate the points of intersection of f(x,y)=0 with g(x,y)=0 you may either use the symbolic solve command or a numeric solve block.

 

See if the attached worksheet helps.

Re: Intersections Calculate 2 circles / Analysis / Math

Thanks so much for your solutions,

i will try to understand the sheets, but this will take me some time.

 

@Werner_E i think you are from germany, it will be nice if you can give me some tipps in german in further times 🙂

 

To understand this calculation its better to plot the circles and then to calculate it 🙂

 

So i will post the worksheet here, but i think its not correct.

 

Greetings

Marc 🙂

 

 

Re: Intersections Calculate 2 circles / Analysis / Math

Thanks so much for your solutions,

i will try to understand the sheets, but this will take me some time.

 

@Werner_E i think you are from germany, it will be nice if you can give me some tipps in german in further times 🙂

 

To understand this calculation its better to plot the circles and then to calculate it 🙂

 

So i will post the worksheet here, but i think its not correct.

 

Greetings

Marc 🙂

 

 

Re: Intersections Calculate 2 circles / Analysis / Math

I cant understand if i calculate it on paper i can calculate with (x-m1)^2+(y-m2)^2=r^2.

 

why i cant do the same with mathcad?

 

 

Re: Intersections Calculate 2 circles / Analysis / Math


@Marc2610 wrote:

I cant understand if i calculate it on paper i can calculate with (x-m1)^2+(y-m2)^2=r^2.

 

why i cant do the same with mathcad?

 

 


Why do you think you can't?

You can use the very same equation for calculations in Mathcad.

 

You simply can't PLOT a function given implicitly. Thats something Mathcad unfortunately is not capable of.

 

To use the equation you cited you have to use the Boolean equal sign (the fat 😃 and not the assignment equal (:=) or the numeric evaluation equal sign (=).

Usually you get the Boolean equal sign by pressing Ctrl and + at the same time. The help says to press  Ctrl and = but that may only be true if you are using an English keyboard layout, not if you are using a German one.

 

Re: Intersections Calculate 2 circles / Analysis / Math

Hey,

is it possible to upload the file @AlanStevens Alan? 

i have problems to create the mathcad file.

 

I dont understand the solverblock and the theta with index, the deg isnt in blue colour, and mathcad have problems with "i".

Re: Intersections Calculate 2 circles / Analysis / Math


@Marc2610 wrote:

I dont understand the solverblock and the theta with index, the deg isnt in blue colour, and mathcad have problems with "i".


Alan has defined i as a range variable (from 0 to 360 in steps of 1.)  He then defines theta as a vector of angles from 0 degrees to 360 degrees.  (You need to be sure that the deg in that definition is labeled as a unit.)  As Werner explained, to plot the entire circle you need to plot with theta as the parameter.

 

The solve block finds the values of x where the values of y are the same.  (Alan deals with numerical errors by making the difference very small rather than trying for exact equality.)

 

Re: Intersections Calculate 2 circles / Analysis / Math

Is it possible to calculate the x and y easier?

I prefer the way i did by hand (uploaded picture)

 

The best way for me is to create variables for the middle of the cycles and the radius of both cycles.

 

Then i want to subtract the 2 equations, plot the 2 cycles, plot the 2 intersections, get the intersection variables x and y like this:

x1=

x2=

y1=

y2=