RSS Amplifier

Blog

Fun Programming

Creative coding video tutorials

funprogramming.orgRSS feed ↗10 posts

Latest posts

144. Drawing animated loops

By using an array of PGraphics, in this episode we draw looping flipbooks. The idea is simple: we have a constantly playing animation of 20 frames, and we are able to draw on it. When the mouse is pressed, our ink ends up in the current frame, whichever that is. The resulting effect is quite interesting. Once you have the program running, you can learn different drawing tricks, but I leave that to…

145. Export animation frames, convert to animgif using gifsicle

In this episode we add two features to the loop drawing program we created on the last one: export the loop as gif images and clear the animation to start with a new drawing. Both features are triggered by pressing different keys on the keyboard.As the animation is a 20 frame loop, it does not really matter when we start saving the frames, as long as we export exactly 20. An easy way to export the…

146. Let's make errors I (syntax and type)

This is one of those videos where we unfortunately don't do any amazing graphics. But we do something almost as fun: we provoke errors. I hope that by seeing errors happen you can identify them and fix them quickly when they happens to you.In part I we take a look at errors that happen when you misspell or forget something (syntax errors) and also at errors that happen when using the wrong…

147. Let's make errors II (nullPointerException, arrays, logic)

This is one of those videos where we unfortunately don't do any amazing graphics. But we do something almost as fun: we provoke errors. I hope that by seeing errors happen you can identify them and fix them quickly when they happens to you.In part II we take a look at nullPointeExceptions, which happen when you try to access a variable that has not been initialized. We also see what happens…

148. Drawing shapes with glow or shadow

By drawing the stroke of a shape multiple times with low opacity we can easily achieve glows and shadows. A simple concept that can produce good looking images. Here some examples: http://hamoid.tumblr.com/post/76579918775/84932-jpg-34758-jpg-and-49862-jpg-as-saved-byTip: the darkness of the shadow or glow should not decrease in a linear fashion (like 8, 6, 4, 2) or it will not look too real.…

149. Glowing SVG vector shape

In Processing you can easily load, display and manipulate vector images. Some advantages of vector images are: they often occupy little space on the hard drive, the can be enlarged without the result becoming pixelated, and there are tons of vector objects online which you can use in your programs. More about them: https://en.wikipedia.org/wiki/Vector_imageIn this episode I use Inkscape, a free…

150. Webcam light tracking and air drawing

This episode shows two things you can do with a webcam.The first one is tracking an object which is easy to distinguish from the background. We use brightness() to search for bright pixels, but you could also use red() to search for very red pixels, or one of the other functions that return color properties.At home at night this works very well. Doing this for an art installation is more tricky,…

151. Convert an image into a 3D grid of boxes

This episode is... long! I hope you can stay awake for 18 minutes :)In this episode I show you how you can create a grid of 3D cubes based on an input image. We use the brightness of each pixel in the image to set the size of each 3D cube in our grid.scale() is used to scale the scene up. The default is scale(1). If you want to make everything half the size, use scale(0.5). And to double the size…

152. Exporting 3D shapes as .obj files in Processing

This time we are taking the shape we created in episode 151 and exporting it as an .obj file. To achieve that we use the ObjExport Processing library. We also take a look at how to make code run only once even if it's inside the draw loop. That becomes useful to avoid exporting the .obj file over and over again. We only need the file once :)Processing by default offers a limited set of 3D…

153. Rendering Processing shapes in Blender

After the two previous episodes, in which we created a 3D shape in Proccesing and exported it as .obj file, we are ready to import that shape into Blender and render a realistic looking image.These are the steps we take to get our render ready:1. Import the .obj file into Blender2. Clean up the imported model by deleting a huge rectangle that somehow grew in one side. Maybe it was caused by using…