Items tagged with intersection

I want to calculate the intersection between three circles.
I know that in this case i can calculate intersection of only the first and second equation, but I need this for a interactive component.

The command "intersection"[GEOMETRY] work only with 2 circles.

I did this but it doesn't work.

Thanks.

Hello! with the datapoints below I've calulated the results "manually" 
I'm looking for a way to make Maple tell me the intersection of these datapoints with the x-axis and also, the area under it from e.g. 0 to 5.125, which i've also had to calculate by hand... I know I can use int comand to do this, but I think there is a lot wrong with the syntax, so after hours of failure I hope someone can show me the right commands..

 

Thanks, 
krismalo
 

 

 

t1 := Matrix(14, 2, {(1, 1) = 0, (1, 2) = 0, (2, 1) = 0, (2, 2) = 4170, (3, 1) = 1, (3, 2) = 3966, (4, 1) = 1, (4, 2) = 3466, (5, 1) = 3, (5, 2) = 3058, (6, 1) = 3, (6, 2) = 3058, (7, 1) = 4, (7, 2) = 1854, (8, 1) = 4, (8, 2) = 1354, (9, 1) = 7, (9, 2) = -2258, (10, 1) = 7, (10, 2) = -2758, (11, 1) = 8, (11, 2) = -3962, (12, 1) = 8, (12, 2) = -3962, (13, 1) = 10, (13, 2) = -4370, (14, 1) = 10, (14, 2) = 0})plot(t1); =  

 

 

The intersection of this plot with the x-axis should be ≈ 5.125 and the area from 0 to 5.125 (or from 5.125 to 10) should be ≈ 13810

 

 

 

 

NULL


 

Download primes_area_question.mw

n := 5:
z1 := exp(2*3.14*I*k1/n)*cosh(z)^(2/n);
z2 := exp(2*3.14*I*k2/n)*sinh(z)^(2/n);
xx := Re(z1);
yy := Re(z2);
uu := cos(alpha)*Im(z1) + sin(alpha)*Im(z2);

i find that the 3d graph has many intersection points to itself

how to find these intersection points of calabi yau ?

 

 

hello

i have some implicit plot that i want intersect between them.

for example:


implicitplot(x^2+y^2<1,x=-3..3,y=-3..3);
implicitplot((x-1)^2+y^2<1,x=-3..3,y=-3..3);

how can i do intersect between them!?

thanks for guidance

intersection in the geometry package does not seem to recognize assume.

restart: with(geometry):

assume(p[1]<>0, p[2]<>0, p[3]<>0);
assume(q[1]<>0, q[2]<>0, q[3]<>0);
point(T,[p[1],q[1]]);
point(U,[p[2],q[2]]);
point(V,[p[3],q[3]]);
point(Op,[0,0]);

line(OT,[Op,T]);
line(OU,[Op,U]);
line(OV,[Op,V]);

point(B,2*q[2],solve(subs(x=2*q[2],Equation(OU)),y));
coordinates(B);
IsOnLine(B,OU);

PerpendicularLine(AD,B,OT);
ArePerpendicular(AD,OT);
sol:=solve({Equation(AD),Equation(OT)},{x,y});
eval(x,sol);
point(A,eval(x,sol),eval(y,sol));  ## the intersection exists
intersection(xA,AD,OT); ## fails
about(p[1]),about(q[1]);

This post is my attempt to answer the question from   here : how to find all integer points (all points with integer coordinates) in the intersection of two cubes. The following procedure  IntegerPoints  solves a more general problem: it finds all the integer points of a bounded polyhedral region of arbitrary dimension, defined by a system of linear inequalities and / or equations.

Required parameters of the procedure: SN is a set or a list of linear inequalities and/or equations with any number of variables, the Var is the list of variables. The procedure returns the set of all integer points, satisfying the conditions  SN .

Code of the procedure:

restart;

IntegerPoints := proc (SN::{list, set}, Var::list)

local SN1, sn, n, Sol, k, i, s, S, R;

uses PolyhedralSets, SolveTools[Inequality];

SN1 := convert(evalf(SN), fraction);

for sn in SN1 do

if type(sn, `<`) then SN1 := subs(sn = (`<=`(op(sn))), SN1)

end if; end do;

if IsBounded(PolyhedralSet(SN1)) = false then error "The region should be bounded" end if;

n := nops(Var);

Sol := LinearMultivariateSystem(SN, Var);

if Sol = {} then return {} else

k := 0;

for s in Sol do if nops(indets(s[1])) = 1 then

S[0] := [[]];

for i to n do

S[i] := [seq(seq([op(j1), op(j2)], j2 = [isolve(eval(s[i], j1))]), j1 = S[i-1])] end do;

