User Tools

Site Tools


02_user_tutorials:13_rgg:02_xl-turtle-geometry

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
02_user_tutorials:13_rgg:02_xl-turtle-geometry [2025/12/10 13:14] – ↷ Page moved from 02_new_tutorials:13_rgg:02_xl-turtle-geometry to 02_user_tutorials:13_rgg:02_xl-turtle-geometry gaetan02_user_tutorials:13_rgg:02_xl-turtle-geometry [2025/12/12 12:08] (current) – [Turtle commands] groimp
Line 1: Line 1:
 +~~NOTOC~~
 ====== XL turtle geometry and graph construction ====== ====== XL turtle geometry and graph construction ======
  
Line 11: Line 12:
 | {{:tutorials:turtle_tut_f.png?direct&220 |}}{{: tutorials:turtle_tut_f_graph.png?direct&200|}}| | {{:tutorials:turtle_tut_f.png?direct&220 |}}{{: tutorials:turtle_tut_f_graph.png?direct&200|}}|
 | The 3d view and the graph structure created by the init function above | | The 3d view and the graph structure created by the init function above |
-This function is called very time you reset your model.(either with the rest button by recompiling/saving the code). The basic theory behind it is that the model always rests to the Axiom node and then runs the init function, if one is provided.+This function is called every time you reset your model.(either with the rest button by recompiling/saving the code). The basic theory behind it is that the model always rests to the Axiom node and then runs the init function, if one is provided.
    
  
Line 17: Line 18:
  
 That if we replace the Axiom with an F, a F node appears in the 2d graph is quite strait forward.  That if we replace the Axiom with an F, a F node appears in the 2d graph is quite strait forward. 
-The fact that this turns into a Cylinder in 3d is a bit more of a stretch.  This is happening because 'F' is a so called [[01_user_documentation:groimp-platform:turtle_commands|turtle command]].+The fact that this turns into a Cylinder in 3d is a bit more of a stretch.  This is happening because 'F' is a so called [[15_cheatsheet:turtle_commands|turtle command]].
  
 Each turtle command is interpreted for the creation of the 3d model.  We can imagine that a “turtle” starts at position (0,0,0) in the 3D scene and then follows the instructions given by the nodes in the graph. Reading the graph starts at the top at Node.0 and goes down through the nodes. The first two nodes (Node.0 and RGGRoot) have no effect on the turtle, but a F tells the turtle to draw a cylinder and move to the end of that cylinder. Therefore a second F would tell the turtle to do the same thing again: Each turtle command is interpreted for the creation of the 3d model.  We can imagine that a “turtle” starts at position (0,0,0) in the 3D scene and then follows the instructions given by the nodes in the graph. Reading the graph starts at the top at Node.0 and goes down through the nodes. The first two nodes (Node.0 and RGGRoot) have no effect on the turtle, but a F tells the turtle to draw a cylinder and move to the end of that cylinder. Therefore a second F would tell the turtle to do the same thing again:
02_user_tutorials/13_rgg/02_xl-turtle-geometry.1765368851.txt.gz · Last modified: 2025/12/10 13:14 by gaetan