<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://patrius.cnes.fr/index.php?action=history&amp;feed=atom&amp;title=User_Manual_3.3_Lines</id>
	<title>User Manual 3.3 Lines - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://patrius.cnes.fr/index.php?action=history&amp;feed=atom&amp;title=User_Manual_3.3_Lines"/>
	<link rel="alternate" type="text/html" href="https://patrius.cnes.fr/index.php?title=User_Manual_3.3_Lines&amp;action=history"/>
	<updated>2026-04-07T01:53:10Z</updated>
	<subtitle>Historique des versions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://patrius.cnes.fr/index.php?title=User_Manual_3.3_Lines&amp;diff=1636&amp;oldid=prev</id>
		<title>Admin : Page créée avec « ====Definition==== The lines are defined by an origin point and a direction vector (both Vector3D).  center  ====Implementation==== Please refer to the [... »</title>
		<link rel="alternate" type="text/html" href="https://patrius.cnes.fr/index.php?title=User_Manual_3.3_Lines&amp;diff=1636&amp;oldid=prev"/>
		<updated>2018-04-04T13:32:48Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec « ====Definition==== The lines are defined by an origin point and a direction vector (both Vector3D).  &lt;a href=&quot;/index.php/Fichier:Line.png&quot; title=&quot;Fichier:Line.png&quot;&gt;center&lt;/a&gt;  ====Implementation==== Please refer to the [... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;====Definition====&lt;br /&gt;
The lines are defined by an origin point and a direction vector (both Vector3D).&lt;br /&gt;
&lt;br /&gt;
[[File:line.png|center]]&lt;br /&gt;
&lt;br /&gt;
====Implementation====&lt;br /&gt;
Please refer to the [{{JavaDoc3.3}}/org/apache/commons/math3/geometry/euclidean/threed/Line.html Javadoc] for a complete list of public methods.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Instantiation====&lt;br /&gt;
A Line(geometry.euclidian.threed) can be created in twi different ways :&lt;br /&gt;
&lt;br /&gt;
* Using the constructor, by giving it two different points of the line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Vector3D p1 = new Vector3D(8, -12, 2);&lt;br /&gt;
Vector3D p2 = new Vector3D(-3, 4, 1);&lt;br /&gt;
Line l2 = new Line(p1, p2, true);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Using the static method createLine(Vector3D, Vector3D) : the first Vector3D is a point of the line, the second one is the direction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Vector3D origin = new Vector3D(-6, 4, 2);&lt;br /&gt;
Vector3D direction = new Vector3D(2, 0, -9);&lt;br /&gt;
Line l1 = Line.createLine(origin, direction );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The origin of the line is always computed to be the closest one of the line to the (0, 0, 0) point.&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
The Line class proposes methods to  :&lt;br /&gt;
&lt;br /&gt;
* Test if the line identical to another one (they are similar if the contain the same points) :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
boolean similarLines = line1.isSimilarTo(line2);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the coordinates of the projection of any point of space in the local frame (origin, direction)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Vector3D point = new Vector3D(2, 3, 5);&lt;br /&gt;
Vector1D pointOnLine = line.toSubSpace(point);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the coordinates in the global frame of a point expressed in the local frame&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Vector3D point = p1.toSpace(pointOnLine );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Test if a point belongs to it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
Vector3D point = new Vector3D(2, 3, 5);&lt;br /&gt;
boolean containsPoint = line1.contains(point);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please refer to the [[MAT_GEO_Home#HInteractions|Interactions with other geometrical objects section]] for other methods : Line does not implement the Shape interface (it is not a &amp;quot;shape&amp;quot;), but contains methods for interactions with other lines and points (clostestPointTo, distance...).&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>