nluken + code   6

Modelbuilder update
I’ve updated the README for Modelbuilder on Github. It clarifies some issues regarding Processing 2.0 beta and the fact that unlekkerLib has been discontinued. Here is the full update:

Modelbuilder Readme, Feb 2013
Modelbuilder is a computational geometry library for Processing designed to help with parametric and generative modeling, while eliminitating complex and tedious tasks whenever possible.

Modelbuilder provides a set of object-oriented data structures and workflow metaphors (UVertexList define edges, UGeometry is used to generate and modify polygon meshes). The logic used is the familiar beginShape() / endShape() mechanism, optimized and abstracted to eliminate the need for tedious iteration through lists of vertices and faces etc.

Modelbuilder was first released in 2011 as part of my artist-in-residence project with Makerbot Industries, and the library is thus somewhat biased towards digital fabrication (3D printing, laser cutting etc.) My design priority has always been ease of coding rather than maximum realtime performance, but the library still has plenty of useful tools for realtime applications.

Users of my old library unlekkerLib should note that Modelbuilder replaces that library. Having both libraries installed will produce unresolvable conflicts. Modelbuilder does offers most of the same functionality, although with significant API changes. If there was something in unlekkerLib you need I suggest you open an issue on Modelbuilder and I will try to accommodate you.

Update for Processing 2.0 beta:
The code base in src is Processing 2.0b7 compatible, the compiled library is modelbuilder v0019 (not tested on Processing 2.0b8).

I’m still finding some issues using 2.0 for my own projects, so I will maintain code for 1.5.1 for a while longer. See see src-0151-compatible.

Modelbuilder as Swiss Army Knife
Somewhat limited in scope at its inception (i.e. 3D printing,) the library has since proven valuable as a teaching tool, especially for the shorter independent workshops I teach in New York. Consequently Modelbuilder has expanded in scope and become the code equivalent of a Swiss Army Knife, containing tools I find useful but hopefully avoiding outright feature bloat.

Some examples of secondary functions:

Color palette generation (UColorTool)
File saving and parsing (UIO, UDataText, UFileNode and ULogUtil)
FFT code with automatic damping and peak following for use in animation and sound-responsive applications.

With the final jump to Processing 2.0 I plan to do some much needed house-cleaning, making the code a little more consistent and changing some of the underlying design. This will likely come at the cost of some loss of backwards compatibility. Eggs and omelettes, etc.

Marius Watz, Feb 2013
Code  Libraries  Open_source  Processing_/_Java  library  modelbuilder  processing.org  unlekkerlib  from google
february 2013 by nluken
Awesome Universe of Creative Coding, Explained in Five Minutes [Video]
“What’s creative coding?”

At last, we have a five-minute video that, in rapid-cut wonder, explains the answer to lay people – and can be a serious dose of inspirational adrenaline to people doing it. (If designers and artists had locker rooms, watching this before tackling that next Processing tutorial might be in order.) Cover the big three of open-source, free-software toolkits for artists – Processing, OpenFrameworks, and Cinder – and showing everything you can do with them (from big-screen video walls to generative fashion), the video has nearly all the bases covered.

In fact, the only thing missing is you: as Dan Shiffman points out, it’s the contributions from the community that make these things work, and the incalculable number of students and artists learning now who will be the stars of this video in short order.

Lisa Romagnoli, Associate Producer of PBS’ Off Book, sends in the video to CDM.

(Those of you who aren’t from the USA, PBS is public broadcasting in the United States. Unlike most public media in the world, it receives only a sliver of its funding from the state; in a unique arrangement long before the age of Kickstarter, it has been funded largely by viewers, which gives it a uniquely-independent focus that I find inspiring as a Web publisher. It’s a non-profit, non-governmental network collectively owned by stations.)

Lisa describes the segment:

Programming plays a huge role in the world that surrounds us, and though its uses are often purely functional, there is a growing community of artists who use the language of code as their medium. Their work includes everything from computer generated art to elaborate interactive installations, all with the goal of expanding our sense of what is possible with digital tools. To simplify the coding process, several platforms and libraries have been assembled to allow coders to cut through the nitty-gritty of programming and focus on the creative aspects of the project. These platforms all share a strong open source philosophy that encourages growth and experimentation, creating a rich community of artists that share their strategies and work with unprecedented openness.

As for the series, “Off Book is a web series from PBS that explores cutting edge art, the artists that make it and the people that share it online.”

Side note: we need more people using Cinder, so it doesn’t auto-complete to Cinderella. (Why grow up to be a bland princess or Prince Charming when you can grow up to be a coding queen or emperor of data? And yes, you can still go to the ball – you’ll just use generative tech to produce both the visuals and your outfit.)

