A number of the included breve demos have Stationary objects. The SwarmEvolve-1.0 simulation, for example, has this code:
floor = new Stationary.
floor register with-shape (new Cube init-with size (100, 2, 100)) at-location (0, -5, 0).
To get a disc shape, you'll want to use the class PolygonDisk, which is included in Shape.tz. No need to use CustomShape, as this is a standard built-in shape.
In that case, you'll replace the "Cube" creation above with something along the lines of:
new PolygonDisk init-with radius 5.0 sides 20 height 0.1.
Of course, you'll want to play with those parameters until you get the shape you're looking for.
Stationary
i dont know how to do a perfect disc but you could probably make a fairly good makeup of one with a custom shape.
Stationary
cheer NoZ
but how do i program a stationary - it is not explicit in the breve documentation.
is it just like a mobile? could anyone provide simple example code
sorry to be a burden
cheer again
gregger G
Stationary
A number of the included breve demos have Stationary objects. The SwarmEvolve-1.0 simulation, for example, has this code:
floor = new Stationary. floor register with-shape (new Cube init-with size (100, 2, 100)) at-location (0, -5, 0).To get a disc shape, you'll want to use the class PolygonDisk, which is included in Shape.tz. No need to use CustomShape, as this is a standard built-in shape.
In that case, you'll replace the "Cube" creation above with something along the lines of:
Of course, you'll want to play with those parameters until you get the shape you're looking for.
- jon
Stationary
cheer
it works!
cheer again
gregger G
Stationary
carrying on from gregger's theme...
are stationary objects completely passive?
i am wanting change their colour as i run from my simulation.
would it be better to us a non moving mobile?
thanks
t