code – metabiosis http://metabiosis.kuri.mu Dependence of one organism on another for the preparation of an environment in which it can live. Tue, 04 Nov 2014 15:40:59 +0000 en-US hourly 1 https://wordpress.org/?v=4.4.2 Dot Matrix patterns http://metabiosis.kuri.mu/2008/03/25/dot-matrix-patterns/ http://metabiosis.kuri.mu/2008/03/25/dot-matrix-patterns/#respond Tue, 25 Mar 2008 00:18:32 +0000 http://metabiosis.goto10.org/2008/03/25/dot-matrix-patterns/ In “hello process”, each iteration, through all the small bits of FORTH code inside the block file image, is visualized as one line of graphics on paper from the dot matrix printer. These graphics are not generated as an image and sent to the printer, but instead are directly using the 8-pin graphics mode of the printer.

In this case, each of the eight bits in a byte of data sent to the printer corresponds to one pin on the printhead. A bit’s value can be either 1 or 0. When the printer receives the data, it interprets a bit with a value of 1 as a command to fire the corresponding pin. Bits that are set to 0 don’t cause pins to fire.

Each block code will end up with its own “byte ID” so it can be visualized and identified on paper in the graphics line. But before getting there, a few tests have been done to try different bit combos and select the generators the most aesthetically pleasing for us :)

Dot Matrix patterns 6Dot Matrix patterns 2Dot Matrix patterns 3Dot Matrix patterns 7

Below, one of the small quick and dirty shell scripts used to quickly test different patterns:

#!/bin/sh
# OKI 320 ML tests
# this test is to generate (crap) random 8 pin mode patterns
#PRNG
function rand {
echo "obase=8;`expr $RANDOM % 256`" | bc
}
function randpat {
n=1
while [ $n -le 256 ]; do
RND=`rand`
echo -ne '\'$RND
n=$((n+1))
done
}
PATTERN=`randpat`
# noise
# PATTERN2=`head /dev/urandom -c 1024`
echo -e '^[@^[5^[9^[*1\4'$PATTERN'^[@' | lp -o raw

Dot Matrix patterns 5Dot Matrix patterns 1Dot Matrix patterns 4Dot Matrix patterns 8

]]>
http://metabiosis.kuri.mu/2008/03/25/dot-matrix-patterns/feed/ 0
touch me, touch me http://metabiosis.kuri.mu/2007/06/11/touch-me-touch-me/ http://metabiosis.kuri.mu/2007/06/11/touch-me-touch-me/#comments Mon, 11 Jun 2007 14:33:43 +0000 http://metabiosis.goto10.org/2007/06/11/touch-me-touch-me/ The software part of pond is almost ready and we’re now mounting all the bits and pieces together including the touch screens. Everything is working fine but we had a bit of troubles with the serial touchscreen, even though it is supposed to be working on Xorg, the calibration software provided by penmount is really outdated and produce bogus data.

touchscreen-1-640×480.pngtouchscreen-2-640×480.pngtouchscreen-3-640×480.pngtouchscreen-4-640×480.png

Not to mention the impossibility to store the calibration settings on the firmware (only windows apparently…) so everything needs to be stored directly in the xorg.conf file. The free xorg input driver works I think, as it read from /dev/ttyS0 and translate the data in X11 events, but not the right events unfortunately. Because we could not find any documentation on the calibration settings, it is also virtually impossible to manually configure the driver.

Fortunately, tom came up with a cool hack, so now we read directly from /dev/ttyS0 by calling a pseudo driver that just filter out the unwanted hexadecimal crap and translate it correctly. The calibration is simply done within PF. In the end this solution is even more elegant than using the xorg driver and reading the X11 events from PF.

And yes it feels nice to play with the little thingies on the screen.

]]>
http://metabiosis.kuri.mu/2007/06/11/touch-me-touch-me/feed/ 1
jumping http://metabiosis.kuri.mu/2006/10/26/jumping/ http://metabiosis.kuri.mu/2006/10/26/jumping/#respond Thu, 26 Oct 2006 19:25:38 +0000 http://metabiosis.goto10.org/2006/10/26/jumping/ We’ve now implemented the jumping of datapackets from one ecosystem to the next. We have also been working on the visualisation of the process. Newborn packets are surrounded by a circle, fertile packets glow and dying packets fade… We will continue to work on the visualisation and networking of the ecosystems.

jumping-1.pngjumping-2.pngjumping-3.pngjumping-4.png

]]>
http://metabiosis.kuri.mu/2006/10/26/jumping/feed/ 0
implemented shape generator http://metabiosis.kuri.mu/2006/10/20/implemented-shape-generator/ http://metabiosis.kuri.mu/2006/10/20/implemented-shape-generator/#respond Fri, 20 Oct 2006 17:25:21 +0000 http://metabiosis.goto10.org/2006/10/20/implemented-shape-generator/ In our “go forth & *” software, we’ve now implemented the previously mentioned shapegenerator. We also introduced fertility cycles, reproduction and the prevention of over- and underpopulation. Our next step is making the packets jump from one ecosystem to the next.