Now, send this to your family, friends, and anyone else who doesn’t know what the heck it is we mean when we say creative coding.
News  C++  cinder  code  computer-vision  creative-coding  dan-shiffman  free-software  generative  java  open-frameworks  open-source  pbs  processing  processing.org  programming  united-states  usa  videos  vision  from google
january 2013 by nluken
Modelbuilder getting some play
Amanda Ghassaei: 3D printed record created with Modelbuilder

This made my week: Amanda Ghassaei posted an awesome Instructable showing how to use my Modelbuilder library to 3D print phonorecords (aka vinyl aka discs encoding sound signals – weird, I know.) Her post has gotten a lot of well-deserved press all over (from Boing Boing to The Verge), and you can find some sample STL files on Pirate Bay although currently there are no seeders for thosee torrents.

Ghassaei provides the code to try it for yourself, although without access to an Objet or a similar high-level 3D printer your mileage might vary. I suspect the process could be reproduced on a lo-fi printer like RepRap or Makerbot given some experimentation, although likely with a further loss of sound quality. If you want guaranteed success this Instructable detailing how to make discs for the Fisher Price toy record player might be of interest. The instructions describe using a CNC mill but the STL files should be easy enough to print on a Makerbot Replicator.

Modelbuilder is currently being upgraded to Processing 2.0 in time for the final release of Processing 2.0. My aim is to eliminate inconsistencies in the library in the process, so please email me (marius at mariuswatz dot com) with requests or bug reports.
Code  Libraries  Open_source  Processing_/_Java  3d  modelbuilder  processing.org  from google
december 2012 by nluken
Animation: UTimer demo
Screenshot: UTimerDemo.pde

I just posted a demo of the unlekker.util.UTimer class in Modelbuilder on OpenProcessing.org. The example was created for a recent workshop, but I figured it might be worth sharing since UTimer is not exactly well-documented in the current Modelbuilder.

Basically, the demo shows how UTimer can be used to to animate individual objects as well as global behaviors according to a global timeline. The demo is nothing special in terms of visuals, but the underlying methodology can be very useful when creating animations that unfold over a given time interval (especially for rendered videos etc.) Since Processing lacks a timeline metaphor it’s sometimes necessary to simulate one, and while UTimer is by no means a particularly complex piece of code it does present one option.

UTimer allows you to control timed behavior where a local time t=[0..1] is calculated from a global time T=[0..1]. By specifying a UTimer instance with a local start time (tStart) and local duration (tDur) so that (tStart+tDur)<1, the current local time can be calculated using UTimer.update(globalT). If local time < 0 the object is not active yet, if local time >1 the object is “dead”.

A typical use case would be to have multiple objects appearing at various times, animating for a given interval and then “dying”. That is exactly the behavior demonstrated by the sample I’ve posted.

One drawback of the way UTimer currently works is that it only works with fractional time and not actual frame counts. That makes it easy to describe actions as a fraction of total time, but if the actual duration of an animation is changed the local rate of change will scale accordingly. Sometimes that’s appropriate, but there are cases one might want to specify duration in terms of absolute frame count so that rate of change (or duration of a behavior) is kept constant. That’s especially true when working with constant frame rates.

A workaround would be to calculate local duration (tDur) as a fraction of total frame count. I.e. if total frame count is 2000 and a local behavior should occur over 300 frames tDur = 300/2000 = 0.15. It is worth noting, however, that the fractional logic can allow you to produce quick motion previews at a reduced frame rate. If a given animation is supposed to be 60 seconds long, a video exported at 5 fps can give a good idea of motion as long as you correctly calculate the global T and export the video with the correct frame rate.

This kind of preview can be done automatically if only fractional time is used, simply change the number of total frames and set the frame rate accordingly.
Code  Libraries  Processing_/_Java  Workshops  animation  modelbuilder  processing.org  timeline  from google
november 2012 by nluken
Mozilla Thimble Teaches You HTML and CSS with a Side-by-Side HTML Editor [Learn To Code]
We recently told you about Mozilla's new Webmaker projects that teach you how to code, and the first one is ready for a test drive right now. Thimble is an easy to use, in-browser HTML editor that shows you the finished product right alongside your code, so you can learn as you go. More »
Learn_to_code  code  Development  Free  HTML  Learning  Mozilla  News  Teach_Yourself  Top  web_development  Webapps  from google
may 2012 by nluken
repl.it
repl.it is an online environment for interactively exploring programming languages. Supported languages.
code  javascript  lua  programming  python  qbasic  replit  ruby  scheme  from google
september 2011 by nluken

Copy this bookmark:



description:


tags: