diff --git a/.classpath b/.classpath index 3883739d..59e74239 100644 --- a/.classpath +++ b/.classpath @@ -13,9 +13,7 @@ - - @@ -37,5 +35,7 @@ + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..7f793a39 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/bin/ +/dist/ +/docs/ diff --git a/ant/versions.properties b/ant/versions.properties index c3c06142..79090cef 100644 --- a/ant/versions.properties +++ b/ant/versions.properties @@ -1,7 +1,7 @@ #Wed Feb 10 02:48:40 GMT 2010 version.audio=0008 version.color=0010 -version.core=0021 +version.core=0022 version.data=0002 version.image=0001 version.p5=0004 diff --git a/examples/color/Theme/Theme.pde b/examples/color/Theme/Theme.pde index a84ad48c..1686d355 100644 --- a/examples/color/Theme/Theme.pde +++ b/examples/color/Theme/Theme.pde @@ -80,9 +80,10 @@ void drawSpline(ColorList list) { points[i]=new Vec2D(random(-1,1)*50+(float)i/points.length*width,random(0.25,0.75)*height); } points[points.length-1]=new Vec2D(width+XRAD,random(height)); - List vertices=new Spline2D(points).computeVertices(width/RES); + + List vertices=new Spline2D(points).getPointList(); for(Vec2D v: vertices) { fill(list.get((int) random(numCols)).toARGB()); ellipse(v.x,v.y,noise(v.y*0.01)*XRAD,noise(v.x*0.01)*YRAD); } -} +} \ No newline at end of file diff --git a/examples/core/geometry/OctreeDemo/OctreeDemo.pde b/examples/core/geometry/OctreeDemo/OctreeDemo.pde index 400c3a5b..241c8087 100644 --- a/examples/core/geometry/OctreeDemo/OctreeDemo.pde +++ b/examples/core/geometry/OctreeDemo/OctreeDemo.pde @@ -31,7 +31,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -import processing.opengl.*; + import toxi.geom.*; import toxi.processing.*; import java.util.List; @@ -65,7 +65,7 @@ ToxiclibsSupport gfx; int numParticles = 1; void setup() { - size(1024, 768, OPENGL); + size(1024, 768, P3D); textFont(createFont("SansSerif", 18)); // setup empty octree so that it's centered around the world origin octree=new VisibleOctree(new Vec3D(-1, -1, -1).scaleSelf(DIM2), DIM); diff --git a/examples/core/geometry/PlaneIntersection/PlaneIntersection.pde b/examples/core/geometry/PlaneIntersection/PlaneIntersection.pde index 9f384224..e2fbc3c7 100644 --- a/examples/core/geometry/PlaneIntersection/PlaneIntersection.pde +++ b/examples/core/geometry/PlaneIntersection/PlaneIntersection.pde @@ -1,7 +1,7 @@ import toxi.geom.*; import toxi.util.*; import toxi.processing.*; -import processing.opengl.*; + Plane p1, p2; @@ -9,7 +9,7 @@ ToxiclibsSupport gfx; boolean doSave; void setup() { - size(1280, 720, OPENGL); + size(1280, 720, P3D); gfx = new ToxiclibsSupport(this); p1 = new Plane(new Vec3D(100, 100, 100), new Vec3D(0, 1, 0)); p2 = new Plane(new Vec3D(100, 200, 100), Vec3D.randomVector()); diff --git a/examples/core/geometry/PolyTesselateSpherize/PolyTesselateSpherize.pde b/examples/core/geometry/PolyTesselateSpherize/PolyTesselateSpherize.pde index ed3bd54f..cf5e7c0d 100644 --- a/examples/core/geometry/PolyTesselateSpherize/PolyTesselateSpherize.pde +++ b/examples/core/geometry/PolyTesselateSpherize/PolyTesselateSpherize.pde @@ -40,7 +40,7 @@ import toxi.processing.*; import toxi.math.*; import java.util.List; -import processing.opengl.*; + // radius of the root delaunay triangle which encompasses (MUST) all other points float DELAUNAY_SIZE = 10000; @@ -62,7 +62,7 @@ TriangleMesh mesh; float res=6; void setup() { - size(1024, 768, OPENGL); + size(1024, 768, P3D); smooth(); gfx = new ToxiclibsSupport(this); diff --git a/examples/core/geometry/RayReflectSphere/RayReflectSphere.pde b/examples/core/geometry/RayReflectSphere/RayReflectSphere.pde index 32a33c6f..c86c9a73 100644 --- a/examples/core/geometry/RayReflectSphere/RayReflectSphere.pde +++ b/examples/core/geometry/RayReflectSphere/RayReflectSphere.pde @@ -31,7 +31,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -import processing.opengl.*; + import toxi.geom.*; import toxi.processing.*; @@ -54,7 +54,7 @@ Vec3D camRot = new Vec3D(); ToxiclibsSupport gfx; void setup() { - size(500,500,OPENGL); + size(500,500,P3D); gfx=new ToxiclibsSupport(this); } diff --git a/examples/core/mapping/TwitterGeo/TwitterGeo.pde b/examples/core/mapping/TwitterGeo/TwitterGeo.pde index c07ed73f..5f9a34f6 100644 --- a/examples/core/mapping/TwitterGeo/TwitterGeo.pde +++ b/examples/core/mapping/TwitterGeo/TwitterGeo.pde @@ -35,7 +35,7 @@ import toxi.geom.*; import toxi.processing.*; -import processing.opengl.*; + final int EARTH_RADIUS = 200; @@ -66,7 +66,7 @@ Vec2D[] cities = new Vec2D[] { ToxiclibsSupport gfx; void setup() { - size(1024,576,OPENGL); + size(1024,576,P3D); gfx=new ToxiclibsSupport(this); searchTwitter(SEARCH_QUERY); } diff --git a/examples/core/math/AdditiveWaves/AdditiveWaves.pde b/examples/core/math/AdditiveWaves/AdditiveWaves.pde index 1251ac27..a81bd66d 100644 --- a/examples/core/math/AdditiveWaves/AdditiveWaves.pde +++ b/examples/core/math/AdditiveWaves/AdditiveWaves.pde @@ -50,7 +50,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -import processing.opengl.*; + import toxi.math.waves.*; AbstractWave waveX,waveY; @@ -61,7 +61,7 @@ int D2 = DIM/2; int AMP = 50; void setup() { - size(1024, 576, OPENGL); + size(1024, 576, P3D); noStroke(); waveX=createRandomWave(); waveY=createRandomWave(); diff --git a/examples/core/mesh/MeshAlignToAxis/MeshAlignToAxis.pde b/examples/core/mesh/MeshAlignToAxis/MeshAlignToAxis.pde index 920fca1a..a65df337 100644 --- a/examples/core/mesh/MeshAlignToAxis/MeshAlignToAxis.pde +++ b/examples/core/mesh/MeshAlignToAxis/MeshAlignToAxis.pde @@ -24,7 +24,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -import processing.opengl.*; + import toxi.geom.*; import toxi.geom.mesh.*; @@ -38,7 +38,7 @@ TriangleMesh[] boxes=new TriangleMesh[600]; ToxiclibsSupport gfx; void setup() { - size(600,600,OPENGL); + size(600,600,P3D); gfx=new ToxiclibsSupport(this); for(int i=0; iA soft pendulum (series of connected springs)
- * The Nature of Code
+ * The Nature of Code
* Spring 2010

