Difference between revisions of "Intersect Command"

From GeoGebra Manual
Jump to: navigation, search
m (Text replace - "<div class="block-note"><span class="block-contents"> '''Note:''' From GeoGebra 5, this command will work with 3D objects as well</span></div> " to "")
(command syntax: changed [ ] into ( ))
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=5.0}}</noinclude>
+
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|cas=true|geometry}}
{{command|cas=true|geometry}}
+
;Intersect( <Object>, <Object> )
;Intersect[ <Object>, <Object> ]
 
 
:Yields the intersection points of two objects.
 
:Yields the intersection points of two objects.
:{{example|1=<div>
+
:{{examples|1=<div>
:* Let <code><nowiki>a: -3x + 7y = -10</nowiki></code> be a line and <code><nowiki>c: x^2 + 2y^2 = 8</nowiki></code> be an ellipse. <code><nowiki>Intersect[a, c]</nowiki></code> yields the intersection points ''E'' = (-1.02, -1,87) and ''F'' = (2.81, -0.22) of the line and the ellipse.
+
:* Let <code><nowiki>a: -3x + 7y = -10</nowiki></code> be a line and <code><nowiki>c: x^2 + 2y^2 = 8</nowiki></code> be an ellipse. <code><nowiki>Intersect(a, c)</nowiki></code> yields the intersection points ''E'' = (-1.02, -1,87) and ''F'' = (2.81, -0.22) of the line and the ellipse.
:* <code><nowiki>Intersect[y = x + 3, Curve[t, 2t, t, 0, 10]]</nowiki></code> yields ''A''=(3,6).
+
:* <code><nowiki>Intersect(y = x + 3, Curve(t, 2t, t, 0, 10))</nowiki></code> yields ''A''=(3,6).
:*<code><nowiki>Intersect[Curve[2s, 5s, s,-10, 10 ], Curve[t, 2t, t, -10, 10]]</nowiki></code> yields ''A''=(0,0). </div>}}
+
:*<code><nowiki>Intersect(Curve(2s, 5s, s,-10, 10), Curve(t, 2t, t, -10, 10))</nowiki></code> yields ''A''=(0,0). </div>}}
;Intersect[ <Object>, <Object>, <Index of Intersection Point> ]
+
;Intersect( <Object>, <Object>, <Index of Intersection Point> )
:Yields the n<sup>th</sup> intersection point of two objects.
+
:Yields the n<sup>th</sup> intersection point of two objects. Each object must be a line, conic, polynomial function or implicit curve.
:{{example|1=<div>Let <code><nowiki>a(x) = x^3 + x^2 - x</nowiki></code> be a function and <code><nowiki>b: -3x + 5y = 4</nowiki></code> be a line. <code><nowiki>Intersect[a, b, 2]</nowiki></code> yields the intersection point ''C'' = (-0.43, 0.54) of the function and the line.</div>}}
+
:{{example|1=<div>Let <code><nowiki>a(x) = x^3 + x^2 - x</nowiki></code> be a function and <code><nowiki>b: -3x + 5y = 4</nowiki></code> be a line. <code><nowiki>Intersect(a, b, 2)</nowiki></code> yields the intersection point ''C'' = (-0.43, 0.54) of the function and the line.</div>}}
;Intersect[ <Object>, <Object>, <Initial Point> ]
+
;Intersect( <Object>, <Object>, <Initial Point> )
:Yields an intersection point of two objects by using a (numerical) iterative method with initial point.
+
:Yields an intersection point of two objects by using a numerical, iterative method with initial point.
:{{example|1=<div>Let <code><nowiki>a(x) = x^3 + x^2 - x</nowiki></code> be a function, <code><nowiki>b: -3x + 5y = 4</nowiki></code> be a line, and ''C'' = (0, 0.8) be the initial point. <code><nowiki>Intersect[a, b, C]</nowiki></code> yields the intersection point ''D'' = (-0.43, 0.54) of the function and the line by using a (numerical) iterative method.</div>}}
+
:{{example|1=<div>Let <code><nowiki>a(x) = x^3 + x^2 - x</nowiki></code> be a function, <code><nowiki>b: -3x + 5y = 4</nowiki></code> be a line, and ''C'' = (0, 0.8) be the initial point. <code><nowiki>Intersect(a, b, C)</nowiki></code> yields the intersection point ''D'' = (-0.43, 0.54) of the function and the line by using a numerical, iterative method.</div>}}
;Intersect[ <Function>, <Function>, <Start x-Value>, <End x-Value> ]
+
;Intersect( <Function>, <Function>, <Start x-Value>, <End x-Value> )
 
:Yields the intersection points numerically for the two functions in the given interval.
 