k := k+1; R[k] := op(S[n]);

end if; end do;

convert(R, set);

map(t->rhs~(t), %);

end if;

end proc:

 

Examples of use:

IntegerPoints({x > 0, y > 0, z > 0, 2*x+3*y+z < 12}, [x, y, z]);

       

  {[1, 1, 1], [1, 1, 2], [1, 1, 3], [1, 1, 4], [1, 1, 5], [1, 1, 6], [1, 2, 1], [1, 2, 2], [1, 2, 3], [2, 1, 1], [2, 1, 2],

                                   [2, 1, 3], [2, 1, 4], [2, 2, 1], [3, 1, 1], [3, 1, 2]}

 

IntegerPoints({x > 0, y > 0, z > 0, 2*x+3*y+z = 12}, [x, y, z]);

                                    {[1, 1, 7], [1, 2, 4], [1, 3, 1], [2, 1, 5], [2, 2, 2], [3, 1, 3], [4, 1, 1]}

 

IntegerPoints([x > 0, y > 0, z > 0, 2*x+3*y+z = 12, x+y+z <= 6], [x, y, z]);

                                                           {[1, 3, 1], [2, 2, 2], [4, 1, 1]}

isolve({x > 0, y > 0, z > 0, 2*x+3*y+z < 12});  #  isolve fails with these examples

              Warning, solutions may have been lost

isolve({x > 0, y > 0, z > 0, 2*x+3*y+z = 12});

              Warning, solutions may have been lost

 

In the following example (with a visualization) we find all integer point in the intersection of a square and a triangle:

S1 := {x > 0, y > 0, x < 13/2, y < 13/2}:

S2 := {y > (1/4)*x+1, y < 2*x, y+x < 12}:

S := IntegerPoints(`union`(S1, S2), [x, y]):

Region := plots[inequal](`union`(S1, S2), x = 0 .. 7, y = 0 .. 7, color = "LightGreen", nolines):

Points := plot([op(S)], style = point, color = red, symbol = solidcircle):

Square := plottools[curve]([[0, 0], [13/2, 0], [13/2, 13/2], [0, 13/2], [0, 0]], color = blue, thickness = 3):

Triangle := plottools[curve]([[4/7, 8/7], [4, 8], [44/5, 16/5], [4/7, 8/7]], color = blue, thickness = 3):

plots[display](Square, Triangle, Points, Region, scaling = constrained);

                                           

 

 

In the following example (with a visualization) we find all integer point in the intersection of two cubes. The second cube is obtained from the first cube by rotation with orthogonal matrix  A  and by a translation:

A := <1/3, 2/3, 2/3; -2/3, 2/3, -1/3; -2/3, -1/3, 2/3>:

f := unapply(A^(-1).<x+5, y-4, z-7>, x, y, z):

S1 := {x > 0, y > 0, z > 0, x < 6, y < 6, z < 6}:

S2 := eval(S1, {x = f(x, y, z)[1], y = f(x, y, z)[2], z = f(x, y, z)[3]}):

S := IntegerPoints(`union`(S1, S2), [x, y, z]);

Points := plots[pointplot3d](S, color = red, symbol = box):

Cube := plottools[cuboid]([0, 0, 0], [6, 6, 6], color = blue, linestyle = solid):

F := plottools[transform]((x, y, z)->convert(A.<x, y, z>+<-5, 4, 7>, list)):

plots[display](Cube,  F(Cube), Points, scaling = constrained, linestyle = solid, transparency = 0.7, orientation = [25, 75], axes = normal);

 

 

 

In the example below, all the ways to exchange $ 1 coins of 1, 5, 10, 25 and 50 cents, if the number of coins no more than 8, there is no pennies and there is at least one 50-cent coin:

IntegerPoints({x1 = 0, x2 >= 0, x3 >= 0, x4 >= 0, x5 >= 1,  x1+5*x2+10*x3+25*x4+50*x5 = 100, x1+x2+x3+x4+x5 <= 8}, [x1, x2, x3, x4, x5]);

nops(%);

                              {[0, 0, 0, 0, 2], [0, 0, 0, 2, 1], [0, 0, 5, 0, 1], [0, 1, 2, 1, 1], [0, 2, 4, 0, 1],

                                                 [0, 3, 1, 1, 1], [0, 4, 3, 0, 1], [0, 5, 0, 1, 1]}

                                                                                    8

 

Integer_points.mw

 

Addition: Below in my comments another procedure  IntegerPoints1  is presented that solves the same problem.

Hello,

I am trying to use Apollonius procedure from geometry package. Here is an example:

