background preloader

Coding for processing

Facebook Twitter

Installing WordCram. Transparent canvas. Cube with button. Working as efficiently as possible. GLGraphics. Peasycam. Peasycam v201 A library by Jonathan Feinberg for the programming environment processing.

peasycam

Distributed under the Apache Public License, version 2.0. Last update, 04/09/2014. PeasyCam provides a dead-simple mouse-driven camera for Processing. Example PeasyCam camera; void setup() { camera = new PeasyCam(this, 0, 0, 0, 50); } That's it. The PeasyCam is positioned on a sphere whose radius is the given distance from the look-at point. PeasyCam is impervious to gimbal lock, and has no known "singularities" or discontinuities in its behavior. Thanks Useful bug reports and feature suggestions were provided by: Please let me know if I've forgotten to acknowledge you. Download Download peasycam version 201 in .zip format. Installation Unzip and put the extracted peasycam folder into the libraries folder of your processing sketches. Constructors. Processing-mobile/examples/twitter/blprnt-twitter-demo.html at master · processing-js/processing-mobile. Processing Tip: Rendering Large Amounts of Text… Fast!

I’ve been working on a project at the New York Times R&D Lab which involves rendering a fair amount of text to screen, which needs to be animated smoothly in real time.

Processing Tip: Rendering Large Amounts of Text… Fast!

I’ve never had much luck working with large amounts of text in Processing, using the traditional approach. But I’ve found a nice way using an external library and a old trick, which allows for the rendering of large amounts of text at high framerates (the image above shows 1000+ text blocks running at ~50fps on my two-year-old MacBook). How does it work? Well, let’s first talk about how we’d typically approach this problem. Because they need to be animated independently, each of the text blocks is a member of a custom Class. Here, I’ve barely added 200 objects, and the frame rate has crawled down to a measly 10fps. Blit it. The first part of the solution is to use an old-school technique called ‘blitting’. Here, we’ve got about 550 objects on the screen, at full framerate.

Let’s push it a little. GL Text Example (4kb) Andreas Schlegel, sojamo. Code. Wiki Pages - processing - An open source programming language and environment for creating images, animation, and interactions. Www.sojamo.de/libraries/drop/reference/ Processing GUI, controlP5. About controlP5 is a library written by Andreas Schlegel for the programming environment processing.

processing GUI, controlP5

Last update, 12/23/2012. ControlP5 is a GUI and controller library for processing that can be used in authoring, application, and applet mode. Controllers such as Sliders, Buttons, Toggles, Knobs, Textfields, RadioButtons, Checkboxes amongst others are easily added to a processing sketch. They can be arranged in separate control windows, and can be organized in tabs or groups. → read more. Installation Unzip and put the extracted controlP5 folder into the libraries folder of your processing sketches. Export to Applet The security regulations for applets are very high and strict, in order to make controlP5 work properly within an applet, you need to make fields and functions which are used by controlP5 public in your code.

Details. WebPlatform.org — Your Web, documented. Reingold-tilford algorithm. Bezier curves and mouse interaction in Processingjs. Demo here.

Bezier curves and mouse interaction in Processingjs

A lot has happened since last time, we now manage bezier curvature and mouse interaction. Since we now have interaction (out links will light up when we move the mouse over the site name in question) we can’t just quit in the middle of the draw function like we’ve done so far. To achieve our goal we therefore have to split things up, we need to set everything up and store all the information we need in the setup function. This information will now be used in the draw function. Let’s walk this stuff: A lot here can be recognized from the old draw function, new stuff is happening in the second each loop.

To set the control points up we first use the new original angle value which we saved in the first loop, with that value we can define a disc drawn at the very same angle the text is drawn, but further inside the circle (100 pixels). Finally we save all this information in a new object_links array, one object for each outgoing link. Related Posts. Loading JSON, rendering text and using the Processing JS API. Mouse clicks in Processingjs.