{"id":164,"date":"2018-06-27T19:24:35","date_gmt":"2018-06-27T17:24:35","guid":{"rendered":"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/?page_id=164"},"modified":"2018-07-17T14:50:29","modified_gmt":"2018-07-17T12:50:29","slug":"lesson-4-write-embedding-expressions","status":"publish","type":"page","link":"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/lesson-4-write-embedding-expressions\/","title":{"rendered":"Lesson 4: Write embedding expressions"},"content":{"rendered":"<div class=\"toc_sitemap\"><h3 class=\"toc_sitemap_pages\">Pages<\/h3><ul class=\"toc_sitemap_pages_list\"><li class=\"page_item page-item-24\"><a href=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/\">A RULE-BASED TOPOLOGICAL MODELER GENERATOR<\/a><\/li>\n<li class=\"page_item page-item-671\"><a href=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/inference-of-topological-operations-illustration-in-geology\/\">Inference of topological operations: illustration in geology<\/a><\/li>\n<li class=\"page_item page-item-596\"><a href=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/japhy\/\">Japhy : une plate-forme m\u00e9canique et topologique utilisant un langage \u00e0 base de r\u00e8gles pour l&rsquo;animation physique.<\/a><\/li>\n<li class=\"page_item page-item-645\"><a href=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/jerboaeclatement\/\">JerboaEclatement<\/a><\/li>\n<li class=\"page_item page-item-736\"><a href=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/joptop-jerboa-optimisation-topologique\/\">Joptop &#8211; Jerboa Optimisation Topologique<\/a><\/li>\n<li class=\"page_item page-item-85\"><a href=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/lesson-1-discover-topological-structures\/\">Lesson 1: Discover topological structures of Jerboa<\/a><\/li>\n<li class=\"page_item page-item-128\"><a href=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/lesson-2-discover-embeddings-and-orbits\/\">Lesson 2: Discover embeddings and orbits<\/a><\/li>\n<li class=\"page_item page-item-158\"><a href=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/lesson-3-modify-and-write-a-first-rule\/\">Lesson 3: Modify and write a first rule<\/a><\/li>\n<li class=\"page_item page-item-164\"><a href=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/lesson-4-write-embedding-expressions\/\">Lesson 4: Write embedding expressions<\/a><\/li>\n<li class=\"page_item page-item-243\"><a href=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/lesson-5-make-topological-transformations\/\">Lesson 5: Design topological transformations<\/a><\/li>\n<li class=\"page_item page-item-248\"><a href=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/lesson-6-using-the-execution-cycle\/\">Lesson 6: Utilize the execution cycle of rules<\/a><\/li>\n<li class=\"page_item page-item-536\"><a href=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/lesson-7-write-scripts-in-jerboa\/\">Lesson 7 : Write scripts in Jerboa<\/a><\/li>\n<li class=\"page_item page-item-449\"><a href=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/lesson-8-create-your-own-modeler\/\">Lesson 8: Create your own modeler<\/a><\/li>\n<li class=\"page_item page-item-775\"><a href=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/model-reevaluation-based-on-graph-transformation-rules\/\">Model reevaluation based on graph transformation rules<\/a><\/li>\n<li class=\"page_item page-item-712\"><a href=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/topological-inference-for-subdivision-schemes\/\">Topological inference for subdivision schemes<\/a><\/li>\n<\/ul><\/div>\n<p style=\"text-align: center;\"><a href=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/lesson-3-modify-and-write-a-first-rule\/\" class=\"su-button su-button-style-default\" style=\"color:#FFFFFF;background-color:#2D89EF;border-color:#246ec0;border-radius:6px\" target=\"_self\"><span style=\"color:#FFFFFF;padding:0px 18px;font-size:14px;line-height:28px;border-color:#6cadf4;border-radius:6px;text-shadow:none\"> Lesson 3<\/span><\/a>\n<p>&nbsp;<\/p>\n<p>In this lesson you will learn how to manipulate the embeddings of objects with embedding expressions just like the ones you modified in Lesson 3. You will be using the same modeler for witch you will create new rules for the modeler with the editor, export them to the project and use the corresponding operations through the viewer.<\/p>\n<p>Every embedding that you wish to include must be declared in the editor by clicking on \u201cNew Embedding\u201d, giving it a name, an associated orbit and a type (which is either an existing java class or one that you can write yourself in the embeddings package of the project).<\/p>\n<h3><strong>OBSERVING EMBEDDINGS<br \/>\n<\/strong><\/h3>\n<ul>\n<li>open the editor and right click on the points embedding on the left of the screen under the embeddings label then click on modify (see Screen 4.1)<\/li>\n<\/ul>\n<p><span style=\"color: #808080;\"><span style=\"color: #0000ff;\"><div class=\"su-note\"  style=\"border-color:#e5e5e5;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#ffffff;border-color:#ffffff;color:#808080;\"><\/span>You can find out with which orbit it is associated and what it&rsquo;s type is (defined by a class). Once you know what the type is you can find out which methods are contained in the class and thus how you can manipulate that particular embedding.<span style=\"color: #0000ff;\"><\/div><\/div><\/span><\/span><\/p>\n<figure id=\"attachment_255\" aria-describedby=\"caption-attachment-255\" style=\"width: 762px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-255 size-full\" src=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/06\/47.jpg\" alt=\"Sorry, you'll ahve to use your imagination\" width=\"762\" height=\"206\" srcset=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/06\/47.jpg 762w, http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/06\/47-300x81.jpg 300w\" sizes=\"(max-width: 762px) 100vw, 762px\" \/><figcaption id=\"caption-attachment-255\" class=\"wp-caption-text\">Screen 4.1: point embedding information<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<ul>\n<li>now open your IDE and open the <code>Points.java<\/code> embedding to find out what methods are at your disposal, observe the copy constructors (see Screen 4.2)<\/li>\n<\/ul>\n<figure id=\"attachment_422\" aria-describedby=\"caption-attachment-422\" style=\"width: 1067px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-422 size-full\" src=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/94.jpg\" alt=\"\" width=\"1067\" height=\"787\" srcset=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/94.jpg 1067w, http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/94-300x221.jpg 300w, http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/94-768x566.jpg 768w, http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/94-1024x755.jpg 1024w\" sizes=\"(max-width: 1067px) 100vw, 1067px\" \/><figcaption id=\"caption-attachment-422\" class=\"wp-caption-text\">Screen 4.2: \u00ab\u00a0Points\u00a0\u00bb embedding class*<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<h3><strong>ACCESSING AN EMBEDDING<\/strong><\/h3>\n<p><span style=\"color: #333333;\">You will write a rule which translates an object and changes only the point embedding of each vertex so as to place the object twenty points higher than it&rsquo;s original position.<\/span><\/p>\n<ul>\n<li>open the editor and create a new rule called Translate<\/li>\n<li>place a node in the left pattern with the orbit to match the whole connected component (i.e. &lt;\u03b10,\u03b11,\u03b12,\u03b13&gt;) and make it a hook<\/li>\n<\/ul>\n<p><span style=\"color: #0000ff;\"><div class=\"su-note\"  style=\"border-color:#e5e5e5;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#ffffff;border-color:#ffffff;color:#808080;\"><span style=\"color: #808080;\">To write an orbit to a node simply select the node and press the number key corresponding to the link you wish to enter or enter the numbers into the \u00ab\u00a0Orbit:\u00a0\u00bb text field at the top and hit Enter.<\/span><\/div><\/div><\/span><\/p>\n<ul>\n<li>place a node in the right pattern identical to the one in the left pattern (with the same orbit) (see Screen 4.3)<\/li>\n<\/ul>\n<figure id=\"attachment_423\" aria-describedby=\"caption-attachment-423\" style=\"width: 902px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-423 size-full\" src=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/96.jpg\" alt=\"\" width=\"902\" height=\"657\" srcset=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/96.jpg 902w, http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/96-300x219.jpg 300w, http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/96-768x559.jpg 768w\" sizes=\"(max-width: 902px) 100vw, 902px\" \/><figcaption id=\"caption-attachment-423\" class=\"wp-caption-text\">Screen 4.3: Translate<\/figcaption><\/figure>\n<p><span style=\"color: #333333;\">You will notice that the node in the left pattern is called <code>n0<\/code> and the one\u00a0 in the right pattern is called <code>n0<\/code> as well because it corresponds to <code>n0<\/code> in the left pattern and it hasn&rsquo;t been changed which means that the sub-graph matched by the left pattern will be preserved by the rule.<\/span><\/p>\n<div class=\"su-note\"  style=\"border-color:#e5e5e5;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#ffffff;border-color:#ffffff;color:#808080;\"><code>n0.point<\/code> will return the point embedding of the current dart matched by <code>n0<\/code>. <\/div><\/div>\n<ul>\n<li>write the point expression for <code>n0<\/code> (see Screen 4.4)\n<ul>\n<li>use the <code>getX()<\/code>, <code>getY()<\/code> and <code>getZ()<\/code> methods from the Points class to get the values of attributes x, y and z from the point embedding of <code>n0<\/code><\/li>\n<li>return and instance of Points created using the <code>public Points(float x, float y, float z)<\/code> constructor and adding 20 to y to translate the point along the y axis<\/li>\n<li>click on \u00ab\u00a0Apply\u00a0\u00bb<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<figure id=\"attachment_424\" aria-describedby=\"caption-attachment-424\" style=\"width: 897px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-424 size-full\" src=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/98.jpg\" alt=\"\" width=\"897\" height=\"209\" srcset=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/98.jpg 897w, http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/98-300x70.jpg 300w, http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/98-768x179.jpg 768w\" sizes=\"(max-width: 897px) 100vw, 897px\" \/><figcaption id=\"caption-attachment-424\" class=\"wp-caption-text\">Screen 4.4: point embedding expression<\/figcaption><\/figure>\n<ul>\n<li>Save and export the modeler and try out your new operation on any object after having closed and launched the viewer<\/li>\n<\/ul>\n<p>If you would like your rule to change the color of the moved object you can observe the color embedding expression of <code>MakeRed<\/code> to give every face a new color. You just need to copy the expression into the color expression of the\u00a0 node in the right pattern of your \u00ab\u00a0Translate\u00a0\u00bb rule to obtain a translated red connected component.<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>ACCESSING NEIGHBORING EMBEDDINGS<\/strong><\/h3>\n<p>You will now write a rule which gives a color to a face which is the median color calculated from the color of the face and that of the neighboring face. You will need to access the neighboring color embedding to do so.<\/p>\n<ul>\n<li>open the editor and create a new rule called <code>MedianColor1<\/code><\/li>\n<li>place a node in the left pattern with the dart orbit (i.e. &lt;&gt;) and make it a hook<\/li>\n<li>place the same node in the right pattern with the same orbit (see Screen 4.6)<\/li>\n<\/ul>\n<figure id=\"attachment_427\" aria-describedby=\"caption-attachment-427\" style=\"width: 903px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-427 size-full\" src=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/100.jpg\" alt=\"\" width=\"903\" height=\"483\" srcset=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/100.jpg 903w, http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/100-300x160.jpg 300w, http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/100-768x411.jpg 768w\" sizes=\"(max-width: 903px) 100vw, 903px\" \/><figcaption id=\"caption-attachment-427\" class=\"wp-caption-text\">Screen 4.5: MedianColor1<\/figcaption><\/figure>\n<ul>\n<li>edit the color embedding of <code>n0<\/code> in the right pattern (see Screen 4.6)\n<ul>\n<li>create three instances of int (called <code>red, green and blue<\/code>) which will be given the median of the R value of the color embedding of selected dart and the R value of the color embedding of the selected dart&rsquo;s neighbor through alpha2<\/li>\n<li>return a <code>new Color<\/code> with these new values for the R, G and B attributes<\/li>\n<li>Apply, save and export<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"color: #0000ff;\"><div class=\"su-note\"  style=\"border-color:#e5e5e5;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#ffffff;border-color:#ffffff;color:#808080;\"><span style=\"color: #808080;\">To do this you will need to access of the neighboring dart, this is done with <code>n@i<\/code><\/span><\/span><span style=\"color: #0000ff;\"><span style=\"color: #808080;\"> which indicates that you want the neighbor of n through the i-link.<span style=\"color: #0000ff;\"><\/div><\/div><\/span><\/span><\/span><\/p>\n<p><span style=\"color: #333333;\">To retrieve the red, green and blue attributes you can use the <code>getRed()<\/code>, <code>getGreen()<\/code> and <code>getBlue()<\/code> methods from <code>java.awtColor<\/code>.<\/span><\/p>\n<figure id=\"attachment_343\" aria-describedby=\"caption-attachment-343\" style=\"width: 846px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-343 size-full\" src=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/06\/77-1.jpg\" alt=\"\" width=\"846\" height=\"339\" srcset=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/06\/77-1.jpg 846w, http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/06\/77-1-300x120.jpg 300w, http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/06\/77-1-768x308.jpg 768w\" sizes=\"(max-width: 846px) 100vw, 846px\" \/><figcaption id=\"caption-attachment-343\" class=\"wp-caption-text\">Screen 4.6: color embedding expression<\/figcaption><\/figure>\n<ul>\n<li>try your new rule on the IcositeHexagon by selecting a dart belonging to the face which you want to change color<\/li>\n<\/ul>\n<p>This rule will be applied to one single dart meaning that the color will be retrieved from the neighboring face which is connected to that particular dart through a 2-link. Depending on the selected dart, the result can vary.<\/p>\n<p>&nbsp;<\/p>\n<h3><span style=\"color: #333333;\"><strong>COLLECTING DARTS<\/strong><\/span><\/h3>\n<p><span style=\"color: #333333;\">You will now write a new rule which calculates the median color from all adjacent faces to the one from which a dart is selected. You will learn how to collect darts and how to use a \u00ab\u00a0foreach\u00a0\u00bb loop.<\/span><\/p>\n<ul>\n<li>open the editor and create a new rule called <code>MedianColor2<\/code> (see Screen 4.7)<\/li>\n<li>create a node in the left pattern<\/li>\n<li>give the (&lt;&gt;) orbit to the node and make it a hook<\/li>\n<li>create an identical node in the right pattern<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_431\" aria-describedby=\"caption-attachment-431\" style=\"width: 870px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-431 size-full\" src=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/103.jpg\" alt=\"\" width=\"870\" height=\"460\" srcset=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/103.jpg 870w, http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/103-300x159.jpg 300w, http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/103-768x406.jpg 768w\" sizes=\"(max-width: 870px) 100vw, 870px\" \/><figcaption id=\"caption-attachment-431\" class=\"wp-caption-text\">Screen 4.7: MedianColor2<\/figcaption><\/figure>\n<ul>\n<li>edit the color embedding expression for that node (see Screen 4.8)\n<ul>\n<li>create four new instances of integer called <code>red, green, blue<\/code> and <code>count<\/code> (all are equal to 0)<\/li>\n<li>use a \u00ab\u00a0foreach\u00a0\u00bb loop which browses every <code>JerboaDart<\/code> as a <code>dart<\/code> on the &lt;0,1&gt;_&lt;0&gt; orbit starting from <code>n0<\/code><\/li>\n<li>for each <code>dart<\/code> add the value of each component of the color from the color embedding of the neighboring dart through a 2-link to <code>red, green and blue<\/code> and increment <code>count<\/code><\/li>\n<li>finally divide <code>red, green and blue<\/code> by <code>count<\/code> and return a new instance of <code>Color(red, green, blue)<\/code><\/li>\n<li>Apply, save and export<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<figure id=\"attachment_546\" aria-describedby=\"caption-attachment-546\" style=\"width: 954px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-546 size-full\" src=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/140.jpg\" alt=\"\" width=\"954\" height=\"432\" srcset=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/140.jpg 954w, http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/140-300x136.jpg 300w, http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-content\/uploads\/2018\/07\/140-768x348.jpg 768w\" sizes=\"(max-width: 954px) 100vw, 954px\" \/><figcaption id=\"caption-attachment-546\" class=\"wp-caption-text\">Screen 4.8: color embedding expression<\/figcaption><\/figure>\n<p>You can now try the operation on the IcositeHexagon and compare it&rsquo;s result to that of MedianColor1<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>MORE POSSIBILITIES WITH THE LANGUAGE<\/strong><\/h3>\n<p>You can use these operations in the embedding expressions to manipulate the embeddings.<\/p>\n<div class=\"su-table su-table-alternate\">\n<table>\n<tbody>\n<tr>\n<td>Operation<\/td>\n<td>Jerboa code<\/td>\n<\/tr>\n<tr>\n<td>Access an \u00ab\u00a0embedding\u00a0\u00bb embedding<\/p>\n<p>Access an i-linked neighboring dart<\/p>\n<p>Collect all embeddings of the &lt;0,1,3&gt; orbit<\/p>\n<p>Collect the &lt;0&gt; sub-orbit from the &lt;0,1,3&gt;(n) orbit<\/p>\n<p>Access the G-map<\/p>\n<p>Get the type of the \u00ab\u00a0embedding\u00a0\u00bb embedding<\/td>\n<td><code>n.embedding<\/code><\/p>\n<p><code>n@i<\/code><\/p>\n<p><code>&lt;0,1,3&gt;_embedding(n)<\/code><\/p>\n<p><code>&lt;0,1,3&gt;_&lt;0&gt;(n)<\/code><\/p>\n<p><code>@gmap<\/code><\/p>\n<p><code>@ebd&lt;embedding<\/code>;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>You can also use these classic instructions.<\/p>\n<pre class=\"default prettyprint prettyprinted\"><code><span class=\"pun\">if ([condition]) { \r\n    [instruction] \r\n} else { \r\n    [instruction] \r\n};\r\n<\/span>\r\nwhile ([condition]) { \r\n    [instruction] \r\n};\r\n\r\nfor ( [type] [variable] : [condition] ) { \/\/foreach\r\n    [instruction] \r\n};\r\n\r\nfor i in [beginning] . . [end] { \r\n    [instruction] \r\n};<\/code><\/pre>\n<p>&nbsp;<\/p>\n<hr \/>\n<h3><strong>What have you learned ?<\/strong><\/h3>\n<ul>\n<li>What methods could you create in the \u00ab\u00a0Points.java\u00a0\u00bb embedding class to translate the instance of point by a given vector?<\/li>\n<li>How can you collect all the incident\u00a0faces to a dart n?<\/li>\n<li>How can you test whether the incident face to n is a triangle?<\/li>\n<\/ul>\n<p style=\"text-align: center;\"><a href=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\" class=\"su-button su-button-style-default\" style=\"color:#FFFFFF;background-color:#2D89EF;border-color:#246ec0;border-radius:6px\" target=\"_self\"><span style=\"color:#FFFFFF;padding:0px 18px;font-size:14px;line-height:28px;border-color:#6cadf4;border-radius:6px;text-shadow:none\"> Lesson 5<\/span><\/a>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; In this lesson you will learn how to manipulate the embeddings of objects with embedding expressions just like the ones you modified in Lesson 3. You will be using the same modeler for witch you will create new rules for the modeler with the editor, export them to the project and use the corresponding &hellip; <a href=\"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/lesson-4-write-embedding-expressions\/\" class=\"more-link\">Continuer la lecture de <span class=\"screen-reader-text\">Lesson 4: Write embedding expressions<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-json\/wp\/v2\/pages\/164"}],"collection":[{"href":"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-json\/wp\/v2\/comments?post=164"}],"version-history":[{"count":54,"href":"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-json\/wp\/v2\/pages\/164\/revisions"}],"predecessor-version":[{"id":562,"href":"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-json\/wp\/v2\/pages\/164\/revisions\/562"}],"wp:attachment":[{"href":"http:\/\/xlim-sic.labo.univ-poitiers.fr\/jerboa\/doc\/wp-json\/wp\/v2\/media?parent=164"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}