Brownian Motion App

Brownian Motion Simulation demonstrates the phenomenon of brownian motion, where microscopic particles display a random walk due to molecular collisions. For instance, particles suspended in liquid move due to random collisions by water molecules that are in constant motion.

The Brownian Motion Simulation script was coded in Python and Pygame. To run in the web browser, the script was compiled to JavaScript with Transcrypt and the Pyjsdl-ts library.
Read More »

Posted in Biology, Programming | Leave a comment

Biomorph Evolve App

Biomorph Evolve is a computer simulation of biomorph evolution. A biomorph is a form that resembles a living organism. The simulation derives altered biomorph morphology due to an evolutionary process. The program is an implementation of Richard Dawkins' Blind Watchmaker algorithm discussed in his book The Blind Watchmaker and his article The Evolution of Evolvability in Artificial Life. The biomorph morphology is under control of a number of genes and undergo random mutation to derive altered biomorph progeny.
Read More »

Posted in Artificial Life, Biology, Programming | Leave a comment

Usage of Pyjsdl with Transcrypt

The Pyjsdl library in the Pyjsdl-ts package is a port of Pyjsdl to work with Transcrypt. Pyjsdl permit scripts coded in Python/Pygame to compile to JavaScript for online deployment. Pyjsdl is modelled on the Pygame commands that wraps JavaScript API providing the multimedia functionality. The post describes the process to convert the Draw Pad script to an app for online deployment.
Read More »

Posted in Programming | Tagged , , , , | Leave a comment

Transcrypt Port of Pyjsdl

The Pyjsdl-ts library permits scripts coded in Python and Pygame to compile to JavaScript using the Transcrypt Python-to-JavaScript compiler. It is coded in Python that wraps JavaScript API for online deployment of web browser applications. The library is a port of Pyjsdl for Transcrypt that compiles Python 3 code to efficient JavaScript. The library is available on the Pyjsdl-ts project page and used to compile the following demo.
Read More »

Posted in Programming | Tagged , , , , | Leave a comment

Interphase: Cross-platform GUI Module

Interphase is a Python module designed to provide a graphics user interface (GUI) to Pygame applications. Two of my other projects provide Pygame functionality to additional platforms, including PyJ2D for the Java environment and Pyjsdl for the JavaScript environment. Since a dependency of Interphase is Pygame, the module is compatible with the PyJ2D and Pyjsdl libraries, permitting the programming of cross-platform applications with GUI interface coded with Interphase.
Read More »

Posted in Programming | Tagged , , , , | Leave a comment

Guide to Pyjs and Pyjsdl

These notes provide instructions on the use of Pyjs with Pyjsdl, which were tested on Linux and Win7 systems.
Read More »

Posted in Programming | Tagged , , , , , | 32 Responses

Pyjsdl Demo Apps

The apps on this page were coded in Python and Pygame. They were derived from the Pygame examples included in Pygame distribution. The first app is the Chimp example that is also used in a Pygame tutorial.
Read More »

Posted in Programming | Tagged , , , , , , , | 2 Responses

Compile Apps with Pyjs and Pyjsdl

Pyjsdl implements Pygame through JavaScript functionality permitting porting Python/Pygame apps to the Web browser as JavaScript/HTML5 apps via Pyjs compilation. This post provides some additional details required to port the app, supplementing a previous post. The following app was deployed from Serpent Duel script, and runs with Python and Pygame, on JVM with Jython and PyJ2D, and in the Web browser with Pyjs compilation and Pyjsdl.
Read More »

Posted in Programming | Tagged , , , , , | 9 Responses

Deploy JavaScript Application Using Pyjsdl

The Pyjsdl module is modelled on Pygame/SDL methods that wraps JavaScript functionality including HTML5 canvas. The module permits scripts coded in Python/Pygame to compile to JavaScript using the Pyjs compiler, allowing deployment of JavaScript applications without extensive editing of the script.
Read More »

Posted in Programming | Tagged , , , , , | 26 Responses

Pyjsdl: Python-to-JavaScript Module

The Pyjsdl module is modelled on Pygame/SDL designed to permit scripts coded in Python programming language and Pygame multimedia library to compile to JavaScript using the Pyjs compiler. The module is coded in Python that wraps JavaScript libraries and harnesses the HTML5 canvas for deployment of web browser 2D applications. It was derived from my PyJ2D project, and currently supports a subset of Pygame functionality. The module is available on the Pyjsdl project page, and used to compile the following JavaScript demo.
Read More »

Posted in Programming | Tagged , , , , , | Leave a comment

Applet Deployment Using PyJ2D

The PyJ2D module permits scripts coded in Python programming language and the Pygame module to run in the Java virtual machine (JVM) using the Jython interpreter. PyJ2D wraps several Java libraries including the Java 2D graphics library to emulate Pygame functionality. Information about PyJ2D can be obtained on the PyJ2D project page, the PyJ2D documentation, and the PyJ2D: Python-Java2D Applet post. I have used PyJ2D to create some applets of my projects, and will describe the method used to create them.
Read More »

Posted in Programming | Tagged , , , , | Comments closed

PyJ2D: Python-Java2D Applet

PyJ2D is a module designed with the intent to allow scripts coded in Python programming language and the Pygame module to run in the Java virtual machine (JVM). Python programs can run in the JVM using Jython, a Java-encoded Python interpreter that includes much of the standard library and can access the Java library. My projects are coded in Python and Pygame, and I hoped to be able to execute them online as an applet. However, since Pygame is a wrapper of the SDL multimedia library coded in C language, it cannot execute in the JVM. I wrote the PyJ2D module in Python code that essentially is a wrapper of several Java libraries including Java 2D graphics library, and modelled after the Pygame library to maintain Pygame statements. The following Java applet is a demo of Serpent Duel included in my Interphase Pack that is coded in Python/Pygame using the PyJ2D module:
Read More »

Posted in Programming | Tagged , , , , | Leave a comment