Home Download Help Forum Resources Extensions FAQ NetLogo Publications Contact Us Donate Models: Library Community Modeling Commons Beginners Interactive NetLogo Dictionary (BIND) NetLogo Dictionary User Manuals: Web Printable Chinese Czech Farsi / Persian Japanese Spanish

NetLogo Models Library: 
If you download the NetLogo application, this model is included. You can also Try running it in NetLogo Web 
This model maps turtles between Cartesian and spherical 3dimensional coordinates. To create the appearance of a curved 3D surface, the program generates turtles with random x and zcoordinates, then computes each turtle's ycoordinate based on x and z, and time. The cosine function is used in the formula to produce a curved surface. Varying the y coordinate based on time produces motion.
To render the surface in the NetLogo view, it maps from 3D to 2D coordinates as follows:
>view x = turtle x + (turtle z) / 2 >view y = turtle y + (turtle z) / 2
In other words, increasing z causes the turtle's apparent position to move both up and to the right.
Click the SETUP button to generate the turtles and place them on the surface. Click the GO (forever) button to run the model, which continuously varies the turtles' ycoordinates to generate a wavelike motion.
The NUMTURTLES slider determines the number of turtles that make up the surface.
Notice that as the turtles move down (ycoordinate decreases) they become darker in color, and when they move up (ycoordinate increases) they become lighter.
Experiment with the NUMTURTLES slider. How many turtles are needed to produce a realistic effect? Why doesn't it keep getting betterlooking indefinitely as you add more turtles?
In the move
procedure, try other numbers besides 5 in front of and inside the cosine function. Explain the new behavior!
Try changing the formula used to compute the ycoordinate to produce differently shaped surfaces.
See if you can draw not just a surface, but a three dimensional shape such as a cone or a sphere.
Notice the use of scalecolor
to change a turtle's color based on its ycoordinate. Also see the model "Wave Machine" for a version that uses patches rather than turtles to make a 3D membrane.
3D Solids Wave Machine
If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.
For the model itself:
Please cite the NetLogo software as:
Copyright 1998 Uri Wilensky.
This work is licensed under the Creative Commons AttributionNonCommercialShareAlike 3.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/byncsa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.
This model was created as part of the project: CONNECTED MATHEMATICS: MAKING SENSE OF COMPLEX PHENOMENA THROUGH BUILDING OBJECTBASED PARALLEL MODELS (OBPML). The project gratefully acknowledges the support of the National Science Foundation (Applications of Advanced Technologies Program)  grant numbers RED #9552950 and REC #9632612.
This model was converted to NetLogo as part of the projects: PARTICIPATORY SIMULATIONS: NETWORKBASED DESIGN FOR SYSTEMS LEARNING IN CLASSROOMS and/or INTEGRATED SIMULATION AND MODELING ENVIRONMENT. The project gratefully acknowledges the support of the National Science Foundation (REPP & ROLE programs)  grant numbers REC #9814682 and REC0126227. Converted from StarLogoT to NetLogo, 2001.
(back to the NetLogo Models Library)