restart;
with(geometry):
circle( c1, [ point( c1c, 0 , 0 ), 5 ] );
circle( c2, [ point( c2c, 5 , 4 ), 2 ] );
circle( c3, [ point( c3c, 13 , 0 ), 3 ] );
A := Apollonius( c1, c2, c3 );

Unfortunatelly the Apollonius method does not give any result. The only message is:

intersection: there is no point of intersection

 

Anyone know what is wrong in my code?

Best regards

Rafał Nowak

Hi, I'm new to Maple and have been trying to solve the below curve intersection. But the answer I am getting from Maple is incorrect and does not tally with the plot when drawn on excel, am I doing something wrong ???  (the intersect should be around x=93.9)

 

restart;
eq1:=y=86:
eq2:=y=-0.0000054527x^3+0.010903836x^2+0.0714244709x+74.18816:
sol:=solve({eq1,eq2},{x,y});

Hey there!

I uploaded a solid drawing from a CAD software (like solidworks, inventor, stl files, etc) into Maple using plottools:-importplot("drawing.stl"). 

Also, I know Maple can give me the normal vector (and point of intersection) using line and intersection commands, for example.

Now, is it possible to find a point of intersection (and the normal vector at that point) of a line that crosses the uploaded CAD solid?

I guess that to accomplish that, it would be necessary to somehow "map" the solid and that's the part that I am lost.

Many thanks!

 

 

    Intersection of surfaces:

x3-.25*(sin(4*x1)+sin(3*x2+x3)+sin(2*x2))=0;  (1)

(x1-xx1)^4+(x2-xx2)^4+(x3-xx3)^4-1=0;          (2)   

   Surface (1) and a set of surfaces (2). Point (xx1, xx2, xx3) belongs to (1). Moving along the surface (1), we compute its intersection with the surface (2).
   The program is very simple and its algorithm can be used for many other combinations of equations.

intersection_of_surfaces.mw  

a curve has residual p if it is linked, in a complete intersection, to a curve with residual p-1

0 residual if is a complete intersection of two surfaces

do complete intersection means two surfaces totally overlapped?

why they are not the same one if complete intersection?

I Want to plot only the intersection between this Surfaces 

 

z = sqrt(x^2+y^2)

y >= abs(x)

x^2+y^2+z^2 >= 4

x^2+y^2+z^2 <= 9

 

Anyone knows how ?

Thanks!

Hello I am a Maple 15 user and I am using the command fsolve to solve for the intersection of two curves over a specified interval in x, namely from 0 to the lim defined in the Maple document. The specified interval contains asymptotes and when I specify the full interval only one of the three solutions is returned even if I can see that there are three distinct solutions by looking at the plot of RHS and LHS. Should I use another technique to find the solution or is my implementation of fsolve command wrong?

Thanks in advance


restart

with(ListTools):

n1 := 1:

n2 := 1.50:

n3 := 1.40:

lambda := 1.3:

k0 := 2*Pi/lambda:

d := 3:

x0 := k0*d:

arg1 := sqrt(x0^2*(n2^2-n1^2)):

arg2 := sqrt(x0^2*(n2^2-n3^2)):

lim := FindMinimalElement([arg1, arg2]):

sqr1 := sqrt(x0^2*(n2^2-n1^2)-x^2):

sqr2 := sqrt(x0^2*(n2^2-n3^2)-x^2):

LHS := tan(x):

RHS := (sqr1+sqr2)/(x*(1-sqr1*sqr2/x^2)):

plot([LHS, RHS], x = 0 .. lim, y = -6 .. 6)

 

fsolve(RHS = LHS, x = (1/2)*Pi .. 3*Pi*(1/2))

2.634254816

(1)

fsolve(RHS = LHS, x = 3*Pi*(1/2) .. 9*Pi*(1/4))

5.222527128

(2)

fsolve(RHS = LHS, x = 9*Pi*(1/4) .. lim)

7.598486053

(3)

``


Download HW4Q2.mw

Hi Maple friends.

Is there a Maple function to determine the intersection of two curves? For simple curves where the intersection is clear, I can plot them and use probeinfo to get the approximate intersection values.

But for more complex curves, where the scales are large, or the intersection point is not clear, it is difficult.

ie. intersection of y=x-3 and y=x^2-2*x-1

or intersection of y=x+1 and y=(x+1)/(x-1)

Thanks in advance.

How do I define a function from a graph in a plot? 

Or how do I find the intersection between two lines? I have to find the intersection of 2 lines in a graph, while one of these lines consists of 2 different equations dependent from the same variable. 

 

Thanks in advance. 

1 2 Page 1 of 2