*/ /* - * Copyright (c) 2010 Daniel Schiffmann + * Copyright (c) 2010 Daniel Shiffmann * * This demo & library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -66,5 +66,4 @@ void mousePressed() { void mouseReleased() { // Release the chain chain.release(); -} - +} \ No newline at end of file diff --git a/examples/physics/Shiffmann_ForceDirectedGraph/Cluster.pde b/examples/physics/Shiffman_ForceDirectedGraph/Cluster.pde similarity index 100% rename from examples/physics/Shiffmann_ForceDirectedGraph/Cluster.pde rename to examples/physics/Shiffman_ForceDirectedGraph/Cluster.pde diff --git a/examples/physics/Shiffmann_ForceDirectedGraph/Node.pde b/examples/physics/Shiffman_ForceDirectedGraph/Node.pde similarity index 100% rename from examples/physics/Shiffmann_ForceDirectedGraph/Node.pde rename to examples/physics/Shiffman_ForceDirectedGraph/Node.pde diff --git a/examples/physics/Shiffmann_ForceDirectedGraph/Shiffmann_ForceDirectedGraph.pde b/examples/physics/Shiffman_ForceDirectedGraph/Shiffman_ForceDirectedGraph.pde similarity index 96% rename from examples/physics/Shiffmann_ForceDirectedGraph/Shiffmann_ForceDirectedGraph.pde rename to examples/physics/Shiffman_ForceDirectedGraph/Shiffman_ForceDirectedGraph.pde index 5fa9f587..a8c70cf5 100644 --- a/examples/physics/Shiffmann_ForceDirectedGraph/Shiffmann_ForceDirectedGraph.pde +++ b/examples/physics/Shiffman_ForceDirectedGraph/Shiffman_ForceDirectedGraph.pde @@ -1,12 +1,12 @@ /** *

Force directed graph, * heavily based on: fid.gen
- * The Nature of Code
+ * The Nature of Code
* Spring 2010

*/ /* - * Copyright (c) 2010 Daniel Schiffmann + * Copyright (c) 2010 Daniel Shiffmann * * This demo & library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -132,4 +132,4 @@ void keyPressed() { else if (key == 'n') { newGraph(); } -} +} \ No newline at end of file diff --git a/examples/physics/Shiffmann_SimpleSpring/Shiffmann_SimpleSpring.pde b/examples/physics/Shiffman_SimpleSpring/Shiffman_SimpleSpring.pde similarity index 95% rename from examples/physics/Shiffmann_SimpleSpring/Shiffmann_SimpleSpring.pde rename to examples/physics/Shiffman_SimpleSpring/Shiffman_SimpleSpring.pde index a590b10b..47f18978 100644 --- a/examples/physics/Shiffmann_SimpleSpring/Shiffmann_SimpleSpring.pde +++ b/examples/physics/Shiffman_SimpleSpring/Shiffman_SimpleSpring.pde @@ -1,11 +1,11 @@ /** *

Simple two particles and spring example
- * The Nature of Code
+ * The Nature of Code
* Spring 2010

*/ /* - * Copyright (c) 2010 Daniel Schiffmann + * Copyright (c) 2010 Daniel Shiffmann * * This demo & library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -105,5 +105,4 @@ class Particle extends VerletParticle2D { stroke(0); ellipse(x,y,16,16); } -} - +} \ No newline at end of file diff --git a/examples/physics/SoftBodySquare/SoftBodySquare.pde b/examples/physics/SoftBodySquare/SoftBodySquare.pde index 4c504379..ed56eb6c 100644 --- a/examples/physics/SoftBodySquare/SoftBodySquare.pde +++ b/examples/physics/SoftBodySquare/SoftBodySquare.pde @@ -26,7 +26,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -import processing.opengl.*; + import toxi.physics2d.behaviors.*; import toxi.physics2d.*; @@ -44,7 +44,7 @@ VerletPhysics2D physics; VerletParticle2D head,tail; void setup() { - size(1280,720,OPENGL); + size(1280,720,P3D); smooth(); physics=new VerletPhysics2D(); physics.addBehavior(new GravityBehavior2D(new Vec2D(0,0.1))); diff --git a/examples/physics/ThreadDemo/ThreadDemo.pde b/examples/physics/ThreadDemo/ThreadDemo.pde index bf940bc5..d7db63c8 100644 --- a/examples/physics/ThreadDemo/ThreadDemo.pde +++ b/examples/physics/ThreadDemo/ThreadDemo.pde @@ -29,7 +29,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -import processing.opengl.*; + import toxi.physics2d.constraints.*; import toxi.physics2d.*; import toxi.geom.*; @@ -46,7 +46,7 @@ VerletParticle2D head,tail; boolean isTailLocked; void setup() { - size(1024,768,OPENGL); + size(1024,768,P3D); smooth(); physics=new VerletPhysics2D(); Vec2D stepDir=new Vec2D(1,1).normalizeTo(REST_LENGTH); diff --git a/examples/physics/ThreadSphere/ThreadSphere.pde b/examples/physics/ThreadSphere/ThreadSphere.pde index fc82f6c0..9e858c2a 100644 --- a/examples/physics/ThreadSphere/ThreadSphere.pde +++ b/examples/physics/ThreadSphere/ThreadSphere.pde @@ -30,7 +30,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -import processing.opengl.*; + import toxi.physics3d.constraints.*; import toxi.physics3d.behaviors.*; @@ -47,7 +47,7 @@ VerletPhysics3D physics; VerletParticle3D head; void setup() { - size(1024,768,OPENGL); + size(1024,768,P3D); smooth(); // create collision sphere at origin, replace OUTSIDE with INSIDE to keep particles inside the sphere ParticleConstraint3D sphere=new SphereConstraint(new Sphere(new Vec3D(),SPHERE_RADIUS),SphereConstraint.OUTSIDE); diff --git a/examples/sim/DLASpiral/DLASpiral.pde b/examples/sim/DLASpiral/DLASpiral.pde index 6424aea3..c3020c75 100644 --- a/examples/sim/DLASpiral/DLASpiral.pde +++ b/examples/sim/DLASpiral/DLASpiral.pde @@ -47,7 +47,7 @@ import toxi.sim.dla.*; import toxi.geom.*; -import processing.opengl.*; + DLA dla; DLAListener listener; @@ -56,7 +56,7 @@ float currScale = 6; boolean isOctreeVisible=true; void setup() { - size(640, 480, OPENGL); + size(640, 480, P3D); // compute spiral key points (every 45 degrees) ArrayList points = new ArrayList(); for (float theta=-TWO_PI, r=20; theta<3*TWO_PI; theta+=QUARTER_PI) { diff --git a/examples/volume/AnimatedNoise/AnimatedNoise.pde b/examples/volume/AnimatedNoise/AnimatedNoise.pde index 2de8c560..124f018c 100644 --- a/examples/volume/AnimatedNoise/AnimatedNoise.pde +++ b/examples/volume/AnimatedNoise/AnimatedNoise.pde @@ -37,7 +37,7 @@ import toxi.volume.*; import toxi.math.noise.*; import toxi.processing.*; -import processing.opengl.*; + int DIMX=48; int DIMY=48; @@ -57,7 +57,7 @@ TriangleMesh mesh; ToxiclibsSupport gfx; void setup() { - size(1024,576,OPENGL); + size(1024,576,P3D); gfx=new ToxiclibsSupport(this); } diff --git a/examples/volume/BoxFluidDemo/BoxFluidDemo.pde b/examples/volume/BoxFluidDemo/BoxFluidDemo.pde index e26dfef3..ee4c27fc 100644 --- a/examples/volume/BoxFluidDemo/BoxFluidDemo.pde +++ b/examples/volume/BoxFluidDemo/BoxFluidDemo.pde @@ -44,7 +44,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -import processing.opengl.*; + import toxi.physics3d.*; import toxi.physics3d.behaviors.*; @@ -84,7 +84,7 @@ boolean useBoundary=false; Vec3D colAmp=new Vec3D(400, 200, 200); void setup() { - size(1280,720,OPENGL); + size(1280,720,P3D); smooth(); initPhysics(); initGUI(); diff --git a/examples/volume/ImplicitFunction/ImplicitFunction.pde b/examples/volume/ImplicitFunction/ImplicitFunction.pde index a9756341..373d3c8b 100644 --- a/examples/volume/ImplicitFunction/ImplicitFunction.pde +++ b/examples/volume/ImplicitFunction/ImplicitFunction.pde @@ -35,7 +35,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -import processing.opengl.*; + import toxi.geom.*; import toxi.geom.mesh.*; @@ -54,7 +54,7 @@ float currZoom = 1; boolean isWireframe; void setup() { - size(1280,720, OPENGL); + size(1280,720, P3D); gfx = new ToxiclibsSupport(this); VolumetricSpace vol = new EvaluatingVolume(new Vec3D(400,400,400), RES, MAX_ISO); IsoSurface surface = new HashIsoSurface(vol); diff --git a/examples/volume/MRISurface/MRISurface.pde b/examples/volume/MRISurface/MRISurface.pde index 87704882..0bc2ad1e 100644 --- a/examples/volume/MRISurface/MRISurface.pde +++ b/examples/volume/MRISurface/MRISurface.pde @@ -41,7 +41,7 @@ import toxi.volume.*; import toxi.math.noise.*; import toxi.processing.*; -import processing.opengl.*; + int DIM=128; float ISO_THRESHOLD = 0.1; @@ -54,7 +54,7 @@ ToxiclibsSupport gfx; boolean isWireframe=false; void setup() { - size(1024,768,OPENGL); + size(1024,768,P3D); gfx=new ToxiclibsSupport(this); strokeWeight(0.5); diff --git a/examples/volume/NoiseSurface/NoiseSurface.pde b/examples/volume/NoiseSurface/NoiseSurface.pde index f1c4ad59..df76381f 100644 --- a/examples/volume/NoiseSurface/NoiseSurface.pde +++ b/examples/volume/NoiseSurface/NoiseSurface.pde @@ -37,7 +37,7 @@ import toxi.volume.*; import toxi.math.noise.*; import toxi.processing.*; -import processing.opengl.*; + int DIMX=192; int DIMY=32; @@ -56,7 +56,7 @@ float currScale=1; ToxiclibsSupport gfx; void setup() { - size(1024,768,OPENGL); + size(1024,768,P3D); gfx=new ToxiclibsSupport(this); strokeWeight(0.5); VolumetricSpace volume=new VolumetricSpaceArray(SCALE,DIMX,DIMY,DIMZ); diff --git a/examples/volume/VolumeBrush/VolumeBrush.pde b/examples/volume/VolumeBrush/VolumeBrush.pde index 6189992e..078a41af 100644 --- a/examples/volume/VolumeBrush/VolumeBrush.pde +++ b/examples/volume/VolumeBrush/VolumeBrush.pde @@ -40,7 +40,7 @@ import toxi.volume.*; import toxi.math.waves.*; import toxi.processing.*; -import processing.opengl.*; + int DIMX=64; int DIMY=64; @@ -65,7 +65,7 @@ float density=0.5; ToxiclibsSupport gfx; void setup() { - size(1024,768,OPENGL); + size(1024,768,P3D); smooth(4); gfx=new ToxiclibsSupport(this); strokeWeight(0.5); diff --git a/examples/volume/VolumetricCup/VolumetricCup.pde b/examples/volume/VolumetricCup/VolumetricCup.pde index 61473b71..880d5589 100644 --- a/examples/volume/VolumetricCup/VolumetricCup.pde +++ b/examples/volume/VolumetricCup/VolumetricCup.pde @@ -42,7 +42,7 @@ import toxi.volume.*; import toxi.math.waves.*; import toxi.processing.*; -import processing.opengl.*; + int DIMX=96; int DIMY=96; @@ -71,7 +71,7 @@ float Z_STEP=0.005; ToxiclibsSupport gfx; void setup() { - size(1024,768,OPENGL); + size(1024,768,P3D); gfx=new ToxiclibsSupport(this); strokeWeight(0.5); diff --git a/examples/volume/VoxelizeMesh/VoxelizeMesh.pde b/examples/volume/VoxelizeMesh/VoxelizeMesh.pde index 9e92cb64..8e118a5c 100644 --- a/examples/volume/VoxelizeMesh/VoxelizeMesh.pde +++ b/examples/volume/VoxelizeMesh/VoxelizeMesh.pde @@ -39,7 +39,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -import processing.opengl.*; + import toxi.geom.*; import toxi.geom.mesh.*; @@ -58,7 +58,7 @@ boolean isWireframe; float currZoom = 1.25f; void setup() { - size(1280, 720, OPENGL); + size(1280, 720, P3D); gfx = new ToxiclibsSupport(this); initMesh(); } diff --git a/lib/core.jar b/lib/core.jar index 74005e08..088aeec0 100644 Binary files a/lib/core.jar and b/lib/core.jar differ diff --git a/library.properties b/library.properties new file mode 100644 index 00000000..5a6f0421 --- /dev/null +++ b/library.properties @@ -0,0 +1,58 @@ +# More on this file here: https://github.com/processing/processing/wiki/Library-Basics +# UTF-8 supported. + +# The name of your library as you want it formatted. +name = ToxicLibs + +# List of authors. Links can be provided using the syntax [author name](url). +authors = [Karsten Schmidt](http://postspectacular.com/) + +# A web page for your library, NOT a direct link to where to download it. +url = http://toxiclibs.org/ + +# The category of your library, must be one (or many) of the following: +# "3D" "Animation" "Compilations" "Data" +# "Fabrication" "Geometry" "GUI" "Hardware" +# "I/O" "Language" "Math" "Simulation" +# "Sound" "Utilities" "Typography" "Video & Vision" +# +# If a value other than those listed is used, your library will listed as +# "Other". +category = Compilations + +# A short sentence (or fragment) to summarize the library's function. This will +# be shown from inside the PDE when the library is being installed. Avoid +# repeating the name of your library here. Also, avoid saying anything redundant +# like mentioning that it's a library. This should start with a capitalized +# letter, and end with a period. +sentence = toxiclibs is an independent, open source library collection for computational design tasks. + +# Additional information suitable for the Processing website. The value of +# 'sentence' always will be prepended, so you should start by writing the +# second sentence here. If your library only works on certain operating systems, +# mention it here. +paragraph = toxiclibs is an independent, open source library collection for computational design tasks. The classes are purposefully kept fairly generic in order to maximize re-use in different contexts ranging from generative design, animation, interaction/interface design, data visualization to architecture and digital fabrication, use as teaching tool and more. + +# Links in the 'sentence' and 'paragraph' attributes can be inserted using the +# same syntax as for authors. +# That is, [here is a link to Processing](http://processing.org/) + + +# A version number that increments once with each release. This is used to +# compare different versions of the same library, and check if an update is +# available. You should think of it as a counter, counting the total number of +# releases you've had. +version = 22 # This must be parsable as an int + +# The version as the user will see it. If blank, the version attribute will be +# used here. +prettyVersion = 22 # This is treated as a String + +# The min and max revision of Processing compatible with your library. +# Note that these fields use the revision and not the version of Processing, +# parsable as an int. For example, the revision number for 2.2.1 is 227. +# You can find the revision numbers in the change log: https://raw.githubusercontent.com/processing/processing/master/build/shared/revisions.txt +# Only use maxRevision (or minRevision), when your library is known to +# break in a later (or earlier) release. Otherwise, use the default value 0. +minRevision = 246 +maxRevision = 0