:Yields the intersection points numerically for the two functions in the given interval.
:{{example|1=<div>Let <code><nowiki>f(x) = x^3 + x^2 - x</nowiki></code> and <code><nowiki>g(x) = 4 / 5 + 3 / 5 x</nowiki></code> be two functions. <code><nowiki>Intersect[ f, g, -1, 2 ]</nowiki></code> yields  the intersection points ''A'' = (-0.43, 0.54) and ''B'' = (1.1, 1.46) of the two functions in the interval [ -1, 2 ].</div>}}
+
:{{example|1=<div>Let <code><nowiki>f(x) = x^3 + x^2 - x</nowiki></code> and <code><nowiki>g(x) = 4 / 5 + 3 / 5 x</nowiki></code> be two functions. <code><nowiki>Intersect(f, g, -1, 2)</nowiki></code> yields  the intersection points ''A'' = (-0.43, 0.54) and ''B'' = (1.1, 1.46) of the two functions in the interval [ -1, 2 ].</div>}}
;Intersect[ <Curve 1>, <Curve 2>, <Parameter 1>, <Parameter 2> ]
+
;Intersect( <Curve 1>, <Curve 2>, <Parameter 1>, <Parameter 2> )
:Finds one intersection point using an iterative method starting at the given parameters.
+
:Finds one intersection point using a numerical, iterative method starting at the given parameters.
:{{example|1=<div>Let <code>a = Curve[cos(t), sin(t), t, 0, π]</code> and <code>b = Curve[cos(t) + 1, sin(t), t, 0, π]</code>. <br><code><nowiki>Intersect[a, b, 0, 2]</nowiki></code> yields the intersection point ''A = (0.5, 0.87)''.</div>}}
+
:{{example|1=<div>Let <code>a = Curve(cos(t), sin(t), t, 0, π)</code> and <code>b = Curve(cos(t) + 1, sin(t), t, 0, π)</code>. <br><code><nowiki>Intersect(a, b, 0, 2)</nowiki></code> yields the intersection point ''A = (0.5, 0.87)''.</div>}}
  
 
==CAS Syntax==
 
==CAS Syntax==
;Intersect[ <Function>, <Function> ]
+
;Intersect( <Function>, <Function> )
 
:Yields a list containing the intersection points of two objects.
 
:Yields a list containing the intersection points of two objects.
:{{example|1=<div>Let <code><nowiki>f(x):= x^3 + x^2 - x</nowiki></code> and <code><nowiki>g(x):= x</nowiki></code> be two functions. <code><nowiki>Intersect[ f(x), g(x) ]</nowiki></code> yields the intersection points list: ''{(1, 1), (0, 0), (-2, -2)}'' of the two functions.</div>}}
+
:{{example|1=<div>Let <code><nowiki>f(x):= x^3 + x^2 - x</nowiki></code> and <code><nowiki>g(x):= x</nowiki></code> be two functions. <code><nowiki>Intersect(f(x), g(x))</nowiki></code> yields the intersection points list: ''{(1, 1), (0, 0), (-2, -2)}'' of the two functions.</div>}}
  
{{Note| See also [[Image:Tool Intersect Two Objects.gif]] [[Intersect Tool|Intersect]] tool.}}
+
;Intersect( <Object>, <Object> )
 
+
:{{examples| 1=<div>
 
+
:*<code><nowiki>Intersect( <Line> , <Object> )</nowiki></code> creates the intersection point(s) of a line and a plane, segment, polygon, conic, etc.  
 
+
:*<code><nowiki>Intersect( <Plane> , <Object> )</nowiki></code> creates the intersection point(s) of a plane and segment, polygon, conic, etc.  
;Intersect[ <Object>, <Object> ]
+
:*<code><nowiki>Intersect( <Conic>, <Conic> )</nowiki></code> creates the intersection point(s) of two conics  
:{{example| 1=<div>
+
:*<code><nowiki>Intersect( <Plane>, <Plane> )</nowiki></code> creates the intersection line of two planes  
:*<code><nowiki>Intersect[ <Line> , <Object> ]</nowiki></code> creates the intersection point(s) of a line and a plane, segment, polygon, conic, etc.  
+
:*<code><nowiki>Intersect( <Plane>, <Polyhedron> )</nowiki></code> creates the polygon(s) intersection of a plane and a polyhedron.  
:*<code><nowiki>Intersect[ <Plane> , <Object> ]</nowiki></code> creates the intersection point(s) of a plane and segment, polygon, conic, etc.  
+
:*<code><nowiki>Intersect( <Sphere>, <Sphere> )</nowiki></code> creates the circle intersection of two spheres  
:*<code><nowiki>Intersect[ <Conic>, <Conic> ]</nowiki></code> creates the intersection point(s) of two conics  
+
:*<code><nowiki>Intersect( <Plane>, <Quadric> )</nowiki></code> creates the conic intersection of the plane and the quadric (sphere, cone, cylinder, ...)</div>}}
:*<code><nowiki>Intersect[ <Plane>, <Plane> ]</nowiki></code> creates the intersection line of two planes  
+
{{Notes|1=<div>
:*<code><nowiki>Intersect[ <Plane>, <Polyhedron> ]</nowiki></code> creates the polygon(s) intersection of a plane and a polyhedron.  
+
* to get all the intersection points in a list you can use eg <code>{Intersect(a,b)}</code>
:*<code><nowiki>Intersect[ <Sphere>, <Sphere> ]</nowiki></code> creates the circle intersection of two spheres  
+
* See also [[IntersectConic Command|IntersectConic]] and [[IntersectPath Command|IntersectPath]] commands.
:*<code><nowiki>Intersect[ <Plane>, <Quadric> ]</nowiki></code> creates the conic intersection of the plane and the quadric (sphere, cone, cylinder, ...)</div>}}
+
* See also [[File:Mode intersect.svg|link=|22px]] [[Intersect Tool|Intersect]] tool.</div>}}
{{Note| See also [[IntersectConic Command|IntersectConic]] and [[IntersectPath Command|IntersectPath]] commands.}}
 

