Difference between revisions of "ConwayLife.com:Help"
m (→Saving animated images: fixed thumbnail)
m (Changed description of Offsets since it took me five minutes to understand what they did)
|Line 143:||Line 143:|
| X Offset
| X Offset
| The number of [[cell]]s
| The number of [[cell]]s the the pattern in the generation. This can be useful to add larger padding around an animation or to take into account an oscillator with a changing [[bounding box]]. Its default value is 1.
| Y Offset
| Y Offset
| The number of
| The number of the pattern in the generation. This can be useful to add larger padding around an animation or to take into account an oscillator with a changing [[bounding box]]. Its default value is 1.
| X Panning
| X Panning
Revision as of 14:09, 16 March 2009
The online tool at ConwayLife.com contains many features hidden under its surface, and this page will help you find and use each of them. If you continue to have trouble using the tool, please ask questions on the talk page.
The tool that loads when you visit ConwayLife.com is a Java-based tool for exploring Conway's Game of Life, which means that you must have Java installed on your computer for it to run. Most new computers and web browsers will come with Java already installed, but if the applet will not load for you then you can download and install Java from www.java.com.
There are three ways to load an existing pattern into the applet. You may load the pattern from a file on your hard drive, or from the online database via either the applet or querystring.
Load from file
Load -> From File
and then choose the file from your hard drive. Note that the applet will not accept files larger than 100 kB in size.
Load from online database (via applet)
To load a pattern that is saved in the online database, simply select
Load -> Online Database
and type the name of the pattern. Spaces and capitalization are ignored, as are special characters like apostrophes and slashes. Most well-known patterns already exist in the online database, as do all patterns listed in LifeWiki. You may also load any patterns that you (or another user) saved to the online database using this same form.
Load from online database (via querystring)
To load a pattern that is saved in the online database via querystring simply append "?p=patternname", without quotes, to the end of the website URL and replace patternname with the name of the pattern that you wish to load. Due to website URL restrictions, it is recommended that you remove all spaces and special characters from the name of the pattern before trying to access it in this way. You may load both pre-defined patterns and user-saved patterns in this way.
|Gosper glider gun||www.conwaylife.com?p=gosperglidergun|
ConwayLife.com provides comprehensive tools for creating both static and animated images of patterns. Static images can be created via the applet or via a special querystring URL, but animated images can only be created via the applet. In all cases, you can not create images with width or height greater than 800 pixels.
Saving static images (via the applet)
Static images can be saved in BMP, GIF, or PNG format depending on your preference, with PNG being the default. To save an image of a pattern, first load your pattern into the applet as you would like it to appear. Note that all zoom and display settings that you have selected will carry over to the created image. Once the image appears in the applet as desired, select
Save -> Download Image
Note that an image name is optional - if that field is left blank then a random name will be generated for the image. The padding field specifies how many rows and columns of dead cells you want to appear around the edge of the pattern in the image.
Saving static images (via querystring)
This method allows you to create static images without actually loading the applet at all. To create an image, simply visit www.conwaylife.com/image.aspx and append some of the following querystring parameters. Examples of their use are provided further down.
|bc||FFFFFF (white)||The background color in HTML hexadecimal format.|
|cc||000000 (black)||The cell color in HTML hexadecimal format.|
|format||png||The file format of the image to be produced. Acceptable values are bmp, gif, and png.|
|gc||C0C0C0 (light gray)||The grid color in HTML hexadecimal format.|
|grid||Floor((ppc + 12) / 16)||The width of the grid lines.|
|h||The pattern's height||The height (in cells) of the pattern image, excluding any padding specified by the pad parameter.|
|name||Random name||The name of the image that will appear if you try to save it to your hard drive.|
|pad||1||The number of rows and columns of dead cells that should appear around the outer edge of the pattern.|
|ppc||8||The number of pixels per cell.|
|px||0||The X (horizontal) offset of the pattern, in pixels (must be between -ppc and +ppc). Compare xoff.|
|py||0||The Y (vertical) offset of the pattern, in pixels (must be between -ppc and +ppc). Compare yoff.|
|rle||b (empty pattern)||An RLE encoding of a pattern.|
|shape||s (square)||The shape that the cells should be. Acceptable values are s (for square) and c (for circle).|
|w||The pattern's width||The width (in cells) of the pattern image, excluding any padding specified by the pad parameter.|
|xoff||0||The X (horizontal) offset of the pattern, in cells. An xoff value of 2 would shift the pattern to the right by 2 cells, for example. Compare px.|
|yoff||0||The Y (vertical) offset of the pattern, in cells. A yoff value of -1 would shift the pattern up by 1 cell, for example. Compare py.|
Some examples of how to make images via this querystring method follow. Note that any number of the querystring parameters can be specified and any that are omitted will use their default values.
|Pattern||URL and Description|
A simple example leaving most values at their default settings.
Specifying grid width, cell size, padding and image name.
Specifying custom colours, width and height.
Specifying x and y offsets, and turning the grid off.
Saving animated images
Animated images (animated GIFs, to be more specific) can be saved via the applet by selecting
Save -> Download Image
On the pop-up window that appears, change the file format to "Animated GIF (.gif)" to open up the animation options. For simple (non-moving) animations it is often sufficient to only specify the number of generations and leave the rest of the values at their default settings. For more complicated animations, refer to the following table for a description of what each setting does.
|Generations||The number of generations that your animation should run for. If making an animation of an oscillator or a spaceship, this should equal its period.|
|X Offset||The number of dead cells lying between the leftmost living cell of the pattern and the leftmost edge of the image in the initial generation. This can be useful to add larger padding around an animation or to take into account an oscillator with a changing bounding box. Its default value is 1.|
|Y Offset||The number of dead cells lying between the topmost living cell of the pattern and the topmost edge of the image in the initial generation. This can be useful to add larger padding around an animation or to take into account an oscillator with a changing bounding box. Its default value is 1.|
|X Panning||The number of cells to the right that the animation should move over the course of the animation. This is useful for making moving animations of spaceships. For example, for a lightweight spaceship moving to the right, you could set the number of generations to be 4 and the X Panning to be 2 (since it moves to the right 2 cells over the course of 4 generations).|
|Y Panning||The number of cells down that the animation should move over the course of the animation. This is useful for making moving animations of spaceships. For example, for a glider moving to the upper-right, you could set the number of generations to be 4, the X Panning to be 1, and the Y Panning to be -1 (since it moves up and to the right 1 cell over the course of 4 generations).|
|Width||The width (in cells) of the animation. The default value is the width of the current pattern plus two (to allow for some padding).|
|Height||The height (in cells) of the animation. The default value is the height of the current pattern plus two (to allow for some padding).|
Note that, as with static images created via the applet, all display settings currently active in the applet carry over to the created image. Similarly, the number of generations per second that you currently have selected will carry over to the animated image as well.