Skip to main content

command-driven drawing/visualization/animation/presentation tool

Project description

NAME

cellx - command-driven drawing/visualization/animation/presentation tool

SCREENSHOTS

  • DTN simulator visualization

screenshot

  • DTN simulator visualization with blurring

screenshot

  • CCN simulator visualization with blurring

screenshot

  • CCN simulator visualization with blurring and blue-yellow (#3) color map

screenshot

  • DFC-BP+ visualization

screenshot

  • DFC-BP+ visualization

screenshot

  • WSN simulator visualization

screenshot

  • Circuit-switching illustration (converted from PostScript)

screenshot

  • M/M/1 queue illustration (converted from PostScript)

screenshot

DESCRIPTION

This manual page documents cellx, a one-pass interpreter of the CELL language. CELL language is a simple line-oriented language for dynamic graphics drawing. cellx reads a source code written in the CELL language from the standard input or specified files. Every line in the source code is parsed and interpreted. The output is drawn on a window using SDL library via pygame module or sent to the standard output in the PostScript format.

CELL LANGUAGE COMMANDS

alpha (name|regexp) alpha
animate name (goal_x goal_y|name[(+|-)dx(+|-)dy])
attach name parent_name dx dy
color (name|regexp) color
define name bitmap file [(x y|name[(+|-)dx(+|-)dy])]
define name box [-f color] [width height color (x y|name[(+|-)dx(+|-)dy])]
define name ellipse [-f color] [rx ry color] [(x y|name[(+|-)dx(+|-)dy])]
define name line [-ht] sx sy dx dy [width color]
define name link src_name dst_name [width color]
define name polygon [-f color] [-r degree] n r [color (x y|name[(+|-)dx(+|-)dy])]
define name spline x1 y1 x2 y2 x3 y3 [width color]
define name text [-lcr] string [size color (x y|name[(+|-)dx(+|-)dy])]
define name wire [-ht] sx sy dx dy [width color]
display
fade (name|regexp)...
fix (name|regexp)...
hide (name|regexp)...
kill (name|regexp)...
move (name|regexp) (x y|name[(+|-)dx(+|-)dy])
palette symbol r g b [alpha]
play file
priority (name|regexp) level
resize (name|regexp) (x y|name[(+|-)dx(+|-)dy])
scale (name|regexp) ratio
shift (name|regexp) dx dy
sleep x
spring [-f filter] [-r degree] (name|regexp)... [x1 y1 x2 y2]
unhide (name|regexp)...
wait

EXAMPLES

Many examples are found in ex directory contained in the source archive.

  • M/M/1 queue:
#define font_size 20
#define packet_color gray80

#define add_note_above(name, str) \
define name##_note text str font_size white name+0-40

#define add_note_below(name, str) \
define name##_note text str font_size white name+0+40

#define create_slot(name) \
  define name box -f black 10 50 white

#define create_slot_at(name, pos) \
  create_slot(name) pos

#define create_customer(name) \
  define name box -f black 10 50 packet_color

#define create_customer_at(name, pos) \
  create_customer(name) pos

define server ellipse -f black 30 30 white
add_note_below(server, server) 
move server_note server+.02+.08

create_slot_at(b1, server-35+0)
create_slot_at(b2, b1-10+0)
create_slot_at(b3, b2-10+0)
create_slot_at(b4, b3-10+0)
create_slot_at(b5, b4-10+0)
add_note_below(b5, buffer)
move b5_note b5+0+.08

define lb line -h .25 .5 b5-10+0 undef 2 black
define la line -h server+30+0 undef .65 .5 2 black

create_customer_at(c1, .33 .44)
create_customer_at(c2, .36 .44)
create_customer_at(c3, .56 .44)
create_customer_at(c4, .62 .44)

add_note_above(c1, customer)

display
wait

INSTALLATION

pip3 install cellx

AVAILABILITY

The latest version of cellx is available at PyPI (https://pypi.org/project/cellx/) .

SEE ALSO

cell - CELL language interpreter for visualization using SDL/OpenGL/PostScript/AVI/PDF (http://www.lsnl.jp/~ohsaki/software/cell)

AUTHOR

Hiroyuki Ohsaki <ohsaki[atmark]lsnl.jp>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cellx-1.3.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

cellx-1.3-py3-none-any.whl (39.4 kB view details)

Uploaded Python 3

File details

Details for the file cellx-1.3.tar.gz.

File metadata

  • Download URL: cellx-1.3.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for cellx-1.3.tar.gz
Algorithm Hash digest
SHA256 814b3a784865c7ce82bb4069df0a650492c3a5de9eb4883cbcce8ec01c047f1a
MD5 6a82c70a4b030a3518516683b0aa3c68
BLAKE2b-256 ac7dd24a35575381a96ecb2df5f7f1f89b62556894ff2cc983ff7467674236fc

See more details on using hashes here.

File details

Details for the file cellx-1.3-py3-none-any.whl.

File metadata

  • Download URL: cellx-1.3-py3-none-any.whl
  • Upload date:
  • Size: 39.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for cellx-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2d83b00463c602b606bb167d9c965d56719a41f31c6ec3336d330e63c885a2dd
MD5 3f9b1e94bf0e4da8f7c750ba29a62520
BLAKE2b-256 73833c8e54012354d5c6de59b9aeb938e96a666291bf68d17c4776183d6c1776

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page