background preloader



My Processing Template Sketch Posted by Jan Vantomme on 29 November 2010. Tags: processing, teaching, workflow Processing makes it very easy to save your work in different formats. But writing the code to save movies, images and PDF files from the same sketch is boring. I’ve made a template sketch I can reuse so I don’t have to write this kind of code over and over again. template.pde Main template sketch.config.pde A configuration file with the directories to save images, PDF files, movies and the number of frames for the length of the movie.functions.pde Some functions to generate filenames for the PDF and video files. If you’re familiar with Processing, you should be able to figure out what everything in this sketch is doing. Main Template Most of the magic happens in the draw() method. I’m using the ANIMATION codec at LOSSLESS quality, Full HD so I usually end up with big video files. Configuration File bc. Functions getSketchName() returns a String with the name of the current sketch. User Interface Download

Les-Astuces / Processing Pour vous éviter certaines erreurs de base et aller plus loin dans l'utilisation de Processing, ce chapitre présente plusieurs astuces et morceaux de code qui permettent de résoudre une série de problèmes fréquemment rencontrés. N'hésitez pas à les utiliser dans vos programmes. Augmenter la mémoire Si vous créez des sketchs qui utilisent de la vidéo, de nombreuses images ou qui travaillent avec des données volumineuses, il peut arriver que votre programme génère une erreur pour cause de mémoire insuffisante. Voici l'erreur affichée par Processing dans la console. Pour résoudre ce problème, vous devez ouvrir les préférences de Processing et changer la quantité de mémoire allouée à votre sketch. Inverser la valeur d'un booléen (vrai/faux) Voici un mécanisme permettant d'inverser la valeur d'un booléen sans avoir à tester à l'aide de la condition if/ then si sa valeur est vraie ou fausse . Intervalomètre avec frameRate(), frameCount et modulo Créer une classe intervalomètre Quitter le programme

Three.js - examples Three.js Examples The goal of this collection is to provide a set of basic and instructive examples that introduce the various features in Three.js. The source code for each page contains detailed comments. Hosted at GitHub. Basic Examples • Hello World • Template • Info Box • Materials - Solid • Color Explorer • Wireframe • Lines and Dashed Lines • Helpers • Outline Effect • Face/Vertex Colors • Shapes • Extrusion • Text3D Texture Examples • Textures • Texture - Repeat • Texture - Text3D • Translucence • Shadow • Subdivision Modifier - Cube • SkyBox • Reflection • Refraction • Bubble • Texture from Canvas • Texture Animation Sprite Examples • Sprites • Sprite Text Labels • Labeled Geometry Mouse and Keyboard Examples • Mouse Sprite • Mouse Click • Mouse Hovering • Mouse Tooltip • Keyboard Events Camera/Renderer Examples • Mesh Movement • Chase Camera • Multiple Cameras • Camera to Texture • Viewports - Dual • Viewports - Quad • Embedded HTML • Red/Blue Anaglyph Shader Examples GUI Examples Helpers

Hemesh Part 2 | Free Art Bureau Evolution of shape /////////////////////////////////////////////////////////////////////// ——— HEMESH Library by Frederik Vanhoutte ————- ///////////////////////////////////////////////////////////////////////Frederik Vanhoutte’s website Source Code :Sketches ProcessingHemesh Library In the following examples, we are going to look at how we can implement key input with Hemesh to modify our shapes on the fly. It’s not really practical to have to re-execute code constantly when working with systems for exploring form. 10 of the 13 Archimedean Solids We are also going to discover some new shapes with our creator classes in HE_MESH. Open the sketch entitled A_key_interface_01. Various render methods In our next sketch, B_key_interface_02, there are a number of modifications to the structure of the code that are worthy of note. As for the modifiers used in this example, we’ve added HEM_Wireframe and the HEM_Twist class. Iterations of twisted shapes

Ruby Processing: May 2011 Here is the toxiclibs InflateMesh verlet physics example demonstrating winged mesh class functionality. Although this was a P3D sketch in the example it looks best using OPENGL. Because there is still an issue with linux and ruby-processing OPENGL at less than full_screen, I have scaled some of the variables in the sketch (mainly annotated I think), anyway you should probably look at the original (included in the library download toxiclibs-complete version 0020). # <p>This example uses the attraction behavior to inflate a 3D mesh.# The mesh vertices are re-created as physics particles and connected# using springs. Upon mouse press the inflation force is applied,# counteracting the forces created by the springs, causing the mesh to# expand and deform.</p># # <p>Usage: Click and hold mouse button to inflate mesh</p># attr_reader :physics, :inflate, :box, :gfx full_screen def setup setup_opengl @gfx = init_physics end

