Circle
objects are meant to be representative of any object in your simulated world. They could represent a spherical object such as a planet or a ball, but could also represent any object, as long as it serves your purpose of simply representing the position of the object.Circle
is probably the object that you are going to use.Circle
object is created and placed in the virtual world at the position of x = 0 and y = 0 with a default radius of 10 and a default color.{
and }
. The text in between these curly braces is a list of name and value pairs that define the attributes of the Circle
object. There a number of these attributes that can be set or changed in your simulation:pos
— The initial position of your Circle
in [X,Y]
coordinates.radius
— The radius of the circle that is drawn in the World View to represent this particle.color
— The circle will be drawn in this color. Use HTML colors e.g. "#ff3300", "blue".image
— A URL that identifies a JPEG, GIF, SVG or PNG image.opacity
— The circle will be drawn with an opacity between 1 and 0, representing 100% opaque to 100% transparent.visible
— The circle can be hidden from view by setting this flag to false
. motion_map
— This flag tells Tychos to attach a series of strobe images called a motion map.label
- You can attach a label to the Circle
object by indicating a the text
and color
of the label. Circle
object when you create one:Circle
object by referencing its "pos" attribute. This is done by using a common computer science notation called "dot" notation. Its quite easy:Rectangle
object is another Tychos object that you can use to represent of an object in your simulated world. They could represent objects such as a box, or a table top, but could also represent any object. The big difference between a Rectangle
object and a Circle
object is that Rectangle
objects have a length and a width rather than a radius. Rectangle
object is probably the object that you are going to use.Rectangle
object in the simulation, once again you need to first identify a valid variable name to store the reference to the object. Just like with the the Circle
object, you create a Rectangle
object by assigning the variable to the result of a command that invokes or essentially brings the Rectangle
object into existence:Rectangle
object is created and placed in the virtual world at the position of x = 0 and y = 0 with a default length and width of 5 and 5.Rectangle
object a width (or X size value) and length (or Y size value).pos
— The initial position of your Rectangle
in [X,Y]
coordinates.size
— The width and height of the Rectangle
that is drawn in the World View to represent this particle.color
— The Rectangle
will be drawn in this color. Use HTML colors e.g. "#ff3300", "blue".image
— A URL that identifies a JPEG, GIF, SVG or PNG image.opacity
— The Rectangle
will be drawn with an opacity between 1 and 0, representing 100% opaque to 100% transparent.visible
— The Rectangle
can be hidden from view by setting this flag to false
. motion_map
— This flag tells Tychos to attach a series of strobe images called a motion map.label
- You can attach a label to the Rectangle
object by indicating a the text
and color
of the label. .image
attribute like this:size
defined in either the radius
attribute or the size attribute of the object.