the processing portfolio of
toxiclibs

member since February 9, 2010
PolarLines

PolarLines

PolarLines demo shows the difference between lines in normal cartesian and polar coordinate systems, where a line is actually a curve/spiral. Both "lines" are shown in parallel and the only difference is the order of the .toCartesian() conversion (either inside or outside the loop). Usage: move mouse to adjust line endpoint
MeshFaceExtrude

MeshFaceExtrude

Mesh face extrusion with toxiclibs-0019 or later. More info here: http://forum.processing.org/topic/toxiclibs-trianglemesh-question Usage: f - toggle filled/wireframe display a/d - move extruded face along X axis w/s - moved face along Y z/x - move face along Z
DashedDottedBox

DashedDottedBox

Example of using the Line3D's splitIntoSegments() method to create dashed or dotted lines. The demo also shows how to use the WETriangleMesh class to extract edges from a given mesh... Usage: Press any key to switch between dashed/dotted rendering
CrashTest

CrashTest

This example demonstrates the new winged-edge mesh structure in combination with the 3d verlet physics engine to simulate a crash test scenario. The winged-edge mesh provides connectivity information for each mesh vertex which is used to create a physical representation of the mesh and allows each vertex/particle to be connected with springs. Every frame the mesh vertices are updated to the position of their corresponding particle and due to the gravity in the space, the mesh is being deformed. Usage: Press 'r' to restart the simulation.
Polygon clipping

Polygon clipping

Demonstration of the Sutherland-Hodgeman polygon clipping algorithm part of the upcoming toxiclibscore-0019 release. Press any key to toggle clipping on/off
KuryeCloth

KuryeCloth

An adaptation of the SoftBodySquare demo to create a 3D cloth in a space with spherical obstacles and a solid ground box. This example was created during the Kurye Video Festival workshop on 2010-05-15 in Istanbul. Usage: r: reset simulation g: turn gouraud shading on/off s: turn sphere display on/off x: export current mesh as STL (only offline)
BoxFluid

BoxFluid

BoxFluid demo is combining 3D physics particles with the IsoSurface class to create an animated mesh with a fluid behaviour. The mesh is optionally created within a boundary sphere, but other forms can be created using a custom ParticleConstraint class. Key controls: w : wireframe on/off c : close sides on/off p : show particles only on/off b : turn bounding sphere on/off r : reset particles s : save current mesh as OBJ & STL format - / = : decrease/increase surface threshold/tightness
BoxConstraint

BoxConstraint

This demo demonstrates how to use a ParticleConstraint implementation to create box obstactles in the physical simulation space. Two boxes are defined and attached as constraint to each particle. The particles themselves are connected via springs to form a long string/thread with one of its ends anchored in space. The ParticleString class is used to create this string. Usage: Press 'r' to restart the simulation
DraggableParticles

DraggableParticles

Draggable particle demo shows how to handle mouse events on particles and allow them to be dragged around. See original discussion at: http://processing.org/discourse/yabb2/YaBB.pl?num=1266335586
SoftBodySquare

SoftBodySquare

Creates a 2D square mesh out of verlet particles and shows how to improve stability by including an inner skeleton to avoid total structural deformation... Usage: move mouse to drag/deform the square
PointOctree

PointOctree

PointOctree demo shows how to use this data structure to efficiently select and isolate particle-like objects within a defined neighbourhood from a much larger set of objects. Key controls: SPACE : add 100 more particles S : choose between sphere and bounding box culling O : toggle display of the octree structure - / + : adjust the size of the culling radius
GeometryInStyle

GeometryInStyle

The ToxiclibsSupport class of the toxi.processing package provides various shortcuts to directly use toxiclibs geometry datatypes with Processing style drawing operations. Most of these are demonstrated in this example.
ShiffmanFlocking3D

ShiffmanFlocking3D

Flocking by Daniel Shiffman Ported to 3D & toxiclibs by Karsten Schmidt The Nature of Code, Spring 2009 Demonstration of Craig Reynolds' "Flocking" behavior See: http://www.red3d.com/cwr/ Rules: Cohesion, Separation, Alignment Click mouse to add boids into the system
MeshAlignToAxis

MeshAlignToAxis

This example shows how to dynamically create a simple box mesh and align it with a given direction vector using the pointTowards() method of the TriangleMesh class.
ArcPolarCoordinates

ArcPolarCoordinates

Quick demo & test for working with 2D polar coordinates, interpolation and circle segments. Might be useful for some...
CircleTangentPoints

CircleTangentPoints

This simple example shows how to compute tangent points on a circle using the new Circle and Line2D classes. Furthermore, the demo shows how these points are constructed geometrically and how to use the ToxiclibsSupport class of the toxi.processing package to handle the drawing of these geometrical shapes. Usage: * move mouse to move/recalculate tangents * click+drag mouse to adjust circle radius
BiasedFloatRange

BiasedFloatRange

The toxi.util.datatypes package contains classes to work with ranges of numbers instead of fixed values. These classes are very helpful for picking randomized parameters throughout a larger application. There're also biased versions of these range types which impose a bell curve distribution of the randomly picked values, centred around the bias value. This demo interactively visualizes the behaviour of such a biased range. Usage: * move mouse horizontally to change bias value * move mouse vertically to adjust the standard deviation/strength of the bias
TerrainSteering

TerrainSteering

This demo shows a simple 2D car steering algorithm and how to easily align the car with the 3D terrain surface. The demo also features a third person camera, following the car and re-orienting itself towards the current direction of movement. Usage: use cursor keys to control car up: accelerate down: break left/right: steer
SphericalHarmonics

SphericalHarmonics

SphericalHarmonicsMeshBuilder demonstrates how to use the SurfaceMeshBuilder class in conjunction with a spherical harmonics function to dynamically create a variety of organic looking forms. The function is described in detail on Paul Bourke's website. Included is also a re-usable function for displaying a generic TriangleMesh instance using normal mapping. the display of surface normals useful for debug purposes. Usage: r: randomize spherical harmonics w: toggle wireframe on/off n: toggle normal vector display on/off s: save current mesh as STL file space: save screenshot
SuperEllipsoidMeshBuilder

SuperEllipsoidMeshBuilder

SuperEllipsoidMeshBuilder demonstrates how to use the SurfaceMeshBuilder class in conjunction with a SuperEllipsoid function to dynamically create a variety of useful geometric forms. The super ellipsoid is described in detail on Paul Bourke's website. In this demo 2 out-of-sync sine waves are used to animate the ellipsoid parameters. Included is also a re-usable function for displaying a generic TriangleMesh instance, incl. the display of surface normals useful for debug purposes. Usage: w: toggle wireframe on/off n: toggle normal vector display on/off s: save current mesh as ST
Additive waves

Additive waves

AdditiveWaves demo is showing how to add 2 randomly chosen waveforms to create a 3D terrain. One wave is moving along the X axis and is mapped to the red color channel, the other is propagating along Y and is mapped to blue. In this demo each wave's frequency is modulated by a secondary wave (here hardcoded as sine wave). Three of the possible waveforms chosen have additional options/special behaviour: AMFMSineWave also modulates the wave's overall amplitude on top of frequency modulation FMHarmonicSquareWave's shape can tweaked by adjusting the number of harmonics used (the higher the more