Toxiclibs explorations: 3D sketching app - Pepf's Blob import processing.opengl.*; import toxi.geom. import toxi.geom.mesh import toxi.volume import toxi.processing ToxiclibsSupport gfx; TriangleMesh mesh; VolumetricBrush brush; VolumetricSpace volume; IsoSurface surface; float yRot=0; float xRot=0; PFont myFont; float mapY, mapX,xPos,yPos,zPos; void setup() { size(600,600,OPENGL); noLoop(); gfx = new ToxiclibsSupport(this); volume = new VolumetricSpaceArray( new Vec3D(600,600,600), 50, 50, 50 ); surface = new ArrayIsoSurface( volume ); mesh = new TriangleMesh(); ellipseMode(CENTER); brush = new RoundBrush( volume, 50 ); myFont = createFont("Arial", 16); textFont(myFont); volume.closeSides(); surface.reset(); surface.computeSurfaceMesh( mesh, .1 ); void draw() { xPos = mapX*cos(yRot); yPos = mapX*sin(yRot); zPos = -mapY*sin(xRot); background(0); lights(); pushMatrix(); translate( width/2, height/2, 0); rotateY( yRot); rotateX( xRot); scale(1); fill(255); stroke(255,0,0); line(0,0,300,0); line(0,yPos,xPos,yPos); stroke(0,255,0); line(0,0,0,300); line(xPos,0,xPos,yPos); stroke(0,0,250);

Drawing a Cylinder with Processing Posted by Jan Vantomme on 10 December 2010. Tags: 3d, processing, teaching In this second article, I’m going to show you how you can create your own custom 3D shapes with Processing. You’ll learn how to draw a cylinder by using the beginShape(), endShape() and vertex() functions. A cylinder consists of a top, bottom and body. Bottom and top are usually circles, but in this case, we’ll write a function that will allow us to create shapes like hexagonal or octagonal cylinders. void drawCylinder(int sides, float r){ float angle = 360 / sides; beginShape(); for (int i = 0; i < sides; i++) { float x = cos( radians( i * angle ) ) * r; float y = sin( radians( i * angle ) ) * r; vertex( x, y ); } endShape(CLOSE);} The image below shows you how you this function can be used to draw a detailed circle with 30 vertices and other geometric shapes with less vertices. ! The code we have so far only draws the top of our cylinder. The last thing we need to do is draw the body of our cylinder. Download

Coding tutorials and books Awakening Our Truth | We are Spiritual Beings having a Human Experience, learning Unconditional Love in a story we call Life, it's an Illusion we create from One Mind Thinking #GodHome ~ Awakening Our Truth Project Shapeshifter Loris Gréaud au Louvre et à Pompidou : "J'engage tout ce que j'ai, mon énergie, mon corps et ma vie" - Les Inrocks : magazine et actualité culturelle en continu Le plasticien Loris Gréaud expose simultanément dans deux espaces parisiens symboliques : le forum du Centre Pompidou et sous la pyramide du musée du Louvre. Deux superproductions conçues par un admirateur de Lynch et de Burroughs. Un léger tremblement de terre dans la salle d'exposition, un stadium où s'affrontent des paintballers, un appartement fantôme dans Paris, un nanomusée, un concert de rap pour créatures des fonds marins : depuis son apparition dans le champ de l'art au milieu des années 2000, marquée notamment par sa première expo solo au Plateau en 2005 et surtout par l'exposition Cellar Door qui investit la totalité du Palais de Tokyo en 2008, l'artiste Loris Gréaud, 34 ans, est une figure étonnante du paysage artistique international. Travaillant au long cours sur des projets à la fois ambitieux et hermétiques, montant des superproductions expérimentales, des blockbusters conceptuels, il met le spectateur face à des énigmes, à des équations complexes. Et au Louvre ?

Projection map of the world | Центр геоинформационных исследований Polyconic projection of the Central Scientific Research Institute of Geodesy and Cartography Formulae are obtained in 1983 for the table of rectangular coordinates presented in the “Atlas for projection choice” by G.A.Ginsburg, T.D. Salmanova (Central Scientific Research Institute of Geodesy and Cartography professional paper 110, Moscow, 1957), N 72. The coordinates in the table correspond to the Earth radius 6371116 meters so rectangular coordinates must be multiplied by the ratio of a custom sphere radius to the radius from the Atlas. The projection is supported by the software GIS GeoGraph 2.0 (vector and raster maps transformation). The projection is symmetrical about the central meridian (Y axis on projection) or about the Equator (X axis on projection). Program for calculation of rectangular coordinates of points sets on the projections Formulae: M.

futurebird – mathematical sandbox Chapter 3 We stood in a verdant meadow filled with multicolor butterflies and flowering trees as the police man tried to wrestle the dying woman from my arms. "Look up!" I shouted. "You need help?" An older woman in a pink ladies summer suit was talking to the police man. "I don't know where the door went." The young man guided me to the cabin. "You are and alien and this is your home planet." The cabin was like those found upstate, small, with thin walls only suitable for the summer months, a jaunty stove pipe sticking from the roof. Inside, it was quite different (were all doors here as strange as that first portal?) "It must be doing something for the pain." Outside the shack an argument between the Upper East Side lady and the cop was reaching a crescendo. Our alien host (captor?) Relieved she slid back into the chair so that the repairs to her body could continue. But, the cop and the woman, were still coming. As they stepped through the threshold I saw them both cleanly sliced.