Next: Drawing a cube
Up: Turtle and 3D
Previous: Primitives available in 2D
Contents
Index
A 3D Viewer is included in XLogo, it allows you to visualize your drawing in 3D. This module uses the JAVA3D libraries, so it's necessary to have java3D fully installed.
Here are the rules to use the 3D Viewer:
When we create a geometric figure on the drawing area, we have to indicate to the 3D Viewer which shapes we want to record for future visualization. It's possible to record polygons (surfaces), lines, points or text. To use this feature, here are the primitives:
- polystart: The following turtle's moves are saved to create a polygon.
- polyend: Since the last polystart call, the turtle has gone through several vertices. This new polygon is recorded, its color is defined by all vertices color. This primitive finalizes the polygon.
- linestart: The following turtle's moves are saved to create a strip line.
- lineend: Since the last linestart call, the turtle has gone through several vertices. This new line is recorded, its color is defined by all vertices color. This primitive finalizes the strip line.
- pointstart: The following turtle's moves are saved to create a point set.
- pointend: This primitive finalizes the point set.
- textstart: Each time the user displays text on the drawing area with the primitive label, it will be recorded and then displayed by the 3D Viewer.
- textend: End of text recording.
- view3d polyview: Launch the 3D viewer, all recorded objects are drawn on this new window. You have control of the camera scene:
- You can rotate the scene by clicking on the mouse's left button.
- You can translate the scene by clicking on the mouse's right button.
- You can zoom the scene with the mouse's wheel button.
Next: Drawing a cube
Up: Turtle and 3D
Previous: Primitives available in 2D
Contents
Index
Loïc
2008-06-08