The Jellyfish VM is now running in fluxus on android – a kind of executable rendering primitive which defines it’s form (a 3D triangle list) in the same place as it’s behaviour (a vector processing program), in the primitive’s data array.
This provides a 3D procedural modelling VM loosely inspired by the Playstation 2 which is much faster than interpreting scheme (or Java) on ARM devices like android. There are also possibilities for genetic programming or touch based programming interfaces just like Betablocker DS (think 3D animation rather than music).
Triangles are written to by de-referencing a register that defines the start of the model data, which exists in program memory. It can be programmed with raw vectors for each instruction, and right now the VM is run for 10 cycles for each frame, although this will be configurable “in the future”. Here is a simple program that was used to make the screenshots:
(define jelly (build-jellyfish)) (with-primitive jelly (program-jellyfish (list ; data (vector 0 0 0) ; time (increases by 1 each loop) (vector 2 2 -3) ; shuffle data for converting (x y z) -> (z z x) ; code follows to build a vertex by rotation around an angle based on time (vector LDA 0 0) ; load current time from address 0 (vector LDL 135.3 0) ; load value 135.3 (angle in degrees) (vector MUL 0 0) ; multiply time by angle (vector SIN 0 0) ; makes (sin(angle) cos(angle) 0) ; make a spiral by scaling up with time (vector LDA 0 0) ; load time again (vector LDL 0.05 0) ; load 0.05 (vector MUL 0 0) ; multiply to get time*0.05 (vector MUL 0 0) ; mul rotation vector by time*0.05 ; move backward in z so we get some depth (vector LDA 0 0) ; load the time again (vector LDL 0.03) ; load 0.03 (vector MUL 0 0) ; multiply the time by 0.01 (vector LDA 1 0) ; load the shuffle vec from address 1 (vector SHF 0 0) ; shuffle the x to z position (vector ADD 0 0) ; add (0 0 x) to set z on current position (vector STI 0 REG_MDL) ; write position to model memory registers ; increment the index by 1 (vector LDA 0 0) ; load address (vector LDL 1 0) ; load inc (vector ADD 0 0) ; add them together (vector STA 0 0) ; store at address loc (vector JMP 2 0)))) ; goto 2
Leave a Reply to Timothy Capelle Cancel reply