Latest revision as of 09:20, 11 October 2017


Intersect( <Object>, <Object> )
Yields the intersection points of two objects.
Examples:
  • Let a: -3x + 7y = -10 be a line and c: x^2 + 2y^2 = 8 be an ellipse. Intersect(a, c) yields the intersection points E = (-1.02, -1,87) and F = (2.81, -0.22) of the line and the ellipse.
  • Intersect(y = x + 3, Curve(t, 2t, t, 0, 10)) yields A=(3,6).
  • Intersect(Curve(2s, 5s, s,-10, 10), Curve(t, 2t, t, -10, 10)) yields A=(0,0).
Intersect( <Object>, <Object>, <Index of Intersection Point> )
Yields the nth intersection point of two objects. Each object must be a line, conic, polynomial function or implicit curve.
Example:
Let a(x) = x^3 + x^2 - x be a function and b: -3x + 5y = 4 be a line. Intersect(a, b, 2) yields the intersection point C = (-0.43, 0.54) of the function and the line.
Intersect( <Object>, <Object>, <Initial Point> )
Yields an intersection point of two objects by using a numerical, iterative method with initial point.
Example:
Let a(x) = x^3 + x^2 - x be a function, b: -3x + 5y = 4 be a line, and C = (0, 0.8) be the initial point. Intersect(a, b, C) yields the intersection point D = (-0.43, 0.54) of the function and the line by using a numerical, iterative method.
Intersect( <Function>, <Function>, <Start x-Value>, <End x-Value> )
Yields the intersection points numerically for the two functions in the given interval.
Example:
Let f(x) = x^3 + x^2 - x and g(x) = 4 / 5 + 3 / 5 x be two functions. Intersect(f, g, -1, 2) yields the intersection points A = (-0.43, 0.54) and B = (1.1, 1.46) of the two functions in the interval [ -1, 2 ].
Intersect( <Curve 1>, <Curve 2>, <Parameter 1>, <Parameter 2> )
Finds one intersection point using a numerical, iterative method starting at the given parameters.
Example:
Let a = Curve(cos(t), sin(t), t, 0, π) and b = Curve(cos(t) + 1, sin(t), t, 0, π).
Intersect(a, b, 0, 2) yields the intersection point A = (0.5, 0.87).


CAS Syntax

Intersect( <Function>, <Function> )
Yields a list containing the intersection points of two objects.
Example:
Let f(x):= x^3 + x^2 - x and g(x):= x be two functions. Intersect(f(x), g(x)) yields the intersection points list: {(1, 1), (0, 0), (-2, -2)} of the two functions.


Intersect( <Object>, <Object> )
Examples:
  • Intersect( <Line> , <Object> ) creates the intersection point(s) of a line and a plane, segment, polygon, conic, etc.
  • Intersect( <Plane> , <Object> ) creates the intersection point(s) of a plane and segment, polygon, conic, etc.
  • Intersect( <Conic>, <Conic> ) creates the intersection point(s) of two conics
  • Intersect( <Plane>, <Plane> ) creates the intersection line of two planes
  • Intersect( <Plane>, <Polyhedron> ) creates the polygon(s) intersection of a plane and a polyhedron.
  • Intersect( <Sphere>, <Sphere> ) creates the circle intersection of two spheres
  • Intersect( <Plane>, <Quadric> ) creates the conic intersection of the plane and the quadric (sphere, cone, cylinder, ...)
Notes:
© 2024 International GeoGebra Institute