Monday, 12 January 2009
Funny Bees
Many thanks to all of you who sent me images of flies for my demo. In the end I coded a bumble-bee myself - as I wanted to have the program self contained. A bee is made out of 6 Ellipses, 5 Circles and a small triangle (for the 'stinger').
They look nowhere near as good as your PNG and GIFs but they do animate and they make me laugh!
Check out the full screen version at www.javaimage.co.uk/animatedflowersandbees.html
Sunday, 4 January 2009
Wall Paper Images and Processing Server
I've been inspired by Mike Taperell's flower wall paper images, having a go myself (see image above). I think my attempts are somewhat 'cold'and 'digital'. I wonder what Mr Morris would think?
Set up a new Server for my processing PApplets. www.javaimage.co.uk -
I think the animation Papplet 'flower.html (www.javaimage.co.uk/flower.html) - is far too big for my chapter - so have simplified it to show static flower with a 'hovering' fly.
Have a peek at www.javaimage.co.uk/fly.html Anyone out there fancy making up a bumble bee out of a few ellipses?
When you are viewing the fly PApplet - click on the display with your mouse and hit the 'P' key to view the fly's flight path.
Thursday, 1 January 2009
PApplet Ready Setup
Woah Boy! Is this image animating without the aid of a Java VM?
I noticed I had a slight problem when exporting (file/export) my processing code to run as a PApplet. I wanted to have one code base to run as an application and a PApplet.
When running as an applet I wanted the canvas dimensions to come from the parameters 'width' and 'height' found in the HTML source. The following hack (catching exceptions) worked out nicely.
View Petal Demo @ http://www.javaimage.co.uk/flower.html
// Example Setup
string mode ;
float CX,CY ;
int displayHeight,displayWidth ;
void setup()
{
mode = JAVA2D ;
try {
displayHeight =
Integer.parseInt(getParameter("height")) ;
displayWidth =
Integer.parseInt(getParameter("width")) ;
} catch (Exception e){
displayHeight = 3*screen.height/4 ;
displayWidth = 3*screen.width/4 ;
}
CX = displayWidth / 2 ;
CY = displayHeight / 2 ;
size(displayWidth, displayHeight,mode);
loop() ;
}
Subscribe to:
Posts (Atom)