ecosystem-1.pngecosystem-2.pngecosystem-3.pngecosystem-4.png

]]>
http://metabiosis.kuri.mu/2006/10/20/implemented-shape-generator/feed/ 0
Miniphy http://metabiosis.kuri.mu/2006/09/20/miniphy/ http://metabiosis.kuri.mu/2006/09/20/miniphy/#comments Wed, 20 Sep 2006 15:35:58 +0000 http://metabiosis.goto10.org/2006/09/20/miniphy/ Miniphy is a Packet Forth words library that provides various simple math shortcuts and handy functions that can be useful to handle simple 2D vectors.

simplephy-1.pngsimplephy-2.pngsimplephy-3.pngsimplephy-4.png

While working on “go forth & *” it became obvious to avoid as much as possible buillt-in components and prefer generic libraries that can live outside of the project itself for later use and better code structure.

At the moment miniphy is the first of those metabiosis Forth libs to have made its way out of the main project and will be kept synced with it for later fixes and improvements. Future version will in priority implement double space geometry for 2D vectors and later 3D vectors (higher dimensions are also considered but will be probably live next to the n-dimension multigrid tool instead).

Miniphy comes with simple examples that show how to use it for autonomous agents.
You can grab miniphy here: http://devel.goto10.org/

]]>
http://metabiosis.kuri.mu/2006/09/20/miniphy/feed/ 8
shape generator http://metabiosis.kuri.mu/2006/09/07/shape-generator/ http://metabiosis.kuri.mu/2006/09/07/shape-generator/#respond Thu, 07 Sep 2006 12:22:23 +0000 http://metabiosis.goto10.org/2006/09/07/shape-generator/ To give each packet of data its own personality and shape, i’ve made a shape generating script in PF. The shape is determined by the packets “DNA”. In this script the DNA consists of 4 random numbers between 0 and 9, linked to the following characteristics: sociability, speed, reproductivity and love for travelling. Some packets will hate to travel, are super slow, but very social, others are incredibly fast, non-reproductive and totally asocial…
The code can be found here: http://devel.goto10.org

]]>
http://metabiosis.kuri.mu/2006/09/07/shape-generator/feed/ 0
Lsystems and Pure Data http://metabiosis.kuri.mu/2006/09/07/lsystems-and-puredata/ http://metabiosis.kuri.mu/2006/09/07/lsystems-and-puredata/#respond Thu, 07 Sep 2006 10:44:00 +0000 http://metabiosis.goto10.org/2006/09/07/lsystems-and-puredata/ For the workshop Go Forth! during Futuresonic festival in Manchester, I made a little example of how to hook Packet Forth to Pure Data using OSC. The PF part is an Lsystem that draws lines, step by step, growing into a little chaotic cluster. The PD part receives the string that generates the lines and interprets the numbers turning them into sound.

lsys-osc-7.pnglsys-osc-3.pnglsys-osc-2.pnglsys-osc-1.png

The code (together with all Go Forth! PF workshop material) can be found here: http://devel.goto10.org

]]>
http://metabiosis.kuri.mu/2006/09/07/lsystems-and-puredata/feed/ 0
Lsystems in pf http://metabiosis.kuri.mu/2006/09/05/testing/ http://metabiosis.kuri.mu/2006/09/05/testing/#respond Tue, 05 Sep 2006 18:28:11 +0000 http://metabiosis.goto10.org/2006/09/05/testing/ Recently I read some things about Lsystems and started building one in Packet Forth. L-systems are a mathematical formalism proposed by Aristid Lindenmayer in 1968 as a foundation for an axiomatic theory of biological development. The system I wrote works like any other Lsystem. It takes a seed and a rule on how to grow from that seed. It is a string rewriting system based on cell divisions in multicellular organisms such as plants. For instance: you start with a seed : A. The rule you use for rewriting is A -> ABA. You can now apply the rule to the seed to create a new string: ABA, and reaply the rule: ABABABA, and so on. Each item in the string is used as directions for a turtle, who visualizes the string. My system produces strings of numbers 0 to 6, interpreted by the turtle as left, right, forward, backward, stop, push and pop. The push and pop make it possible to create branches.

lsys-osc-5.pnglsys-osc-8.pnglsys-osc-6.pnglsys-osc-4.png

The code can be found on: http://devel.goto10.org

]]>
http://metabiosis.kuri.mu/2006/09/05/testing/feed/ 0