From eb8c319af5adb2f54a6e752adf6e336713253eb0 Mon Sep 17 00:00:00 2001 From: benfry Date: Sun, 17 Apr 2011 17:50:52 +0000 Subject: [PATCH] removing applet folders from svn --- .../3D/Camera/MoveEye/applet/MoveEye.java | 48 -- .../3D/Camera/MoveEye/applet/MoveEye.pde | 28 -- .../3D/Camera/MoveEye/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/OrthoVSPerspective.java | 62 --- .../applet/OrthoVSPerspective.pde | 42 -- .../OrthoVSPerspective/applet/loading.gif | Bin 2232 -> 0 bytes .../Perspective/applet/Perspective.java | 61 --- .../Camera/Perspective/applet/Perspective.pde | 41 -- .../3D/Camera/Perspective/applet/loading.gif | Bin 2232 -> 0 bytes .../3D/Form/BrickTower/applet/BrickTower.java | 152 ------- .../3D/Form/BrickTower/applet/BrickTower.pde | 61 --- .../3D/Form/BrickTower/applet/Cube.pde | 60 --- .../3D/Form/BrickTower/applet/loading.gif | Bin 2232 -> 0 bytes .../3D/Form/CubicGrid/applet/CubicGrid.java | 67 --- .../3D/Form/CubicGrid/applet/CubicGrid.pde | 47 -- .../3D/Form/CubicGrid/applet/loading.gif | Bin 2232 -> 0 bytes .../3D/Form/Icosahedra/applet/Dimension3D.pde | 10 - .../3D/Form/Icosahedra/applet/Icosahedra.java | 416 ------------------ .../3D/Form/Icosahedra/applet/Icosahedra.pde | 53 --- .../3D/Form/Icosahedra/applet/Icosahedron.pde | 160 ------- .../3D/Form/Icosahedra/applet/Shape3D.pde | 81 ---- .../3D/Form/Icosahedra/applet/loading.gif | Bin 2232 -> 0 bytes .../Primitives3D/applet/Primitives3D.java | 51 --- .../Form/Primitives3D/applet/Primitives3D.pde | 30 -- .../3D/Form/Primitives3D/applet/loading.gif | Bin 2232 -> 0 bytes .../3D/Form/RGBCube/applet/RGBCube.java | 94 ---- .../3D/Form/RGBCube/applet/RGBCube.pde | 74 ---- .../3D/Form/RGBCube/applet/loading.gif | Bin 2232 -> 0 bytes .../examples/3D/Form/RunAmuck/applet/Legs.pde | 162 ------- .../3D/Form/RunAmuck/applet/RunAmuck.java | 228 ---------- .../3D/Form/RunAmuck/applet/RunAmuck.pde | 45 -- .../3D/Form/RunAmuck/applet/loading.gif | Bin 2232 -> 0 bytes .../ShapeTransform/applet/ShapeTransform.java | 147 ------- .../ShapeTransform/applet/ShapeTransform.pde | 114 ----- .../3D/Form/ShapeTransform/applet/loading.gif | Bin 2232 -> 0 bytes .../3D/Form/Toroid/applet/Toroid.java | 215 --------- .../examples/3D/Form/Toroid/applet/Toroid.pde | 182 -------- .../3D/Form/Toroid/applet/loading.gif | Bin 2232 -> 0 bytes .../3D/Form/Vertices/applet/Vertices.java | 87 ---- .../3D/Form/Vertices/applet/Vertices.pde | 67 --- .../3D/Form/Vertices/applet/loading.gif | Bin 2232 -> 0 bytes .../3D/Image/Explode/applet/Explode.java | 63 --- .../3D/Image/Explode/applet/Explode.pde | 43 -- .../3D/Image/Explode/applet/loading.gif | Bin 2232 -> 0 bytes .../3D/Image/Extrusion/applet/Extrusion.java | 67 --- .../3D/Image/Extrusion/applet/Extrusion.pde | 46 -- .../3D/Image/Extrusion/applet/loading.gif | Bin 2232 -> 0 bytes java/examples/3D/Image/Zoom/applet/Zoom.java | 109 ----- java/examples/3D/Image/Zoom/applet/Zoom.pde | 89 ---- .../examples/3D/Image/Zoom/applet/loading.gif | Bin 2232 -> 0 bytes .../Directional/applet/Directional.java | 48 -- .../Lights/Directional/applet/Directional.pde | 28 -- .../3D/Lights/Directional/applet/loading.gif | Bin 2232 -> 0 bytes .../3D/Lights/Lights1/applet/Lights1.java | 49 --- .../3D/Lights/Lights1/applet/Lights1.pde | 29 -- .../3D/Lights/Lights1/applet/loading.gif | Bin 2232 -> 0 bytes .../3D/Lights/Lights2/applet/Lights2.java | 56 --- .../3D/Lights/Lights2/applet/Lights2.pde | 36 -- .../3D/Lights/Lights2/applet/loading.gif | Bin 2232 -> 0 bytes .../Lights/Reflection/applet/Reflection.java | 45 -- .../Lights/Reflection/applet/Reflection.pde | 25 -- .../3D/Lights/Reflection/applet/loading.gif | Bin 2232 -> 0 bytes java/examples/3D/Lights/Spot/applet/Spot.java | 55 --- java/examples/3D/Lights/Spot/applet/Spot.pde | 35 -- .../3D/Lights/Spot/applet/loading.gif | Bin 2232 -> 0 bytes .../3D/Textures/Texture1/applet/Texture1.java | 48 -- .../3D/Textures/Texture1/applet/Texture1.pde | 28 -- .../3D/Textures/Texture1/applet/loading.gif | Bin 2232 -> 0 bytes .../3D/Textures/Texture2/applet/Texture2.java | 45 -- .../3D/Textures/Texture2/applet/Texture2.pde | 25 -- .../3D/Textures/Texture2/applet/loading.gif | Bin 2232 -> 0 bytes .../3D/Textures/Texture3/applet/Texture3.java | 66 --- .../3D/Textures/Texture3/applet/Texture3.pde | 46 -- .../3D/Textures/Texture3/applet/loading.gif | Bin 2232 -> 0 bytes .../TextureCube/applet/TextureCube.java | 111 ----- .../TextureCube/applet/TextureCube.pde | 91 ---- .../Textures/TextureCube/applet/loading.gif | Bin 2232 -> 0 bytes .../3D/Transform/Bird/applet/Bird.java | 83 ---- .../3D/Transform/Bird/applet/Bird.pde | 63 --- .../3D/Transform/Bird/applet/loading.gif | Bin 2232 -> 0 bytes .../3D/Transform/Birds/applet/Bird.pde | 99 ----- .../3D/Transform/Birds/applet/Birds.java | 172 -------- .../3D/Transform/Birds/applet/Birds.pde | 53 --- .../3D/Transform/Birds/applet/loading.gif | Bin 2232 -> 0 bytes .../Transform/CubesWithinCube/applet/Cube.pde | 72 --- .../applet/CubesWithinCube.java | 226 ---------- .../applet/CubesWithinCube.pde | 117 ----- .../CubesWithinCube/applet/loading.gif | Bin 2232 -> 0 bytes .../PushPopCubes/applet/PushPopCubes.java | 164 ------- .../PushPopCubes/applet/PushPopCubes.pde | 144 ------ .../Transform/PushPopCubes/applet/loading.gif | Bin 2232 -> 0 bytes .../3D/Transform/Rotate1/applet/Rotate1.java | 58 --- .../3D/Transform/Rotate1/applet/Rotate1.pde | 38 -- .../3D/Transform/Rotate1/applet/loading.gif | Bin 2232 -> 0 bytes .../3D/Transform/Rotate2/applet/Rotate2.java | 62 --- .../3D/Transform/Rotate2/applet/Rotate2.pde | 42 -- .../3D/Transform/Rotate2/applet/loading.gif | Bin 2232 -> 0 bytes .../KineticType/applet/KineticType.java | 137 ------ .../KineticType/applet/KineticType.pde | 66 --- .../Typography/KineticType/applet/Letter.pde | 13 - .../3D/Typography/KineticType/applet/Line.pde | 28 -- .../3D/Typography/KineticType/applet/Word.pde | 10 - .../Typography/KineticType/applet/loading.gif | Bin 2232 -> 0 bytes .../3D/Typography/LetterK/applet/LetterK.java | 145 ------ .../3D/Typography/LetterK/applet/LetterK.pde | 125 ------ .../3D/Typography/LetterK/applet/loading.gif | Bin 2232 -> 0 bytes .../3D/Typography/Typing/applet/Typing.java | 101 ----- .../3D/Typography/Typing/applet/Typing.pde | 81 ---- .../3D/Typography/Typing/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Arrays/Array/applet/Array.java | 56 --- .../Basics/Arrays/Array/applet/Array.pde | 35 -- .../Basics/Arrays/Array/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Arrays/Array2D/applet/Array2D.java | 53 --- .../Basics/Arrays/Array2D/applet/Array2D.pde | 32 -- .../Basics/Arrays/Array2D/applet/loading.gif | Bin 2232 -> 0 bytes .../ArrayObjects/applet/ArrayObjects.java | 94 ---- .../ArrayObjects/applet/ArrayObjects.pde | 74 ---- .../Arrays/ArrayObjects/applet/loading.gif | Bin 2232 -> 0 bytes .../Color/Brightness/applet/Brightness.java | 51 --- .../Color/Brightness/applet/Brightness.pde | 31 -- .../Color/Brightness/applet/loading.gif | Bin 2232 -> 0 bytes .../Color/ColorWheel/applet/ColorWheel.java | 99 ----- .../Color/ColorWheel/applet/ColorWheel.pde | 79 ---- .../Color/ColorWheel/applet/loading.gif | Bin 2232 -> 0 bytes .../Color/Creating/applet/Creating.java | 47 -- .../Basics/Color/Creating/applet/Creating.pde | 26 -- .../Basics/Color/Creating/applet/loading.gif | Bin 2232 -> 0 bytes .../examples/Basics/Color/Hue/applet/Hue.java | 51 --- java/examples/Basics/Color/Hue/applet/Hue.pde | 31 -- .../Basics/Color/Hue/applet/loading.gif | Bin 2232 -> 0 bytes .../LinearGradient/applet/LinearGradient.java | 93 ---- .../LinearGradient/applet/LinearGradient.pde | 73 --- .../Color/LinearGradient/applet/loading.gif | Bin 2232 -> 0 bytes .../RadialGradient/applet/RadialGradient.java | 78 ---- .../RadialGradient/applet/RadialGradient.pde | 58 --- .../Color/RadialGradient/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Color/Reading/applet/Reading.java | 63 --- .../Basics/Color/Reading/applet/Reading.pde | 42 -- .../Basics/Color/Reading/applet/loading.gif | Bin 2232 -> 0 bytes .../Color/Relativity/applet/Relativity.java | 62 --- .../Color/Relativity/applet/Relativity.pde | 42 -- .../Color/Relativity/applet/loading.gif | Bin 2232 -> 0 bytes .../Color/Saturation/applet/Saturation.java | 52 --- .../Color/Saturation/applet/Saturation.pde | 32 -- .../Color/Saturation/applet/loading.gif | Bin 2232 -> 0 bytes .../WaveGradient/applet/WaveGradient.java | 59 --- .../WaveGradient/applet/WaveGradient.pde | 39 -- .../Color/WaveGradient/applet/loading.gif | Bin 2232 -> 0 bytes .../Conditionals1/applet/Conditionals1.java | 47 -- .../Conditionals1/applet/Conditionals1.pde | 26 -- .../Control/Conditionals1/applet/loading.gif | Bin 2232 -> 0 bytes .../Conditionals2/applet/Conditionals2.java | 47 -- .../Conditionals2/applet/Conditionals2.pde | 26 -- .../Control/Conditionals2/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/EmbeddedIteration.java | 48 -- .../applet/EmbeddedIteration.pde | 27 -- .../EmbeddedIteration/applet/loading.gif | Bin 2232 -> 0 bytes .../Control/Iteration/applet/Iteration.java | 66 --- .../Control/Iteration/applet/Iteration.pde | 45 -- .../Control/Iteration/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/LogicalOperators.java | 66 --- .../applet/LogicalOperators.pde | 45 -- .../LogicalOperators/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/CharactersStrings.java | 101 ----- .../applet/CharactersStrings.pde | 81 ---- .../Data/CharactersStrings/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/DatatypeConversion.java | 49 --- .../applet/DatatypeConversion.pde | 28 -- .../DatatypeConversion/applet/loading.gif | Bin 2232 -> 0 bytes .../IntegersFloats/applet/IntegersFloats.java | 56 --- .../IntegersFloats/applet/IntegersFloats.pde | 36 -- .../Data/IntegersFloats/applet/loading.gif | Bin 2232 -> 0 bytes .../Data/TrueFalse/applet/TrueFalse.java | 55 --- .../Data/TrueFalse/applet/TrueFalse.pde | 34 -- .../Basics/Data/TrueFalse/applet/loading.gif | Bin 2232 -> 0 bytes .../VariableScope/applet/VariableScope.java | 81 ---- .../VariableScope/applet/VariableScope.pde | 61 --- .../Data/VariableScope/applet/loading.gif | Bin 2232 -> 0 bytes .../Data/Variables/applet/Variables.java | 44 -- .../Data/Variables/applet/Variables.pde | 23 - .../Basics/Data/Variables/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Form/Bezier/applet/Bezier.java | 39 -- .../Basics/Form/Bezier/applet/Bezier.pde | 18 - .../Basics/Form/Bezier/applet/loading.gif | Bin 2232 -> 0 bytes .../BezierEllipse/applet/BezierEllipse.java | 123 ------ .../BezierEllipse/applet/BezierEllipse.pde | 103 ----- .../Form/BezierEllipse/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Form/PieChart/applet/PieChart.java | 44 -- .../Basics/Form/PieChart/applet/PieChart.pde | 23 - .../Basics/Form/PieChart/applet/loading.gif | Bin 2232 -> 0 bytes .../Form/PointsLines/applet/PointsLines.java | 53 --- .../Form/PointsLines/applet/PointsLines.pde | 32 -- .../Form/PointsLines/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/ShapePrimitives.java | 42 -- .../applet/ShapePrimitives.pde | 21 - .../Form/ShapePrimitives/applet/loading.gif | Bin 2232 -> 0 bytes .../SimpleCurves/applet/SimpleCurves.java | 101 ----- .../Form/SimpleCurves/applet/SimpleCurves.pde | 81 ---- .../Form/SimpleCurves/applet/loading.gif | Bin 2232 -> 0 bytes .../TriangleStrip/applet/TriangleStrip.java | 57 --- .../TriangleStrip/applet/TriangleStrip.pde | 36 -- .../Form/TriangleStrip/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Form/Vertices/applet/Vertices.java | 68 --- .../Basics/Form/Vertices/applet/Vertices.pde | 47 -- .../Basics/Form/Vertices/applet/loading.gif | Bin 2232 -> 0 bytes .../Image/Alphamask/applet/Alphamask.java | 45 -- .../Image/Alphamask/applet/Alphamask.pde | 25 -- .../Basics/Image/Alphamask/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/BackgroundImage.java | 50 --- .../applet/BackgroundImage.pde | 30 -- .../Image/BackgroundImage/applet/loading.gif | Bin 2232 -> 0 bytes .../Image/CreateImage/applet/CreateImage.java | 44 -- .../Image/CreateImage/applet/CreateImage.pde | 24 - .../Image/CreateImage/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/LoadDisplayImage.java | 44 -- .../applet/LoadDisplayImage.pde | 23 - .../Image/LoadDisplayImage/applet/loading.gif | Bin 2232 -> 0 bytes .../Image/Pointillism/applet/Pointillism.java | 49 --- .../Image/Pointillism/applet/Pointillism.pde | 29 -- .../Image/Pointillism/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Image/Sprite/applet/Sprite.java | 61 --- .../Basics/Image/Sprite/applet/Sprite.pde | 41 -- .../Basics/Image/Sprite/applet/loading.gif | Bin 2232 -> 0 bytes .../Transparency/applet/Transparency.java | 50 --- .../Transparency/applet/Transparency.pde | 30 -- .../Image/Transparency/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Input/Clock/applet/Clock.java | 59 --- .../Basics/Input/Clock/applet/Clock.pde | 39 -- .../Basics/Input/Clock/applet/loading.gif | Bin 2232 -> 0 bytes .../Input/Constrain/applet/Constrain.java | 60 --- .../Input/Constrain/applet/Constrain.pde | 40 -- .../Basics/Input/Constrain/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Input/Easing/applet/Easing.java | 61 --- .../Basics/Input/Easing/applet/Easing.pde | 41 -- .../Basics/Input/Easing/applet/loading.gif | Bin 2232 -> 0 bytes .../Input/Keyboard/applet/Keyboard.java | 60 --- .../Basics/Input/Keyboard/applet/Keyboard.pde | 40 -- .../Basics/Input/Keyboard/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/KeyboardFunctions.java | 109 ----- .../applet/KeyboardFunctions.pde | 89 ---- .../KeyboardFunctions/applet/loading.gif | Bin 2232 -> 0 bytes .../Milliseconds/applet/Milliseconds.java | 46 -- .../Milliseconds/applet/Milliseconds.pde | 26 -- .../Input/Milliseconds/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Input/Mouse1D/applet/Mouse1D.java | 70 --- .../Basics/Input/Mouse1D/applet/Mouse1D.pde | 50 --- .../Basics/Input/Mouse1D/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Input/Mouse2D/applet/Mouse2D.java | 45 -- .../Basics/Input/Mouse2D/applet/Mouse2D.pde | 25 -- .../Basics/Input/Mouse2D/applet/loading.gif | Bin 2232 -> 0 bytes .../MouseFunctions/applet/MouseFunctions.java | 88 ---- .../MouseFunctions/applet/MouseFunctions.pde | 68 --- .../Input/MouseFunctions/applet/loading.gif | Bin 2232 -> 0 bytes .../Input/MousePress/applet/MousePress.java | 43 -- .../Input/MousePress/applet/MousePress.pde | 23 - .../Input/MousePress/applet/loading.gif | Bin 2232 -> 0 bytes .../MouseSignals/applet/MouseSignals.java | 74 ---- .../MouseSignals/applet/MouseSignals.pde | 54 --- .../Input/MouseSignals/applet/loading.gif | Bin 2232 -> 0 bytes .../StoringInput/applet/StoringInput.java | 60 --- .../StoringInput/applet/StoringInput.pde | 40 -- .../Input/StoringInput/applet/loading.gif | Bin 2232 -> 0 bytes .../AdditiveWave/applet/AdditiveWave.java | 89 ---- .../Math/AdditiveWave/applet/AdditiveWave.pde | 69 --- .../Math/AdditiveWave/applet/loading.gif | Bin 2232 -> 0 bytes .../Math/Arctangent/applet/Arctangent.java | 87 ---- .../Math/Arctangent/applet/Arctangent.pde | 67 --- .../Basics/Math/Arctangent/applet/loading.gif | Bin 2232 -> 0 bytes .../Math/Distance1D/applet/Distance1D.java | 71 --- .../Math/Distance1D/applet/Distance1D.pde | 51 --- .../Basics/Math/Distance1D/applet/loading.gif | Bin 2232 -> 0 bytes .../Math/Distance2D/applet/Distance2D.java | 49 --- .../Math/Distance2D/applet/Distance2D.pde | 29 -- .../Basics/Math/Distance2D/applet/loading.gif | Bin 2232 -> 0 bytes .../DoubleRandom/applet/DoubleRandom.java | 41 -- .../Math/DoubleRandom/applet/DoubleRandom.pde | 20 - .../Math/DoubleRandom/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/Graphing2DEquation.java | 60 --- .../applet/Graphing2DEquation.pde | 40 -- .../Graphing2DEquation/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/IncrementDecrement.java | 66 --- .../applet/IncrementDecrement.pde | 46 -- .../IncrementDecrement/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Math/Modulo/applet/Modulo.java | 51 --- .../Basics/Math/Modulo/applet/Modulo.pde | 31 -- .../Basics/Math/Modulo/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Math/Noise1D/applet/Noise1D.java | 57 --- .../Basics/Math/Noise1D/applet/Noise1D.pde | 37 -- .../Basics/Math/Noise1D/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Math/Noise2D/applet/Noise2D.java | 67 --- .../Basics/Math/Noise2D/applet/Noise2D.pde | 47 -- .../Basics/Math/Noise2D/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Math/Noise3D/applet/Noise3D.java | 74 ---- .../Basics/Math/Noise3D/applet/Noise3D.pde | 54 --- .../Basics/Math/Noise3D/applet/loading.gif | Bin 2232 -> 0 bytes .../Math/NoiseWave/applet/NoiseWave.java | 80 ---- .../Math/NoiseWave/applet/NoiseWave.pde | 60 --- .../Basics/Math/NoiseWave/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/OperatorPrecedence.java | 79 ---- .../applet/OperatorPrecedence.pde | 58 --- .../OperatorPrecedence/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/PolarToCartesian.java | 72 --- .../applet/PolarToCartesian.pde | 52 --- .../Math/PolarToCartesian/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Math/Random/applet/Random.java | 40 -- .../Basics/Math/Random/applet/Random.pde | 19 - .../Basics/Math/Random/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Math/Sine/applet/Sine.java | 66 --- .../examples/Basics/Math/Sine/applet/Sine.pde | 46 -- .../Basics/Math/Sine/applet/loading.gif | Bin 2232 -> 0 bytes .../Math/SineCosine/applet/SineCosine.java | 79 ---- .../Math/SineCosine/applet/SineCosine.pde | 59 --- .../Basics/Math/SineCosine/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Math/SineWave/applet/SineWave.java | 75 ---- .../Basics/Math/SineWave/applet/SineWave.pde | 55 --- .../Basics/Math/SineWave/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/CompositeObjects.java | 125 ------ .../applet/CompositeObjects.pde | 105 ----- .../CompositeObjects/applet/loading.gif | Bin 2232 -> 0 bytes .../Inheritance/applet/Inheritance.java | 98 ----- .../Inheritance/applet/Inheritance.pde | 78 ---- .../Objects/Inheritance/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/MultipleConstructors.java | 67 --- .../applet/MultipleConstructors.pde | 47 -- .../MultipleConstructors/applet/loading.gif | Bin 2232 -> 0 bytes .../Neighborhood/applet/Neighborhood.java | 323 -------------- .../Neighborhood/applet/Neighborhood.pde | 303 ------------- .../Objects/Neighborhood/applet/loading.gif | Bin 2232 -> 0 bytes .../Objects/Objects/applet/Objects.java | 91 ---- .../Basics/Objects/Objects/applet/Objects.pde | 71 --- .../Basics/Objects/Objects/applet/loading.gif | Bin 2232 -> 0 bytes .../DisableStyle/applet/DisableStyle.java | 55 --- .../DisableStyle/applet/DisableStyle.pde | 34 -- .../Shape/DisableStyle/applet/loading.gif | Bin 2232 -> 0 bytes .../Shape/GetChild/applet/GetChild.java | 66 --- .../Basics/Shape/GetChild/applet/GetChild.pde | 45 -- .../Basics/Shape/GetChild/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/LoadDisplayShape.java | 47 -- .../applet/LoadDisplayShape.pde | 26 -- .../Shape/LoadDisplayShape/applet/loading.gif | Bin 2232 -> 0 bytes .../Shape/ScaleShape/applet/ScaleShape.java | 47 -- .../Shape/ScaleShape/applet/ScaleShape.pde | 26 -- .../Shape/ScaleShape/applet/loading.gif | Bin 2232 -> 0 bytes .../Coordinates/applet/Coordinates.java | 62 --- .../Coordinates/applet/Coordinates.pde | 41 -- .../Structure/Coordinates/applet/loading.gif | Bin 2232 -> 0 bytes .../CreateGraphics/applet/CreateGraphics.java | 53 --- .../CreateGraphics/applet/CreateGraphics.pde | 33 -- .../CreateGraphics/applet/loading.gif | Bin 2232 -> 0 bytes .../Structure/Functions/applet/Functions.java | 53 --- .../Structure/Functions/applet/Functions.pde | 33 -- .../Structure/Functions/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Structure/Loop/applet/Loop.java | 60 --- .../Basics/Structure/Loop/applet/Loop.pde | 40 -- .../Basics/Structure/Loop/applet/loading.gif | Bin 2232 -> 0 bytes .../Structure/NoLoop/applet/NoLoop.java | 53 --- .../Basics/Structure/NoLoop/applet/NoLoop.pde | 33 -- .../Structure/NoLoop/applet/loading.gif | Bin 2232 -> 0 bytes .../Structure/Recursion/applet/Recursion.java | 52 --- .../Structure/Recursion/applet/Recursion.pde | 32 -- .../Structure/Recursion/applet/loading.gif | Bin 2232 -> 0 bytes .../Recursion2/applet/Recursion2.java | 52 --- .../Recursion2/applet/Recursion2.pde | 32 -- .../Structure/Recursion2/applet/loading.gif | Bin 2232 -> 0 bytes .../Structure/Redraw/applet/Redraw.java | 57 --- .../Basics/Structure/Redraw/applet/Redraw.pde | 37 -- .../Structure/Redraw/applet/loading.gif | Bin 2232 -> 0 bytes .../Structure/SetupDraw/applet/SetupDraw.java | 50 --- .../Structure/SetupDraw/applet/SetupDraw.pde | 30 -- .../Structure/SetupDraw/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/StatementsComments.java | 41 -- .../applet/StatementsComments.pde | 20 - .../StatementsComments/applet/loading.gif | Bin 2232 -> 0 bytes .../WidthHeight/applet/WidthHeight.java | 37 -- .../WidthHeight/applet/WidthHeight.pde | 16 - .../Structure/WidthHeight/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Transform/Arm/applet/Arm.java | 59 --- .../Basics/Transform/Arm/applet/Arm.pde | 39 -- .../Basics/Transform/Arm/applet/loading.gif | Bin 2232 -> 0 bytes .../Transform/Rotate/applet/Rotate.java | 58 --- .../Basics/Transform/Rotate/applet/Rotate.pde | 38 -- .../Transform/Rotate/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Transform/Scale/applet/Scale.java | 58 --- .../Basics/Transform/Scale/applet/Scale.pde | 38 -- .../Basics/Transform/Scale/applet/loading.gif | Bin 2232 -> 0 bytes .../Transform/Translate/applet/Translate.java | 61 --- .../Transform/Translate/applet/Translate.pde | 41 -- .../Transform/Translate/applet/loading.gif | Bin 2232 -> 0 bytes .../TriangleFlower/applet/TriangleFlower.java | 63 --- .../TriangleFlower/applet/TriangleFlower.pde | 43 -- .../TriangleFlower/applet/loading.gif | Bin 2232 -> 0 bytes .../Typography/Letters/applet/Letters.java | 86 ---- .../Typography/Letters/applet/Letters.pde | 66 --- .../Typography/Letters/applet/loading.gif | Bin 2232 -> 0 bytes .../Basics/Typography/Words/applet/Words.java | 62 --- .../Basics/Typography/Words/applet/Words.pde | 42 -- .../Typography/Words/applet/loading.gif | Bin 2232 -> 0 bytes .../EmbeddedLinks/applet/EmbeddedLinks.java | 93 ---- .../EmbeddedLinks/applet/EmbeddedLinks.pde | 73 --- .../Web/EmbeddedLinks/applet/loading.gif | Bin 2232 -> 0 bytes .../LoadingImages/applet/LoadingImages.java | 37 -- .../LoadingImages/applet/LoadingImages.pde | 16 - .../Web/LoadingImages/applet/loading.gif | Bin 2232 -> 0 bytes .../ArrayListClass/applet/ArrayListClass.java | 122 ----- .../ArrayListClass/applet/ArrayListClass.pde | 52 --- .../ArrayListClass/applet/Ball.pde | 50 --- .../ArrayListClass/applet/loading.gif | Bin 2232 -> 0 bytes .../HashMapClass/applet/HashMapClass.java | 126 ------ .../HashMapClass/applet/HashMapClass.pde | 91 ---- .../HashMapClass/applet/Word.pde | 15 - .../HashMapClass/applet/loading.gif | Bin 2232 -> 0 bytes .../AnimatedSprite/applet/AnimatedSprite.java | 86 ---- .../AnimatedSprite/applet/AnimatedSprite.pde | 39 -- .../AnimatedSprite/applet/Animation.pde | 27 -- .../AnimatedSprite/applet/loading.gif | Bin 2232 -> 0 bytes .../Sequential/applet/Sequential.java | 66 --- .../Sequential/applet/Sequential.pde | 46 -- .../Animation/Sequential/applet/loading.gif | Bin 2232 -> 0 bytes .../Conway/applet/Conway.java | 101 ----- .../Conway/applet/Conway.pde | 81 ---- .../Conway/applet/loading.gif | Bin 2232 -> 0 bytes .../Spore1/applet/Spore1.java | 153 ------- .../Spore1/applet/Spore1.pde | 133 ------ .../Spore1/applet/loading.gif | Bin 2232 -> 0 bytes .../Spore2/applet/Spore2.java | 196 --------- .../Spore2/applet/Spore2.pde | 176 -------- .../Spore2/applet/loading.gif | Bin 2232 -> 0 bytes .../Cellular Automata/Wolfram/applet/CA.pde | 94 ---- .../Wolfram/applet/Wolfram.java | 152 ------- .../Wolfram/applet/Wolfram.pde | 38 -- .../Wolfram/applet/loading.gif | Bin 2232 -> 0 bytes .../Drawing/Animator/applet/Animator.java | 69 --- .../Drawing/Animator/applet/Animator.pde | 49 --- .../Drawing/Animator/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/ContinuousLines.java | 37 -- .../applet/ContinuousLines.pde | 17 - .../ContinuousLines/applet/loading.gif | Bin 2232 -> 0 bytes .../Drawing/CustomTool/applet/CustomTool.java | 104 ----- .../Drawing/CustomTool/applet/CustomTool.pde | 84 ---- .../Drawing/CustomTool/applet/loading.gif | Bin 2232 -> 0 bytes .../Drawing/Pattern/applet/Pattern.java | 54 --- .../Topics/Drawing/Pattern/applet/Pattern.pde | 34 -- .../Topics/Drawing/Pattern/applet/loading.gif | Bin 2232 -> 0 bytes .../Topics/Drawing/Pulses/applet/Pulses.java | 53 --- .../Topics/Drawing/Pulses/applet/Pulses.pde | 33 -- .../Topics/Drawing/Pulses/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/ScribblePlotter.java | 111 ----- .../applet/ScribblePlotter.pde | 91 ---- .../ScribblePlotter/applet/loading.gif | Bin 2232 -> 0 bytes .../Effects/FireCube/applet/FireCube.java | 132 ------ .../Effects/FireCube/applet/FireCube.pde | 112 ----- .../Effects/FireCube/applet/loading.gif | Bin 2232 -> 0 bytes .../Topics/Effects/Lens/applet/Lens.java | 125 ------ .../Topics/Effects/Lens/applet/Lens.pde | 105 ----- .../Topics/Effects/Lens/applet/loading.gif | Bin 2232 -> 0 bytes .../Effects/Metaball/applet/Metaball.java | 96 ---- .../Effects/Metaball/applet/Metaball.pde | 76 ---- .../Effects/Metaball/applet/loading.gif | Bin 2232 -> 0 bytes .../Topics/Effects/Plasma/applet/Plasma.java | 80 ---- .../Topics/Effects/Plasma/applet/Plasma.pde | 60 --- .../Topics/Effects/Plasma/applet/loading.gif | Bin 2232 -> 0 bytes .../Topics/Effects/Tunnel/applet/Tunnel.java | 133 ------ .../Topics/Effects/Tunnel/applet/Tunnel.pde | 113 ----- .../Topics/Effects/Tunnel/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/UnlimitedSprites.java | 80 ---- .../applet/UnlimitedSprites.pde | 60 --- .../UnlimitedSprites/applet/loading.gif | Bin 2232 -> 0 bytes .../Effects/Wormhole/applet/Wormhole.java | 90 ---- .../Effects/Wormhole/applet/Wormhole.pde | 70 --- .../Effects/Wormhole/applet/loading.gif | Bin 2232 -> 0 bytes .../Koch/applet/Koch.java | 195 -------- .../Koch/applet/Koch.pde | 175 -------- .../Koch/applet/loading.gif | Bin 2232 -> 0 bytes .../Mandelbrot/applet/Mandelbrot.java | 95 ---- .../Mandelbrot/applet/Mandelbrot.pde | 75 ---- .../Mandelbrot/applet/loading.gif | Bin 2232 -> 0 bytes .../PenroseSnowflake/applet/LSystem.pde | 76 ---- .../applet/PenroseSnowflake.java | 220 --------- .../applet/PenroseSnowflake.pde | 24 - .../applet/PenroseSnowflakeLSystem.pde | 100 ----- .../PenroseSnowflake/applet/loading.gif | Bin 2232 -> 0 bytes .../PenroseTile/applet/LSystem.pde | 74 ---- .../PenroseTile/applet/PenroseLSystem.pde | 128 ------ .../PenroseTile/applet/PenroseTile.java | 250 ----------- .../PenroseTile/applet/PenroseTile.pde | 28 -- .../PenroseTile/applet/loading.gif | Bin 2232 -> 0 bytes .../Pentigree/applet/LSystem.pde | 76 ---- .../Pentigree/applet/Pentigree.java | 190 -------- .../Pentigree/applet/Pentigree.pde | 23 - .../Pentigree/applet/PentigreeLSystem.pde | 71 --- .../Pentigree/applet/loading.gif | Bin 2232 -> 0 bytes .../Tree/applet/Tree.java | 79 ---- .../Tree/applet/Tree.pde | 59 --- .../Tree/applet/loading.gif | Bin 2232 -> 0 bytes .../Topics/GUI/Button/applet/Button.java | 120 ----- .../Topics/GUI/Button/applet/Button.pde | 100 ----- .../Topics/GUI/Button/applet/loading.gif | Bin 2232 -> 0 bytes .../Topics/GUI/Buttons/applet/Buttons.java | 240 ---------- .../Topics/GUI/Buttons/applet/Buttons.pde | 220 --------- .../Topics/GUI/Buttons/applet/loading.gif | Bin 2232 -> 0 bytes .../Topics/GUI/Handles/applet/Handles.java | 159 ------- .../Topics/GUI/Handles/applet/Handles.pde | 139 ------ .../Topics/GUI/Handles/applet/loading.gif | Bin 2232 -> 0 bytes .../GUI/ImageButton/applet/ImageButton.java | 128 ------ .../GUI/ImageButton/applet/ImageButton.pde | 108 ----- .../Topics/GUI/ImageButton/applet/loading.gif | Bin 2232 -> 0 bytes .../Topics/GUI/Rollover/applet/Rollover.java | 108 ----- .../Topics/GUI/Rollover/applet/Rollover.pde | 88 ---- .../Topics/GUI/Rollover/applet/loading.gif | Bin 2232 -> 0 bytes .../GUI/Scrollbar/applet/Scrollbar.java | 142 ------ .../Topics/GUI/Scrollbar/applet/Scrollbar.pde | 122 ----- .../Topics/GUI/Scrollbar/applet/loading.gif | Bin 2232 -> 0 bytes .../Image Processing/Blur/applet/Blur.java | 65 --- .../Image Processing/Blur/applet/Blur.pde | 44 -- .../Image Processing/Blur/applet/loading.gif | Bin 2232 -> 0 bytes .../Brightness/applet/Brightness.java | 66 --- .../Brightness/applet/Brightness.pde | 46 -- .../Brightness/applet/loading.gif | Bin 2232 -> 0 bytes .../Convolution/applet/Convolution.java | 94 ---- .../Convolution/applet/Convolution.pde | 74 ---- .../Convolution/applet/loading.gif | Bin 2232 -> 0 bytes .../EdgeDetection/applet/EdgeDetection.java | 60 --- .../EdgeDetection/applet/EdgeDetection.pde | 39 -- .../EdgeDetection/applet/loading.gif | Bin 2232 -> 0 bytes .../Histogram/applet/Histogram.java | 67 --- .../Histogram/applet/Histogram.pde | 46 -- .../Histogram/applet/loading.gif | Bin 2232 -> 0 bytes .../LinearImage/applet/LinearImage.java | 73 --- .../LinearImage/applet/LinearImage.pde | 53 --- .../LinearImage/applet/loading.gif | Bin 2232 -> 0 bytes .../PixelArray/applet/PixelArray.java | 83 ---- .../PixelArray/applet/PixelArray.pde | 63 --- .../PixelArray/applet/loading.gif | Bin 2232 -> 0 bytes .../Interaction/Follow1/applet/Follow1.java | 59 --- .../Interaction/Follow1/applet/Follow1.pde | 39 -- .../Interaction/Follow1/applet/loading.gif | Bin 2232 -> 0 bytes .../Interaction/Follow2/applet/Follow2.java | 62 --- .../Interaction/Follow2/applet/Follow2.pde | 42 -- .../Interaction/Follow2/applet/loading.gif | Bin 2232 -> 0 bytes .../Interaction/Follow3/applet/Follow3.java | 64 --- .../Interaction/Follow3/applet/Follow3.pde | 44 -- .../Interaction/Follow3/applet/loading.gif | Bin 2232 -> 0 bytes .../Interaction/Reach1/applet/Reach1.java | 69 --- .../Interaction/Reach1/applet/Reach1.pde | 49 --- .../Interaction/Reach1/applet/loading.gif | Bin 2232 -> 0 bytes .../Interaction/Reach2/applet/Reach2.java | 80 ---- .../Interaction/Reach2/applet/Reach2.pde | 60 --- .../Interaction/Reach2/applet/loading.gif | Bin 2232 -> 0 bytes .../Interaction/Reach3/applet/Reach3.java | 97 ---- .../Interaction/Reach3/applet/Reach3.pde | 77 ---- .../Interaction/Reach3/applet/loading.gif | Bin 2232 -> 0 bytes .../Interaction/Tickle/applet/Tickle.java | 52 --- .../Interaction/Tickle/applet/Tickle.pde | 32 -- .../Interaction/Tickle/applet/loading.gif | Bin 2232 -> 0 bytes .../Topics/Motion/Bounce/applet/Bounce.java | 67 --- .../Topics/Motion/Bounce/applet/Bounce.pde | 47 -- .../Topics/Motion/Bounce/applet/loading.gif | Bin 2232 -> 0 bytes .../BouncyBubbles/applet/BouncyBubbles.java | 118 ----- .../BouncyBubbles/applet/BouncyBubbles.pde | 97 ---- .../Motion/BouncyBubbles/applet/loading.gif | Bin 2232 -> 0 bytes .../Motion/Brownian/applet/Brownian.java | 68 --- .../Motion/Brownian/applet/Brownian.pde | 48 -- .../Topics/Motion/Brownian/applet/loading.gif | Bin 2232 -> 0 bytes .../Motion/CircleCollision/applet/Ball.pde | 16 - .../applet/CircleCollision.java | 173 -------- .../applet/CircleCollision.pde | 136 ------ .../Motion/CircleCollision/applet/loading.gif | Bin 2232 -> 0 bytes .../Motion/Collision/applet/Collision.java | 105 ----- .../Motion/Collision/applet/Collision.pde | 85 ---- .../Motion/Collision/applet/loading.gif | Bin 2232 -> 0 bytes .../Topics/Motion/Linear/applet/Linear.java | 46 -- .../Topics/Motion/Linear/applet/Linear.pde | 26 -- .../Topics/Motion/Linear/applet/loading.gif | Bin 2232 -> 0 bytes .../MovingOnCurves/applet/MovingOnCurves.java | 70 --- .../MovingOnCurves/applet/MovingOnCurves.pde | 50 --- .../Motion/MovingOnCurves/applet/loading.gif | Bin 2232 -> 0 bytes .../Topics/Motion/Puff/applet/Puff.java | 111 ----- .../Topics/Motion/Puff/applet/Puff.pde | 91 ---- .../Topics/Motion/Puff/applet/loading.gif | Bin 2232 -> 0 bytes .../Reflection1/applet/Reflection1.java | 149 ------- .../Motion/Reflection1/applet/Reflection1.pde | 129 ------ .../Motion/Reflection1/applet/loading.gif | Bin 2232 -> 0 bytes .../Motion/Reflection2/applet/Ground.pde | 20 - .../Topics/Motion/Reflection2/applet/Orb.pde | 14 - .../Reflection2/applet/Reflection2.java | 183 -------- .../Motion/Reflection2/applet/Reflection2.pde | 128 ------ .../Motion/Reflection2/applet/loading.gif | Bin 2232 -> 0 bytes .../Topics/Simulate/Chain/applet/Chain.java | 88 ---- .../Topics/Simulate/Chain/applet/Chain.pde | 68 --- .../Topics/Simulate/Chain/applet/loading.gif | Bin 2232 -> 0 bytes .../Topics/Simulate/Flocking/applet/Boid.pde | 196 --------- .../Topics/Simulate/Flocking/applet/Flock.pde | 22 - .../Simulate/Flocking/applet/Flocking.java | 271 ------------ .../Simulate/Flocking/applet/Flocking.pde | 32 -- .../Simulate/Flocking/applet/loading.gif | Bin 2232 -> 0 bytes .../Topics/Simulate/Fluid/applet/Fluid.java | 228 ---------- .../Topics/Simulate/Fluid/applet/Fluid.pde | 208 --------- .../Topics/Simulate/Fluid/applet/loading.gif | Bin 2232 -> 0 bytes .../applet/CrazyParticle.pde | 47 -- .../applet/MultipleParticleSystems.java | 387 ---------------- .../applet/MultipleParticleSystems.pde | 50 --- .../applet/Particle.pde | 57 --- .../applet/ParticleSystem.pde | 51 --- .../applet/loading.gif | Bin 2232 -> 0 bytes .../SimpleParticleSystem/applet/Particle.pde | 49 --- .../applet/ParticleSystem.pde | 50 --- .../applet/SimpleParticleSystem.java | 308 ------------- .../applet/SimpleParticleSystem.pde | 27 -- .../SimpleParticleSystem/applet/loading.gif | Bin 2232 -> 0 bytes .../Topics/Simulate/Smoke/applet/Smoke.java | 284 ------------ .../Topics/Simulate/Smoke/applet/Smoke.pde | 264 ----------- .../Topics/Simulate/Smoke/applet/loading.gif | Bin 2232 -> 0 bytes .../SmokeParticleSystem/applet/Particle.pde | 69 --- .../applet/ParticleSystem.pde | 57 --- .../applet/SmokeParticleSystem.java | 360 --------------- .../applet/SmokeParticleSystem.pde | 52 --- .../SmokeParticleSystem/applet/loading.gif | Bin 2232 -> 0 bytes .../Simulate/SoftBody/applet/SoftBody.java | 119 ----- .../Simulate/SoftBody/applet/SoftBody.pde | 99 ----- .../Simulate/SoftBody/applet/loading.gif | Bin 2232 -> 0 bytes .../Topics/Simulate/Spring/applet/Spring.java | 117 ----- .../Topics/Simulate/Spring/applet/Spring.pde | 97 ---- .../Topics/Simulate/Spring/applet/loading.gif | Bin 2232 -> 0 bytes .../Simulate/Springs/applet/Springs.java | 182 -------- .../Simulate/Springs/applet/Springs.pde | 162 ------- .../Simulate/Springs/applet/loading.gif | Bin 2232 -> 0 bytes 626 files changed, 32342 deletions(-) delete mode 100644 java/examples/3D/Camera/MoveEye/applet/MoveEye.java delete mode 100644 java/examples/3D/Camera/MoveEye/applet/MoveEye.pde delete mode 100644 java/examples/3D/Camera/MoveEye/applet/loading.gif delete mode 100644 java/examples/3D/Camera/OrthoVSPerspective/applet/OrthoVSPerspective.java delete mode 100644 java/examples/3D/Camera/OrthoVSPerspective/applet/OrthoVSPerspective.pde delete mode 100644 java/examples/3D/Camera/OrthoVSPerspective/applet/loading.gif delete mode 100644 java/examples/3D/Camera/Perspective/applet/Perspective.java delete mode 100644 java/examples/3D/Camera/Perspective/applet/Perspective.pde delete mode 100644 java/examples/3D/Camera/Perspective/applet/loading.gif delete mode 100644 java/examples/3D/Form/BrickTower/applet/BrickTower.java delete mode 100644 java/examples/3D/Form/BrickTower/applet/BrickTower.pde delete mode 100644 java/examples/3D/Form/BrickTower/applet/Cube.pde delete mode 100644 java/examples/3D/Form/BrickTower/applet/loading.gif delete mode 100644 java/examples/3D/Form/CubicGrid/applet/CubicGrid.java delete mode 100644 java/examples/3D/Form/CubicGrid/applet/CubicGrid.pde delete mode 100644 java/examples/3D/Form/CubicGrid/applet/loading.gif delete mode 100644 java/examples/3D/Form/Icosahedra/applet/Dimension3D.pde delete mode 100644 java/examples/3D/Form/Icosahedra/applet/Icosahedra.java delete mode 100644 java/examples/3D/Form/Icosahedra/applet/Icosahedra.pde delete mode 100644 java/examples/3D/Form/Icosahedra/applet/Icosahedron.pde delete mode 100644 java/examples/3D/Form/Icosahedra/applet/Shape3D.pde delete mode 100644 java/examples/3D/Form/Icosahedra/applet/loading.gif delete mode 100644 java/examples/3D/Form/Primitives3D/applet/Primitives3D.java delete mode 100644 java/examples/3D/Form/Primitives3D/applet/Primitives3D.pde delete mode 100644 java/examples/3D/Form/Primitives3D/applet/loading.gif delete mode 100644 java/examples/3D/Form/RGBCube/applet/RGBCube.java delete mode 100644 java/examples/3D/Form/RGBCube/applet/RGBCube.pde delete mode 100644 java/examples/3D/Form/RGBCube/applet/loading.gif delete mode 100644 java/examples/3D/Form/RunAmuck/applet/Legs.pde delete mode 100644 java/examples/3D/Form/RunAmuck/applet/RunAmuck.java delete mode 100644 java/examples/3D/Form/RunAmuck/applet/RunAmuck.pde delete mode 100644 java/examples/3D/Form/RunAmuck/applet/loading.gif delete mode 100644 java/examples/3D/Form/ShapeTransform/applet/ShapeTransform.java delete mode 100644 java/examples/3D/Form/ShapeTransform/applet/ShapeTransform.pde delete mode 100644 java/examples/3D/Form/ShapeTransform/applet/loading.gif delete mode 100644 java/examples/3D/Form/Toroid/applet/Toroid.java delete mode 100644 java/examples/3D/Form/Toroid/applet/Toroid.pde delete mode 100644 java/examples/3D/Form/Toroid/applet/loading.gif delete mode 100644 java/examples/3D/Form/Vertices/applet/Vertices.java delete mode 100644 java/examples/3D/Form/Vertices/applet/Vertices.pde delete mode 100644 java/examples/3D/Form/Vertices/applet/loading.gif delete mode 100644 java/examples/3D/Image/Explode/applet/Explode.java delete mode 100644 java/examples/3D/Image/Explode/applet/Explode.pde delete mode 100644 java/examples/3D/Image/Explode/applet/loading.gif delete mode 100644 java/examples/3D/Image/Extrusion/applet/Extrusion.java delete mode 100644 java/examples/3D/Image/Extrusion/applet/Extrusion.pde delete mode 100644 java/examples/3D/Image/Extrusion/applet/loading.gif delete mode 100644 java/examples/3D/Image/Zoom/applet/Zoom.java delete mode 100644 java/examples/3D/Image/Zoom/applet/Zoom.pde delete mode 100644 java/examples/3D/Image/Zoom/applet/loading.gif delete mode 100644 java/examples/3D/Lights/Directional/applet/Directional.java delete mode 100644 java/examples/3D/Lights/Directional/applet/Directional.pde delete mode 100644 java/examples/3D/Lights/Directional/applet/loading.gif delete mode 100644 java/examples/3D/Lights/Lights1/applet/Lights1.java delete mode 100644 java/examples/3D/Lights/Lights1/applet/Lights1.pde delete mode 100644 java/examples/3D/Lights/Lights1/applet/loading.gif delete mode 100644 java/examples/3D/Lights/Lights2/applet/Lights2.java delete mode 100644 java/examples/3D/Lights/Lights2/applet/Lights2.pde delete mode 100644 java/examples/3D/Lights/Lights2/applet/loading.gif delete mode 100644 java/examples/3D/Lights/Reflection/applet/Reflection.java delete mode 100644 java/examples/3D/Lights/Reflection/applet/Reflection.pde delete mode 100644 java/examples/3D/Lights/Reflection/applet/loading.gif delete mode 100644 java/examples/3D/Lights/Spot/applet/Spot.java delete mode 100644 java/examples/3D/Lights/Spot/applet/Spot.pde delete mode 100644 java/examples/3D/Lights/Spot/applet/loading.gif delete mode 100644 java/examples/3D/Textures/Texture1/applet/Texture1.java delete mode 100644 java/examples/3D/Textures/Texture1/applet/Texture1.pde delete mode 100644 java/examples/3D/Textures/Texture1/applet/loading.gif delete mode 100644 java/examples/3D/Textures/Texture2/applet/Texture2.java delete mode 100644 java/examples/3D/Textures/Texture2/applet/Texture2.pde delete mode 100644 java/examples/3D/Textures/Texture2/applet/loading.gif delete mode 100644 java/examples/3D/Textures/Texture3/applet/Texture3.java delete mode 100644 java/examples/3D/Textures/Texture3/applet/Texture3.pde delete mode 100644 java/examples/3D/Textures/Texture3/applet/loading.gif delete mode 100644 java/examples/3D/Textures/TextureCube/applet/TextureCube.java delete mode 100644 java/examples/3D/Textures/TextureCube/applet/TextureCube.pde delete mode 100644 java/examples/3D/Textures/TextureCube/applet/loading.gif delete mode 100644 java/examples/3D/Transform/Bird/applet/Bird.java delete mode 100644 java/examples/3D/Transform/Bird/applet/Bird.pde delete mode 100644 java/examples/3D/Transform/Bird/applet/loading.gif delete mode 100644 java/examples/3D/Transform/Birds/applet/Bird.pde delete mode 100644 java/examples/3D/Transform/Birds/applet/Birds.java delete mode 100644 java/examples/3D/Transform/Birds/applet/Birds.pde delete mode 100644 java/examples/3D/Transform/Birds/applet/loading.gif delete mode 100644 java/examples/3D/Transform/CubesWithinCube/applet/Cube.pde delete mode 100644 java/examples/3D/Transform/CubesWithinCube/applet/CubesWithinCube.java delete mode 100644 java/examples/3D/Transform/CubesWithinCube/applet/CubesWithinCube.pde delete mode 100644 java/examples/3D/Transform/CubesWithinCube/applet/loading.gif delete mode 100644 java/examples/3D/Transform/PushPopCubes/applet/PushPopCubes.java delete mode 100644 java/examples/3D/Transform/PushPopCubes/applet/PushPopCubes.pde delete mode 100644 java/examples/3D/Transform/PushPopCubes/applet/loading.gif delete mode 100644 java/examples/3D/Transform/Rotate1/applet/Rotate1.java delete mode 100644 java/examples/3D/Transform/Rotate1/applet/Rotate1.pde delete mode 100644 java/examples/3D/Transform/Rotate1/applet/loading.gif delete mode 100644 java/examples/3D/Transform/Rotate2/applet/Rotate2.java delete mode 100644 java/examples/3D/Transform/Rotate2/applet/Rotate2.pde delete mode 100644 java/examples/3D/Transform/Rotate2/applet/loading.gif delete mode 100644 java/examples/3D/Typography/KineticType/applet/KineticType.java delete mode 100644 java/examples/3D/Typography/KineticType/applet/KineticType.pde delete mode 100644 java/examples/3D/Typography/KineticType/applet/Letter.pde delete mode 100644 java/examples/3D/Typography/KineticType/applet/Line.pde delete mode 100644 java/examples/3D/Typography/KineticType/applet/Word.pde delete mode 100644 java/examples/3D/Typography/KineticType/applet/loading.gif delete mode 100644 java/examples/3D/Typography/LetterK/applet/LetterK.java delete mode 100644 java/examples/3D/Typography/LetterK/applet/LetterK.pde delete mode 100644 java/examples/3D/Typography/LetterK/applet/loading.gif delete mode 100644 java/examples/3D/Typography/Typing/applet/Typing.java delete mode 100644 java/examples/3D/Typography/Typing/applet/Typing.pde delete mode 100644 java/examples/3D/Typography/Typing/applet/loading.gif delete mode 100644 java/examples/Basics/Arrays/Array/applet/Array.java delete mode 100644 java/examples/Basics/Arrays/Array/applet/Array.pde delete mode 100644 java/examples/Basics/Arrays/Array/applet/loading.gif delete mode 100644 java/examples/Basics/Arrays/Array2D/applet/Array2D.java delete mode 100644 java/examples/Basics/Arrays/Array2D/applet/Array2D.pde delete mode 100644 java/examples/Basics/Arrays/Array2D/applet/loading.gif delete mode 100644 java/examples/Basics/Arrays/ArrayObjects/applet/ArrayObjects.java delete mode 100644 java/examples/Basics/Arrays/ArrayObjects/applet/ArrayObjects.pde delete mode 100644 java/examples/Basics/Arrays/ArrayObjects/applet/loading.gif delete mode 100644 java/examples/Basics/Color/Brightness/applet/Brightness.java delete mode 100644 java/examples/Basics/Color/Brightness/applet/Brightness.pde delete mode 100644 java/examples/Basics/Color/Brightness/applet/loading.gif delete mode 100644 java/examples/Basics/Color/ColorWheel/applet/ColorWheel.java delete mode 100644 java/examples/Basics/Color/ColorWheel/applet/ColorWheel.pde delete mode 100644 java/examples/Basics/Color/ColorWheel/applet/loading.gif delete mode 100644 java/examples/Basics/Color/Creating/applet/Creating.java delete mode 100644 java/examples/Basics/Color/Creating/applet/Creating.pde delete mode 100644 java/examples/Basics/Color/Creating/applet/loading.gif delete mode 100644 java/examples/Basics/Color/Hue/applet/Hue.java delete mode 100644 java/examples/Basics/Color/Hue/applet/Hue.pde delete mode 100644 java/examples/Basics/Color/Hue/applet/loading.gif delete mode 100644 java/examples/Basics/Color/LinearGradient/applet/LinearGradient.java delete mode 100644 java/examples/Basics/Color/LinearGradient/applet/LinearGradient.pde delete mode 100644 java/examples/Basics/Color/LinearGradient/applet/loading.gif delete mode 100644 java/examples/Basics/Color/RadialGradient/applet/RadialGradient.java delete mode 100644 java/examples/Basics/Color/RadialGradient/applet/RadialGradient.pde delete mode 100644 java/examples/Basics/Color/RadialGradient/applet/loading.gif delete mode 100644 java/examples/Basics/Color/Reading/applet/Reading.java delete mode 100644 java/examples/Basics/Color/Reading/applet/Reading.pde delete mode 100644 java/examples/Basics/Color/Reading/applet/loading.gif delete mode 100644 java/examples/Basics/Color/Relativity/applet/Relativity.java delete mode 100644 java/examples/Basics/Color/Relativity/applet/Relativity.pde delete mode 100644 java/examples/Basics/Color/Relativity/applet/loading.gif delete mode 100644 java/examples/Basics/Color/Saturation/applet/Saturation.java delete mode 100644 java/examples/Basics/Color/Saturation/applet/Saturation.pde delete mode 100644 java/examples/Basics/Color/Saturation/applet/loading.gif delete mode 100644 java/examples/Basics/Color/WaveGradient/applet/WaveGradient.java delete mode 100644 java/examples/Basics/Color/WaveGradient/applet/WaveGradient.pde delete mode 100644 java/examples/Basics/Color/WaveGradient/applet/loading.gif delete mode 100644 java/examples/Basics/Control/Conditionals1/applet/Conditionals1.java delete mode 100644 java/examples/Basics/Control/Conditionals1/applet/Conditionals1.pde delete mode 100644 java/examples/Basics/Control/Conditionals1/applet/loading.gif delete mode 100644 java/examples/Basics/Control/Conditionals2/applet/Conditionals2.java delete mode 100644 java/examples/Basics/Control/Conditionals2/applet/Conditionals2.pde delete mode 100644 java/examples/Basics/Control/Conditionals2/applet/loading.gif delete mode 100644 java/examples/Basics/Control/EmbeddedIteration/applet/EmbeddedIteration.java delete mode 100644 java/examples/Basics/Control/EmbeddedIteration/applet/EmbeddedIteration.pde delete mode 100644 java/examples/Basics/Control/EmbeddedIteration/applet/loading.gif delete mode 100644 java/examples/Basics/Control/Iteration/applet/Iteration.java delete mode 100644 java/examples/Basics/Control/Iteration/applet/Iteration.pde delete mode 100644 java/examples/Basics/Control/Iteration/applet/loading.gif delete mode 100644 java/examples/Basics/Control/LogicalOperators/applet/LogicalOperators.java delete mode 100644 java/examples/Basics/Control/LogicalOperators/applet/LogicalOperators.pde delete mode 100644 java/examples/Basics/Control/LogicalOperators/applet/loading.gif delete mode 100644 java/examples/Basics/Data/CharactersStrings/applet/CharactersStrings.java delete mode 100644 java/examples/Basics/Data/CharactersStrings/applet/CharactersStrings.pde delete mode 100644 java/examples/Basics/Data/CharactersStrings/applet/loading.gif delete mode 100644 java/examples/Basics/Data/DatatypeConversion/applet/DatatypeConversion.java delete mode 100644 java/examples/Basics/Data/DatatypeConversion/applet/DatatypeConversion.pde delete mode 100644 java/examples/Basics/Data/DatatypeConversion/applet/loading.gif delete mode 100644 java/examples/Basics/Data/IntegersFloats/applet/IntegersFloats.java delete mode 100644 java/examples/Basics/Data/IntegersFloats/applet/IntegersFloats.pde delete mode 100644 java/examples/Basics/Data/IntegersFloats/applet/loading.gif delete mode 100644 java/examples/Basics/Data/TrueFalse/applet/TrueFalse.java delete mode 100644 java/examples/Basics/Data/TrueFalse/applet/TrueFalse.pde delete mode 100644 java/examples/Basics/Data/TrueFalse/applet/loading.gif delete mode 100644 java/examples/Basics/Data/VariableScope/applet/VariableScope.java delete mode 100644 java/examples/Basics/Data/VariableScope/applet/VariableScope.pde delete mode 100644 java/examples/Basics/Data/VariableScope/applet/loading.gif delete mode 100644 java/examples/Basics/Data/Variables/applet/Variables.java delete mode 100644 java/examples/Basics/Data/Variables/applet/Variables.pde delete mode 100644 java/examples/Basics/Data/Variables/applet/loading.gif delete mode 100644 java/examples/Basics/Form/Bezier/applet/Bezier.java delete mode 100644 java/examples/Basics/Form/Bezier/applet/Bezier.pde delete mode 100644 java/examples/Basics/Form/Bezier/applet/loading.gif delete mode 100644 java/examples/Basics/Form/BezierEllipse/applet/BezierEllipse.java delete mode 100644 java/examples/Basics/Form/BezierEllipse/applet/BezierEllipse.pde delete mode 100644 java/examples/Basics/Form/BezierEllipse/applet/loading.gif delete mode 100644 java/examples/Basics/Form/PieChart/applet/PieChart.java delete mode 100644 java/examples/Basics/Form/PieChart/applet/PieChart.pde delete mode 100644 java/examples/Basics/Form/PieChart/applet/loading.gif delete mode 100644 java/examples/Basics/Form/PointsLines/applet/PointsLines.java delete mode 100644 java/examples/Basics/Form/PointsLines/applet/PointsLines.pde delete mode 100644 java/examples/Basics/Form/PointsLines/applet/loading.gif delete mode 100644 java/examples/Basics/Form/ShapePrimitives/applet/ShapePrimitives.java delete mode 100644 java/examples/Basics/Form/ShapePrimitives/applet/ShapePrimitives.pde delete mode 100644 java/examples/Basics/Form/ShapePrimitives/applet/loading.gif delete mode 100644 java/examples/Basics/Form/SimpleCurves/applet/SimpleCurves.java delete mode 100644 java/examples/Basics/Form/SimpleCurves/applet/SimpleCurves.pde delete mode 100644 java/examples/Basics/Form/SimpleCurves/applet/loading.gif delete mode 100644 java/examples/Basics/Form/TriangleStrip/applet/TriangleStrip.java delete mode 100644 java/examples/Basics/Form/TriangleStrip/applet/TriangleStrip.pde delete mode 100644 java/examples/Basics/Form/TriangleStrip/applet/loading.gif delete mode 100644 java/examples/Basics/Form/Vertices/applet/Vertices.java delete mode 100644 java/examples/Basics/Form/Vertices/applet/Vertices.pde delete mode 100644 java/examples/Basics/Form/Vertices/applet/loading.gif delete mode 100644 java/examples/Basics/Image/Alphamask/applet/Alphamask.java delete mode 100644 java/examples/Basics/Image/Alphamask/applet/Alphamask.pde delete mode 100644 java/examples/Basics/Image/Alphamask/applet/loading.gif delete mode 100644 java/examples/Basics/Image/BackgroundImage/applet/BackgroundImage.java delete mode 100644 java/examples/Basics/Image/BackgroundImage/applet/BackgroundImage.pde delete mode 100644 java/examples/Basics/Image/BackgroundImage/applet/loading.gif delete mode 100644 java/examples/Basics/Image/CreateImage/applet/CreateImage.java delete mode 100644 java/examples/Basics/Image/CreateImage/applet/CreateImage.pde delete mode 100644 java/examples/Basics/Image/CreateImage/applet/loading.gif delete mode 100644 java/examples/Basics/Image/LoadDisplayImage/applet/LoadDisplayImage.java delete mode 100644 java/examples/Basics/Image/LoadDisplayImage/applet/LoadDisplayImage.pde delete mode 100644 java/examples/Basics/Image/LoadDisplayImage/applet/loading.gif delete mode 100644 java/examples/Basics/Image/Pointillism/applet/Pointillism.java delete mode 100644 java/examples/Basics/Image/Pointillism/applet/Pointillism.pde delete mode 100644 java/examples/Basics/Image/Pointillism/applet/loading.gif delete mode 100644 java/examples/Basics/Image/Sprite/applet/Sprite.java delete mode 100644 java/examples/Basics/Image/Sprite/applet/Sprite.pde delete mode 100644 java/examples/Basics/Image/Sprite/applet/loading.gif delete mode 100644 java/examples/Basics/Image/Transparency/applet/Transparency.java delete mode 100644 java/examples/Basics/Image/Transparency/applet/Transparency.pde delete mode 100644 java/examples/Basics/Image/Transparency/applet/loading.gif delete mode 100644 java/examples/Basics/Input/Clock/applet/Clock.java delete mode 100644 java/examples/Basics/Input/Clock/applet/Clock.pde delete mode 100644 java/examples/Basics/Input/Clock/applet/loading.gif delete mode 100644 java/examples/Basics/Input/Constrain/applet/Constrain.java delete mode 100644 java/examples/Basics/Input/Constrain/applet/Constrain.pde delete mode 100644 java/examples/Basics/Input/Constrain/applet/loading.gif delete mode 100644 java/examples/Basics/Input/Easing/applet/Easing.java delete mode 100644 java/examples/Basics/Input/Easing/applet/Easing.pde delete mode 100644 java/examples/Basics/Input/Easing/applet/loading.gif delete mode 100644 java/examples/Basics/Input/Keyboard/applet/Keyboard.java delete mode 100644 java/examples/Basics/Input/Keyboard/applet/Keyboard.pde delete mode 100644 java/examples/Basics/Input/Keyboard/applet/loading.gif delete mode 100644 java/examples/Basics/Input/KeyboardFunctions/applet/KeyboardFunctions.java delete mode 100644 java/examples/Basics/Input/KeyboardFunctions/applet/KeyboardFunctions.pde delete mode 100644 java/examples/Basics/Input/KeyboardFunctions/applet/loading.gif delete mode 100644 java/examples/Basics/Input/Milliseconds/applet/Milliseconds.java delete mode 100644 java/examples/Basics/Input/Milliseconds/applet/Milliseconds.pde delete mode 100644 java/examples/Basics/Input/Milliseconds/applet/loading.gif delete mode 100644 java/examples/Basics/Input/Mouse1D/applet/Mouse1D.java delete mode 100644 java/examples/Basics/Input/Mouse1D/applet/Mouse1D.pde delete mode 100644 java/examples/Basics/Input/Mouse1D/applet/loading.gif delete mode 100644 java/examples/Basics/Input/Mouse2D/applet/Mouse2D.java delete mode 100644 java/examples/Basics/Input/Mouse2D/applet/Mouse2D.pde delete mode 100644 java/examples/Basics/Input/Mouse2D/applet/loading.gif delete mode 100644 java/examples/Basics/Input/MouseFunctions/applet/MouseFunctions.java delete mode 100644 java/examples/Basics/Input/MouseFunctions/applet/MouseFunctions.pde delete mode 100644 java/examples/Basics/Input/MouseFunctions/applet/loading.gif delete mode 100644 java/examples/Basics/Input/MousePress/applet/MousePress.java delete mode 100644 java/examples/Basics/Input/MousePress/applet/MousePress.pde delete mode 100644 java/examples/Basics/Input/MousePress/applet/loading.gif delete mode 100644 java/examples/Basics/Input/MouseSignals/applet/MouseSignals.java delete mode 100644 java/examples/Basics/Input/MouseSignals/applet/MouseSignals.pde delete mode 100644 java/examples/Basics/Input/MouseSignals/applet/loading.gif delete mode 100644 java/examples/Basics/Input/StoringInput/applet/StoringInput.java delete mode 100644 java/examples/Basics/Input/StoringInput/applet/StoringInput.pde delete mode 100644 java/examples/Basics/Input/StoringInput/applet/loading.gif delete mode 100644 java/examples/Basics/Math/AdditiveWave/applet/AdditiveWave.java delete mode 100644 java/examples/Basics/Math/AdditiveWave/applet/AdditiveWave.pde delete mode 100644 java/examples/Basics/Math/AdditiveWave/applet/loading.gif delete mode 100644 java/examples/Basics/Math/Arctangent/applet/Arctangent.java delete mode 100644 java/examples/Basics/Math/Arctangent/applet/Arctangent.pde delete mode 100644 java/examples/Basics/Math/Arctangent/applet/loading.gif delete mode 100644 java/examples/Basics/Math/Distance1D/applet/Distance1D.java delete mode 100644 java/examples/Basics/Math/Distance1D/applet/Distance1D.pde delete mode 100644 java/examples/Basics/Math/Distance1D/applet/loading.gif delete mode 100644 java/examples/Basics/Math/Distance2D/applet/Distance2D.java delete mode 100644 java/examples/Basics/Math/Distance2D/applet/Distance2D.pde delete mode 100644 java/examples/Basics/Math/Distance2D/applet/loading.gif delete mode 100644 java/examples/Basics/Math/DoubleRandom/applet/DoubleRandom.java delete mode 100644 java/examples/Basics/Math/DoubleRandom/applet/DoubleRandom.pde delete mode 100644 java/examples/Basics/Math/DoubleRandom/applet/loading.gif delete mode 100644 java/examples/Basics/Math/Graphing2DEquation/applet/Graphing2DEquation.java delete mode 100644 java/examples/Basics/Math/Graphing2DEquation/applet/Graphing2DEquation.pde delete mode 100644 java/examples/Basics/Math/Graphing2DEquation/applet/loading.gif delete mode 100644 java/examples/Basics/Math/IncrementDecrement/applet/IncrementDecrement.java delete mode 100644 java/examples/Basics/Math/IncrementDecrement/applet/IncrementDecrement.pde delete mode 100644 java/examples/Basics/Math/IncrementDecrement/applet/loading.gif delete mode 100644 java/examples/Basics/Math/Modulo/applet/Modulo.java delete mode 100644 java/examples/Basics/Math/Modulo/applet/Modulo.pde delete mode 100644 java/examples/Basics/Math/Modulo/applet/loading.gif delete mode 100644 java/examples/Basics/Math/Noise1D/applet/Noise1D.java delete mode 100644 java/examples/Basics/Math/Noise1D/applet/Noise1D.pde delete mode 100644 java/examples/Basics/Math/Noise1D/applet/loading.gif delete mode 100644 java/examples/Basics/Math/Noise2D/applet/Noise2D.java delete mode 100644 java/examples/Basics/Math/Noise2D/applet/Noise2D.pde delete mode 100644 java/examples/Basics/Math/Noise2D/applet/loading.gif delete mode 100644 java/examples/Basics/Math/Noise3D/applet/Noise3D.java delete mode 100644 java/examples/Basics/Math/Noise3D/applet/Noise3D.pde delete mode 100644 java/examples/Basics/Math/Noise3D/applet/loading.gif delete mode 100644 java/examples/Basics/Math/NoiseWave/applet/NoiseWave.java delete mode 100644 java/examples/Basics/Math/NoiseWave/applet/NoiseWave.pde delete mode 100644 java/examples/Basics/Math/NoiseWave/applet/loading.gif delete mode 100644 java/examples/Basics/Math/OperatorPrecedence/applet/OperatorPrecedence.java delete mode 100644 java/examples/Basics/Math/OperatorPrecedence/applet/OperatorPrecedence.pde delete mode 100644 java/examples/Basics/Math/OperatorPrecedence/applet/loading.gif delete mode 100644 java/examples/Basics/Math/PolarToCartesian/applet/PolarToCartesian.java delete mode 100644 java/examples/Basics/Math/PolarToCartesian/applet/PolarToCartesian.pde delete mode 100644 java/examples/Basics/Math/PolarToCartesian/applet/loading.gif delete mode 100644 java/examples/Basics/Math/Random/applet/Random.java delete mode 100644 java/examples/Basics/Math/Random/applet/Random.pde delete mode 100644 java/examples/Basics/Math/Random/applet/loading.gif delete mode 100644 java/examples/Basics/Math/Sine/applet/Sine.java delete mode 100644 java/examples/Basics/Math/Sine/applet/Sine.pde delete mode 100644 java/examples/Basics/Math/Sine/applet/loading.gif delete mode 100644 java/examples/Basics/Math/SineCosine/applet/SineCosine.java delete mode 100644 java/examples/Basics/Math/SineCosine/applet/SineCosine.pde delete mode 100644 java/examples/Basics/Math/SineCosine/applet/loading.gif delete mode 100644 java/examples/Basics/Math/SineWave/applet/SineWave.java delete mode 100644 java/examples/Basics/Math/SineWave/applet/SineWave.pde delete mode 100644 java/examples/Basics/Math/SineWave/applet/loading.gif delete mode 100644 java/examples/Basics/Objects/CompositeObjects/applet/CompositeObjects.java delete mode 100644 java/examples/Basics/Objects/CompositeObjects/applet/CompositeObjects.pde delete mode 100644 java/examples/Basics/Objects/CompositeObjects/applet/loading.gif delete mode 100644 java/examples/Basics/Objects/Inheritance/applet/Inheritance.java delete mode 100644 java/examples/Basics/Objects/Inheritance/applet/Inheritance.pde delete mode 100644 java/examples/Basics/Objects/Inheritance/applet/loading.gif delete mode 100644 java/examples/Basics/Objects/MultipleConstructors/applet/MultipleConstructors.java delete mode 100644 java/examples/Basics/Objects/MultipleConstructors/applet/MultipleConstructors.pde delete mode 100644 java/examples/Basics/Objects/MultipleConstructors/applet/loading.gif delete mode 100644 java/examples/Basics/Objects/Neighborhood/applet/Neighborhood.java delete mode 100644 java/examples/Basics/Objects/Neighborhood/applet/Neighborhood.pde delete mode 100644 java/examples/Basics/Objects/Neighborhood/applet/loading.gif delete mode 100644 java/examples/Basics/Objects/Objects/applet/Objects.java delete mode 100644 java/examples/Basics/Objects/Objects/applet/Objects.pde delete mode 100644 java/examples/Basics/Objects/Objects/applet/loading.gif delete mode 100644 java/examples/Basics/Shape/DisableStyle/applet/DisableStyle.java delete mode 100644 java/examples/Basics/Shape/DisableStyle/applet/DisableStyle.pde delete mode 100644 java/examples/Basics/Shape/DisableStyle/applet/loading.gif delete mode 100644 java/examples/Basics/Shape/GetChild/applet/GetChild.java delete mode 100644 java/examples/Basics/Shape/GetChild/applet/GetChild.pde delete mode 100644 java/examples/Basics/Shape/GetChild/applet/loading.gif delete mode 100644 java/examples/Basics/Shape/LoadDisplayShape/applet/LoadDisplayShape.java delete mode 100644 java/examples/Basics/Shape/LoadDisplayShape/applet/LoadDisplayShape.pde delete mode 100644 java/examples/Basics/Shape/LoadDisplayShape/applet/loading.gif delete mode 100644 java/examples/Basics/Shape/ScaleShape/applet/ScaleShape.java delete mode 100644 java/examples/Basics/Shape/ScaleShape/applet/ScaleShape.pde delete mode 100644 java/examples/Basics/Shape/ScaleShape/applet/loading.gif delete mode 100644 java/examples/Basics/Structure/Coordinates/applet/Coordinates.java delete mode 100644 java/examples/Basics/Structure/Coordinates/applet/Coordinates.pde delete mode 100644 java/examples/Basics/Structure/Coordinates/applet/loading.gif delete mode 100644 java/examples/Basics/Structure/CreateGraphics/applet/CreateGraphics.java delete mode 100644 java/examples/Basics/Structure/CreateGraphics/applet/CreateGraphics.pde delete mode 100644 java/examples/Basics/Structure/CreateGraphics/applet/loading.gif delete mode 100644 java/examples/Basics/Structure/Functions/applet/Functions.java delete mode 100644 java/examples/Basics/Structure/Functions/applet/Functions.pde delete mode 100644 java/examples/Basics/Structure/Functions/applet/loading.gif delete mode 100644 java/examples/Basics/Structure/Loop/applet/Loop.java delete mode 100644 java/examples/Basics/Structure/Loop/applet/Loop.pde delete mode 100644 java/examples/Basics/Structure/Loop/applet/loading.gif delete mode 100644 java/examples/Basics/Structure/NoLoop/applet/NoLoop.java delete mode 100644 java/examples/Basics/Structure/NoLoop/applet/NoLoop.pde delete mode 100644 java/examples/Basics/Structure/NoLoop/applet/loading.gif delete mode 100644 java/examples/Basics/Structure/Recursion/applet/Recursion.java delete mode 100644 java/examples/Basics/Structure/Recursion/applet/Recursion.pde delete mode 100644 java/examples/Basics/Structure/Recursion/applet/loading.gif delete mode 100644 java/examples/Basics/Structure/Recursion2/applet/Recursion2.java delete mode 100644 java/examples/Basics/Structure/Recursion2/applet/Recursion2.pde delete mode 100644 java/examples/Basics/Structure/Recursion2/applet/loading.gif delete mode 100644 java/examples/Basics/Structure/Redraw/applet/Redraw.java delete mode 100644 java/examples/Basics/Structure/Redraw/applet/Redraw.pde delete mode 100644 java/examples/Basics/Structure/Redraw/applet/loading.gif delete mode 100644 java/examples/Basics/Structure/SetupDraw/applet/SetupDraw.java delete mode 100644 java/examples/Basics/Structure/SetupDraw/applet/SetupDraw.pde delete mode 100644 java/examples/Basics/Structure/SetupDraw/applet/loading.gif delete mode 100644 java/examples/Basics/Structure/StatementsComments/applet/StatementsComments.java delete mode 100644 java/examples/Basics/Structure/StatementsComments/applet/StatementsComments.pde delete mode 100644 java/examples/Basics/Structure/StatementsComments/applet/loading.gif delete mode 100644 java/examples/Basics/Structure/WidthHeight/applet/WidthHeight.java delete mode 100644 java/examples/Basics/Structure/WidthHeight/applet/WidthHeight.pde delete mode 100644 java/examples/Basics/Structure/WidthHeight/applet/loading.gif delete mode 100644 java/examples/Basics/Transform/Arm/applet/Arm.java delete mode 100644 java/examples/Basics/Transform/Arm/applet/Arm.pde delete mode 100644 java/examples/Basics/Transform/Arm/applet/loading.gif delete mode 100644 java/examples/Basics/Transform/Rotate/applet/Rotate.java delete mode 100644 java/examples/Basics/Transform/Rotate/applet/Rotate.pde delete mode 100644 java/examples/Basics/Transform/Rotate/applet/loading.gif delete mode 100644 java/examples/Basics/Transform/Scale/applet/Scale.java delete mode 100644 java/examples/Basics/Transform/Scale/applet/Scale.pde delete mode 100644 java/examples/Basics/Transform/Scale/applet/loading.gif delete mode 100644 java/examples/Basics/Transform/Translate/applet/Translate.java delete mode 100644 java/examples/Basics/Transform/Translate/applet/Translate.pde delete mode 100644 java/examples/Basics/Transform/Translate/applet/loading.gif delete mode 100644 java/examples/Basics/Transform/TriangleFlower/applet/TriangleFlower.java delete mode 100644 java/examples/Basics/Transform/TriangleFlower/applet/TriangleFlower.pde delete mode 100644 java/examples/Basics/Transform/TriangleFlower/applet/loading.gif delete mode 100644 java/examples/Basics/Typography/Letters/applet/Letters.java delete mode 100644 java/examples/Basics/Typography/Letters/applet/Letters.pde delete mode 100644 java/examples/Basics/Typography/Letters/applet/loading.gif delete mode 100644 java/examples/Basics/Typography/Words/applet/Words.java delete mode 100644 java/examples/Basics/Typography/Words/applet/Words.pde delete mode 100644 java/examples/Basics/Typography/Words/applet/loading.gif delete mode 100644 java/examples/Basics/Web/EmbeddedLinks/applet/EmbeddedLinks.java delete mode 100644 java/examples/Basics/Web/EmbeddedLinks/applet/EmbeddedLinks.pde delete mode 100644 java/examples/Basics/Web/EmbeddedLinks/applet/loading.gif delete mode 100644 java/examples/Basics/Web/LoadingImages/applet/LoadingImages.java delete mode 100644 java/examples/Basics/Web/LoadingImages/applet/LoadingImages.pde delete mode 100644 java/examples/Basics/Web/LoadingImages/applet/loading.gif delete mode 100644 java/examples/Topics/Advanced Data/ArrayListClass/applet/ArrayListClass.java delete mode 100644 java/examples/Topics/Advanced Data/ArrayListClass/applet/ArrayListClass.pde delete mode 100644 java/examples/Topics/Advanced Data/ArrayListClass/applet/Ball.pde delete mode 100644 java/examples/Topics/Advanced Data/ArrayListClass/applet/loading.gif delete mode 100644 java/examples/Topics/Advanced Data/HashMapClass/applet/HashMapClass.java delete mode 100644 java/examples/Topics/Advanced Data/HashMapClass/applet/HashMapClass.pde delete mode 100644 java/examples/Topics/Advanced Data/HashMapClass/applet/Word.pde delete mode 100644 java/examples/Topics/Advanced Data/HashMapClass/applet/loading.gif delete mode 100644 java/examples/Topics/Animation/AnimatedSprite/applet/AnimatedSprite.java delete mode 100644 java/examples/Topics/Animation/AnimatedSprite/applet/AnimatedSprite.pde delete mode 100644 java/examples/Topics/Animation/AnimatedSprite/applet/Animation.pde delete mode 100644 java/examples/Topics/Animation/AnimatedSprite/applet/loading.gif delete mode 100644 java/examples/Topics/Animation/Sequential/applet/Sequential.java delete mode 100644 java/examples/Topics/Animation/Sequential/applet/Sequential.pde delete mode 100644 java/examples/Topics/Animation/Sequential/applet/loading.gif delete mode 100644 java/examples/Topics/Cellular Automata/Conway/applet/Conway.java delete mode 100644 java/examples/Topics/Cellular Automata/Conway/applet/Conway.pde delete mode 100644 java/examples/Topics/Cellular Automata/Conway/applet/loading.gif delete mode 100644 java/examples/Topics/Cellular Automata/Spore1/applet/Spore1.java delete mode 100644 java/examples/Topics/Cellular Automata/Spore1/applet/Spore1.pde delete mode 100644 java/examples/Topics/Cellular Automata/Spore1/applet/loading.gif delete mode 100644 java/examples/Topics/Cellular Automata/Spore2/applet/Spore2.java delete mode 100644 java/examples/Topics/Cellular Automata/Spore2/applet/Spore2.pde delete mode 100644 java/examples/Topics/Cellular Automata/Spore2/applet/loading.gif delete mode 100644 java/examples/Topics/Cellular Automata/Wolfram/applet/CA.pde delete mode 100644 java/examples/Topics/Cellular Automata/Wolfram/applet/Wolfram.java delete mode 100644 java/examples/Topics/Cellular Automata/Wolfram/applet/Wolfram.pde delete mode 100644 java/examples/Topics/Cellular Automata/Wolfram/applet/loading.gif delete mode 100644 java/examples/Topics/Drawing/Animator/applet/Animator.java delete mode 100644 java/examples/Topics/Drawing/Animator/applet/Animator.pde delete mode 100644 java/examples/Topics/Drawing/Animator/applet/loading.gif delete mode 100644 java/examples/Topics/Drawing/ContinuousLines/applet/ContinuousLines.java delete mode 100644 java/examples/Topics/Drawing/ContinuousLines/applet/ContinuousLines.pde delete mode 100644 java/examples/Topics/Drawing/ContinuousLines/applet/loading.gif delete mode 100644 java/examples/Topics/Drawing/CustomTool/applet/CustomTool.java delete mode 100644 java/examples/Topics/Drawing/CustomTool/applet/CustomTool.pde delete mode 100644 java/examples/Topics/Drawing/CustomTool/applet/loading.gif delete mode 100644 java/examples/Topics/Drawing/Pattern/applet/Pattern.java delete mode 100644 java/examples/Topics/Drawing/Pattern/applet/Pattern.pde delete mode 100644 java/examples/Topics/Drawing/Pattern/applet/loading.gif delete mode 100644 java/examples/Topics/Drawing/Pulses/applet/Pulses.java delete mode 100644 java/examples/Topics/Drawing/Pulses/applet/Pulses.pde delete mode 100644 java/examples/Topics/Drawing/Pulses/applet/loading.gif delete mode 100644 java/examples/Topics/Drawing/ScribblePlotter/applet/ScribblePlotter.java delete mode 100644 java/examples/Topics/Drawing/ScribblePlotter/applet/ScribblePlotter.pde delete mode 100644 java/examples/Topics/Drawing/ScribblePlotter/applet/loading.gif delete mode 100644 java/examples/Topics/Effects/FireCube/applet/FireCube.java delete mode 100644 java/examples/Topics/Effects/FireCube/applet/FireCube.pde delete mode 100644 java/examples/Topics/Effects/FireCube/applet/loading.gif delete mode 100644 java/examples/Topics/Effects/Lens/applet/Lens.java delete mode 100644 java/examples/Topics/Effects/Lens/applet/Lens.pde delete mode 100644 java/examples/Topics/Effects/Lens/applet/loading.gif delete mode 100644 java/examples/Topics/Effects/Metaball/applet/Metaball.java delete mode 100644 java/examples/Topics/Effects/Metaball/applet/Metaball.pde delete mode 100644 java/examples/Topics/Effects/Metaball/applet/loading.gif delete mode 100644 java/examples/Topics/Effects/Plasma/applet/Plasma.java delete mode 100644 java/examples/Topics/Effects/Plasma/applet/Plasma.pde delete mode 100644 java/examples/Topics/Effects/Plasma/applet/loading.gif delete mode 100644 java/examples/Topics/Effects/Tunnel/applet/Tunnel.java delete mode 100644 java/examples/Topics/Effects/Tunnel/applet/Tunnel.pde delete mode 100644 java/examples/Topics/Effects/Tunnel/applet/loading.gif delete mode 100644 java/examples/Topics/Effects/UnlimitedSprites/applet/UnlimitedSprites.java delete mode 100644 java/examples/Topics/Effects/UnlimitedSprites/applet/UnlimitedSprites.pde delete mode 100644 java/examples/Topics/Effects/UnlimitedSprites/applet/loading.gif delete mode 100644 java/examples/Topics/Effects/Wormhole/applet/Wormhole.java delete mode 100644 java/examples/Topics/Effects/Wormhole/applet/Wormhole.pde delete mode 100644 java/examples/Topics/Effects/Wormhole/applet/loading.gif delete mode 100644 java/examples/Topics/Fractals and L-Systems/Koch/applet/Koch.java delete mode 100644 java/examples/Topics/Fractals and L-Systems/Koch/applet/Koch.pde delete mode 100644 java/examples/Topics/Fractals and L-Systems/Koch/applet/loading.gif delete mode 100644 java/examples/Topics/Fractals and L-Systems/Mandelbrot/applet/Mandelbrot.java delete mode 100644 java/examples/Topics/Fractals and L-Systems/Mandelbrot/applet/Mandelbrot.pde delete mode 100644 java/examples/Topics/Fractals and L-Systems/Mandelbrot/applet/loading.gif delete mode 100644 java/examples/Topics/Fractals and L-Systems/PenroseSnowflake/applet/LSystem.pde delete mode 100644 java/examples/Topics/Fractals and L-Systems/PenroseSnowflake/applet/PenroseSnowflake.java delete mode 100644 java/examples/Topics/Fractals and L-Systems/PenroseSnowflake/applet/PenroseSnowflake.pde delete mode 100644 java/examples/Topics/Fractals and L-Systems/PenroseSnowflake/applet/PenroseSnowflakeLSystem.pde delete mode 100644 java/examples/Topics/Fractals and L-Systems/PenroseSnowflake/applet/loading.gif delete mode 100644 java/examples/Topics/Fractals and L-Systems/PenroseTile/applet/LSystem.pde delete mode 100644 java/examples/Topics/Fractals and L-Systems/PenroseTile/applet/PenroseLSystem.pde delete mode 100644 java/examples/Topics/Fractals and L-Systems/PenroseTile/applet/PenroseTile.java delete mode 100644 java/examples/Topics/Fractals and L-Systems/PenroseTile/applet/PenroseTile.pde delete mode 100644 java/examples/Topics/Fractals and L-Systems/PenroseTile/applet/loading.gif delete mode 100644 java/examples/Topics/Fractals and L-Systems/Pentigree/applet/LSystem.pde delete mode 100644 java/examples/Topics/Fractals and L-Systems/Pentigree/applet/Pentigree.java delete mode 100644 java/examples/Topics/Fractals and L-Systems/Pentigree/applet/Pentigree.pde delete mode 100644 java/examples/Topics/Fractals and L-Systems/Pentigree/applet/PentigreeLSystem.pde delete mode 100644 java/examples/Topics/Fractals and L-Systems/Pentigree/applet/loading.gif delete mode 100644 java/examples/Topics/Fractals and L-Systems/Tree/applet/Tree.java delete mode 100644 java/examples/Topics/Fractals and L-Systems/Tree/applet/Tree.pde delete mode 100644 java/examples/Topics/Fractals and L-Systems/Tree/applet/loading.gif delete mode 100644 java/examples/Topics/GUI/Button/applet/Button.java delete mode 100644 java/examples/Topics/GUI/Button/applet/Button.pde delete mode 100644 java/examples/Topics/GUI/Button/applet/loading.gif delete mode 100644 java/examples/Topics/GUI/Buttons/applet/Buttons.java delete mode 100644 java/examples/Topics/GUI/Buttons/applet/Buttons.pde delete mode 100644 java/examples/Topics/GUI/Buttons/applet/loading.gif delete mode 100644 java/examples/Topics/GUI/Handles/applet/Handles.java delete mode 100644 java/examples/Topics/GUI/Handles/applet/Handles.pde delete mode 100644 java/examples/Topics/GUI/Handles/applet/loading.gif delete mode 100644 java/examples/Topics/GUI/ImageButton/applet/ImageButton.java delete mode 100644 java/examples/Topics/GUI/ImageButton/applet/ImageButton.pde delete mode 100644 java/examples/Topics/GUI/ImageButton/applet/loading.gif delete mode 100644 java/examples/Topics/GUI/Rollover/applet/Rollover.java delete mode 100644 java/examples/Topics/GUI/Rollover/applet/Rollover.pde delete mode 100644 java/examples/Topics/GUI/Rollover/applet/loading.gif delete mode 100644 java/examples/Topics/GUI/Scrollbar/applet/Scrollbar.java delete mode 100644 java/examples/Topics/GUI/Scrollbar/applet/Scrollbar.pde delete mode 100644 java/examples/Topics/GUI/Scrollbar/applet/loading.gif delete mode 100644 java/examples/Topics/Image Processing/Blur/applet/Blur.java delete mode 100644 java/examples/Topics/Image Processing/Blur/applet/Blur.pde delete mode 100644 java/examples/Topics/Image Processing/Blur/applet/loading.gif delete mode 100644 java/examples/Topics/Image Processing/Brightness/applet/Brightness.java delete mode 100644 java/examples/Topics/Image Processing/Brightness/applet/Brightness.pde delete mode 100644 java/examples/Topics/Image Processing/Brightness/applet/loading.gif delete mode 100644 java/examples/Topics/Image Processing/Convolution/applet/Convolution.java delete mode 100644 java/examples/Topics/Image Processing/Convolution/applet/Convolution.pde delete mode 100644 java/examples/Topics/Image Processing/Convolution/applet/loading.gif delete mode 100644 java/examples/Topics/Image Processing/EdgeDetection/applet/EdgeDetection.java delete mode 100644 java/examples/Topics/Image Processing/EdgeDetection/applet/EdgeDetection.pde delete mode 100644 java/examples/Topics/Image Processing/EdgeDetection/applet/loading.gif delete mode 100644 java/examples/Topics/Image Processing/Histogram/applet/Histogram.java delete mode 100644 java/examples/Topics/Image Processing/Histogram/applet/Histogram.pde delete mode 100644 java/examples/Topics/Image Processing/Histogram/applet/loading.gif delete mode 100644 java/examples/Topics/Image Processing/LinearImage/applet/LinearImage.java delete mode 100644 java/examples/Topics/Image Processing/LinearImage/applet/LinearImage.pde delete mode 100644 java/examples/Topics/Image Processing/LinearImage/applet/loading.gif delete mode 100644 java/examples/Topics/Image Processing/PixelArray/applet/PixelArray.java delete mode 100644 java/examples/Topics/Image Processing/PixelArray/applet/PixelArray.pde delete mode 100644 java/examples/Topics/Image Processing/PixelArray/applet/loading.gif delete mode 100644 java/examples/Topics/Interaction/Follow1/applet/Follow1.java delete mode 100644 java/examples/Topics/Interaction/Follow1/applet/Follow1.pde delete mode 100644 java/examples/Topics/Interaction/Follow1/applet/loading.gif delete mode 100644 java/examples/Topics/Interaction/Follow2/applet/Follow2.java delete mode 100644 java/examples/Topics/Interaction/Follow2/applet/Follow2.pde delete mode 100644 java/examples/Topics/Interaction/Follow2/applet/loading.gif delete mode 100644 java/examples/Topics/Interaction/Follow3/applet/Follow3.java delete mode 100644 java/examples/Topics/Interaction/Follow3/applet/Follow3.pde delete mode 100644 java/examples/Topics/Interaction/Follow3/applet/loading.gif delete mode 100644 java/examples/Topics/Interaction/Reach1/applet/Reach1.java delete mode 100644 java/examples/Topics/Interaction/Reach1/applet/Reach1.pde delete mode 100644 java/examples/Topics/Interaction/Reach1/applet/loading.gif delete mode 100644 java/examples/Topics/Interaction/Reach2/applet/Reach2.java delete mode 100644 java/examples/Topics/Interaction/Reach2/applet/Reach2.pde delete mode 100644 java/examples/Topics/Interaction/Reach2/applet/loading.gif delete mode 100644 java/examples/Topics/Interaction/Reach3/applet/Reach3.java delete mode 100644 java/examples/Topics/Interaction/Reach3/applet/Reach3.pde delete mode 100644 java/examples/Topics/Interaction/Reach3/applet/loading.gif delete mode 100644 java/examples/Topics/Interaction/Tickle/applet/Tickle.java delete mode 100644 java/examples/Topics/Interaction/Tickle/applet/Tickle.pde delete mode 100644 java/examples/Topics/Interaction/Tickle/applet/loading.gif delete mode 100644 java/examples/Topics/Motion/Bounce/applet/Bounce.java delete mode 100644 java/examples/Topics/Motion/Bounce/applet/Bounce.pde delete mode 100644 java/examples/Topics/Motion/Bounce/applet/loading.gif delete mode 100644 java/examples/Topics/Motion/BouncyBubbles/applet/BouncyBubbles.java delete mode 100644 java/examples/Topics/Motion/BouncyBubbles/applet/BouncyBubbles.pde delete mode 100644 java/examples/Topics/Motion/BouncyBubbles/applet/loading.gif delete mode 100644 java/examples/Topics/Motion/Brownian/applet/Brownian.java delete mode 100644 java/examples/Topics/Motion/Brownian/applet/Brownian.pde delete mode 100644 java/examples/Topics/Motion/Brownian/applet/loading.gif delete mode 100644 java/examples/Topics/Motion/CircleCollision/applet/Ball.pde delete mode 100644 java/examples/Topics/Motion/CircleCollision/applet/CircleCollision.java delete mode 100644 java/examples/Topics/Motion/CircleCollision/applet/CircleCollision.pde delete mode 100644 java/examples/Topics/Motion/CircleCollision/applet/loading.gif delete mode 100644 java/examples/Topics/Motion/Collision/applet/Collision.java delete mode 100644 java/examples/Topics/Motion/Collision/applet/Collision.pde delete mode 100644 java/examples/Topics/Motion/Collision/applet/loading.gif delete mode 100644 java/examples/Topics/Motion/Linear/applet/Linear.java delete mode 100644 java/examples/Topics/Motion/Linear/applet/Linear.pde delete mode 100644 java/examples/Topics/Motion/Linear/applet/loading.gif delete mode 100644 java/examples/Topics/Motion/MovingOnCurves/applet/MovingOnCurves.java delete mode 100644 java/examples/Topics/Motion/MovingOnCurves/applet/MovingOnCurves.pde delete mode 100644 java/examples/Topics/Motion/MovingOnCurves/applet/loading.gif delete mode 100644 java/examples/Topics/Motion/Puff/applet/Puff.java delete mode 100644 java/examples/Topics/Motion/Puff/applet/Puff.pde delete mode 100644 java/examples/Topics/Motion/Puff/applet/loading.gif delete mode 100644 java/examples/Topics/Motion/Reflection1/applet/Reflection1.java delete mode 100644 java/examples/Topics/Motion/Reflection1/applet/Reflection1.pde delete mode 100644 java/examples/Topics/Motion/Reflection1/applet/loading.gif delete mode 100644 java/examples/Topics/Motion/Reflection2/applet/Ground.pde delete mode 100644 java/examples/Topics/Motion/Reflection2/applet/Orb.pde delete mode 100644 java/examples/Topics/Motion/Reflection2/applet/Reflection2.java delete mode 100644 java/examples/Topics/Motion/Reflection2/applet/Reflection2.pde delete mode 100644 java/examples/Topics/Motion/Reflection2/applet/loading.gif delete mode 100644 java/examples/Topics/Simulate/Chain/applet/Chain.java delete mode 100644 java/examples/Topics/Simulate/Chain/applet/Chain.pde delete mode 100644 java/examples/Topics/Simulate/Chain/applet/loading.gif delete mode 100644 java/examples/Topics/Simulate/Flocking/applet/Boid.pde delete mode 100644 java/examples/Topics/Simulate/Flocking/applet/Flock.pde delete mode 100644 java/examples/Topics/Simulate/Flocking/applet/Flocking.java delete mode 100644 java/examples/Topics/Simulate/Flocking/applet/Flocking.pde delete mode 100644 java/examples/Topics/Simulate/Flocking/applet/loading.gif delete mode 100644 java/examples/Topics/Simulate/Fluid/applet/Fluid.java delete mode 100644 java/examples/Topics/Simulate/Fluid/applet/Fluid.pde delete mode 100644 java/examples/Topics/Simulate/Fluid/applet/loading.gif delete mode 100644 java/examples/Topics/Simulate/MultipleParticleSystems/applet/CrazyParticle.pde delete mode 100644 java/examples/Topics/Simulate/MultipleParticleSystems/applet/MultipleParticleSystems.java delete mode 100644 java/examples/Topics/Simulate/MultipleParticleSystems/applet/MultipleParticleSystems.pde delete mode 100644 java/examples/Topics/Simulate/MultipleParticleSystems/applet/Particle.pde delete mode 100644 java/examples/Topics/Simulate/MultipleParticleSystems/applet/ParticleSystem.pde delete mode 100644 java/examples/Topics/Simulate/MultipleParticleSystems/applet/loading.gif delete mode 100644 java/examples/Topics/Simulate/SimpleParticleSystem/applet/Particle.pde delete mode 100644 java/examples/Topics/Simulate/SimpleParticleSystem/applet/ParticleSystem.pde delete mode 100644 java/examples/Topics/Simulate/SimpleParticleSystem/applet/SimpleParticleSystem.java delete mode 100644 java/examples/Topics/Simulate/SimpleParticleSystem/applet/SimpleParticleSystem.pde delete mode 100644 java/examples/Topics/Simulate/SimpleParticleSystem/applet/loading.gif delete mode 100644 java/examples/Topics/Simulate/Smoke/applet/Smoke.java delete mode 100644 java/examples/Topics/Simulate/Smoke/applet/Smoke.pde delete mode 100644 java/examples/Topics/Simulate/Smoke/applet/loading.gif delete mode 100644 java/examples/Topics/Simulate/SmokeParticleSystem/applet/Particle.pde delete mode 100644 java/examples/Topics/Simulate/SmokeParticleSystem/applet/ParticleSystem.pde delete mode 100644 java/examples/Topics/Simulate/SmokeParticleSystem/applet/SmokeParticleSystem.java delete mode 100644 java/examples/Topics/Simulate/SmokeParticleSystem/applet/SmokeParticleSystem.pde delete mode 100644 java/examples/Topics/Simulate/SmokeParticleSystem/applet/loading.gif delete mode 100644 java/examples/Topics/Simulate/SoftBody/applet/SoftBody.java delete mode 100644 java/examples/Topics/Simulate/SoftBody/applet/SoftBody.pde delete mode 100644 java/examples/Topics/Simulate/SoftBody/applet/loading.gif delete mode 100644 java/examples/Topics/Simulate/Spring/applet/Spring.java delete mode 100644 java/examples/Topics/Simulate/Spring/applet/Spring.pde delete mode 100644 java/examples/Topics/Simulate/Spring/applet/loading.gif delete mode 100644 java/examples/Topics/Simulate/Springs/applet/Springs.java delete mode 100644 java/examples/Topics/Simulate/Springs/applet/Springs.pde delete mode 100644 java/examples/Topics/Simulate/Springs/applet/loading.gif diff --git a/java/examples/3D/Camera/MoveEye/applet/MoveEye.java b/java/examples/3D/Camera/MoveEye/applet/MoveEye.java deleted file mode 100644 index a99b32dba..000000000 --- a/java/examples/3D/Camera/MoveEye/applet/MoveEye.java +++ /dev/null @@ -1,48 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class MoveEye extends PApplet { - -/** - * Move Eye. - * by Simon Greenwold. - * - * The camera lifts up (controlled by mouseY) while looking at the same point. - */ - -public void setup() { - size(640, 360, P3D); - fill(204); -} - -public void draw() { - lights(); - background(0); - - // Change height of the camera with mouseY - camera(30.0f, mouseY, 220.0f, // eyeX, eyeY, eyeZ - 0.0f, 0.0f, 0.0f, // centerX, centerY, centerZ - 0.0f, 1.0f, 0.0f); // upX, upY, upZ - - noStroke(); - box(90); - stroke(255); - line(-100, 0, 0, 100, 0, 0); - line(0, -100, 0, 0, 100, 0); - line(0, 0, -100, 0, 0, 100); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "MoveEye" }); - } -} diff --git a/java/examples/3D/Camera/MoveEye/applet/MoveEye.pde b/java/examples/3D/Camera/MoveEye/applet/MoveEye.pde deleted file mode 100644 index 6a6384640..000000000 --- a/java/examples/3D/Camera/MoveEye/applet/MoveEye.pde +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Move Eye. - * by Simon Greenwold. - * - * The camera lifts up (controlled by mouseY) while looking at the same point. - */ - -void setup() { - size(640, 360, P3D); - fill(204); -} - -void draw() { - lights(); - background(0); - - // Change height of the camera with mouseY - camera(30.0, mouseY, 220.0, // eyeX, eyeY, eyeZ - 0.0, 0.0, 0.0, // centerX, centerY, centerZ - 0.0, 1.0, 0.0); // upX, upY, upZ - - noStroke(); - box(90); - stroke(255); - line(-100, 0, 0, 100, 0, 0); - line(0, -100, 0, 0, 100, 0); - line(0, 0, -100, 0, 0, 100); -} diff --git a/java/examples/3D/Camera/MoveEye/applet/loading.gif b/java/examples/3D/Camera/MoveEye/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~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ih>8w-$ diff --git a/java/examples/3D/Camera/OrthoVSPerspective/applet/OrthoVSPerspective.java b/java/examples/3D/Camera/OrthoVSPerspective/applet/OrthoVSPerspective.java deleted file mode 100644 index f6c2dcd1e..000000000 --- a/java/examples/3D/Camera/OrthoVSPerspective/applet/OrthoVSPerspective.java +++ /dev/null @@ -1,62 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class OrthoVSPerspective extends PApplet { - -/** - * Ortho vs Perspective. - * - * Click to see the difference between orthographic projection - * and perspective projection as applied to a simple box. - * The ortho() function sets an orthographic projection and - * defines a parallel clipping volume. All objects with the - * same dimension appear the same size, regardless of whether - * they are near or far from the camera. The parameters to this - * function specify the clipping volume where left and right - * are the minimum and maximum x values, top and bottom are the - * minimum and maximum y values, and near and far are the minimum - * and maximum z values. - */ - -public void setup() -{ - size(640, 360, P3D); - noStroke(); - fill(204); -} - -public void draw() -{ - background(0); - lights(); - - if(mousePressed) { - float fov = PI/3.0f; - float cameraZ = (height/2.0f) / tan(PI * fov / 360.0f); - perspective(fov, PApplet.parseFloat(width)/PApplet.parseFloat(height), - cameraZ/2.0f, cameraZ*2.0f); - } else { - ortho(-width/2, width/2, -height/2, height/2, -10, 10); - } - - translate(width/2, height/2, 0); - rotateX(-PI/6); - rotateY(PI/3); - box(160); -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "OrthoVSPerspective" }); - } -} diff --git a/java/examples/3D/Camera/OrthoVSPerspective/applet/OrthoVSPerspective.pde b/java/examples/3D/Camera/OrthoVSPerspective/applet/OrthoVSPerspective.pde deleted file mode 100644 index f91fec7b7..000000000 --- a/java/examples/3D/Camera/OrthoVSPerspective/applet/OrthoVSPerspective.pde +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Ortho vs Perspective. - * - * Click to see the difference between orthographic projection - * and perspective projection as applied to a simple box. - * The ortho() function sets an orthographic projection and - * defines a parallel clipping volume. All objects with the - * same dimension appear the same size, regardless of whether - * they are near or far from the camera. The parameters to this - * function specify the clipping volume where left and right - * are the minimum and maximum x values, top and bottom are the - * minimum and maximum y values, and near and far are the minimum - * and maximum z values. - */ - -void setup() -{ - size(640, 360, P3D); - noStroke(); - fill(204); -} - -void draw() -{ - background(0); - lights(); - - if(mousePressed) { - float fov = PI/3.0; - float cameraZ = (height/2.0) / tan(PI * fov / 360.0); - perspective(fov, float(width)/float(height), - cameraZ/2.0, cameraZ*2.0); - } else { - ortho(-width/2, width/2, -height/2, height/2, -10, 10); - } - - translate(width/2, height/2, 0); - rotateX(-PI/6); - rotateY(PI/3); - box(160); -} - diff --git a/java/examples/3D/Camera/OrthoVSPerspective/applet/loading.gif b/java/examples/3D/Camera/OrthoVSPerspective/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!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MStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Camera/Perspective/applet/Perspective.java b/java/examples/3D/Camera/Perspective/applet/Perspective.java deleted file mode 100644 index 82d32937c..000000000 --- a/java/examples/3D/Camera/Perspective/applet/Perspective.java +++ /dev/null @@ -1,61 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Perspective extends PApplet { - -/** - * Perspective. - * - * Move the mouse left and right to change the field of view (fov). - * Click to modify the aspect ratio. The perspective() function - * sets a perspective projection applying foreshortening, making - * distant objects appear smaller than closer ones. The parameters - * define a viewing volume with the shape of truncated pyramid. - * Objects near to the front of the volume appear their actual size, - * while farther objects appear smaller. This projection simulates - * the perspective of the world more accurately than orthographic projection. - * The version of perspective without parameters sets the default - * perspective and the version with four parameters allows the programmer - * to set the area precisely. - */ - -public void setup() { - size(640, 360, P3D); - noStroke(); -} - -public void draw() { - lights(); - background(204); - float cameraY = height/2.0f; - float fov = mouseX/PApplet.parseFloat(width) * PI/2; - float cameraZ = cameraY / tan(fov / 2.0f); - float aspect = PApplet.parseFloat(width)/PApplet.parseFloat(height); - if (mousePressed) { - aspect = aspect / 2.0f; - } - perspective(fov, aspect, cameraZ/10.0f, cameraZ*10.0f); - - translate(width/2+30, height/2, 0); - rotateX(-PI/6); - rotateY(PI/3 + mouseY/PApplet.parseFloat(height) * PI); - box(45); - translate(0, 0, -50); - box(30); -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Perspective" }); - } -} diff --git a/java/examples/3D/Camera/Perspective/applet/Perspective.pde b/java/examples/3D/Camera/Perspective/applet/Perspective.pde deleted file mode 100644 index 46695397d..000000000 --- a/java/examples/3D/Camera/Perspective/applet/Perspective.pde +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Perspective. - * - * Move the mouse left and right to change the field of view (fov). - * Click to modify the aspect ratio. The perspective() function - * sets a perspective projection applying foreshortening, making - * distant objects appear smaller than closer ones. The parameters - * define a viewing volume with the shape of truncated pyramid. - * Objects near to the front of the volume appear their actual size, - * while farther objects appear smaller. This projection simulates - * the perspective of the world more accurately than orthographic projection. - * The version of perspective without parameters sets the default - * perspective and the version with four parameters allows the programmer - * to set the area precisely. - */ - -void setup() { - size(640, 360, P3D); - noStroke(); -} - -void draw() { - lights(); - background(204); - float cameraY = height/2.0; - float fov = mouseX/float(width) * PI/2; - float cameraZ = cameraY / tan(fov / 2.0); - float aspect = float(width)/float(height); - if (mousePressed) { - aspect = aspect / 2.0; - } - perspective(fov, aspect, cameraZ/10.0, cameraZ*10.0); - - translate(width/2+30, height/2, 0); - rotateX(-PI/6); - rotateY(PI/3 + mouseY/float(height) * PI); - box(45); - translate(0, 0, -50); - box(30); -} - diff --git a/java/examples/3D/Camera/Perspective/applet/loading.gif b/java/examples/3D/Camera/Perspective/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr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U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Form/BrickTower/applet/BrickTower.java b/java/examples/3D/Form/BrickTower/applet/BrickTower.java deleted file mode 100644 index 54ac70f76..000000000 --- a/java/examples/3D/Form/BrickTower/applet/BrickTower.java +++ /dev/null @@ -1,152 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class BrickTower extends PApplet { - -/** - * Brick Tower - * by Ira Greenberg. - * - * 3D castle tower constructed out of individual bricks. - * Uses the Point3D and Cube classes. - */ - - -float bricksPerLayer = 16.0f; -float brickLayers = 18.0f; -Cube brick; -float brickWidth = 60, brickHeight = 25, brickDepth = 25; -float radius = 175.0f; -float angle = 0; - -public void setup(){ - size(640, 360, P3D); - brick = new Cube(brickWidth, brickHeight, brickDepth); -} - -public void draw(){ - background(0); - float tempX = 0, tempY = 0, tempZ = 0; - fill(182, 62, 29); - noStroke(); - // Add basic light setup - lights(); - translate(width/2, height*1.2f, -380); - // Tip tower to see inside - rotateX(radians(-45)); - // Slowly rotate tower - rotateY(frameCount * PI/600); - for (int i = 0; i < brickLayers; i++){ - // Increment rows - tempY-=brickHeight; - // Alternate brick seams - angle = 360.0f / bricksPerLayer * i/2; - for (int j = 0; j < bricksPerLayer; j++){ - tempZ = cos(radians(angle))*radius; - tempX = sin(radians(angle))*radius; - pushMatrix(); - translate(tempX, tempY, tempZ); - rotateY(radians(angle)); - // Add crenelation - if (i==brickLayers-1){ - if (j%2 == 0){ - brick.create(); - } - } - // Create main tower - else { - brick.create(); - } - popMatrix(); - angle += 360.0f/bricksPerLayer; - } - } -} - - -class Cube { - - Point3D[] vertices = new Point3D[24]; - float w, h, d; - - Cube(){ } - - Cube(float w, float h, float d){ - this.w = w; - this.h = h; - this.d = d; - - // Cube composed of 6 quads - // Front - vertices[0] = new Point3D(-w/2,-h/2,d/2); - vertices[1] = new Point3D(w/2,-h/2,d/2); - vertices[2] = new Point3D(w/2,h/2,d/2); - vertices[3] = new Point3D(-w/2,h/2,d/2); - - // Left - vertices[4] = new Point3D(-w/2,-h/2,d/2); - vertices[5] = new Point3D(-w/2,-h/2,-d/2); - vertices[6] = new Point3D(-w/2,h/2,-d/2); - vertices[7] = new Point3D(-w/2,h/2,d/2); - - // Right - vertices[8] = new Point3D(w/2,-h/2,d/2); - vertices[9] = new Point3D(w/2,-h/2,-d/2); - vertices[10] = new Point3D(w/2,h/2,-d/2); - vertices[11] = new Point3D(w/2,h/2,d/2); - - // Back - vertices[12] = new Point3D(-w/2,-h/2,-d/2); - vertices[13] = new Point3D(w/2,-h/2,-d/2); - vertices[14] = new Point3D(w/2,h/2,-d/2); - vertices[15] = new Point3D(-w/2,h/2,-d/2); - - // Top - vertices[16] = new Point3D(-w/2,-h/2,d/2); - vertices[17] = new Point3D(-w/2,-h/2,-d/2); - vertices[18] = new Point3D(w/2,-h/2,-d/2); - vertices[19] = new Point3D(w/2,-h/2,d/2); - - // Bottom - vertices[20] = new Point3D(-w/2,h/2,d/2); - vertices[21] = new Point3D(-w/2,h/2,-d/2); - vertices[22] = new Point3D(w/2,h/2,-d/2); - vertices[23] = new Point3D(w/2,h/2,d/2); - } - - public void create(){ - for (int i=0; i<6; i++){ - beginShape(QUADS); - for (int j = 0; j < 4; j++){ - vertex(vertices[j+4*i].x, vertices[j+4*i].y, vertices[j+4*i].z); - } - endShape(); - } - } -} -class Point3D { - float x, y, z; - - Point3D(){ } - - Point3D(float x, float y, float z){ - this.x = x; - this.y = y; - this.z = z; - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "BrickTower" }); - } -} diff --git a/java/examples/3D/Form/BrickTower/applet/BrickTower.pde b/java/examples/3D/Form/BrickTower/applet/BrickTower.pde deleted file mode 100644 index 997c9774a..000000000 --- a/java/examples/3D/Form/BrickTower/applet/BrickTower.pde +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Brick Tower - * by Ira Greenberg. - * - * 3D castle tower constructed out of individual bricks. - * Uses the Point3D and Cube classes. - */ - - -float bricksPerLayer = 16.0; -float brickLayers = 18.0; -Cube brick; -float brickWidth = 60, brickHeight = 25, brickDepth = 25; -float radius = 175.0; -float angle = 0; - -void setup(){ - size(640, 360, P3D); - brick = new Cube(brickWidth, brickHeight, brickDepth); -} - -void draw(){ - background(0); - float tempX = 0, tempY = 0, tempZ = 0; - fill(182, 62, 29); - noStroke(); - // Add basic light setup - lights(); - translate(width/2, height*1.2, -380); - // Tip tower to see inside - rotateX(radians(-45)); - // Slowly rotate tower - rotateY(frameCount * PI/600); - for (int i = 0; i < brickLayers; i++){ - // Increment rows - tempY-=brickHeight; - // Alternate brick seams - angle = 360.0 / bricksPerLayer * i/2; - for (int j = 0; j < bricksPerLayer; j++){ - tempZ = cos(radians(angle))*radius; - tempX = sin(radians(angle))*radius; - pushMatrix(); - translate(tempX, tempY, tempZ); - rotateY(radians(angle)); - // Add crenelation - if (i==brickLayers-1){ - if (j%2 == 0){ - brick.create(); - } - } - // Create main tower - else { - brick.create(); - } - popMatrix(); - angle += 360.0/bricksPerLayer; - } - } -} - - diff --git a/java/examples/3D/Form/BrickTower/applet/Cube.pde b/java/examples/3D/Form/BrickTower/applet/Cube.pde deleted file mode 100644 index acdabcaad..000000000 --- a/java/examples/3D/Form/BrickTower/applet/Cube.pde +++ /dev/null @@ -1,60 +0,0 @@ -class Cube { - - Point3D[] vertices = new Point3D[24]; - float w, h, d; - - Cube(){ } - - Cube(float w, float h, float d){ - this.w = w; - this.h = h; - this.d = d; - - // Cube composed of 6 quads - // Front - vertices[0] = new Point3D(-w/2,-h/2,d/2); - vertices[1] = new Point3D(w/2,-h/2,d/2); - vertices[2] = new Point3D(w/2,h/2,d/2); - vertices[3] = new Point3D(-w/2,h/2,d/2); - - // Left - vertices[4] = new Point3D(-w/2,-h/2,d/2); - vertices[5] = new Point3D(-w/2,-h/2,-d/2); - vertices[6] = new Point3D(-w/2,h/2,-d/2); - vertices[7] = new Point3D(-w/2,h/2,d/2); - - // Right - vertices[8] = new Point3D(w/2,-h/2,d/2); - vertices[9] = new Point3D(w/2,-h/2,-d/2); - vertices[10] = new Point3D(w/2,h/2,-d/2); - vertices[11] = new Point3D(w/2,h/2,d/2); - - // Back - vertices[12] = new Point3D(-w/2,-h/2,-d/2); - vertices[13] = new Point3D(w/2,-h/2,-d/2); - vertices[14] = new Point3D(w/2,h/2,-d/2); - vertices[15] = new Point3D(-w/2,h/2,-d/2); - - // Top - vertices[16] = new Point3D(-w/2,-h/2,d/2); - vertices[17] = new Point3D(-w/2,-h/2,-d/2); - vertices[18] = new Point3D(w/2,-h/2,-d/2); - vertices[19] = new Point3D(w/2,-h/2,d/2); - - // Bottom - vertices[20] = new Point3D(-w/2,h/2,d/2); - vertices[21] = new Point3D(-w/2,h/2,-d/2); - vertices[22] = new Point3D(w/2,h/2,-d/2); - vertices[23] = new Point3D(w/2,h/2,d/2); - } - - void create(){ - for (int i=0; i<6; i++){ - beginShape(QUADS); - for (int j = 0; j < 4; j++){ - vertex(vertices[j+4*i].x, vertices[j+4*i].y, vertices[j+4*i].z); - } - endShape(); - } - } -} diff --git a/java/examples/3D/Form/BrickTower/applet/loading.gif b/java/examples/3D/Form/BrickTower/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d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fG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Form/CubicGrid/applet/CubicGrid.java b/java/examples/3D/Form/CubicGrid/applet/CubicGrid.java deleted file mode 100644 index 9cfd7d6b7..000000000 --- a/java/examples/3D/Form/CubicGrid/applet/CubicGrid.java +++ /dev/null @@ -1,67 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class CubicGrid extends PApplet { - -/** - * Cubic Grid - * by Ira Greenberg. - * - * 3D translucent colored grid uses nested pushMatrix() - * and popMatrix() functions. - */ - -float boxSize = 40; -float margin = boxSize*2; -float depth = 400; -int boxFill; - -public void setup() { - size(640, 360, P3D); - noStroke(); -} - -public void draw() { - background(255); - - // Center and spin grid - translate(width/2, height/2, -depth); - rotateY(frameCount * 0.01f); - rotateX(frameCount * 0.01f); - - // Build grid using multiple translations - for (float i =- depth/2+margin; i <= depth/2-margin; i += boxSize){ - pushMatrix(); - for (float j =- height+margin; j <= height-margin; j += boxSize){ - pushMatrix(); - for (float k =- width+margin; k <= width-margin; k += boxSize){ - // Base fill color on counter values, abs function - // ensures values stay within legal range - boxFill = color(abs(i), abs(j), abs(k), 50); - pushMatrix(); - translate(k, j, i); - fill(boxFill); - box(boxSize, boxSize, boxSize); - popMatrix(); - } - popMatrix(); - } - popMatrix(); - } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "CubicGrid" }); - } -} diff --git a/java/examples/3D/Form/CubicGrid/applet/CubicGrid.pde b/java/examples/3D/Form/CubicGrid/applet/CubicGrid.pde deleted file mode 100644 index 111cd3f3f..000000000 --- a/java/examples/3D/Form/CubicGrid/applet/CubicGrid.pde +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Cubic Grid - * by Ira Greenberg. - * - * 3D translucent colored grid uses nested pushMatrix() - * and popMatrix() functions. - */ - -float boxSize = 40; -float margin = boxSize*2; -float depth = 400; -color boxFill; - -void setup() { - size(640, 360, P3D); - noStroke(); -} - -void draw() { - background(255); - - // Center and spin grid - translate(width/2, height/2, -depth); - rotateY(frameCount * 0.01); - rotateX(frameCount * 0.01); - - // Build grid using multiple translations - for (float i =- depth/2+margin; i <= depth/2-margin; i += boxSize){ - pushMatrix(); - for (float j =- height+margin; j <= height-margin; j += boxSize){ - pushMatrix(); - for (float k =- width+margin; k <= width-margin; k += boxSize){ - // Base fill color on counter values, abs function - // ensures values stay within legal range - boxFill = color(abs(i), abs(j), abs(k), 50); - pushMatrix(); - translate(k, j, i); - fill(boxFill); - box(boxSize, boxSize, boxSize); - popMatrix(); - } - popMatrix(); - } - popMatrix(); - } -} - diff --git a/java/examples/3D/Form/CubicGrid/applet/loading.gif b/java/examples/3D/Form/CubicGrid/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Form/Icosahedra/applet/Dimension3D.pde b/java/examples/3D/Form/Icosahedra/applet/Dimension3D.pde deleted file mode 100644 index 01c2bcf57..000000000 --- a/java/examples/3D/Form/Icosahedra/applet/Dimension3D.pde +++ /dev/null @@ -1,10 +0,0 @@ -class Dimension3D { - - float w, h, d; - - Dimension3D(float w, float h, float d){ - this.w=w; - this.h=h; - this.d=d; - } -} diff --git a/java/examples/3D/Form/Icosahedra/applet/Icosahedra.java b/java/examples/3D/Form/Icosahedra/applet/Icosahedra.java deleted file mode 100644 index 8f6672b6c..000000000 --- a/java/examples/3D/Form/Icosahedra/applet/Icosahedra.java +++ /dev/null @@ -1,416 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Icosahedra extends PApplet { - -/** - * I Like Icosahedra - * by Ira Greenberg. - * - * This example plots icosahedra. The Icosahdron is a regular - * polyhedron composed of 20 equalateral triangles. - * - */ - - -Icosahedron ico1; -Icosahedron ico2; -Icosahedron ico3; - -public void setup() { - size(640, 360, P3D); - ico1 = new Icosahedron(75); - ico2 = new Icosahedron(75); - ico3 = new Icosahedron(75); -} - -public void draw() { - background(0); - lights(); - translate(width/2, height/2); - - pushMatrix(); - translate(-width/3.5f, 0); - rotateX(frameCount * PI/185); - rotateY(frameCount * PI/-200); - stroke(170, 0, 0); - noFill(); - ico1.create(); - popMatrix(); - - pushMatrix(); - rotateX(frameCount * PI/200); - rotateY(frameCount * PI/300); - stroke(150, 0, 180); - fill(170, 170, 0); - ico2.create(); - popMatrix(); - - pushMatrix(); - translate(width/3.5f, 0); - rotateX(frameCount * PI/-200); - rotateY(frameCount * PI/200); - noStroke(); - fill(0, 0, 185); - ico3.create(); - popMatrix(); -} - -class Dimension3D { - - float w, h, d; - - Dimension3D(float w, float h, float d){ - this.w=w; - this.h=h; - this.d=d; - } -} -class Icosahedron extends Shape3D { - - // icosahedron - Vector3D topPoint; - Vector3D[] topPent = new Vector3D[5]; - Vector3D bottomPoint; - Vector3D[] bottomPent = new Vector3D[5]; - float angle = 0, radius = 150; - float triDist; - float triHt; - float a, b, c; - - // constructor - Icosahedron(float radius) { - this.radius = radius; - init(); - } - - Icosahedron(Vector3D v, float radius) { - super(v); - this.radius = radius; - init(); - } - - // calculate geometry - public void init() { - c = dist(cos(0)*radius, sin(0)*radius, - cos(radians(72))*radius, sin(radians(72))*radius); - b = radius; - a = (float)(Math.sqrt(((c*c)-(b*b)))); - - triHt = (float)(Math.sqrt((c*c)-((c/2)*(c/2)))); - - for (int i = 0; i < topPent.length; i++){ - topPent[i] = new Vector3D(cos(angle)*radius, - sin(angle)*radius, triHt/2.0f); - angle+=radians(72); - } - topPoint = new Vector3D(0, 0, triHt/2.0f+a); - angle = 72.0f/2.0f; - for (int i = 0; i < topPent.length; i++){ - bottomPent[i] = new Vector3D(cos(angle)*radius, - sin(angle)*radius, -triHt/2.0f); - angle+=radians(72); - } - bottomPoint = new Vector3D(0, 0, -(triHt/2.0f+a)); - } - - // draws icosahedron - public void create(){ - for (int i=0; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|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Lewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Form/Primitives3D/applet/Primitives3D.java b/java/examples/3D/Form/Primitives3D/applet/Primitives3D.java deleted file mode 100644 index ba3668572..000000000 --- a/java/examples/3D/Form/Primitives3D/applet/Primitives3D.java +++ /dev/null @@ -1,51 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Primitives3D extends PApplet { - public void setup() {/** - * Primitives 3D. - * - * Placing mathematically 3D objects in synthetic space. - * The lights() method reveals their imagined dimension. - * The box() and sphere() functions each have one parameter - * which is used to specify their size. These shapes are - * positioned using the translate() function. - */ - -size(640, 360, P3D); -background(0); -lights(); - -noStroke(); -pushMatrix(); -translate(130, height/2, 0); -rotateY(1.25f); -rotateX(-0.4f); -box(100); -popMatrix(); - -noFill(); -stroke(255); -pushMatrix(); -translate(500, height*0.35f, -200); -sphere(280); -popMatrix(); - - - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "Primitives3D" }); - } -} diff --git a/java/examples/3D/Form/Primitives3D/applet/Primitives3D.pde b/java/examples/3D/Form/Primitives3D/applet/Primitives3D.pde deleted file mode 100644 index 053301190..000000000 --- a/java/examples/3D/Form/Primitives3D/applet/Primitives3D.pde +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Primitives 3D. - * - * Placing mathematically 3D objects in synthetic space. - * The lights() method reveals their imagined dimension. - * The box() and sphere() functions each have one parameter - * which is used to specify their size. These shapes are - * positioned using the translate() function. - */ - -size(640, 360, P3D); -background(0); -lights(); - -noStroke(); -pushMatrix(); -translate(130, height/2, 0); -rotateY(1.25); -rotateX(-0.4); -box(100); -popMatrix(); - -noFill(); -stroke(255); -pushMatrix(); -translate(500, height*0.35, -200); -sphere(280); -popMatrix(); - - diff --git a/java/examples/3D/Form/Primitives3D/applet/loading.gif b/java/examples/3D/Form/Primitives3D/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Form/RGBCube/applet/RGBCube.java b/java/examples/3D/Form/RGBCube/applet/RGBCube.java deleted file mode 100644 index 6de1d2ac8..000000000 --- a/java/examples/3D/Form/RGBCube/applet/RGBCube.java +++ /dev/null @@ -1,94 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class RGBCube extends PApplet { - -/** - * RGB Cube. - * - * The three primary colors of the additive color model are red, green, and blue. - * This RGB color cube displays smooth transitions between these colors. - */ - -float xmag, ymag = 0; -float newXmag, newYmag = 0; - -public void setup() -{ - size(640, 360, P3D); - noStroke(); - colorMode(RGB, 1); -} - -public void draw() -{ - background(0.5f); - - pushMatrix(); - - translate(width/2, height/2, -30); - - newXmag = mouseX/PApplet.parseFloat(width) * TWO_PI; - newYmag = mouseY/PApplet.parseFloat(height) * TWO_PI; - - float diff = xmag-newXmag; - if (abs(diff) > 0.01f) { xmag -= diff/4.0f; } - - diff = ymag-newYmag; - if (abs(diff) > 0.01f) { ymag -= diff/4.0f; } - - rotateX(-ymag); - rotateY(-xmag); - - scale(90); - beginShape(QUADS); - - fill(0, 1, 1); vertex(-1, 1, 1); - fill(1, 1, 1); vertex( 1, 1, 1); - fill(1, 0, 1); vertex( 1, -1, 1); - fill(0, 0, 1); vertex(-1, -1, 1); - - fill(1, 1, 1); vertex( 1, 1, 1); - fill(1, 1, 0); vertex( 1, 1, -1); - fill(1, 0, 0); vertex( 1, -1, -1); - fill(1, 0, 1); vertex( 1, -1, 1); - - fill(1, 1, 0); vertex( 1, 1, -1); - fill(0, 1, 0); vertex(-1, 1, -1); - fill(0, 0, 0); vertex(-1, -1, -1); - fill(1, 0, 0); vertex( 1, -1, -1); - - fill(0, 1, 0); vertex(-1, 1, -1); - fill(0, 1, 1); vertex(-1, 1, 1); - fill(0, 0, 1); vertex(-1, -1, 1); - fill(0, 0, 0); vertex(-1, -1, -1); - - fill(0, 1, 0); vertex(-1, 1, -1); - fill(1, 1, 0); vertex( 1, 1, -1); - fill(1, 1, 1); vertex( 1, 1, 1); - fill(0, 1, 1); vertex(-1, 1, 1); - - fill(0, 0, 0); vertex(-1, -1, -1); - fill(1, 0, 0); vertex( 1, -1, -1); - fill(1, 0, 1); vertex( 1, -1, 1); - fill(0, 0, 1); vertex(-1, -1, 1); - - endShape(); - - popMatrix(); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "RGBCube" }); - } -} diff --git a/java/examples/3D/Form/RGBCube/applet/RGBCube.pde b/java/examples/3D/Form/RGBCube/applet/RGBCube.pde deleted file mode 100644 index 2040d0c0b..000000000 --- a/java/examples/3D/Form/RGBCube/applet/RGBCube.pde +++ /dev/null @@ -1,74 +0,0 @@ -/** - * RGB Cube. - * - * The three primary colors of the additive color model are red, green, and blue. - * This RGB color cube displays smooth transitions between these colors. - */ - -float xmag, ymag = 0; -float newXmag, newYmag = 0; - -void setup() -{ - size(640, 360, P3D); - noStroke(); - colorMode(RGB, 1); -} - -void draw() -{ - background(0.5); - - pushMatrix(); - - translate(width/2, height/2, -30); - - newXmag = mouseX/float(width) * TWO_PI; - newYmag = mouseY/float(height) * TWO_PI; - - float diff = xmag-newXmag; - if (abs(diff) > 0.01) { xmag -= diff/4.0; } - - diff = ymag-newYmag; - if (abs(diff) > 0.01) { ymag -= diff/4.0; } - - rotateX(-ymag); - rotateY(-xmag); - - scale(90); - beginShape(QUADS); - - fill(0, 1, 1); vertex(-1, 1, 1); - fill(1, 1, 1); vertex( 1, 1, 1); - fill(1, 0, 1); vertex( 1, -1, 1); - fill(0, 0, 1); vertex(-1, -1, 1); - - fill(1, 1, 1); vertex( 1, 1, 1); - fill(1, 1, 0); vertex( 1, 1, -1); - fill(1, 0, 0); vertex( 1, -1, -1); - fill(1, 0, 1); vertex( 1, -1, 1); - - fill(1, 1, 0); vertex( 1, 1, -1); - fill(0, 1, 0); vertex(-1, 1, -1); - fill(0, 0, 0); vertex(-1, -1, -1); - fill(1, 0, 0); vertex( 1, -1, -1); - - fill(0, 1, 0); vertex(-1, 1, -1); - fill(0, 1, 1); vertex(-1, 1, 1); - fill(0, 0, 1); vertex(-1, -1, 1); - fill(0, 0, 0); vertex(-1, -1, -1); - - fill(0, 1, 0); vertex(-1, 1, -1); - fill(1, 1, 0); vertex( 1, 1, -1); - fill(1, 1, 1); vertex( 1, 1, 1); - fill(0, 1, 1); vertex(-1, 1, 1); - - fill(0, 0, 0); vertex(-1, -1, -1); - fill(1, 0, 0); vertex( 1, -1, -1); - fill(1, 0, 1); vertex( 1, -1, 1); - fill(0, 0, 1); vertex(-1, -1, 1); - - endShape(); - - popMatrix(); -} diff --git a/java/examples/3D/Form/RGBCube/applet/loading.gif b/java/examples/3D/Form/RGBCube/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Form/RunAmuck/applet/Legs.pde b/java/examples/3D/Form/RunAmuck/applet/Legs.pde deleted file mode 100644 index eb74d7859..000000000 --- a/java/examples/3D/Form/RunAmuck/applet/Legs.pde +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Legs class - * By Ira Greenberg
- * Processing for Flash Developers, - * Friends of ED, 2009 - */ - -class Legs { - // Instance properties with default values - float x = 0, y = 0, z = 0, w = 150, ht = 125; - color col = #77AA22; - // Advanced properties - float detailW = w/6.0; - float detailHt = ht/8.0; - float shoeBulge = detailHt*2.0; - float legGap = w/7.0; - - // Dynamics properties - float velocity = .02, stepL, stepR, stepRate = random(10, 50); - float speedX = 1.0, speedZ, spring, damping = .5, theta; - - // Default constructor - Legs() { - } - - // Standard constructor - Legs(float x, float z, float w, float ht, color col) { - this.x = x; - this.z = z; - this.w = w; - this.ht = ht; - this.col = col; - fill(col); - detailW = w/6.0; - detailHt = ht/8.0; - shoeBulge = detailHt*2.0; - legGap = w/7.0; - speedX = random(-speedX, speedX); - } - - // Advanced constructor - Legs(float x, float z, float w, float ht, color col, float detailW, - float detailHt, float shoeBulge, float legGap) { - this.x = x; - this.z = z; - this.w = w; - this.ht = ht; - this.col = col; - this.detailW = detailW; - this.detailHt = detailHt; - this.shoeBulge = shoeBulge; - this.legGap = legGap; - speedX = random(-speedX, speedX); - } - - // Draw legs - void create() { - fill(col); - float footWidth = (w - legGap)/2; - beginShape(); - vertex(x - w/2, y - ht, z); - vertex(x - w/2, y - ht + detailHt, z); - vertex(x - w/2 + detailW, y - ht + detailHt, z); - // left foot - vertex(x - w/2 + detailW, y + stepL, z); - curveVertex(x - w/2 + detailW, y + stepL, z); - curveVertex(x - w/2 + detailW, y + stepL, z); - curveVertex(x - w/2 + detailW - shoeBulge, y + detailHt/2 + stepL, z); - curveVertex(x - w/2, y + detailHt + stepL, z); - curveVertex(x - w/2, y + detailHt + stepL, z); - vertex(x - w/2 + footWidth, y + detailHt + stepL*.9, z); - // end left foot - vertex(x - w/2 + footWidth + legGap/2, y - ht + detailHt, z); - vertex(x - w/2 + footWidth + legGap/2, y - ht + detailHt, z); - // right foot - vertex(x - w/2 + footWidth + legGap, y + detailHt + stepR*.9, z); - vertex(x + w/2, y + detailHt + stepR, z); - curveVertex(x + w/2, y + detailHt + stepR, z); - curveVertex(x + w/2, y + detailHt + stepR, z); - curveVertex(x + w/2 - detailW + shoeBulge, y + detailHt/2 + stepR, z); - curveVertex(x + w/2 - detailW, y + stepR, z); - vertex(x + w/2 - detailW, y + stepR, z); - // end right foot - vertex(x + w/2 - detailW, y - ht + detailHt, z); - vertex(x + w/2, y - ht + detailHt, z); - vertex(x + w/2, y - ht, z); - endShape(CLOSE); - } - - // Set advanced property values - void setDetails(float detailW, float detailHt, float shoeBulge, float legGap) { - this.detailW = detailW; - this.detailHt = detailHt; - this.shoeBulge = shoeBulge; - this.legGap = legGap; - } - - // Make the legs step - void step(float stepRate) { - this.stepRate = stepRate; - spring = ht/2.0; - stepL = sin(theta)*spring; - stepR = cos(theta)*spring; - theta += radians(stepRate); - } - - // Alternative overloaded step method - void step() { - spring = ht/2.0; - stepL = sin(theta)*spring; - stepR = cos(theta)*spring; - theta += radians(stepRate); - } - - - // Moves legs along x, y, z axes - void move() { - // Move legs along y-axis - y = stepR*damping; - - // Move legs along x-axis and - // check for collision against frame edge - x += speedX; - if (screenX(x, y, z) > width) { - speedX *= -1; - } - if (screenX(x, y, z) < 0) { - speedX *= -1; - } - - // Move legs along z-axis based on speed of stepping - // and check for collision against extremes - speedZ = (stepRate*velocity); - z += speedZ; - if (z > 400) { - z = 400; - velocity *= -1; - } - if (z < -100) { - z = -100; - velocity *= -1; - } - } - - void setDynamics(float speedX, float spring, float damping) { - this.speedX = speedX; - this.spring = spring; - this.damping = damping; - } -} - - - - - - - - - - - - diff --git a/java/examples/3D/Form/RunAmuck/applet/RunAmuck.java b/java/examples/3D/Form/RunAmuck/applet/RunAmuck.java deleted file mode 100644 index 1f573102b..000000000 --- a/java/examples/3D/Form/RunAmuck/applet/RunAmuck.java +++ /dev/null @@ -1,228 +0,0 @@ -import processing.core.*; -import processing.xml.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class RunAmuck extends PApplet { - -/** - * Run-Amuck - * By Ira Greenberg
- * Processing for Flash Developers, - * Friends of ED, 2009 - */ - -int count = 250; -Legs[] legs = new Legs[count]; - -public void setup() { - size(640, 360, P3D); - noStroke(); - for (int i = 0; i < legs.length; i++) { - legs[i] = new Legs(random(-10, 10), random(-50, 150), random(.5f, 5), - random(.5f, 5), color(random(255), random(255), random(255))); - } -} - -public void draw() { - background(0); - translate(width/2, height/2); - noStroke(); - fill(35); - - // Draw ground plane - beginShape(); - vertex(-width*2, 0, -1000); - vertex(width*2, 0, -1000); - vertex(width/2, height/2, 400); - vertex(-width/2, height/2, 400); - endShape(CLOSE); - - // Update and draw the legs - for (int i = 0; i < legs.length; i++) { - legs[i].create(); - // Set foot step rate - legs[i].step(random(10, 50)); - // Move legs along x, y, z axes - // z-movement dependent upon step rate - legs[i].move(); - } -} - - -/** - * Legs class - * By Ira Greenberg
- * Processing for Flash Developers, - * Friends of ED, 2009 - */ - -class Legs { - // Instance properties with default values - float x = 0, y = 0, z = 0, w = 150, ht = 125; - int col = 0xff77AA22; - // Advanced properties - float detailW = w/6.0f; - float detailHt = ht/8.0f; - float shoeBulge = detailHt*2.0f; - float legGap = w/7.0f; - - // Dynamics properties - float velocity = .02f, stepL, stepR, stepRate = random(10, 50); - float speedX = 1.0f, speedZ, spring, damping = .5f, theta; - - // Default constructor - Legs() { - } - - // Standard constructor - Legs(float x, float z, float w, float ht, int col) { - this.x = x; - this.z = z; - this.w = w; - this.ht = ht; - this.col = col; - fill(col); - detailW = w/6.0f; - detailHt = ht/8.0f; - shoeBulge = detailHt*2.0f; - legGap = w/7.0f; - speedX = random(-speedX, speedX); - } - - // Advanced constructor - Legs(float x, float z, float w, float ht, int col, float detailW, - float detailHt, float shoeBulge, float legGap) { - this.x = x; - this.z = z; - this.w = w; - this.ht = ht; - this.col = col; - this.detailW = detailW; - this.detailHt = detailHt; - this.shoeBulge = shoeBulge; - this.legGap = legGap; - speedX = random(-speedX, speedX); - } - - // Draw legs - public void create() { - fill(col); - float footWidth = (w - legGap)/2; - beginShape(); - vertex(x - w/2, y - ht, z); - vertex(x - w/2, y - ht + detailHt, z); - vertex(x - w/2 + detailW, y - ht + detailHt, z); - // left foot - vertex(x - w/2 + detailW, y + stepL, z); - curveVertex(x - w/2 + detailW, y + stepL, z); - curveVertex(x - w/2 + detailW, y + stepL, z); - curveVertex(x - w/2 + detailW - shoeBulge, y + detailHt/2 + stepL, z); - curveVertex(x - w/2, y + detailHt + stepL, z); - curveVertex(x - w/2, y + detailHt + stepL, z); - vertex(x - w/2 + footWidth, y + detailHt + stepL*.9f, z); - // end left foot - vertex(x - w/2 + footWidth + legGap/2, y - ht + detailHt, z); - vertex(x - w/2 + footWidth + legGap/2, y - ht + detailHt, z); - // right foot - vertex(x - w/2 + footWidth + legGap, y + detailHt + stepR*.9f, z); - vertex(x + w/2, y + detailHt + stepR, z); - curveVertex(x + w/2, y + detailHt + stepR, z); - curveVertex(x + w/2, y + detailHt + stepR, z); - curveVertex(x + w/2 - detailW + shoeBulge, y + detailHt/2 + stepR, z); - curveVertex(x + w/2 - detailW, y + stepR, z); - vertex(x + w/2 - detailW, y + stepR, z); - // end right foot - vertex(x + w/2 - detailW, y - ht + detailHt, z); - vertex(x + w/2, y - ht + detailHt, z); - vertex(x + w/2, y - ht, z); - endShape(CLOSE); - } - - // Set advanced property values - public void setDetails(float detailW, float detailHt, float shoeBulge, float legGap) { - this.detailW = detailW; - this.detailHt = detailHt; - this.shoeBulge = shoeBulge; - this.legGap = legGap; - } - - // Make the legs step - public void step(float stepRate) { - this.stepRate = stepRate; - spring = ht/2.0f; - stepL = sin(theta)*spring; - stepR = cos(theta)*spring; - theta += radians(stepRate); - } - - // Alternative overloaded step method - public void step() { - spring = ht/2.0f; - stepL = sin(theta)*spring; - stepR = cos(theta)*spring; - theta += radians(stepRate); - } - - - // Moves legs along x, y, z axes - public void move() { - // Move legs along y-axis - y = stepR*damping; - - // Move legs along x-axis and - // check for collision against frame edge - x += speedX; - if (screenX(x, y, z) > width) { - speedX *= -1; - } - if (screenX(x, y, z) < 0) { - speedX *= -1; - } - - // Move legs along z-axis based on speed of stepping - // and check for collision against extremes - speedZ = (stepRate*velocity); - z += speedZ; - if (z > 400) { - z = 400; - velocity *= -1; - } - if (z < -100) { - z = -100; - velocity *= -1; - } - } - - public void setDynamics(float speedX, float spring, float damping) { - this.speedX = speedX; - this.spring = spring; - this.damping = damping; - } -} - - - - - - - - - - - - - - static public void main(String args[]) { - PApplet.main(new String[] { "--present", "--bgcolor=#666666", "--hide-stop", "RunAmuck" }); - } -} diff --git a/java/examples/3D/Form/RunAmuck/applet/RunAmuck.pde b/java/examples/3D/Form/RunAmuck/applet/RunAmuck.pde deleted file mode 100644 index 7a5b06fc2..000000000 --- a/java/examples/3D/Form/RunAmuck/applet/RunAmuck.pde +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Run-Amuck - * By Ira Greenberg
- * Processing for Flash Developers, - * Friends of ED, 2009 - */ - -int count = 250; -Legs[] legs = new Legs[count]; - -void setup() { - size(640, 360, P3D); - noStroke(); - for (int i = 0; i < legs.length; i++) { - legs[i] = new Legs(random(-10, 10), random(-50, 150), random(.5, 5), - random(.5, 5), color(random(255), random(255), random(255))); - } -} - -void draw() { - background(0); - translate(width/2, height/2); - noStroke(); - fill(35); - - // Draw ground plane - beginShape(); - vertex(-width*2, 0, -1000); - vertex(width*2, 0, -1000); - vertex(width/2, height/2, 400); - vertex(-width/2, height/2, 400); - endShape(CLOSE); - - // Update and draw the legs - for (int i = 0; i < legs.length; i++) { - legs[i].create(); - // Set foot step rate - legs[i].step(random(10, 50)); - // Move legs along x, y, z axes - // z-movement dependent upon step rate - legs[i].move(); - } -} - - diff --git a/java/examples/3D/Form/RunAmuck/applet/loading.gif b/java/examples/3D/Form/RunAmuck/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Form/ShapeTransform/applet/ShapeTransform.java b/java/examples/3D/Form/ShapeTransform/applet/ShapeTransform.java deleted file mode 100644 index f8c5377a8..000000000 --- a/java/examples/3D/Form/ShapeTransform/applet/ShapeTransform.java +++ /dev/null @@ -1,147 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class ShapeTransform extends PApplet { - -/** - * Shape Transform - * by Ira Greenberg. - * - * Illustrates the geometric relationship - * between Cube, Pyramid, Cone and - * Cylinder 3D primitives. - * - * Instructions: - * Up Arrow - increases points - * Down Arrow - decreases points - * 'p' key toggles between cube/pyramid - */ - -int pts = 7; -float angle = 0; -float radius = 89; -float cylinderLength = 85; - -Point3D vertices[][]; -boolean isPyramid = false; - -public void setup(){ - size(640, 360, P3D); - noStroke(); - fill(204); -} - -public void draw(){ - background(102); - lights(); - - translate(width/2, height/2, 0); - rotateX(frameCount * 0.006f); - rotateY(frameCount * 0.006f); - rotateZ(frameCount * 0.006f); - - // initialize point arrays - vertices = new Point3D[2][pts+1]; - - // fill arrays - for (int i = 0; i < 2; i++){ - angle = 0; - for(int j = 0; j <= pts; j++){ - vertices[i][j] = new Point3D(); - if (isPyramid){ - if (i==1){ - vertices[i][j].x = 0; - vertices[i][j].y = 0; - } - else { - vertices[i][j].x = cos(radians(angle))*radius; - vertices[i][j].y = sin(radians(angle))*radius; - } - } - else { - vertices[i][j].x = cos(radians(angle))*radius; - vertices[i][j].y = sin(radians(angle))*radius; - } - vertices[i][j].z = cylinderLength; - // the .0 after the 360 is critical - angle += 360.0f/pts; - } - cylinderLength*=-1; - } - - // draw cylinder tube - beginShape(QUAD_STRIP); - for (int j = 0; j <= pts; j++){ - vertex(vertices[0][j].x, vertices[0][j].y, vertices[0][j].z); - vertex(vertices[1][j].x, vertices[1][j].y, vertices[1][j].z); - } - endShape(); - - //draw cylinder ends - for (int i = 0; i < 2; i++){ - beginShape(); - for (int j = 0; j < pts; j++){ - vertex(vertices[i][j].x, vertices[i][j].y, vertices[i][j].z); - } - endShape(CLOSE); - } -} - -/* - up/down arrow keys control - polygon detail. - */ -public void keyPressed(){ - if(key == CODED) { - // pts - if (keyCode == UP) { - if (pts<90){ - pts++; - } - } - else if (keyCode == DOWN) { - if (pts > 4){ - pts--; - } - } - } - if (key == 'p'){ - if (isPyramid){ - isPyramid=false; - } - else { - isPyramid=true; - } - } -} - - - -class Point3D{ - float x, y, z; - - // constructors - Point3D(){ - } - - Point3D(float x, float y, float z){ - this.x = x; - this.y = y; - this.z = z; - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "ShapeTransform" }); - } -} diff --git a/java/examples/3D/Form/ShapeTransform/applet/ShapeTransform.pde b/java/examples/3D/Form/ShapeTransform/applet/ShapeTransform.pde deleted file mode 100644 index 4e7989b44..000000000 --- a/java/examples/3D/Form/ShapeTransform/applet/ShapeTransform.pde +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Shape Transform - * by Ira Greenberg. - * - * Illustrates the geometric relationship - * between Cube, Pyramid, Cone and - * Cylinder 3D primitives. - * - * Instructions: - * Up Arrow - increases points - * Down Arrow - decreases points - * 'p' key toggles between cube/pyramid - */ - -int pts = 7; -float angle = 0; -float radius = 89; -float cylinderLength = 85; - -Point3D vertices[][]; -boolean isPyramid = false; - -void setup(){ - size(640, 360, P3D); - noStroke(); - fill(204); -} - -void draw(){ - background(102); - lights(); - - translate(width/2, height/2, 0); - rotateX(frameCount * 0.006); - rotateY(frameCount * 0.006); - rotateZ(frameCount * 0.006); - - // initialize point arrays - vertices = new Point3D[2][pts+1]; - - // fill arrays - for (int i = 0; i < 2; i++){ - angle = 0; - for(int j = 0; j <= pts; j++){ - vertices[i][j] = new Point3D(); - if (isPyramid){ - if (i==1){ - vertices[i][j].x = 0; - vertices[i][j].y = 0; - } - else { - vertices[i][j].x = cos(radians(angle))*radius; - vertices[i][j].y = sin(radians(angle))*radius; - } - } - else { - vertices[i][j].x = cos(radians(angle))*radius; - vertices[i][j].y = sin(radians(angle))*radius; - } - vertices[i][j].z = cylinderLength; - // the .0 after the 360 is critical - angle += 360.0/pts; - } - cylinderLength*=-1; - } - - // draw cylinder tube - beginShape(QUAD_STRIP); - for (int j = 0; j <= pts; j++){ - vertex(vertices[0][j].x, vertices[0][j].y, vertices[0][j].z); - vertex(vertices[1][j].x, vertices[1][j].y, vertices[1][j].z); - } - endShape(); - - //draw cylinder ends - for (int i = 0; i < 2; i++){ - beginShape(); - for (int j = 0; j < pts; j++){ - vertex(vertices[i][j].x, vertices[i][j].y, vertices[i][j].z); - } - endShape(CLOSE); - } -} - -/* - up/down arrow keys control - polygon detail. - */ -void keyPressed(){ - if(key == CODED) { - // pts - if (keyCode == UP) { - if (pts<90){ - pts++; - } - } - else if (keyCode == DOWN) { - if (pts > 4){ - pts--; - } - } - } - if (key == 'p'){ - if (isPyramid){ - isPyramid=false; - } - else { - isPyramid=true; - } - } -} - - - diff --git a/java/examples/3D/Form/ShapeTransform/applet/loading.gif b/java/examples/3D/Form/ShapeTransform/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18F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M`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Form/Toroid/applet/Toroid.java b/java/examples/3D/Form/Toroid/applet/Toroid.java deleted file mode 100644 index f02ae636e..000000000 --- a/java/examples/3D/Form/Toroid/applet/Toroid.java +++ /dev/null @@ -1,215 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Toroid extends PApplet { - -/** - * Interactive Toroid - * by Ira Greenberg. - * - * Illustrates the geometric relationship - * between Toroid, Sphere, and Helix - * 3D primitives, as well as lathing - * principal. - * - * Instructions: - * UP arrow key pts++; - * DOWN arrow key pts--; - * LEFT arrow key segments--; - * RIGHT arrow key segments++; - * 'a' key toroid radius--; - * 's' key toroid radius++; - * 'z' key initial polygon radius--; - * 'x' key initial polygon radius++; - * 'w' key toggle wireframe/solid shading - * 'h' key toggle sphere/helix - */ - - -int pts = 40; -float angle = 0; -float radius = 40.0f; -// Lathe segments -int segments = 60; -float latheAngle = 0; -float latheRadius = 100.0f; -// Vertices -Point3D vertices[], vertices2[]; -// For shaded or wireframe rendering -boolean isWireFrame = false; -// For optional helix -boolean isHelix = false; -float helixOffset = 5.0f; - -public void setup() { - size(640, 360, P3D); -} - -public void draw(){ - background(51); - // Basic lighting setup - lights(); - // Two rendering styles - // Wireframe or solid - if (isWireFrame){ - stroke(255); - noFill(); - } - else { - noStroke(); - fill(204); - } - // Center and spin toroid - translate(width/2, height/2, -100); - - rotateX(frameCount*PI/150); - rotateY(frameCount*PI/170); - rotateZ(frameCount*PI/90); - - // Initialize point arrays - vertices = new Point3D[pts+1]; - vertices2 = new Point3D[pts+1]; - - // Fill arrays - for(int i = 0; i <= pts; i++){ - vertices[i] = new Point3D(); - vertices2[i] = new Point3D(); - vertices[i].x = latheRadius + sin(radians(angle))*radius; - if (isHelix){ - vertices[i].z = cos(radians(angle))*radius-(helixOffset* - segments)/2; - } - else{ - vertices[i].z = cos(radians(angle))*radius; - } - angle+=360.0f/pts; - } - - // Draw toroid - latheAngle = 0; - for(int i = 0; i <= segments; i++){ - beginShape(QUAD_STRIP); - for(int j = 0; j <= pts; j++){ - if (i > 0){ - vertex(vertices2[j].x, vertices2[j].y, vertices2[j].z); - } - vertices2[j].x = cos(radians(latheAngle))*vertices[j].x; - vertices2[j].y = sin(radians(latheAngle))*vertices[j].x; - vertices2[j].z = vertices[j].z; - // Optional helix offset - if (isHelix){ - vertices[j].z+=helixOffset; - } - vertex(vertices2[j].x, vertices2[j].y, vertices2[j].z); - } - // Create extra rotation for helix - if (isHelix){ - latheAngle += 720.0f/segments; - } - else { - latheAngle += 360.0f/segments; - } - endShape(); - } -} - -/* - left/right arrow keys control ellipse detail - up/down arrow keys control segment detail. - 'a','s' keys control lathe radius - 'z','x' keys control ellipse radius - 'w' key toggles between wireframe and solid - 'h' key toggles between toroid and helix - */ -public void keyPressed(){ - if(key == CODED) { - // pts - if (keyCode == UP) { - if (pts < 40){ - pts++; - } - } - else if (keyCode == DOWN) { - if (pts > 3){ - pts--; - } - } - // Extrusion length - if (keyCode == LEFT) { - if (segments > 3){ - segments--; - } - } - else if (keyCode == RIGHT) { - if (segments < 80){ - segments++; - } - } - } - // Lathe radius - if (key =='a'){ - if (latheRadius > 0){ - latheRadius--; - } - } - else if (key == 's'){ - latheRadius++; - } - // Ellipse radius - if (key =='z'){ - if (radius > 10){ - radius--; - } - } - else if (key == 'x'){ - radius++; - } - // Wireframe - if (key == 'w'){ - if (isWireFrame){ - isWireFrame=false; - } - else { - isWireFrame=true; - } - } - // Helix - if (key == 'h'){ - if (isHelix){ - isHelix=false; - } - else { - isHelix=true; - } - } -} - - -class Point3D{ - float x, y, z; - - // constructors - Point3D(){ - } - - Point3D(float x, float y, float z){ - this.x = x; - this.y = y; - this.z = z; - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Toroid" }); - } -} diff --git a/java/examples/3D/Form/Toroid/applet/Toroid.pde b/java/examples/3D/Form/Toroid/applet/Toroid.pde deleted file mode 100644 index 6f876006a..000000000 --- a/java/examples/3D/Form/Toroid/applet/Toroid.pde +++ /dev/null @@ -1,182 +0,0 @@ -/** - * Interactive Toroid - * by Ira Greenberg. - * - * Illustrates the geometric relationship - * between Toroid, Sphere, and Helix - * 3D primitives, as well as lathing - * principal. - * - * Instructions: - * UP arrow key pts++; - * DOWN arrow key pts--; - * LEFT arrow key segments--; - * RIGHT arrow key segments++; - * 'a' key toroid radius--; - * 's' key toroid radius++; - * 'z' key initial polygon radius--; - * 'x' key initial polygon radius++; - * 'w' key toggle wireframe/solid shading - * 'h' key toggle sphere/helix - */ - - -int pts = 40; -float angle = 0; -float radius = 40.0; -// Lathe segments -int segments = 60; -float latheAngle = 0; -float latheRadius = 100.0; -// Vertices -Point3D vertices[], vertices2[]; -// For shaded or wireframe rendering -boolean isWireFrame = false; -// For optional helix -boolean isHelix = false; -float helixOffset = 5.0; - -void setup() { - size(640, 360, P3D); -} - -void draw(){ - background(51); - // Basic lighting setup - lights(); - // Two rendering styles - // Wireframe or solid - if (isWireFrame){ - stroke(255); - noFill(); - } - else { - noStroke(); - fill(204); - } - // Center and spin toroid - translate(width/2, height/2, -100); - - rotateX(frameCount*PI/150); - rotateY(frameCount*PI/170); - rotateZ(frameCount*PI/90); - - // Initialize point arrays - vertices = new Point3D[pts+1]; - vertices2 = new Point3D[pts+1]; - - // Fill arrays - for(int i = 0; i <= pts; i++){ - vertices[i] = new Point3D(); - vertices2[i] = new Point3D(); - vertices[i].x = latheRadius + sin(radians(angle))*radius; - if (isHelix){ - vertices[i].z = cos(radians(angle))*radius-(helixOffset* - segments)/2; - } - else{ - vertices[i].z = cos(radians(angle))*radius; - } - angle+=360.0/pts; - } - - // Draw toroid - latheAngle = 0; - for(int i = 0; i <= segments; i++){ - beginShape(QUAD_STRIP); - for(int j = 0; j <= pts; j++){ - if (i > 0){ - vertex(vertices2[j].x, vertices2[j].y, vertices2[j].z); - } - vertices2[j].x = cos(radians(latheAngle))*vertices[j].x; - vertices2[j].y = sin(radians(latheAngle))*vertices[j].x; - vertices2[j].z = vertices[j].z; - // Optional helix offset - if (isHelix){ - vertices[j].z+=helixOffset; - } - vertex(vertices2[j].x, vertices2[j].y, vertices2[j].z); - } - // Create extra rotation for helix - if (isHelix){ - latheAngle += 720.0/segments; - } - else { - latheAngle += 360.0/segments; - } - endShape(); - } -} - -/* - left/right arrow keys control ellipse detail - up/down arrow keys control segment detail. - 'a','s' keys control lathe radius - 'z','x' keys control ellipse radius - 'w' key toggles between wireframe and solid - 'h' key toggles between toroid and helix - */ -void keyPressed(){ - if(key == CODED) { - // pts - if (keyCode == UP) { - if (pts < 40){ - pts++; - } - } - else if (keyCode == DOWN) { - if (pts > 3){ - pts--; - } - } - // Extrusion length - if (keyCode == LEFT) { - if (segments > 3){ - segments--; - } - } - else if (keyCode == RIGHT) { - if (segments < 80){ - segments++; - } - } - } - // Lathe radius - if (key =='a'){ - if (latheRadius > 0){ - latheRadius--; - } - } - else if (key == 's'){ - latheRadius++; - } - // Ellipse radius - if (key =='z'){ - if (radius > 10){ - radius--; - } - } - else if (key == 'x'){ - radius++; - } - // Wireframe - if (key == 'w'){ - if (isWireFrame){ - isWireFrame=false; - } - else { - isWireFrame=true; - } - } - // Helix - if (key == 'h'){ - if (isHelix){ - isHelix=false; - } - else { - isHelix=true; - } - } -} - - diff --git a/java/examples/3D/Form/Toroid/applet/loading.gif b/java/examples/3D/Form/Toroid/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3t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C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Form/Vertices/applet/Vertices.java b/java/examples/3D/Form/Vertices/applet/Vertices.java deleted file mode 100644 index 1b5c9302d..000000000 --- a/java/examples/3D/Form/Vertices/applet/Vertices.java +++ /dev/null @@ -1,87 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Vertices extends PApplet { - -/** - * Vertices - * by Simon Greenwold. - * - * Draw a cylinder centered on the y-axis, going down - * from y=0 to y=height. The radius at the top can be - * different from the radius at the bottom, and the - * number of sides drawn is variable. - */ - -public void setup() { - size(640, 360, P3D); -} - -public void draw() { - background(0); - lights(); - translate(width / 2, height / 2); - rotateY(map(mouseX, 0, width, 0, PI)); - rotateZ(map(mouseY, 0, height, 0, -PI)); - noStroke(); - fill(255, 255, 255); - translate(0, -40, 0); - drawCylinder(10, 180, 200, 16); // Draw a mix between a cylinder and a cone - //drawCylinder(70, 70, 120, 64); // Draw a cylinder - //drawCylinder(0, 180, 200, 4); // Draw a pyramid -} - -public void drawCylinder(float topRadius, float bottomRadius, float tall, int sides) { - float angle = 0; - float angleIncrement = TWO_PI / sides; - beginShape(QUAD_STRIP); - for (int i = 0; i < sides + 1; ++i) { - vertex(topRadius*cos(angle), 0, topRadius*sin(angle)); - vertex(bottomRadius*cos(angle), tall, bottomRadius*sin(angle)); - angle += angleIncrement; - } - endShape(); - - // If it is not a cone, draw the circular top cap - if (topRadius != 0) { - angle = 0; - beginShape(TRIANGLE_FAN); - - // Center point - vertex(0, 0, 0); - for (int i = 0; i < sides + 1; i++) { - vertex(topRadius * cos(angle), 0, topRadius * sin(angle)); - angle += angleIncrement; - } - endShape(); - } - - // If it is not a cone, draw the circular bottom cap - if (bottomRadius != 0) { - angle = 0; - beginShape(TRIANGLE_FAN); - - // Center point - vertex(0, tall, 0); - for (int i = 0; i < sides + 1; i++) { - vertex(bottomRadius * cos(angle), tall, bottomRadius * sin(angle)); - angle += angleIncrement; - } - endShape(); - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Vertices" }); - } -} diff --git a/java/examples/3D/Form/Vertices/applet/Vertices.pde b/java/examples/3D/Form/Vertices/applet/Vertices.pde deleted file mode 100644 index 5609ff94f..000000000 --- a/java/examples/3D/Form/Vertices/applet/Vertices.pde +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Vertices - * by Simon Greenwold. - * - * Draw a cylinder centered on the y-axis, going down - * from y=0 to y=height. The radius at the top can be - * different from the radius at the bottom, and the - * number of sides drawn is variable. - */ - -void setup() { - size(640, 360, P3D); -} - -void draw() { - background(0); - lights(); - translate(width / 2, height / 2); - rotateY(map(mouseX, 0, width, 0, PI)); - rotateZ(map(mouseY, 0, height, 0, -PI)); - noStroke(); - fill(255, 255, 255); - translate(0, -40, 0); - drawCylinder(10, 180, 200, 16); // Draw a mix between a cylinder and a cone - //drawCylinder(70, 70, 120, 64); // Draw a cylinder - //drawCylinder(0, 180, 200, 4); // Draw a pyramid -} - -void drawCylinder(float topRadius, float bottomRadius, float tall, int sides) { - float angle = 0; - float angleIncrement = TWO_PI / sides; - beginShape(QUAD_STRIP); - for (int i = 0; i < sides + 1; ++i) { - vertex(topRadius*cos(angle), 0, topRadius*sin(angle)); - vertex(bottomRadius*cos(angle), tall, bottomRadius*sin(angle)); - angle += angleIncrement; - } - endShape(); - - // If it is not a cone, draw the circular top cap - if (topRadius != 0) { - angle = 0; - beginShape(TRIANGLE_FAN); - - // Center point - vertex(0, 0, 0); - for (int i = 0; i < sides + 1; i++) { - vertex(topRadius * cos(angle), 0, topRadius * sin(angle)); - angle += angleIncrement; - } - endShape(); - } - - // If it is not a cone, draw the circular bottom cap - if (bottomRadius != 0) { - angle = 0; - beginShape(TRIANGLE_FAN); - - // Center point - vertex(0, tall, 0); - for (int i = 0; i < sides + 1; i++) { - vertex(bottomRadius * cos(angle), tall, bottomRadius * sin(angle)); - angle += angleIncrement; - } - endShape(); - } -} diff --git a/java/examples/3D/Form/Vertices/applet/loading.gif b/java/examples/3D/Form/Vertices/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba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Y?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Image/Explode/applet/Explode.java b/java/examples/3D/Image/Explode/applet/Explode.java deleted file mode 100644 index b8e89ef27..000000000 --- a/java/examples/3D/Image/Explode/applet/Explode.java +++ /dev/null @@ -1,63 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Explode extends PApplet { - -/** - * Explode - * by Daniel Shiffman. - * - * Mouse horizontal location controls breaking apart of image and - * Maps pixels from a 2D image into 3D space. Pixel brightness controls - * translation along z axis. - */ - -PImage img; // The source image -int cellsize = 2; // Dimensions of each cell in the grid -int columns, rows; // Number of columns and rows in our system - -public void setup() { - size(640, 360, P3D); - img = loadImage("eames.jpg"); // Load the image - columns = img.width / cellsize; // Calculate # of columns - rows = img.height / cellsize; // Calculate # of rows -} - -public void draw() { - background(0); - // Begin loop for columns - for ( int i = 0; i < columns; i++) { - // Begin loop for rows - for ( int j = 0; j < rows; j++) { - int x = i*cellsize + cellsize/2; // x position - int y = j*cellsize + cellsize/2; // y position - int loc = x + y*img.width; // Pixel array location - int c = img.pixels[loc]; // Grab the color - // Calculate a z position as a function of mouseX and pixel brightness - float z = (mouseX / PApplet.parseFloat(width)) * brightness(img.pixels[loc]) - 20.0f; - // Translate to the location, set fill and stroke, and draw the rect - pushMatrix(); - translate(x + 200, y + 100, z); - fill(c, 204); - noStroke(); - rectMode(CENTER); - rect(0, 0, cellsize, cellsize); - popMatrix(); - } - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Explode" }); - } -} diff --git a/java/examples/3D/Image/Explode/applet/Explode.pde b/java/examples/3D/Image/Explode/applet/Explode.pde deleted file mode 100644 index e6f120943..000000000 --- a/java/examples/3D/Image/Explode/applet/Explode.pde +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Explode - * by Daniel Shiffman. - * - * Mouse horizontal location controls breaking apart of image and - * Maps pixels from a 2D image into 3D space. Pixel brightness controls - * translation along z axis. - */ - -PImage img; // The source image -int cellsize = 2; // Dimensions of each cell in the grid -int columns, rows; // Number of columns and rows in our system - -void setup() { - size(640, 360, P3D); - img = loadImage("eames.jpg"); // Load the image - columns = img.width / cellsize; // Calculate # of columns - rows = img.height / cellsize; // Calculate # of rows -} - -void draw() { - background(0); - // Begin loop for columns - for ( int i = 0; i < columns; i++) { - // Begin loop for rows - for ( int j = 0; j < rows; j++) { - int x = i*cellsize + cellsize/2; // x position - int y = j*cellsize + cellsize/2; // y position - int loc = x + y*img.width; // Pixel array location - color c = img.pixels[loc]; // Grab the color - // Calculate a z position as a function of mouseX and pixel brightness - float z = (mouseX / float(width)) * brightness(img.pixels[loc]) - 20.0; - // Translate to the location, set fill and stroke, and draw the rect - pushMatrix(); - translate(x + 200, y + 100, z); - fill(c, 204); - noStroke(); - rectMode(CENTER); - rect(0, 0, cellsize, cellsize); - popMatrix(); - } - } -} diff --git a/java/examples/3D/Image/Explode/applet/loading.gif b/java/examples/3D/Image/Explode/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wA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&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Image/Extrusion/applet/Extrusion.java b/java/examples/3D/Image/Extrusion/applet/Extrusion.java deleted file mode 100644 index 44d33ed40..000000000 --- a/java/examples/3D/Image/Extrusion/applet/Extrusion.java +++ /dev/null @@ -1,67 +0,0 @@ -import processing.core.*; -import processing.xml.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Extrusion extends PApplet { - -/** - * Extrusion. - * - * Converts a flat image into spatial data points and rotates the points - * around the center. - */ - -PImage extrude; -int[][] values; -float angle = 0; - -public void setup() { - size(640, 360, P3D); - - // Load the image into a new array - extrude = loadImage("ystone08.jpg"); - extrude.loadPixels(); - values = new int[extrude.width][extrude.height]; - for (int y = 0; y < extrude.height; y++) { - for (int x = 0; x < extrude.width; x++) { - int pixel = extrude.get(x, y); - values[x][y] = PApplet.parseInt(brightness(pixel)); - } - } -} - -public void draw() { - background(0); - - // Update the angle - angle += 0.005f; - - // Rotate around the center axis - translate(width/2, 0, -128); - rotateY(angle); - translate(-extrude.width/2, 100, -128); - - // Display the image mass - for (int y = 0; y < extrude.height; y++) { - for (int x = 0; x < extrude.width; x++) { - stroke(values[x][y]); - point(x, y, -values[x][y]); - } - } - -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Extrusion" }); - } -} diff --git a/java/examples/3D/Image/Extrusion/applet/Extrusion.pde b/java/examples/3D/Image/Extrusion/applet/Extrusion.pde deleted file mode 100644 index 637ac6689..000000000 --- a/java/examples/3D/Image/Extrusion/applet/Extrusion.pde +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Extrusion. - * - * Converts a flat image into spatial data points and rotates the points - * around the center. - */ - -PImage extrude; -int[][] values; -float angle = 0; - -void setup() { - size(640, 360, P3D); - - // Load the image into a new array - extrude = loadImage("ystone08.jpg"); - extrude.loadPixels(); - values = new int[extrude.width][extrude.height]; - for (int y = 0; y < extrude.height; y++) { - for (int x = 0; x < extrude.width; x++) { - color pixel = extrude.get(x, y); - values[x][y] = int(brightness(pixel)); - } - } -} - -void draw() { - background(0); - - // Update the angle - angle += 0.005; - - // Rotate around the center axis - translate(width/2, 0, -128); - rotateY(angle); - translate(-extrude.width/2, 100, -128); - - // Display the image mass - for (int y = 0; y < extrude.height; y++) { - for (int x = 0; x < extrude.width; x++) { - stroke(values[x][y]); - point(x, y, -values[x][y]); - } - } - -} diff --git a/java/examples/3D/Image/Extrusion/applet/loading.gif b/java/examples/3D/Image/Extrusion/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XI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z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Image/Zoom/applet/Zoom.java b/java/examples/3D/Image/Zoom/applet/Zoom.java deleted file mode 100644 index d37d0ff26..000000000 --- a/java/examples/3D/Image/Zoom/applet/Zoom.java +++ /dev/null @@ -1,109 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Zoom extends PApplet { - -/** - * Zoom. - * - * Move the cursor over the image to alter its position. Click and press - * the mouse to zoom and set the density of the matrix by typing numbers 1-5. - * This program displays a series of lines with their heights corresponding to - * a color value read from an image. - */ - -PImage img; -//boolean onetime = true; -int[][] imgPixels; -float sval = 1.0f; -float nmx, nmy; -int res = 5; - -public void setup() -{ - size(640, 360, P3D); - noFill(); - stroke(255); - img = loadImage("ystone08.jpg"); - imgPixels = new int[img.width][img.height]; - for (int i = 0; i < img.height; i++) { - for (int j = 0; j < img.width; j++) { - imgPixels[j][i] = img.get(j, i); - } - } -} - -public void draw() -{ - background(0); - - nmx = nmx + (mouseX-nmx)/20; - nmy += (mouseY-nmy)/20; - - if(mousePressed) { - sval += 0.005f; - } - else { - sval -= 0.01f; - } - - sval = constrain(sval, 1.0f, 2.5f); - - translate(width/2 + nmx * sval-100, height/2 + nmy*sval - 200, -50); - scale(sval); - rotateZ(PI/9 - sval + 1.0f); - rotateX(PI/sval/8 - 0.125f); - rotateY(sval/8 - 0.125f); - - translate(-width/2, -height/2, 0); - - for (int i = 0; i < img.height; i += res) { - for (int j = 0; j < img.width; j += res) { - float rr = red(imgPixels[j][i]); - float gg = green(imgPixels[j][i]); - float bb = blue(imgPixels[j][i]); - float tt = rr+gg+bb; - stroke(rr, gg, gg); - line(i, j, tt/10-20, i, j, tt/10 ); - } - } -} - -public void keyPressed() { - if(key == '1') { - res = 1; - } - else if (key == '2') { - res = 2; - } - else if (key == '3') { - res = 3; - } - else if (key == '4') { - res = 4; - } - else if (key == '5') { - res = 5; - } -} - - - - - - - - static public void main(String args[]) { - PApplet.main(new String[] { "Zoom" }); - } -} diff --git a/java/examples/3D/Image/Zoom/applet/Zoom.pde b/java/examples/3D/Image/Zoom/applet/Zoom.pde deleted file mode 100644 index d80e842a3..000000000 --- a/java/examples/3D/Image/Zoom/applet/Zoom.pde +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Zoom. - * - * Move the cursor over the image to alter its position. Click and press - * the mouse to zoom and set the density of the matrix by typing numbers 1-5. - * This program displays a series of lines with their heights corresponding to - * a color value read from an image. - */ - -PImage img; -//boolean onetime = true; -int[][] imgPixels; -float sval = 1.0; -float nmx, nmy; -int res = 5; - -void setup() -{ - size(640, 360, P3D); - noFill(); - stroke(255); - img = loadImage("ystone08.jpg"); - imgPixels = new int[img.width][img.height]; - for (int i = 0; i < img.height; i++) { - for (int j = 0; j < img.width; j++) { - imgPixels[j][i] = img.get(j, i); - } - } -} - -void draw() -{ - background(0); - - nmx = nmx + (mouseX-nmx)/20; - nmy += (mouseY-nmy)/20; - - if(mousePressed) { - sval += 0.005; - } - else { - sval -= 0.01; - } - - sval = constrain(sval, 1.0, 2.5); - - translate(width/2 + nmx * sval-100, height/2 + nmy*sval - 200, -50); - scale(sval); - rotateZ(PI/9 - sval + 1.0); - rotateX(PI/sval/8 - 0.125); - rotateY(sval/8 - 0.125); - - translate(-width/2, -height/2, 0); - - for (int i = 0; i < img.height; i += res) { - for (int j = 0; j < img.width; j += res) { - float rr = red(imgPixels[j][i]); - float gg = green(imgPixels[j][i]); - float bb = blue(imgPixels[j][i]); - float tt = rr+gg+bb; - stroke(rr, gg, gg); - line(i, j, tt/10-20, i, j, tt/10 ); - } - } -} - -void keyPressed() { - if(key == '1') { - res = 1; - } - else if (key == '2') { - res = 2; - } - else if (key == '3') { - res = 3; - } - else if (key == '4') { - res = 4; - } - else if (key == '5') { - res = 5; - } -} - - - - - - diff --git a/java/examples/3D/Image/Zoom/applet/loading.gif b/java/examples/3D/Image/Zoom/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr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U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Lights/Directional/applet/Directional.java b/java/examples/3D/Lights/Directional/applet/Directional.java deleted file mode 100644 index e6b4a42c0..000000000 --- a/java/examples/3D/Lights/Directional/applet/Directional.java +++ /dev/null @@ -1,48 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Directional extends PApplet { - -/** - * Directional. - * - * Move the mouse the change the direction of the light. - * Directional light comes from one direction and is stronger - * when hitting a surface squarely and weaker if it hits at a - * a gentle angle. After hitting a surface, a directional lights - * scatters in all directions. - */ - -public void setup() { - size(640, 360, P3D); - noStroke(); - fill(204); -} - -public void draw() { - noStroke(); - background(0); - float dirY = (mouseY / PApplet.parseFloat(height) - 0.5f) * 2; - float dirX = (mouseX / PApplet.parseFloat(width) - 0.5f) * 2; - directionalLight(204, 204, 204, -dirX, -dirY, -1); - translate(width/2 - 100, height/2, 0); - sphere(80); - translate(200, 0, 0); - sphere(80); -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Directional" }); - } -} diff --git a/java/examples/3D/Lights/Directional/applet/Directional.pde b/java/examples/3D/Lights/Directional/applet/Directional.pde deleted file mode 100644 index 6a1af3008..000000000 --- a/java/examples/3D/Lights/Directional/applet/Directional.pde +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Directional. - * - * Move the mouse the change the direction of the light. - * Directional light comes from one direction and is stronger - * when hitting a surface squarely and weaker if it hits at a - * a gentle angle. After hitting a surface, a directional lights - * scatters in all directions. - */ - -void setup() { - size(640, 360, P3D); - noStroke(); - fill(204); -} - -void draw() { - noStroke(); - background(0); - float dirY = (mouseY / float(height) - 0.5) * 2; - float dirX = (mouseX / float(width) - 0.5) * 2; - directionalLight(204, 204, 204, -dirX, -dirY, -1); - translate(width/2 - 100, height/2, 0); - sphere(80); - translate(200, 0, 0); - sphere(80); -} - diff --git a/java/examples/3D/Lights/Directional/applet/loading.gif b/java/examples/3D/Lights/Directional/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7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?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Lights/Lights1/applet/Lights1.java b/java/examples/3D/Lights/Lights1/applet/Lights1.java deleted file mode 100644 index d6f6d9672..000000000 --- a/java/examples/3D/Lights/Lights1/applet/Lights1.java +++ /dev/null @@ -1,49 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Lights1 extends PApplet { - -/** - * Lights 1. - * - * Uses the default lights to show a simple box. The lights() function - * is used to turn on the default lighting. - */ - -float spin = 0.0f; - -public void setup() -{ - size(640, 360, P3D); - noStroke(); -} - -public void draw() -{ - background(51); - lights(); - - spin += 0.01f; - - pushMatrix(); - translate(width/2, height/2, 0); - rotateX(PI/9); - rotateY(PI/5 + spin); - box(150); - popMatrix(); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Lights1" }); - } -} diff --git a/java/examples/3D/Lights/Lights1/applet/Lights1.pde b/java/examples/3D/Lights/Lights1/applet/Lights1.pde deleted file mode 100644 index bf7a36edc..000000000 --- a/java/examples/3D/Lights/Lights1/applet/Lights1.pde +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Lights 1. - * - * Uses the default lights to show a simple box. The lights() function - * is used to turn on the default lighting. - */ - -float spin = 0.0; - -void setup() -{ - size(640, 360, P3D); - noStroke(); -} - -void draw() -{ - background(51); - lights(); - - spin += 0.01; - - pushMatrix(); - translate(width/2, height/2, 0); - rotateX(PI/9); - rotateY(PI/5 + spin); - box(150); - popMatrix(); -} diff --git a/java/examples/3D/Lights/Lights1/applet/loading.gif b/java/examples/3D/Lights/Lights1/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8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W_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Lights/Lights2/applet/Lights2.java b/java/examples/3D/Lights/Lights2/applet/Lights2.java deleted file mode 100644 index 568ca8e80..000000000 --- a/java/examples/3D/Lights/Lights2/applet/Lights2.java +++ /dev/null @@ -1,56 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Lights2 extends PApplet { - -/** - * Lights 2 - * by Simon Greenwold. - * - * Display a box with three different kinds of lights. - */ - -public void setup() -{ - size(640, 360, P3D); - noStroke(); -} - -public void draw() -{ - background(0); - translate(width / 2, height / 2); - - // Orange point light on the right - pointLight(150, 100, 0, // Color - 200, -150, 0); // Position - - // Blue directional light from the left - directionalLight(0, 102, 255, // Color - 1, 0, 0); // The x-, y-, z-axis direction - - // Yellow spotlight from the front - spotLight(255, 255, 109, // Color - 0, 40, 200, // Position - 0, -0.5f, -0.5f, // Direction - PI / 2, 2); // Angle, concentration - - rotateY(map(mouseX, 0, width, 0, PI)); - rotateX(map(mouseY, 0, height, 0, PI)); - box(150); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Lights2" }); - } -} diff --git a/java/examples/3D/Lights/Lights2/applet/Lights2.pde b/java/examples/3D/Lights/Lights2/applet/Lights2.pde deleted file mode 100644 index e1693e590..000000000 --- a/java/examples/3D/Lights/Lights2/applet/Lights2.pde +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Lights 2 - * by Simon Greenwold. - * - * Display a box with three different kinds of lights. - */ - -void setup() -{ - size(640, 360, P3D); - noStroke(); -} - -void draw() -{ - background(0); - translate(width / 2, height / 2); - - // Orange point light on the right - pointLight(150, 100, 0, // Color - 200, -150, 0); // Position - - // Blue directional light from the left - directionalLight(0, 102, 255, // Color - 1, 0, 0); // The x-, y-, z-axis direction - - // Yellow spotlight from the front - spotLight(255, 255, 109, // Color - 0, 40, 200, // Position - 0, -0.5, -0.5, // Direction - PI / 2, 2); // Angle, concentration - - rotateY(map(mouseX, 0, width, 0, PI)); - rotateX(map(mouseY, 0, height, 0, PI)); - box(150); -} diff --git a/java/examples/3D/Lights/Lights2/applet/loading.gif b/java/examples/3D/Lights/Lights2/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Px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(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Lights/Reflection/applet/Reflection.java b/java/examples/3D/Lights/Reflection/applet/Reflection.java deleted file mode 100644 index ff5b1073f..000000000 --- a/java/examples/3D/Lights/Reflection/applet/Reflection.java +++ /dev/null @@ -1,45 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Reflection extends PApplet { - -/** - * Reflection - * by Simon Greenwold. - * - * Vary the specular reflection component of a material - * with the horizontal position of the mouse. - */ - -public void setup() { - size(640, 360, P3D); - noStroke(); - colorMode(RGB, 1); - fill(0.4f); -} - -public void draw() { - background(0); - translate(width / 2, height / 2); - // Set the specular color of lights that follow - lightSpecular(1, 1, 1); - directionalLight(0.8f, 0.8f, 0.8f, 0, 0, -1); - float s = mouseX / PApplet.parseFloat(width); - specular(s, s, s); - sphere(120); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Reflection" }); - } -} diff --git a/java/examples/3D/Lights/Reflection/applet/Reflection.pde b/java/examples/3D/Lights/Reflection/applet/Reflection.pde deleted file mode 100644 index f6a3d7a94..000000000 --- a/java/examples/3D/Lights/Reflection/applet/Reflection.pde +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Reflection - * by Simon Greenwold. - * - * Vary the specular reflection component of a material - * with the horizontal position of the mouse. - */ - -void setup() { - size(640, 360, P3D); - noStroke(); - colorMode(RGB, 1); - fill(0.4); -} - -void draw() { - background(0); - translate(width / 2, height / 2); - // Set the specular color of lights that follow - lightSpecular(1, 1, 1); - directionalLight(0.8, 0.8, 0.8, 0, 0, -1); - float s = mouseX / float(width); - specular(s, s, s); - sphere(120); -} diff --git a/java/examples/3D/Lights/Reflection/applet/loading.gif b/java/examples/3D/Lights/Reflection/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJN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CHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Lights/Spot/applet/Spot.java b/java/examples/3D/Lights/Spot/applet/Spot.java deleted file mode 100644 index db961a531..000000000 --- a/java/examples/3D/Lights/Spot/applet/Spot.java +++ /dev/null @@ -1,55 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Spot extends PApplet { - -/** - * Spot. - * - * Move the mouse the change the position and concentation - * of a blue spot light. - */ - -int concentration = 600; // Try values 1 -> 10000 - -public void setup() -{ - //size(200, 200, P3D); - size(640, 360, P3D); - noStroke(); - fill(204); - sphereDetail(60); -} - -public void draw() -{ - background(0); - - // Light the bottom of the sphere - directionalLight(51, 102, 126, 0, -1, 0); - - // Orange light on the upper-right of the sphere - spotLight(204, 153, 0, 360, 160, 600, 0, 0, -1, PI/2, 600); - - // Moving spotlight that follows the mouse - spotLight(102, 153, 204, 360, mouseY, 600, 0, 0, -1, PI/2, 600); - - translate(width/2, height/2, 0); - sphere(120); -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Spot" }); - } -} diff --git a/java/examples/3D/Lights/Spot/applet/Spot.pde b/java/examples/3D/Lights/Spot/applet/Spot.pde deleted file mode 100644 index ce25c4bee..000000000 --- a/java/examples/3D/Lights/Spot/applet/Spot.pde +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Spot. - * - * Move the mouse the change the position and concentation - * of a blue spot light. - */ - -int concentration = 600; // Try values 1 -> 10000 - -void setup() -{ - //size(200, 200, P3D); - size(640, 360, P3D); - noStroke(); - fill(204); - sphereDetail(60); -} - -void draw() -{ - background(0); - - // Light the bottom of the sphere - directionalLight(51, 102, 126, 0, -1, 0); - - // Orange light on the upper-right of the sphere - spotLight(204, 153, 0, 360, 160, 600, 0, 0, -1, PI/2, 600); - - // Moving spotlight that follows the mouse - spotLight(102, 153, 204, 360, mouseY, 600, 0, 0, -1, PI/2, 600); - - translate(width/2, height/2, 0); - sphere(120); -} - diff --git a/java/examples/3D/Lights/Spot/applet/loading.gif b/java/examples/3D/Lights/Spot/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1f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}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Textures/Texture1/applet/Texture1.java b/java/examples/3D/Textures/Texture1/applet/Texture1.java deleted file mode 100644 index fe28c7395..000000000 --- a/java/examples/3D/Textures/Texture1/applet/Texture1.java +++ /dev/null @@ -1,48 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Texture1 extends PApplet { - -/** - * Texture 1. - * - * Load an image and draw it onto a quad. The texture() function sets - * the texture image. The vertex() function maps the image to the geometry. - */ - -PImage img; - -public void setup() { - size(640, 360, P3D); - img = loadImage("berlin-1.jpg"); - noStroke(); -} - -public void draw() { - background(0); - translate(width / 2, height / 2); - rotateY(map(mouseX, 0, width, -PI, PI)); - rotateZ(PI/6); - beginShape(); - texture(img); - vertex(-100, -100, 0, 0, 0); - vertex(100, -100, 0, 400, 0); - vertex(100, 100, 0, 400, 400); - vertex(-100, 100, 0, 0, 400); - endShape(); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Texture1" }); - } -} diff --git a/java/examples/3D/Textures/Texture1/applet/Texture1.pde b/java/examples/3D/Textures/Texture1/applet/Texture1.pde deleted file mode 100644 index 7eb36310a..000000000 --- a/java/examples/3D/Textures/Texture1/applet/Texture1.pde +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Texture 1. - * - * Load an image and draw it onto a quad. The texture() function sets - * the texture image. The vertex() function maps the image to the geometry. - */ - -PImage img; - -void setup() { - size(640, 360, P3D); - img = loadImage("berlin-1.jpg"); - noStroke(); -} - -void draw() { - background(0); - translate(width / 2, height / 2); - rotateY(map(mouseX, 0, width, -PI, PI)); - rotateZ(PI/6); - beginShape(); - texture(img); - vertex(-100, -100, 0, 0, 0); - vertex(100, -100, 0, 400, 0); - vertex(100, 100, 0, 400, 400); - vertex(-100, 100, 0, 0, 400); - endShape(); -} diff --git a/java/examples/3D/Textures/Texture1/applet/loading.gif b/java/examples/3D/Textures/Texture1/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Textures/Texture2/applet/Texture2.java b/java/examples/3D/Textures/Texture2/applet/Texture2.java deleted file mode 100644 index ae3095834..000000000 --- a/java/examples/3D/Textures/Texture2/applet/Texture2.java +++ /dev/null @@ -1,45 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Texture2 extends PApplet { - -/** - * Texture 2. - * - * Using a rectangular image to map a texture onto a triangle. - */ - -PImage img; - -public void setup() { - size(640, 360, P3D); - img = loadImage("berlin-1.jpg"); - noStroke(); -} - -public void draw() { - background(0); - translate(width / 2, height / 2); - rotateY(map(mouseX, 0, width, -PI, PI)); - beginShape(); - texture(img); - vertex(-100, -100, 0, 0, 0); - vertex(100, -40, 0, 400, 120); - vertex(0, 100, 0, 200, 400); - endShape(); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Texture2" }); - } -} diff --git a/java/examples/3D/Textures/Texture2/applet/Texture2.pde b/java/examples/3D/Textures/Texture2/applet/Texture2.pde deleted file mode 100644 index 1398fd3e5..000000000 --- a/java/examples/3D/Textures/Texture2/applet/Texture2.pde +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Texture 2. - * - * Using a rectangular image to map a texture onto a triangle. - */ - -PImage img; - -void setup() { - size(640, 360, P3D); - img = loadImage("berlin-1.jpg"); - noStroke(); -} - -void draw() { - background(0); - translate(width / 2, height / 2); - rotateY(map(mouseX, 0, width, -PI, PI)); - beginShape(); - texture(img); - vertex(-100, -100, 0, 0, 0); - vertex(100, -40, 0, 400, 120); - vertex(0, 100, 0, 200, 400); - endShape(); -} diff --git a/java/examples/3D/Textures/Texture2/applet/loading.gif b/java/examples/3D/Textures/Texture2/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tg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kY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Textures/Texture3/applet/Texture3.java b/java/examples/3D/Textures/Texture3/applet/Texture3.java deleted file mode 100644 index 66565878a..000000000 --- a/java/examples/3D/Textures/Texture3/applet/Texture3.java +++ /dev/null @@ -1,66 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Texture3 extends PApplet { - -/** - * Texture 3. - * - * Load an image and draw it onto a cylinder and a quad. - */ - - -int tubeRes = 32; -float[] tubeX = new float[tubeRes]; -float[] tubeY = new float[tubeRes]; -PImage img; - -public void setup() { - size(640, 360, P3D); - img = loadImage("berlin-1.jpg"); - float angle = 270.0f / tubeRes; - for (int i = 0; i < tubeRes; i++) { - tubeX[i] = cos(radians(i * angle)); - tubeY[i] = sin(radians(i * angle)); - } - noStroke(); -} - -public void draw() { - background(0); - translate(width / 2, height / 2); - rotateX(map(mouseY, 0, height, -PI, PI)); - rotateY(map(mouseX, 0, width, -PI, PI)); - beginShape(QUAD_STRIP); - texture(img); - for (int i = 0; i < tubeRes; i++) { - float x = tubeX[i] * 100; - float z = tubeY[i] * 100; - float u = img.width / tubeRes * i; - vertex(x, -100, z, u, 0); - vertex(x, 100, z, u, img.height); - } - endShape(); - beginShape(QUADS); - texture(img); - vertex(0, -100, 0, 0, 0); - vertex(100, -100, 0, 100, 0); - vertex(100, 100, 0, 100, 100); - vertex(0, 100, 0, 0, 100); - endShape(); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Texture3" }); - } -} diff --git a/java/examples/3D/Textures/Texture3/applet/Texture3.pde b/java/examples/3D/Textures/Texture3/applet/Texture3.pde deleted file mode 100644 index 66130f1e5..000000000 --- a/java/examples/3D/Textures/Texture3/applet/Texture3.pde +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Texture 3. - * - * Load an image and draw it onto a cylinder and a quad. - */ - - -int tubeRes = 32; -float[] tubeX = new float[tubeRes]; -float[] tubeY = new float[tubeRes]; -PImage img; - -void setup() { - size(640, 360, P3D); - img = loadImage("berlin-1.jpg"); - float angle = 270.0 / tubeRes; - for (int i = 0; i < tubeRes; i++) { - tubeX[i] = cos(radians(i * angle)); - tubeY[i] = sin(radians(i * angle)); - } - noStroke(); -} - -void draw() { - background(0); - translate(width / 2, height / 2); - rotateX(map(mouseY, 0, height, -PI, PI)); - rotateY(map(mouseX, 0, width, -PI, PI)); - beginShape(QUAD_STRIP); - texture(img); - for (int i = 0; i < tubeRes; i++) { - float x = tubeX[i] * 100; - float z = tubeY[i] * 100; - float u = img.width / tubeRes * i; - vertex(x, -100, z, u, 0); - vertex(x, 100, z, u, img.height); - } - endShape(); - beginShape(QUADS); - texture(img); - vertex(0, -100, 0, 0, 0); - vertex(100, -100, 0, 100, 0); - vertex(100, 100, 0, 100, 100); - vertex(0, 100, 0, 0, 100); - endShape(); -} diff --git a/java/examples/3D/Textures/Texture3/applet/loading.gif b/java/examples/3D/Textures/Texture3/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59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G86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Textures/TextureCube/applet/TextureCube.java b/java/examples/3D/Textures/TextureCube/applet/TextureCube.java deleted file mode 100644 index ac7a9b21c..000000000 --- a/java/examples/3D/Textures/TextureCube/applet/TextureCube.java +++ /dev/null @@ -1,111 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class TextureCube extends PApplet { - -/** - * TexturedCube - * by Dave Bollinger. - * - * Drag mouse to rotate cube. Demonstrates use of u/v coords in - * vertex() and effect on texture(). The textures get distorted using - * the P3D renderer as you can see, but they look great using OPENGL. -*/ - - -PImage tex; -float rotx = PI/4; -float roty = PI/4; - -public void setup() -{ - size(640, 360, P3D); - tex = loadImage("berlin-1.jpg"); - textureMode(NORMALIZED); - fill(255); - stroke(color(44,48,32)); -} - -public void draw() -{ - background(0); - noStroke(); - translate(width/2.0f, height/2.0f, -100); - rotateX(rotx); - rotateY(roty); - scale(90); - TexturedCube(tex); -} - -public void TexturedCube(PImage tex) { - beginShape(QUADS); - texture(tex); - - // Given one texture and six faces, we can easily set up the uv coordinates - // such that four of the faces tile "perfectly" along either u or v, but the other - // two faces cannot be so aligned. This code tiles "along" u, "around" the X/Z faces - // and fudges the Y faces - the Y faces are arbitrarily aligned such that a - // rotation along the X axis will put the "top" of either texture at the "top" - // of the screen, but is not otherwised aligned with the X/Z faces. (This - // just affects what type of symmetry is required if you need seamless - // tiling all the way around the cube) - - // +Z "front" face - vertex(-1, -1, 1, 0, 0); - vertex( 1, -1, 1, 1, 0); - vertex( 1, 1, 1, 1, 1); - vertex(-1, 1, 1, 0, 1); - - // -Z "back" face - vertex( 1, -1, -1, 0, 0); - vertex(-1, -1, -1, 1, 0); - vertex(-1, 1, -1, 1, 1); - vertex( 1, 1, -1, 0, 1); - - // +Y "bottom" face - vertex(-1, 1, 1, 0, 0); - vertex( 1, 1, 1, 1, 0); - vertex( 1, 1, -1, 1, 1); - vertex(-1, 1, -1, 0, 1); - - // -Y "top" face - vertex(-1, -1, -1, 0, 0); - vertex( 1, -1, -1, 1, 0); - vertex( 1, -1, 1, 1, 1); - vertex(-1, -1, 1, 0, 1); - - // +X "right" face - vertex( 1, -1, 1, 0, 0); - vertex( 1, -1, -1, 1, 0); - vertex( 1, 1, -1, 1, 1); - vertex( 1, 1, 1, 0, 1); - - // -X "left" face - vertex(-1, -1, -1, 0, 0); - vertex(-1, -1, 1, 1, 0); - vertex(-1, 1, 1, 1, 1); - vertex(-1, 1, -1, 0, 1); - - endShape(); -} - -public void mouseDragged() { - float rate = 0.01f; - rotx += (pmouseY-mouseY) * rate; - roty += (mouseX-pmouseX) * rate; -} - - static public void main(String args[]) { - PApplet.main(new String[] { "TextureCube" }); - } -} diff --git a/java/examples/3D/Textures/TextureCube/applet/TextureCube.pde b/java/examples/3D/Textures/TextureCube/applet/TextureCube.pde deleted file mode 100644 index 38df04997..000000000 --- a/java/examples/3D/Textures/TextureCube/applet/TextureCube.pde +++ /dev/null @@ -1,91 +0,0 @@ -/** - * TexturedCube - * by Dave Bollinger. - * - * Drag mouse to rotate cube. Demonstrates use of u/v coords in - * vertex() and effect on texture(). The textures get distorted using - * the P3D renderer as you can see, but they look great using OPENGL. -*/ - - -PImage tex; -float rotx = PI/4; -float roty = PI/4; - -void setup() -{ - size(640, 360, P3D); - tex = loadImage("berlin-1.jpg"); - textureMode(NORMALIZED); - fill(255); - stroke(color(44,48,32)); -} - -void draw() -{ - background(0); - noStroke(); - translate(width/2.0, height/2.0, -100); - rotateX(rotx); - rotateY(roty); - scale(90); - TexturedCube(tex); -} - -void TexturedCube(PImage tex) { - beginShape(QUADS); - texture(tex); - - // Given one texture and six faces, we can easily set up the uv coordinates - // such that four of the faces tile "perfectly" along either u or v, but the other - // two faces cannot be so aligned. This code tiles "along" u, "around" the X/Z faces - // and fudges the Y faces - the Y faces are arbitrarily aligned such that a - // rotation along the X axis will put the "top" of either texture at the "top" - // of the screen, but is not otherwised aligned with the X/Z faces. (This - // just affects what type of symmetry is required if you need seamless - // tiling all the way around the cube) - - // +Z "front" face - vertex(-1, -1, 1, 0, 0); - vertex( 1, -1, 1, 1, 0); - vertex( 1, 1, 1, 1, 1); - vertex(-1, 1, 1, 0, 1); - - // -Z "back" face - vertex( 1, -1, -1, 0, 0); - vertex(-1, -1, -1, 1, 0); - vertex(-1, 1, -1, 1, 1); - vertex( 1, 1, -1, 0, 1); - - // +Y "bottom" face - vertex(-1, 1, 1, 0, 0); - vertex( 1, 1, 1, 1, 0); - vertex( 1, 1, -1, 1, 1); - vertex(-1, 1, -1, 0, 1); - - // -Y "top" face - vertex(-1, -1, -1, 0, 0); - vertex( 1, -1, -1, 1, 0); - vertex( 1, -1, 1, 1, 1); - vertex(-1, -1, 1, 0, 1); - - // +X "right" face - vertex( 1, -1, 1, 0, 0); - vertex( 1, -1, -1, 1, 0); - vertex( 1, 1, -1, 1, 1); - vertex( 1, 1, 1, 0, 1); - - // -X "left" face - vertex(-1, -1, -1, 0, 0); - vertex(-1, -1, 1, 1, 0); - vertex(-1, 1, 1, 1, 1); - vertex(-1, 1, -1, 0, 1); - - endShape(); -} - -void mouseDragged() { - float rate = 0.01; - rotx += (pmouseY-mouseY) * rate; - roty += (mouseX-pmouseX) * rate; -} diff --git a/java/examples/3D/Textures/TextureCube/applet/loading.gif b/java/examples/3D/Textures/TextureCube/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*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{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Transform/Bird/applet/Bird.java b/java/examples/3D/Transform/Bird/applet/Bird.java deleted file mode 100644 index 849715af1..000000000 --- a/java/examples/3D/Transform/Bird/applet/Bird.java +++ /dev/null @@ -1,83 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Bird extends PApplet { - -/** - * Simple 3D Bird - * by Ira Greenberg. - * - * Using a box and 2 rects to simulate a flying bird. - * Trig functions handle the flapping and sinuous movement. - */ - -float ang = 0, ang2 = 0, ang3 = 0, ang4 = 0; -float px = 0, py = 0, pz = 0; -float flapSpeed = 0.2f; - -public void setup(){ - size(640, 360, P3D); - noStroke(); -} - -public void draw(){ - background(0); - lights(); - - // Flight - px = sin(radians(ang3)) * 170; - py = cos(radians(ang3)) * 300; - pz = sin(radians(ang4)) * 500; - translate(width/2 + px, height/2 + py, -700+pz); - rotateX(sin(radians(ang2)) * 120); - rotateY(sin(radians(ang2)) * 50); - rotateZ(sin(radians(ang2)) * 65); - - // Body - fill(153); - box(20, 100, 20); - - - // Left wing - fill(204); - pushMatrix(); - rotateY(sin(radians(ang)) * -20); - rect(-75, -50, 75, 100); - popMatrix(); - - // Right wing - pushMatrix(); - rotateY(sin(radians(ang)) * 20); - rect(0, -50, 75, 100); - popMatrix(); - - // Wing flap - ang += flapSpeed; - if (ang > 3) { - flapSpeed *= -1; - } - if (ang < -3) { - flapSpeed *= -1; - } - - // Increment angles - ang2 += 0.01f; - ang3 += 2.0f; - ang4 += 0.75f; -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Bird" }); - } -} diff --git a/java/examples/3D/Transform/Bird/applet/Bird.pde b/java/examples/3D/Transform/Bird/applet/Bird.pde deleted file mode 100644 index dacd405d1..000000000 --- a/java/examples/3D/Transform/Bird/applet/Bird.pde +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Simple 3D Bird - * by Ira Greenberg. - * - * Using a box and 2 rects to simulate a flying bird. - * Trig functions handle the flapping and sinuous movement. - */ - -float ang = 0, ang2 = 0, ang3 = 0, ang4 = 0; -float px = 0, py = 0, pz = 0; -float flapSpeed = 0.2; - -void setup(){ - size(640, 360, P3D); - noStroke(); -} - -void draw(){ - background(0); - lights(); - - // Flight - px = sin(radians(ang3)) * 170; - py = cos(radians(ang3)) * 300; - pz = sin(radians(ang4)) * 500; - translate(width/2 + px, height/2 + py, -700+pz); - rotateX(sin(radians(ang2)) * 120); - rotateY(sin(radians(ang2)) * 50); - rotateZ(sin(radians(ang2)) * 65); - - // Body - fill(153); - box(20, 100, 20); - - - // Left wing - fill(204); - pushMatrix(); - rotateY(sin(radians(ang)) * -20); - rect(-75, -50, 75, 100); - popMatrix(); - - // Right wing - pushMatrix(); - rotateY(sin(radians(ang)) * 20); - rect(0, -50, 75, 100); - popMatrix(); - - // Wing flap - ang += flapSpeed; - if (ang > 3) { - flapSpeed *= -1; - } - if (ang < -3) { - flapSpeed *= -1; - } - - // Increment angles - ang2 += 0.01; - ang3 += 2.0; - ang4 += 0.75; -} - diff --git a/java/examples/3D/Transform/Bird/applet/loading.gif b/java/examples/3D/Transform/Bird/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`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@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Transform/Birds/applet/Bird.pde b/java/examples/3D/Transform/Birds/applet/Bird.pde deleted file mode 100644 index 84ada2603..000000000 --- a/java/examples/3D/Transform/Birds/applet/Bird.pde +++ /dev/null @@ -1,99 +0,0 @@ -class Bird { - - // Properties - float offsetX, offsetY, offsetZ; - float w, h; - int bodyFill; - int wingFill; - float ang = 0, ang2 = 0, ang3 = 0, ang4 = 0; - float radiusX = 120, radiusY = 200, radiusZ = 700; - float rotX = 15, rotY = 10, rotZ = 5; - float flapSpeed = 0.4; - float rotSpeed = 0.1; - - // Constructors - Bird(){ - this(0, 0, 0, 60, 80); - } - - Bird(float offsetX, float offsetY, float offsetZ, - float w, float h){ - this.offsetX = offsetX; - this.offsetY = offsetY; - this.offsetZ = offsetZ; - this.h = h; - this.w = w; - bodyFill = color(153); - wingFill = color(204); - } - - void setFlight(float radiusX, float radiusY, float radiusZ, - float rotX, float rotY, float rotZ){ - this.radiusX = radiusX; - this.radiusY = radiusY; - this.radiusZ = radiusZ; - - this.rotX = rotX; - this.rotY = rotY; - this.rotZ = rotZ; - } - - void setWingSpeed(float flapSpeed){ - this.flapSpeed = flapSpeed; - } - - void setRotSpeed(float rotSpeed){ - this.rotSpeed = rotSpeed; - } - - void fly() { - pushMatrix(); - float px, py, pz; - - // Flight - px = sin(radians(ang3)) * radiusX; - py = cos(radians(ang3)) * radiusY; - pz = sin(radians(ang4)) * radiusZ; - - translate(width/2 + offsetX + px, height/2 + offsetY+py, -700 + offsetZ+pz); - - rotateX(sin(radians(ang2)) * rotX); - rotateY(sin(radians(ang2)) * rotY); - rotateZ(sin(radians(ang2)) * rotZ); - - // Body - fill(bodyFill); - box(w/5, h, w/5); - - // Left wing - fill(wingFill); - pushMatrix(); - rotateY(sin(radians(ang)) * 20); - rect(0, -h/2, w, h); - popMatrix(); - - // Right wing - pushMatrix(); - rotateY(sin(radians(ang)) * -20); - rect(-w, -h/2, w, h); - popMatrix(); - - // Wing flap - ang += flapSpeed; - if (ang > 3) { - flapSpeed*=-1; - } - if (ang < -3) { - flapSpeed*=-1; - } - - // Ang's run trig functions - ang2 += rotSpeed; - ang3 += 1.25; - ang4 += 0.55; - popMatrix(); - } -} - - - diff --git a/java/examples/3D/Transform/Birds/applet/Birds.java b/java/examples/3D/Transform/Birds/applet/Birds.java deleted file mode 100644 index eea839af5..000000000 --- a/java/examples/3D/Transform/Birds/applet/Birds.java +++ /dev/null @@ -1,172 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Birds extends PApplet { - -/** - * Crazy Flocking 3D Birds - * by Ira Greenberg. - * - * Simulates a flock of birds using a Bird class and nested - * pushMatrix() / popMatrix() functions. - * Trigonometry functions handle the flapping and sinuous movement. - */ - -// Flock array -int birdCount = 200; -Bird[]birds = new Bird[birdCount]; -float[]x = new float[birdCount]; -float[]y = new float[birdCount]; -float[]z = new float[birdCount]; -float[]rx = new float[birdCount]; -float[]ry = new float[birdCount]; -float[]rz = new float[birdCount]; -float[]spd = new float[birdCount]; -float[]rot = new float[birdCount]; - -public void setup() { - size(640, 360, P3D); - noStroke(); - - // Initialize arrays with random values - for (int i = 0; i < birdCount; i++){ - birds[i] = new Bird(random(-300, 300), random(-300, 300), - random(-500, -2500), random(5, 30), random(5, 30)); - - x[i] = random(20, 340); - y[i] = random(30, 350); - z[i] = random(1000, 4800); - rx[i] = random(-160, 160); - ry[i] = random(-55, 55); - rz[i] = random(-20, 20); - spd[i] = random(.1f, 3.75f); - rot[i] = random(.025f, .15f); - } -} - -public void draw() { - background(0); - lights(); - for (int i = 0; i < birdCount; i++){ - birds[i].setFlight(x[i], y[i], z[i], rx[i], ry[i], rz[i]); - birds[i].setWingSpeed(spd[i]); - birds[i].setRotSpeed(rot[i]); - birds[i].fly(); - } -} - - -class Bird { - - // Properties - float offsetX, offsetY, offsetZ; - float w, h; - int bodyFill; - int wingFill; - float ang = 0, ang2 = 0, ang3 = 0, ang4 = 0; - float radiusX = 120, radiusY = 200, radiusZ = 700; - float rotX = 15, rotY = 10, rotZ = 5; - float flapSpeed = 0.4f; - float rotSpeed = 0.1f; - - // Constructors - Bird(){ - this(0, 0, 0, 60, 80); - } - - Bird(float offsetX, float offsetY, float offsetZ, - float w, float h){ - this.offsetX = offsetX; - this.offsetY = offsetY; - this.offsetZ = offsetZ; - this.h = h; - this.w = w; - bodyFill = color(153); - wingFill = color(204); - } - - public void setFlight(float radiusX, float radiusY, float radiusZ, - float rotX, float rotY, float rotZ){ - this.radiusX = radiusX; - this.radiusY = radiusY; - this.radiusZ = radiusZ; - - this.rotX = rotX; - this.rotY = rotY; - this.rotZ = rotZ; - } - - public void setWingSpeed(float flapSpeed){ - this.flapSpeed = flapSpeed; - } - - public void setRotSpeed(float rotSpeed){ - this.rotSpeed = rotSpeed; - } - - public void fly() { - pushMatrix(); - float px, py, pz; - - // Flight - px = sin(radians(ang3)) * radiusX; - py = cos(radians(ang3)) * radiusY; - pz = sin(radians(ang4)) * radiusZ; - - translate(width/2 + offsetX + px, height/2 + offsetY+py, -700 + offsetZ+pz); - - rotateX(sin(radians(ang2)) * rotX); - rotateY(sin(radians(ang2)) * rotY); - rotateZ(sin(radians(ang2)) * rotZ); - - // Body - fill(bodyFill); - box(w/5, h, w/5); - - // Left wing - fill(wingFill); - pushMatrix(); - rotateY(sin(radians(ang)) * 20); - rect(0, -h/2, w, h); - popMatrix(); - - // Right wing - pushMatrix(); - rotateY(sin(radians(ang)) * -20); - rect(-w, -h/2, w, h); - popMatrix(); - - // Wing flap - ang += flapSpeed; - if (ang > 3) { - flapSpeed*=-1; - } - if (ang < -3) { - flapSpeed*=-1; - } - - // Ang's run trig functions - ang2 += rotSpeed; - ang3 += 1.25f; - ang4 += 0.55f; - popMatrix(); - } -} - - - - - static public void main(String args[]) { - PApplet.main(new String[] { "Birds" }); - } -} diff --git a/java/examples/3D/Transform/Birds/applet/Birds.pde b/java/examples/3D/Transform/Birds/applet/Birds.pde deleted file mode 100644 index 5026bd2ae..000000000 --- a/java/examples/3D/Transform/Birds/applet/Birds.pde +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Crazy Flocking 3D Birds - * by Ira Greenberg. - * - * Simulates a flock of birds using a Bird class and nested - * pushMatrix() / popMatrix() functions. - * Trigonometry functions handle the flapping and sinuous movement. - */ - -// Flock array -int birdCount = 200; -Bird[]birds = new Bird[birdCount]; -float[]x = new float[birdCount]; -float[]y = new float[birdCount]; -float[]z = new float[birdCount]; -float[]rx = new float[birdCount]; -float[]ry = new float[birdCount]; -float[]rz = new float[birdCount]; -float[]spd = new float[birdCount]; -float[]rot = new float[birdCount]; - -void setup() { - size(640, 360, P3D); - noStroke(); - - // Initialize arrays with random values - for (int i = 0; i < birdCount; i++){ - birds[i] = new Bird(random(-300, 300), random(-300, 300), - random(-500, -2500), random(5, 30), random(5, 30)); - - x[i] = random(20, 340); - y[i] = random(30, 350); - z[i] = random(1000, 4800); - rx[i] = random(-160, 160); - ry[i] = random(-55, 55); - rz[i] = random(-20, 20); - spd[i] = random(.1, 3.75); - rot[i] = random(.025, .15); - } -} - -void draw() { - background(0); - lights(); - for (int i = 0; i < birdCount; i++){ - birds[i].setFlight(x[i], y[i], z[i], rx[i], ry[i], rz[i]); - birds[i].setWingSpeed(spd[i]); - birds[i].setRotSpeed(rot[i]); - birds[i].fly(); - } -} - - diff --git a/java/examples/3D/Transform/Birds/applet/loading.gif b/java/examples/3D/Transform/Birds/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdl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6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Transform/CubesWithinCube/applet/Cube.pde b/java/examples/3D/Transform/CubesWithinCube/applet/Cube.pde deleted file mode 100644 index 271792623..000000000 --- a/java/examples/3D/Transform/CubesWithinCube/applet/Cube.pde +++ /dev/null @@ -1,72 +0,0 @@ - -// Custom Cube Class - -class Cube{ - PVector[] vertices = new PVector[24]; - float w, h, d; - - // Default constructor - Cube(){ } - - // Constructor 2 - Cube(float w, float h, float d) { - this.w = w; - this.h = h; - this.d = d; - - // cube composed of 6 quads - //front - vertices[0] = new PVector(-w/2,-h/2,d/2); - vertices[1] = new PVector(w/2,-h/2,d/2); - vertices[2] = new PVector(w/2,h/2,d/2); - vertices[3] = new PVector(-w/2,h/2,d/2); - //left - vertices[4] = new PVector(-w/2,-h/2,d/2); - vertices[5] = new PVector(-w/2,-h/2,-d/2); - vertices[6] = new PVector(-w/2,h/2,-d/2); - vertices[7] = new PVector(-w/2,h/2,d/2); - //right - vertices[8] = new PVector(w/2,-h/2,d/2); - vertices[9] = new PVector(w/2,-h/2,-d/2); - vertices[10] = new PVector(w/2,h/2,-d/2); - vertices[11] = new PVector(w/2,h/2,d/2); - //back - vertices[12] = new PVector(-w/2,-h/2,-d/2); - vertices[13] = new PVector(w/2,-h/2,-d/2); - vertices[14] = new PVector(w/2,h/2,-d/2); - vertices[15] = new PVector(-w/2,h/2,-d/2); - //top - vertices[16] = new PVector(-w/2,-h/2,d/2); - vertices[17] = new PVector(-w/2,-h/2,-d/2); - vertices[18] = new PVector(w/2,-h/2,-d/2); - vertices[19] = new PVector(w/2,-h/2,d/2); - //bottom - vertices[20] = new PVector(-w/2,h/2,d/2); - vertices[21] = new PVector(-w/2,h/2,-d/2); - vertices[22] = new PVector(w/2,h/2,-d/2); - vertices[23] = new PVector(w/2,h/2,d/2); - } - void create(){ - // Draw cube - for (int i=0; i<6; i++){ - beginShape(QUADS); - for (int j=0; j<4; j++){ - vertex(vertices[j+4*i].x, vertices[j+4*i].y, vertices[j+4*i].z); - } - endShape(); - } - } - void create(color[]quadBG){ - // Draw cube - for (int i=0; i<6; i++){ - fill(quadBG[i]); - beginShape(QUADS); - for (int j=0; j<4; j++){ - vertex(vertices[j+4*i].x, vertices[j+4*i].y, vertices[j+4*i].z); - } - endShape(); - } - } -} - - diff --git a/java/examples/3D/Transform/CubesWithinCube/applet/CubesWithinCube.java b/java/examples/3D/Transform/CubesWithinCube/applet/CubesWithinCube.java deleted file mode 100644 index c087c7f6b..000000000 --- a/java/examples/3D/Transform/CubesWithinCube/applet/CubesWithinCube.java +++ /dev/null @@ -1,226 +0,0 @@ -import processing.core.*; -import processing.xml.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class CubesWithinCube extends PApplet { - -/** - * Cubes Contained Within a Cube - * by Ira Greenberg. - * - * Collision detection against all - * outer cube's surfaces. - * Uses the Point3D and Cube classes. - */ - -Cube stage; // external large cube -int cubies = 20; -Cube[]c = new Cube[cubies]; // internal little cubes -int[][]quadBG = new int[cubies][6]; - -// Controls cubie's movement -float[]x = new float[cubies]; -float[]y = new float[cubies]; -float[]z = new float[cubies]; -float[]xSpeed = new float[cubies]; -float[]ySpeed = new float[cubies]; -float[]zSpeed = new float[cubies]; - -// Controls cubie's rotation -float[]xRot = new float[cubies]; -float[]yRot = new float[cubies]; -float[]zRot = new float[cubies]; - -// Size of external cube -float bounds = 300; - -public void setup() { - size(640, 360, P3D); - - for (int i = 0; i < cubies; i++){ - // Each cube face has a random color component - float colorShift = random(-75, 75); - quadBG[i][0] = color(0); - quadBG[i][1] = color(51); - quadBG[i][2] = color(102); - quadBG[i][3] = color(153); - quadBG[i][4] = color(204); - quadBG[i][5] = color(255); - - // Cubies are randomly sized - float cubieSize = random(5, 15); - c[i] = new Cube(cubieSize, cubieSize, cubieSize); - - // Initialize cubie's position, speed and rotation - x[i] = 0; - y[i] = 0; - z[i] = 0; - - xSpeed[i] = random(-1, 1); - ySpeed[i] = random(-1, 1); - zSpeed[i] = random(-1, 1); - - xRot[i] = random(40, 100); - yRot[i] = random(40, 100); - zRot[i] = random(40, 100); - } - - // Instantiate external large cube - stage = new Cube(bounds, bounds, bounds); -} - -public void draw(){ - background(50); - lights(); - - // Center in display window - translate(width/2, height/2, -130); - - // Outer transparent cube - noFill(); - - // Rotate everything, including external large cube - rotateX(frameCount * 0.001f); - rotateY(frameCount * 0.002f); - rotateZ(frameCount * 0.001f); - stroke(255); - - // Draw external large cube - stage.create(); - - // Move and rotate cubies - for (int i = 0; i < cubies; i++){ - pushMatrix(); - translate(x[i], y[i], z[i]); - rotateX(frameCount*PI/xRot[i]); - rotateY(frameCount*PI/yRot[i]); - rotateX(frameCount*PI/zRot[i]); - noStroke(); - c[i].create(quadBG[i]); - x[i] += xSpeed[i]; - y[i] += ySpeed[i]; - z[i] += zSpeed[i]; - popMatrix(); - - // Draw lines connecting cubbies - stroke(0); - if (i < cubies-1){ - line(x[i], y[i], z[i], x[i+1], y[i+1], z[i+1]); - } - - // Check wall collisions - if (x[i] > bounds/2 || x[i] < -bounds/2){ - xSpeed[i]*=-1; - } - if (y[i] > bounds/2 || y[i] < -bounds/2){ - ySpeed[i]*=-1; - } - if (z[i] > bounds/2 || z[i] < -bounds/2){ - zSpeed[i]*=-1; - } - } -} - - -// Custom Cube Class - -class Cube{ - PVector[] vertices = new PVector[24]; - float w, h, d; - - // Default constructor - Cube(){ } - - // Constructor 2 - Cube(float w, float h, float d) { - this.w = w; - this.h = h; - this.d = d; - - // cube composed of 6 quads - //front - vertices[0] = new PVector(-w/2,-h/2,d/2); - vertices[1] = new PVector(w/2,-h/2,d/2); - vertices[2] = new PVector(w/2,h/2,d/2); - vertices[3] = new PVector(-w/2,h/2,d/2); - //left - vertices[4] = new PVector(-w/2,-h/2,d/2); - vertices[5] = new PVector(-w/2,-h/2,-d/2); - vertices[6] = new PVector(-w/2,h/2,-d/2); - vertices[7] = new PVector(-w/2,h/2,d/2); - //right - vertices[8] = new PVector(w/2,-h/2,d/2); - vertices[9] = new PVector(w/2,-h/2,-d/2); - vertices[10] = new PVector(w/2,h/2,-d/2); - vertices[11] = new PVector(w/2,h/2,d/2); - //back - vertices[12] = new PVector(-w/2,-h/2,-d/2); - vertices[13] = new PVector(w/2,-h/2,-d/2); - vertices[14] = new PVector(w/2,h/2,-d/2); - vertices[15] = new PVector(-w/2,h/2,-d/2); - //top - vertices[16] = new PVector(-w/2,-h/2,d/2); - vertices[17] = new PVector(-w/2,-h/2,-d/2); - vertices[18] = new PVector(w/2,-h/2,-d/2); - vertices[19] = new PVector(w/2,-h/2,d/2); - //bottom - vertices[20] = new PVector(-w/2,h/2,d/2); - vertices[21] = new PVector(-w/2,h/2,-d/2); - vertices[22] = new PVector(w/2,h/2,-d/2); - vertices[23] = new PVector(w/2,h/2,d/2); - } - public void create(){ - // Draw cube - for (int i=0; i<6; i++){ - beginShape(QUADS); - for (int j=0; j<4; j++){ - vertex(vertices[j+4*i].x, vertices[j+4*i].y, vertices[j+4*i].z); - } - endShape(); - } - } - public void create(int[]quadBG){ - // Draw cube - for (int i=0; i<6; i++){ - fill(quadBG[i]); - beginShape(QUADS); - for (int j=0; j<4; j++){ - vertex(vertices[j+4*i].x, vertices[j+4*i].y, vertices[j+4*i].z); - } - endShape(); - } - } -} - - -// Extremely simple class to hold each 3D vertex - -class Point3D { - float x, y, z; - - // constructors - Point3D(){ - } - - Point3D(float x, float y, float z){ - this.x = x; - this.y = y; - this.z = z; - } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "CubesWithinCube" }); - } -} diff --git a/java/examples/3D/Transform/CubesWithinCube/applet/CubesWithinCube.pde b/java/examples/3D/Transform/CubesWithinCube/applet/CubesWithinCube.pde deleted file mode 100644 index b20420fcc..000000000 --- a/java/examples/3D/Transform/CubesWithinCube/applet/CubesWithinCube.pde +++ /dev/null @@ -1,117 +0,0 @@ -/** - * Cubes Contained Within a Cube - * by Ira Greenberg. - * - * Collision detection against all - * outer cube's surfaces. - * Uses the Point3D and Cube classes. - */ - -Cube stage; // external large cube -int cubies = 20; -Cube[]c = new Cube[cubies]; // internal little cubes -color[][]quadBG = new color[cubies][6]; - -// Controls cubie's movement -float[]x = new float[cubies]; -float[]y = new float[cubies]; -float[]z = new float[cubies]; -float[]xSpeed = new float[cubies]; -float[]ySpeed = new float[cubies]; -float[]zSpeed = new float[cubies]; - -// Controls cubie's rotation -float[]xRot = new float[cubies]; -float[]yRot = new float[cubies]; -float[]zRot = new float[cubies]; - -// Size of external cube -float bounds = 300; - -void setup() { - size(640, 360, P3D); - - for (int i = 0; i < cubies; i++){ - // Each cube face has a random color component - float colorShift = random(-75, 75); - quadBG[i][0] = color(0); - quadBG[i][1] = color(51); - quadBG[i][2] = color(102); - quadBG[i][3] = color(153); - quadBG[i][4] = color(204); - quadBG[i][5] = color(255); - - // Cubies are randomly sized - float cubieSize = random(5, 15); - c[i] = new Cube(cubieSize, cubieSize, cubieSize); - - // Initialize cubie's position, speed and rotation - x[i] = 0; - y[i] = 0; - z[i] = 0; - - xSpeed[i] = random(-1, 1); - ySpeed[i] = random(-1, 1); - zSpeed[i] = random(-1, 1); - - xRot[i] = random(40, 100); - yRot[i] = random(40, 100); - zRot[i] = random(40, 100); - } - - // Instantiate external large cube - stage = new Cube(bounds, bounds, bounds); -} - -void draw(){ - background(50); - lights(); - - // Center in display window - translate(width/2, height/2, -130); - - // Outer transparent cube - noFill(); - - // Rotate everything, including external large cube - rotateX(frameCount * 0.001); - rotateY(frameCount * 0.002); - rotateZ(frameCount * 0.001); - stroke(255); - - // Draw external large cube - stage.create(); - - // Move and rotate cubies - for (int i = 0; i < cubies; i++){ - pushMatrix(); - translate(x[i], y[i], z[i]); - rotateX(frameCount*PI/xRot[i]); - rotateY(frameCount*PI/yRot[i]); - rotateX(frameCount*PI/zRot[i]); - noStroke(); - c[i].create(quadBG[i]); - x[i] += xSpeed[i]; - y[i] += ySpeed[i]; - z[i] += zSpeed[i]; - popMatrix(); - - // Draw lines connecting cubbies - stroke(0); - if (i < cubies-1){ - line(x[i], y[i], z[i], x[i+1], y[i+1], z[i+1]); - } - - // Check wall collisions - if (x[i] > bounds/2 || x[i] < -bounds/2){ - xSpeed[i]*=-1; - } - if (y[i] > bounds/2 || y[i] < -bounds/2){ - ySpeed[i]*=-1; - } - if (z[i] > bounds/2 || z[i] < -bounds/2){ - zSpeed[i]*=-1; - } - } -} - diff --git a/java/examples/3D/Transform/CubesWithinCube/applet/loading.gif b/java/examples/3D/Transform/CubesWithinCube/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh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uzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Transform/PushPopCubes/applet/PushPopCubes.java b/java/examples/3D/Transform/PushPopCubes/applet/PushPopCubes.java deleted file mode 100644 index 3f4d46961..000000000 --- a/java/examples/3D/Transform/PushPopCubes/applet/PushPopCubes.java +++ /dev/null @@ -1,164 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class PushPopCubes extends PApplet { - -/** - * PushPop Cubes - * by Ira Greenberg. - * - * Array of rotating cubes creates - * dynamic field patterns. Color - * controlled by light sources. Example - * of pushMatrix() and popMatrix(). - */ - -// Cube class required -float ang; -int rows = 21; -int cols = 21; -int cubeCount = rows*cols; -int colSpan, rowSpan; -float rotspd = 2.0f; -Cube[] cubes = new Cube[cubeCount]; -float[] angs = new float[cubeCount]; -float[] rotvals = new float[cubeCount]; - -public void setup(){ - size(640, 360, P3D); - - colSpan = width/(cols-1); - rowSpan = height/(rows-1); - noStroke(); - - // instantiate cubes - for (int i = 0; i < cubeCount; i++){ - cubes[i] = new Cube(12, 12, 6, 0, 0, 0); - /* 3 different rotation options - - 1st option: cubes each rotate uniformly - - 2nd option: cubes each rotate randomly - - 3rd option: cube columns rotate as waves - To try the different rotations, leave one - of the rotVals[i] lines uncommented below - and the other 2 commented out. */ - - //rotvals[i] = rotspd; - //rotvals[i] = random(-rotspd * 2, rotspd * 2); - rotvals[i] = rotspd += .01f; - } -} - -public void draw(){ - int cubeCounter = 0; - background(0); - fill(200); - - // Set up some different colored lights - pointLight(51, 102, 255, width/3, height/2, 100); - pointLight(200, 40, 60, width/1.5f, height/2, -150); - - // Raise overall light in scene - ambientLight(170, 170, 100); - - // Translate, rotate and draw cubes - for (int i = 0; i < cols; i++){ - for (int j = 0; j < rows; j++){ - pushMatrix(); - /* Translate each block. - pushmatix and popmatrix add each cube - translation to matrix, but restore - original, so each cube rotates around its - owns center */ - translate(i * colSpan, j * rowSpan, -20); - //rotate each cube around y and x axes - rotateY(radians(angs[cubeCounter])); - rotateX(radians(angs[cubeCounter])); - cubes[cubeCounter].drawCube(); - popMatrix(); - cubeCounter++; - } - } - // Angs used in rotate function calls above - for (int i = 0; i < cubeCount; i++){ - angs[i] += rotvals[i]; - } -} - -// Simple Cube class, based on Quads -class Cube { - - // Properties - int w, h, d; - int shiftX, shiftY, shiftZ; - - // Constructor - Cube(int w, int h, int d, int shiftX, int shiftY, int shiftZ){ - this.w = w; - this.h = h; - this.d = d; - this.shiftX = shiftX; - this.shiftY = shiftY; - this.shiftZ = shiftZ; - } - - /* Main cube drawing method, which looks - more confusing than it really is. It's - just a bunch of rectangles drawn for - each cube face */ - public void drawCube(){ - - // Front face - beginShape(QUADS); - vertex(-w/2 + shiftX, -h/2 + shiftY, -d/2 + shiftZ); - vertex(w + shiftX, -h/2 + shiftY, -d/2 + shiftZ); - vertex(w + shiftX, h + shiftY, -d/2 + shiftZ); - vertex(-w/2 + shiftX, h + shiftY, -d/2 + shiftZ); - - // Back face - vertex(-w/2 + shiftX, -h/2 + shiftY, d + shiftZ); - vertex(w + shiftX, -h/2 + shiftY, d + shiftZ); - vertex(w + shiftX, h + shiftY, d + shiftZ); - vertex(-w/2 + shiftX, h + shiftY, d + shiftZ); - - // Left face - vertex(-w/2 + shiftX, -h/2 + shiftY, -d/2 + shiftZ); - vertex(-w/2 + shiftX, -h/2 + shiftY, d + shiftZ); - vertex(-w/2 + shiftX, h + shiftY, d + shiftZ); - vertex(-w/2 + shiftX, h + shiftY, -d/2 + shiftZ); - - // Right face - vertex(w + shiftX, -h/2 + shiftY, -d/2 + shiftZ); - vertex(w + shiftX, -h/2 + shiftY, d + shiftZ); - vertex(w + shiftX, h + shiftY, d + shiftZ); - vertex(w + shiftX, h + shiftY, -d/2 + shiftZ); - - // Top face - vertex(-w/2 + shiftX, -h/2 + shiftY, -d/2 + shiftZ); - vertex(w + shiftX, -h/2 + shiftY, -d/2 + shiftZ); - vertex(w + shiftX, -h/2 + shiftY, d + shiftZ); - vertex(-w/2 + shiftX, -h/2 + shiftY, d + shiftZ); - - // Bottom face - vertex(-w/2 + shiftX, h + shiftY, -d/2 + shiftZ); - vertex(w + shiftX, h + shiftY, -d/2 + shiftZ); - vertex(w + shiftX, h + shiftY, d + shiftZ); - vertex(-w/2 + shiftX, h + shiftY, d + shiftZ); - endShape(); - } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "PushPopCubes" }); - } -} diff --git a/java/examples/3D/Transform/PushPopCubes/applet/PushPopCubes.pde b/java/examples/3D/Transform/PushPopCubes/applet/PushPopCubes.pde deleted file mode 100644 index 52ae70fdc..000000000 --- a/java/examples/3D/Transform/PushPopCubes/applet/PushPopCubes.pde +++ /dev/null @@ -1,144 +0,0 @@ -/** - * PushPop Cubes - * by Ira Greenberg. - * - * Array of rotating cubes creates - * dynamic field patterns. Color - * controlled by light sources. Example - * of pushMatrix() and popMatrix(). - */ - -// Cube class required -float ang; -int rows = 21; -int cols = 21; -int cubeCount = rows*cols; -int colSpan, rowSpan; -float rotspd = 2.0; -Cube[] cubes = new Cube[cubeCount]; -float[] angs = new float[cubeCount]; -float[] rotvals = new float[cubeCount]; - -void setup(){ - size(640, 360, P3D); - - colSpan = width/(cols-1); - rowSpan = height/(rows-1); - noStroke(); - - // instantiate cubes - for (int i = 0; i < cubeCount; i++){ - cubes[i] = new Cube(12, 12, 6, 0, 0, 0); - /* 3 different rotation options - - 1st option: cubes each rotate uniformly - - 2nd option: cubes each rotate randomly - - 3rd option: cube columns rotate as waves - To try the different rotations, leave one - of the rotVals[i] lines uncommented below - and the other 2 commented out. */ - - //rotvals[i] = rotspd; - //rotvals[i] = random(-rotspd * 2, rotspd * 2); - rotvals[i] = rotspd += .01; - } -} - -void draw(){ - int cubeCounter = 0; - background(0); - fill(200); - - // Set up some different colored lights - pointLight(51, 102, 255, width/3, height/2, 100); - pointLight(200, 40, 60, width/1.5, height/2, -150); - - // Raise overall light in scene - ambientLight(170, 170, 100); - - // Translate, rotate and draw cubes - for (int i = 0; i < cols; i++){ - for (int j = 0; j < rows; j++){ - pushMatrix(); - /* Translate each block. - pushmatix and popmatrix add each cube - translation to matrix, but restore - original, so each cube rotates around its - owns center */ - translate(i * colSpan, j * rowSpan, -20); - //rotate each cube around y and x axes - rotateY(radians(angs[cubeCounter])); - rotateX(radians(angs[cubeCounter])); - cubes[cubeCounter].drawCube(); - popMatrix(); - cubeCounter++; - } - } - // Angs used in rotate function calls above - for (int i = 0; i < cubeCount; i++){ - angs[i] += rotvals[i]; - } -} - -// Simple Cube class, based on Quads -class Cube { - - // Properties - int w, h, d; - int shiftX, shiftY, shiftZ; - - // Constructor - Cube(int w, int h, int d, int shiftX, int shiftY, int shiftZ){ - this.w = w; - this.h = h; - this.d = d; - this.shiftX = shiftX; - this.shiftY = shiftY; - this.shiftZ = shiftZ; - } - - /* Main cube drawing method, which looks - more confusing than it really is. It's - just a bunch of rectangles drawn for - each cube face */ - void drawCube(){ - - // Front face - beginShape(QUADS); - vertex(-w/2 + shiftX, -h/2 + shiftY, -d/2 + shiftZ); - vertex(w + shiftX, -h/2 + shiftY, -d/2 + shiftZ); - vertex(w + shiftX, h + shiftY, -d/2 + shiftZ); - vertex(-w/2 + shiftX, h + shiftY, -d/2 + shiftZ); - - // Back face - vertex(-w/2 + shiftX, -h/2 + shiftY, d + shiftZ); - vertex(w + shiftX, -h/2 + shiftY, d + shiftZ); - vertex(w + shiftX, h + shiftY, d + shiftZ); - vertex(-w/2 + shiftX, h + shiftY, d + shiftZ); - - // Left face - vertex(-w/2 + shiftX, -h/2 + shiftY, -d/2 + shiftZ); - vertex(-w/2 + shiftX, -h/2 + shiftY, d + shiftZ); - vertex(-w/2 + shiftX, h + shiftY, d + shiftZ); - vertex(-w/2 + shiftX, h + shiftY, -d/2 + shiftZ); - - // Right face - vertex(w + shiftX, -h/2 + shiftY, -d/2 + shiftZ); - vertex(w + shiftX, -h/2 + shiftY, d + shiftZ); - vertex(w + shiftX, h + shiftY, d + shiftZ); - vertex(w + shiftX, h + shiftY, -d/2 + shiftZ); - - // Top face - vertex(-w/2 + shiftX, -h/2 + shiftY, -d/2 + shiftZ); - vertex(w + shiftX, -h/2 + shiftY, -d/2 + shiftZ); - vertex(w + shiftX, -h/2 + shiftY, d + shiftZ); - vertex(-w/2 + shiftX, -h/2 + shiftY, d + shiftZ); - - // Bottom face - vertex(-w/2 + shiftX, h + shiftY, -d/2 + shiftZ); - vertex(w + shiftX, h + shiftY, -d/2 + shiftZ); - vertex(w + shiftX, h + shiftY, d + shiftZ); - vertex(-w/2 + shiftX, h + shiftY, d + shiftZ); - endShape(); - } -} - diff --git a/java/examples/3D/Transform/PushPopCubes/applet/loading.gif b/java/examples/3D/Transform/PushPopCubes/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKc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0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Transform/Rotate1/applet/Rotate1.java b/java/examples/3D/Transform/Rotate1/applet/Rotate1.java deleted file mode 100644 index 3a78763fd..000000000 --- a/java/examples/3D/Transform/Rotate1/applet/Rotate1.java +++ /dev/null @@ -1,58 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Rotate1 extends PApplet { - -/** - * Rotate 1. - * - * Rotating simultaneously in the X and Y axis. - * Transformation functions such as rotate() are additive. - * Successively calling rotate(1.0) and rotate(2.0) - * is equivalent to calling rotate(3.0). - */ - -float a = 0.0f; -float rSize; // rectangle size - -public void setup() { - size(640, 360, P3D); - rSize = width / 6; - noStroke(); - fill(204, 204); -} - -public void draw() { - background(0); - - a += 0.005f; - if(a > TWO_PI) { - a = 0.0f; - } - - translate(width/2, height/2); - - rotateX(a); - rotateY(a * 2.0f); - rect(-rSize, -rSize, rSize*2, rSize*2); - - rotateX(a * 1.001f); - rotateY(a * 2.002f); - rect(-rSize, -rSize, rSize*2, rSize*2); - -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Rotate1" }); - } -} diff --git a/java/examples/3D/Transform/Rotate1/applet/Rotate1.pde b/java/examples/3D/Transform/Rotate1/applet/Rotate1.pde deleted file mode 100644 index 7aafc250a..000000000 --- a/java/examples/3D/Transform/Rotate1/applet/Rotate1.pde +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Rotate 1. - * - * Rotating simultaneously in the X and Y axis. - * Transformation functions such as rotate() are additive. - * Successively calling rotate(1.0) and rotate(2.0) - * is equivalent to calling rotate(3.0). - */ - -float a = 0.0; -float rSize; // rectangle size - -void setup() { - size(640, 360, P3D); - rSize = width / 6; - noStroke(); - fill(204, 204); -} - -void draw() { - background(0); - - a += 0.005; - if(a > TWO_PI) { - a = 0.0; - } - - translate(width/2, height/2); - - rotateX(a); - rotateY(a * 2.0); - rect(-rSize, -rSize, rSize*2, rSize*2); - - rotateX(a * 1.001); - rotateY(a * 2.002); - rect(-rSize, -rSize, rSize*2, rSize*2); - -} diff --git a/java/examples/3D/Transform/Rotate1/applet/loading.gif b/java/examples/3D/Transform/Rotate1/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!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7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Transform/Rotate2/applet/Rotate2.java b/java/examples/3D/Transform/Rotate2/applet/Rotate2.java deleted file mode 100644 index 0403df557..000000000 --- a/java/examples/3D/Transform/Rotate2/applet/Rotate2.java +++ /dev/null @@ -1,62 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Rotate2 extends PApplet { - -/** - * Rotate 2. - * - * The push() and pop() functions allow for more control over transformations. - * The push function saves the current coordinate system to the stack - * and pop() restores the prior coordinate system. - */ - -float a; // Angle of rotation -float offset = PI/24.0f; // Angle offset between boxes -int num = 12; // Number of boxes -int[] colors = new int[num]; // Colors of each box -int safecolor; - -boolean pink = true; - -public void setup() -{ - size(640, 360, P3D); - noStroke(); - for(int i=0; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2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f+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Typography/KineticType/applet/KineticType.java b/java/examples/3D/Typography/KineticType/applet/KineticType.java deleted file mode 100644 index 852401aa3..000000000 --- a/java/examples/3D/Typography/KineticType/applet/KineticType.java +++ /dev/null @@ -1,137 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class KineticType extends PApplet { - -/** - * Kinetic Type - * by Zach Lieberman. - * - * Using push() and pop() to define the curves of the lines of type. - */ - -Line ln; -Line lns[]; - -String words[] = { - "sometimes it's like", "the lines of text", "are so happy", "that they want to dance", - "or leave the page or jump", "can you blame them?", "living on the page like that", - "waiting to be read..." -}; - -public void setup() -{ - size(640, 360, P3D); - - // Array of line objects - lns = new Line[8]; - - // Load the font from the sketch's data directory - textFont(loadFont("Univers66.vlw.gz"), 1.0f); - - // White type - fill(255); - - // Creating the line objects - for(int i = 0; i < 8; i++) { - // For every line in the array, create a Line object to animate - // i * 70 is the spacing - ln = new Line(words[i], 0, i * 70); - lns[i] = ln; - } -} - -public void draw() -{ - background(0); - - translate(-200, -50, -450); - rotateY(0.3f); - - // Now animate every line object & draw it... - for(int i = 0; i < 8; i++) { - float f1 = sin((i + 1.0f) * (millis() / 10000.0f) * TWO_PI); - float f2 = sin((8.0f - i) * (millis() / 10000.0f) * TWO_PI); - Line line = lns[i]; - pushMatrix(); - translate(0.0f, line.yPosition, 0.0f); - for(int j = 0; j < line.myLetters.length; j++) { - if(j != 0) { - translate(textWidth(line.myLetters[j - 1].myChar) * 75, 0.0f, 0.0f); - } - rotateY(f1 * 0.005f * f2); - pushMatrix(); - scale(75.0f); - text(line.myLetters[j].myChar, 0.0f, 0.0f); - popMatrix(); - } - popMatrix(); - } -} - -class Letter -{ - char myChar; - float x; - float y; - - Letter(char c, float f, float f1) - { - myChar = c; - x = f; - y = f1; - } -} -class Line -{ - String myString; - int xPosition; - int yPosition; - int highlightNum; - float speed; - float curlInX; - Letter myLetters[]; - - Line(String s, int i, int j) - { - myString = s; - xPosition = i; - yPosition = j; - myLetters = new Letter[s.length()]; - float f1 = 0.0f; - for(int k = 0; k < s.length(); k++) - { - char c = s.charAt(k); - f1 += textWidth(c); - Letter letter = new Letter(c, f1, 0.0f); - myLetters[k] = letter; - } - - curlInX = 0.1f; - } -} -class Word -{ - String myName; - int x; - - Word(String s) - { - myName = s; - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "KineticType" }); - } -} diff --git a/java/examples/3D/Typography/KineticType/applet/KineticType.pde b/java/examples/3D/Typography/KineticType/applet/KineticType.pde deleted file mode 100644 index bf422811f..000000000 --- a/java/examples/3D/Typography/KineticType/applet/KineticType.pde +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Kinetic Type - * by Zach Lieberman. - * - * Using push() and pop() to define the curves of the lines of type. - */ - -Line ln; -Line lns[]; - -String words[] = { - "sometimes it's like", "the lines of text", "are so happy", "that they want to dance", - "or leave the page or jump", "can you blame them?", "living on the page like that", - "waiting to be read..." -}; - -void setup() -{ - size(640, 360, P3D); - - // Array of line objects - lns = new Line[8]; - - // Load the font from the sketch's data directory - textFont(loadFont("Univers66.vlw.gz"), 1.0); - - // White type - fill(255); - - // Creating the line objects - for(int i = 0; i < 8; i++) { - // For every line in the array, create a Line object to animate - // i * 70 is the spacing - ln = new Line(words[i], 0, i * 70); - lns[i] = ln; - } -} - -void draw() -{ - background(0); - - translate(-200, -50, -450); - rotateY(0.3); - - // Now animate every line object & draw it... - for(int i = 0; i < 8; i++) { - float f1 = sin((i + 1.0) * (millis() / 10000.0) * TWO_PI); - float f2 = sin((8.0 - i) * (millis() / 10000.0) * TWO_PI); - Line line = lns[i]; - pushMatrix(); - translate(0.0, line.yPosition, 0.0); - for(int j = 0; j < line.myLetters.length; j++) { - if(j != 0) { - translate(textWidth(line.myLetters[j - 1].myChar) * 75, 0.0, 0.0); - } - rotateY(f1 * 0.005 * f2); - pushMatrix(); - scale(75.0); - text(line.myLetters[j].myChar, 0.0, 0.0); - popMatrix(); - } - popMatrix(); - } -} - diff --git a/java/examples/3D/Typography/KineticType/applet/Letter.pde b/java/examples/3D/Typography/KineticType/applet/Letter.pde deleted file mode 100644 index d12a9a78d..000000000 --- a/java/examples/3D/Typography/KineticType/applet/Letter.pde +++ /dev/null @@ -1,13 +0,0 @@ -class Letter -{ - char myChar; - float x; - float y; - - Letter(char c, float f, float f1) - { - myChar = c; - x = f; - y = f1; - } -} diff --git a/java/examples/3D/Typography/KineticType/applet/Line.pde b/java/examples/3D/Typography/KineticType/applet/Line.pde deleted file mode 100644 index f01b9cdc8..000000000 --- a/java/examples/3D/Typography/KineticType/applet/Line.pde +++ /dev/null @@ -1,28 +0,0 @@ -class Line -{ - String myString; - int xPosition; - int yPosition; - int highlightNum; - float speed; - float curlInX; - Letter myLetters[]; - - Line(String s, int i, int j) - { - myString = s; - xPosition = i; - yPosition = j; - myLetters = new Letter[s.length()]; - float f1 = 0.0; - for(int k = 0; k < s.length(); k++) - { - char c = s.charAt(k); - f1 += textWidth(c); - Letter letter = new Letter(c, f1, 0.0); - myLetters[k] = letter; - } - - curlInX = 0.1; - } -} diff --git a/java/examples/3D/Typography/KineticType/applet/Word.pde b/java/examples/3D/Typography/KineticType/applet/Word.pde deleted file mode 100644 index 6bc2f2deb..000000000 --- a/java/examples/3D/Typography/KineticType/applet/Word.pde +++ /dev/null @@ -1,10 +0,0 @@ -class Word -{ - String myName; - int x; - - Word(String s) - { - myName = s; - } -} diff --git a/java/examples/3D/Typography/KineticType/applet/loading.gif b/java/examples/3D/Typography/KineticType/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569d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yKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Typography/LetterK/applet/LetterK.java b/java/examples/3D/Typography/LetterK/applet/LetterK.java deleted file mode 100644 index 4d2105e21..000000000 --- a/java/examples/3D/Typography/LetterK/applet/LetterK.java +++ /dev/null @@ -1,145 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class LetterK extends PApplet { - -/** - * Letter K - * by Peter Cho. - * - * Move the mouse across the screen to fold the "K". - */ - -int backgroundColor; -int foregroundColor; -int foregroundColor2; - -float px, py; -float pfx, pfy; -float pv2, pvx, pvy; -float pa2, pax, pay; -float pMass, pDrag; - -public void setup() { - size(640, 360, P3D); - noStroke(); - backgroundColor = color(134, 144, 154); - foregroundColor = color(235, 235, 30); - foregroundColor2 = color(240, 130, 20); - initParticle(0.6f, 0.9f, width/2, height/2); -} - -public void draw() { - background(backgroundColor); - pushMatrix(); - - iterateParticle(0.15f*(-px+mouseX), 0.15f*(-py+(height-mouseY))); - - translate(width/2, height/2, 0); - fill(foregroundColor); - drawK(); - - pushMatrix(); - translate(0, 0, 1); - translate(0.75f * (px-width/2), -0.75f * (py-height/2), 0); - translate(0.75f * (px-width/2), -0.75f * (py-height/2), 0); - rotateZ(atan2(-(py-height/2), (px-width/2)) + PI/2); - rotateX(PI); - rotateZ(-(atan2(-(py-height/2), (px-width/2)) + PI/2)); - - fill(foregroundColor2); - drawK(); - popMatrix(); - - translate(0.75f * (px-width/2), -0.75f * (py-height/2), 2); - rotateZ(atan2(-(py-height/2), (px-width/2)) + PI/2); - - fill(backgroundColor); - beginShape(QUADS); - vertex(-640, 0); - vertex( 640, 0); - vertex( 640, -360); - vertex(-640, -360); - endShape(); - - popMatrix(); - -} - -public void initParticle(float _mass, float _drag, float ox, float oy) { - px = ox; - py = oy; - pv2 = 0.0f; - pvx = 0.0f; - pvy = 0.0f; - pa2 = 0.0f; - pax = 0.0f; - pay = 0.0f; - pMass = _mass; - pDrag = _drag; -} - -public void iterateParticle(float fkx, float fky) { - // iterate for a single force acting on the particle - pfx = fkx; - pfy = fky; - pa2 = pfx*pfx + pfy*pfy; - if (pa2 < 0.0000001f) { - return; - } - pax = pfx/pMass; - pay = pfy/pMass; - pvx += pax; - pvy += pay; - pv2 = pvx*pvx + pvy*pvy; - if (pv2 < 0.0000001f) { - return; - } - pvx *= (1.0f - pDrag); - pvy *= (1.0f - pDrag); - px += pvx; - py += pvy; -} - -public void drawK() { - pushMatrix(); - - scale(1.5f); - translate(-63, 71); - beginShape(QUADS); - vertex(0, 0, 0); - vertex(0, -142.7979f, 0); - vertex(37.1992f, -142.7979f, 0); - vertex(37.1992f, 0, 0); - - vertex(37.1992f, -87.9990f, 0); - vertex(84.1987f, -142.7979f, 0); - vertex(130.3979f, -142.7979f, 0); - vertex(37.1992f, -43.999f, 0); - - vertex(77.5986f-.2f, -86.5986f-.3f, 0); - vertex(136.998f, 0, 0); - vertex(90.7988f, 0, 0); - vertex(52.3994f-.2f, -59.999f-.3f, 0); - endShape(); - //translate(63, -71); - popMatrix(); -} - - - - - static public void main(String args[]) { - PApplet.main(new String[] { "LetterK" }); - } -} diff --git a/java/examples/3D/Typography/LetterK/applet/LetterK.pde b/java/examples/3D/Typography/LetterK/applet/LetterK.pde deleted file mode 100644 index f2284d9a6..000000000 --- a/java/examples/3D/Typography/LetterK/applet/LetterK.pde +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Letter K - * by Peter Cho. - * - * Move the mouse across the screen to fold the "K". - */ - -color backgroundColor; -color foregroundColor; -color foregroundColor2; - -float px, py; -float pfx, pfy; -float pv2, pvx, pvy; -float pa2, pax, pay; -float pMass, pDrag; - -void setup() { - size(640, 360, P3D); - noStroke(); - backgroundColor = color(134, 144, 154); - foregroundColor = color(235, 235, 30); - foregroundColor2 = color(240, 130, 20); - initParticle(0.6, 0.9, width/2, height/2); -} - -void draw() { - background(backgroundColor); - pushMatrix(); - - iterateParticle(0.15*(-px+mouseX), 0.15*(-py+(height-mouseY))); - - translate(width/2, height/2, 0); - fill(foregroundColor); - drawK(); - - pushMatrix(); - translate(0, 0, 1); - translate(0.75 * (px-width/2), -0.75 * (py-height/2), 0); - translate(0.75 * (px-width/2), -0.75 * (py-height/2), 0); - rotateZ(atan2(-(py-height/2), (px-width/2)) + PI/2); - rotateX(PI); - rotateZ(-(atan2(-(py-height/2), (px-width/2)) + PI/2)); - - fill(foregroundColor2); - drawK(); - popMatrix(); - - translate(0.75 * (px-width/2), -0.75 * (py-height/2), 2); - rotateZ(atan2(-(py-height/2), (px-width/2)) + PI/2); - - fill(backgroundColor); - beginShape(QUADS); - vertex(-640, 0); - vertex( 640, 0); - vertex( 640, -360); - vertex(-640, -360); - endShape(); - - popMatrix(); - -} - -void initParticle(float _mass, float _drag, float ox, float oy) { - px = ox; - py = oy; - pv2 = 0.0; - pvx = 0.0; - pvy = 0.0; - pa2 = 0.0; - pax = 0.0; - pay = 0.0; - pMass = _mass; - pDrag = _drag; -} - -void iterateParticle(float fkx, float fky) { - // iterate for a single force acting on the particle - pfx = fkx; - pfy = fky; - pa2 = pfx*pfx + pfy*pfy; - if (pa2 < 0.0000001) { - return; - } - pax = pfx/pMass; - pay = pfy/pMass; - pvx += pax; - pvy += pay; - pv2 = pvx*pvx + pvy*pvy; - if (pv2 < 0.0000001) { - return; - } - pvx *= (1.0 - pDrag); - pvy *= (1.0 - pDrag); - px += pvx; - py += pvy; -} - -void drawK() { - pushMatrix(); - - scale(1.5); - translate(-63, 71); - beginShape(QUADS); - vertex(0, 0, 0); - vertex(0, -142.7979, 0); - vertex(37.1992, -142.7979, 0); - vertex(37.1992, 0, 0); - - vertex(37.1992, -87.9990, 0); - vertex(84.1987, -142.7979, 0); - vertex(130.3979, -142.7979, 0); - vertex(37.1992, -43.999, 0); - - vertex(77.5986-.2, -86.5986-.3, 0); - vertex(136.998, 0, 0); - vertex(90.7988, 0, 0); - vertex(52.3994-.2, -59.999-.3, 0); - endShape(); - //translate(63, -71); - popMatrix(); -} - - - diff --git a/java/examples/3D/Typography/LetterK/applet/loading.gif b/java/examples/3D/Typography/LetterK/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1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$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/3D/Typography/Typing/applet/Typing.java b/java/examples/3D/Typography/Typing/applet/Typing.java deleted file mode 100644 index c68f5b2aa..000000000 --- a/java/examples/3D/Typography/Typing/applet/Typing.java +++ /dev/null @@ -1,101 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Typing extends PApplet { - -/** - * Typing (Excerpt from the piece Textension) - * by Josh Nimoy. - * - * Click in the window to give it focus. - * Type to add letters and press backspace or delete to remove them. - */ - - -int leftmargin = 10; -int rightmargin = 20; -String buff = ""; -boolean didntTypeYet = true; - -public void setup() -{ - size(640, 360, P3D); - textFont(loadFont("Univers45.vlw"), 25); -} - -public void draw() -{ - background(176); - - if((millis() % 500) < 250){ // Only fill cursor half the time - noFill(); - } - else{ - fill(255); - stroke(0); - } - float rPos; - // Store the cursor rectangle's position - rPos = textWidth(buff)+leftmargin; - rect(rPos+1, 19, 10, 21); - - // Some instructions at first - if(didntTypeYet){ - fill(0); - //text("Use the keyboard.", 22, 40); - } - - fill(0); - pushMatrix(); - translate(rPos,10+25); - char k; - for(int i=0;i0){ - buff = buff.substring(1); - } - break; - case 13: // Avoid special keys - case 10: - case 65535: - case 127: - case 27: - break; - default: - if(textWidth(buff+k)+leftmargin < width-rightmargin){ - didntTypeYet = false; - buff=k+buff; - } - break; - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Typing" }); - } -} diff --git a/java/examples/3D/Typography/Typing/applet/Typing.pde b/java/examples/3D/Typography/Typing/applet/Typing.pde deleted file mode 100644 index 0102012b7..000000000 --- a/java/examples/3D/Typography/Typing/applet/Typing.pde +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Typing (Excerpt from the piece Textension) - * by Josh Nimoy. - * - * Click in the window to give it focus. - * Type to add letters and press backspace or delete to remove them. - */ - - -int leftmargin = 10; -int rightmargin = 20; -String buff = ""; -boolean didntTypeYet = true; - -void setup() -{ - size(640, 360, P3D); - textFont(loadFont("Univers45.vlw"), 25); -} - -void draw() -{ - background(176); - - if((millis() % 500) < 250){ // Only fill cursor half the time - noFill(); - } - else{ - fill(255); - stroke(0); - } - float rPos; - // Store the cursor rectangle's position - rPos = textWidth(buff)+leftmargin; - rect(rPos+1, 19, 10, 21); - - // Some instructions at first - if(didntTypeYet){ - fill(0); - //text("Use the keyboard.", 22, 40); - } - - fill(0); - pushMatrix(); - translate(rPos,10+25); - char k; - for(int i=0;i0){ - buff = buff.substring(1); - } - break; - case 13: // Avoid special keys - case 10: - case 65535: - case 127: - case 27: - break; - default: - if(textWidth(buff+k)+leftmargin < width-rightmargin){ - didntTypeYet = false; - buff=k+buff; - } - break; - } -} diff --git a/java/examples/3D/Typography/Typing/applet/loading.gif b/java/examples/3D/Typography/Typing/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569d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yKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Arrays/Array/applet/Array.java b/java/examples/Basics/Arrays/Array/applet/Array.java deleted file mode 100644 index 3beda6698..000000000 --- a/java/examples/Basics/Arrays/Array/applet/Array.java +++ /dev/null @@ -1,56 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Array extends PApplet { - public void setup() {/** - * Array. - * - * An array is a list of data. Each piece of data in an array - * is identified by an index number representing its position in - * the array. Arrays are zero based, which means that the first - * element in the array is [0], the second element is [1], and so on. - * In this example, an array named "coswav" is created and - * filled with the cosine values. This data is displayed three - * separate ways on the screen. - */ - -size(200, 200); - -float[] coswave = new float[width]; - -for (int i = 0; i < width; i++) { - float amount = map(i, 0, width, 0, PI); - coswave[i] = abs(cos(amount)); -} - -for (int i = 0; i < width; i++) { - stroke(coswave[i]*255); - line(i, 0, i, height/3); -} - -for (int i = 0; i < width; i++) { - stroke(coswave[i]*255 / 4); - line(i, height/3, i, height/3*2); -} - -for (int i = 0; i < width; i++) { - stroke(255 - coswave[i]*255); - line(i, height/3*2, i, height); -} - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "Array" }); - } -} diff --git a/java/examples/Basics/Arrays/Array/applet/Array.pde b/java/examples/Basics/Arrays/Array/applet/Array.pde deleted file mode 100644 index a981fa470..000000000 --- a/java/examples/Basics/Arrays/Array/applet/Array.pde +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Array. - * - * An array is a list of data. Each piece of data in an array - * is identified by an index number representing its position in - * the array. Arrays are zero based, which means that the first - * element in the array is [0], the second element is [1], and so on. - * In this example, an array named "coswav" is created and - * filled with the cosine values. This data is displayed three - * separate ways on the screen. - */ - -size(200, 200); - -float[] coswave = new float[width]; - -for (int i = 0; i < width; i++) { - float amount = map(i, 0, width, 0, PI); - coswave[i] = abs(cos(amount)); -} - -for (int i = 0; i < width; i++) { - stroke(coswave[i]*255); - line(i, 0, i, height/3); -} - -for (int i = 0; i < width; i++) { - stroke(coswave[i]*255 / 4); - line(i, height/3, i, height/3*2); -} - -for (int i = 0; i < width; i++) { - stroke(255 - coswave[i]*255); - line(i, height/3*2, i, height); -} diff --git a/java/examples/Basics/Arrays/Array/applet/loading.gif b/java/examples/Basics/Arrays/Array/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe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yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Arrays/Array2D/applet/Array2D.java b/java/examples/Basics/Arrays/Array2D/applet/Array2D.java deleted file mode 100644 index ee25d0c53..000000000 --- a/java/examples/Basics/Arrays/Array2D/applet/Array2D.java +++ /dev/null @@ -1,53 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Array2D extends PApplet { - public void setup() {/** - * Array 2D. - * - * Demonstrates the syntax for creating a two-dimensional (2D) array. - * Values in a 2D array are accessed through two index values. - * 2D arrays are useful for storing images. In this example, each dot - * is colored in relation to its distance from the center of the image. - */ - -float[][] distances; -float maxDistance; - -size(200, 200); -background(0); -maxDistance = dist(width/2, height/2, width, height); -distances = new float[width][height]; -for(int i=0; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Arrays/ArrayObjects/applet/ArrayObjects.java b/java/examples/Basics/Arrays/ArrayObjects/applet/ArrayObjects.java deleted file mode 100644 index 3ce1aa1a9..000000000 --- a/java/examples/Basics/Arrays/ArrayObjects/applet/ArrayObjects.java +++ /dev/null @@ -1,94 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class ArrayObjects extends PApplet { - -/** - * Array Objects. - * - * Demonstrates the syntax for creating an array of custom objects. - */ - -int unit = 40; -int num; -Module[] mods; - -public void setup() -{ - size(200, 200); - background(176); - noStroke(); - - num = width/unit * width/unit; - mods = new Module[num]; - - for (int i=0; i= size || x <= 0) { - xdir *= -1; - x = x + (1 * xdir); - y = y + (1 * ydir); - } - if (y >= size || y <= 0) { - ydir *= -1; - y = y + (1 * ydir); - } - } - - // Custom method for drawing the object - public void draw() { - stroke(second()*4); - point(mx+x-1, my+y-1); - } -} - - - - static public void main(String args[]) { - PApplet.main(new String[] { "ArrayObjects" }); - } -} diff --git a/java/examples/Basics/Arrays/ArrayObjects/applet/ArrayObjects.pde b/java/examples/Basics/Arrays/ArrayObjects/applet/ArrayObjects.pde deleted file mode 100644 index c2ea3b4a2..000000000 --- a/java/examples/Basics/Arrays/ArrayObjects/applet/ArrayObjects.pde +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Array Objects. - * - * Demonstrates the syntax for creating an array of custom objects. - */ - -int unit = 40; -int num; -Module[] mods; - -void setup() -{ - size(200, 200); - background(176); - noStroke(); - - num = width/unit * width/unit; - mods = new Module[num]; - - for (int i=0; i= size || x <= 0) { - xdir *= -1; - x = x + (1 * xdir); - y = y + (1 * ydir); - } - if (y >= size || y <= 0) { - ydir *= -1; - y = y + (1 * ydir); - } - } - - // Custom method for drawing the object - void draw() { - stroke(second()*4); - point(mx+x-1, my+y-1); - } -} - - diff --git a/java/examples/Basics/Arrays/ArrayObjects/applet/loading.gif b/java/examples/Basics/Arrays/ArrayObjects/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj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yNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Color/Brightness/applet/Brightness.java b/java/examples/Basics/Color/Brightness/applet/Brightness.java deleted file mode 100644 index 03e7c208c..000000000 --- a/java/examples/Basics/Color/Brightness/applet/Brightness.java +++ /dev/null @@ -1,51 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Brightness extends PApplet { - -/** - * Brightness - * by Rusty Robison. - * - * Brightness is the relative lightness or darkness of a color. - * Move the cursor vertically over each bar to alter its brightness. - */ - -int barWidth = 5; -int[] brightness; - -public void setup() -{ - size(200, 200); - colorMode(HSB, 360, height, height); - brightness = new int[width/barWidth]; -} - -public void draw() -{ - int j = 0; - for (int i = 0; i <= (width-barWidth); i += barWidth) { - noStroke(); - if ((mouseX > i) && (mouseX < i+barWidth)) { - brightness[j] = mouseY; - } - fill(i, height, brightness[j]); - rect(i, 0, barWidth, height); - j++; - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Brightness" }); - } -} diff --git a/java/examples/Basics/Color/Brightness/applet/Brightness.pde b/java/examples/Basics/Color/Brightness/applet/Brightness.pde deleted file mode 100644 index c9dba6d28..000000000 --- a/java/examples/Basics/Color/Brightness/applet/Brightness.pde +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Brightness - * by Rusty Robison. - * - * Brightness is the relative lightness or darkness of a color. - * Move the cursor vertically over each bar to alter its brightness. - */ - -int barWidth = 5; -int[] brightness; - -void setup() -{ - size(200, 200); - colorMode(HSB, 360, height, height); - brightness = new int[width/barWidth]; -} - -void draw() -{ - int j = 0; - for (int i = 0; i <= (width-barWidth); i += barWidth) { - noStroke(); - if ((mouseX > i) && (mouseX < i+barWidth)) { - brightness[j] = mouseY; - } - fill(i, height, brightness[j]); - rect(i, 0, barWidth, height); - j++; - } -} diff --git a/java/examples/Basics/Color/Brightness/applet/loading.gif b/java/examples/Basics/Color/Brightness/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D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0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Color/ColorWheel/applet/ColorWheel.java b/java/examples/Basics/Color/ColorWheel/applet/ColorWheel.java deleted file mode 100644 index c9ecabb74..000000000 --- a/java/examples/Basics/Color/ColorWheel/applet/ColorWheel.java +++ /dev/null @@ -1,99 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class ColorWheel extends PApplet { - -/** - * Subtractive Color Wheel - * by Ira Greenberg. - * - * The primaries are red, yellow, and blue. The - * secondaries are green, purple, and orange. The - * tertiaries are yellow-orange, red-orange, red-purple, - * blue-purple, blue-green, and yellow-green. - * - * Create a shade or tint of the - * subtractive color wheel using - * SHADE or TINT parameters. - */ - -int segs = 12; -int steps = 6; -float rotAdjust = radians(360.0f/segs/2.0f); -float radius = 95.0f; -float segWidth = radius/steps; -float interval = TWO_PI/segs; -int SHADE = 0; -int TINT = 1; - -public void setup(){ - size(200, 200); - background(127); - smooth(); - ellipseMode(CENTER_RADIUS); - noStroke(); - // you can substitue TINT for SHADE argument - createWheel(width/2, height/2, SHADE); -} - -public void createWheel(int x, int y, int valueShift){ - if (valueShift == SHADE){ - for (int j=0; j}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KR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ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Color/Creating/applet/Creating.java b/java/examples/Basics/Color/Creating/applet/Creating.java deleted file mode 100644 index a999e8a55..000000000 --- a/java/examples/Basics/Color/Creating/applet/Creating.java +++ /dev/null @@ -1,47 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Creating extends PApplet { - public void setup() {/** - * Creating Colors (Homage to Albers). - * - * Creating variables for colors that may be referred to - * in the program by their name, rather than a number. - */ - -size(200, 200); -noStroke(); - -int inside = color(204, 102, 0); -int middle = color(204, 153, 0); -int outside = color(153, 51, 0); - -// These statements are equivalent to the statements above. -// Programmers may use the format they prefer. -//color inside = #CC6600; -//color middle = #CC9900; -//color outside = #993300; - -fill(outside); -rect(0, 0, 200, 200); -fill(middle); -rect(40, 60, 120, 120); -fill(inside); -rect(60, 90, 80, 80); - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "Creating" }); - } -} diff --git a/java/examples/Basics/Color/Creating/applet/Creating.pde b/java/examples/Basics/Color/Creating/applet/Creating.pde deleted file mode 100644 index 628e1f7ac..000000000 --- a/java/examples/Basics/Color/Creating/applet/Creating.pde +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Creating Colors (Homage to Albers). - * - * Creating variables for colors that may be referred to - * in the program by their name, rather than a number. - */ - -size(200, 200); -noStroke(); - -color inside = color(204, 102, 0); -color middle = color(204, 153, 0); -color outside = color(153, 51, 0); - -// These statements are equivalent to the statements above. -// Programmers may use the format they prefer. -//color inside = #CC6600; -//color middle = #CC9900; -//color outside = #993300; - -fill(outside); -rect(0, 0, 200, 200); -fill(middle); -rect(40, 60, 120, 120); -fill(inside); -rect(60, 90, 80, 80); diff --git a/java/examples/Basics/Color/Creating/applet/loading.gif b/java/examples/Basics/Color/Creating/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h z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2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Color/Hue/applet/Hue.java b/java/examples/Basics/Color/Hue/applet/Hue.java deleted file mode 100644 index e75799f52..000000000 --- a/java/examples/Basics/Color/Hue/applet/Hue.java +++ /dev/null @@ -1,51 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Hue extends PApplet { - -/** - * Hue. - * - * Hue is the color reflected from or transmitted through an object - * and is typically referred to as the name of the color (red, blue, yellow, etc.) - * Move the cursor vertically over each bar to alter its hue. - */ - -int barWidth = 5; -int[] hue; - -public void setup() -{ - size(200, 200); - colorMode(HSB, 360, height, height); - hue = new int[width/barWidth]; - noStroke(); -} - -public void draw() -{ - int j = 0; - for (int i=0; i<=(width-barWidth); i+=barWidth) { - if ((mouseX > i) && (mouseX < i+barWidth)) { - hue[j] = mouseY; - } - fill(hue[j], height/1.2f, height/1.2f); - rect(i, 0, barWidth, height); - j++; - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Hue" }); - } -} diff --git a/java/examples/Basics/Color/Hue/applet/Hue.pde b/java/examples/Basics/Color/Hue/applet/Hue.pde deleted file mode 100644 index b22ffb535..000000000 --- a/java/examples/Basics/Color/Hue/applet/Hue.pde +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Hue. - * - * Hue is the color reflected from or transmitted through an object - * and is typically referred to as the name of the color (red, blue, yellow, etc.) - * Move the cursor vertically over each bar to alter its hue. - */ - -int barWidth = 5; -int[] hue; - -void setup() -{ - size(200, 200); - colorMode(HSB, 360, height, height); - hue = new int[width/barWidth]; - noStroke(); -} - -void draw() -{ - int j = 0; - for (int i=0; i<=(width-barWidth); i+=barWidth) { - if ((mouseX > i) && (mouseX < i+barWidth)) { - hue[j] = mouseY; - } - fill(hue[j], height/1.2, height/1.2); - rect(i, 0, barWidth, height); - j++; - } -} diff --git a/java/examples/Basics/Color/Hue/applet/loading.gif b/java/examples/Basics/Color/Hue/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|G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earGradient/applet/LinearGradient.java deleted file mode 100644 index 6fbbc5c2e..000000000 --- a/java/examples/Basics/Color/LinearGradient/applet/LinearGradient.java +++ /dev/null @@ -1,93 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class LinearGradient extends PApplet { - -/** - * Simple Linear Gradient - * by Ira Greenberg. - * - * Using the convenient red(), green() - * and blue() component functions, - * generate some linear gradients. - */ - -// constants -int Y_AXIS = 1; -int X_AXIS = 2; - -public void setup(){ - size(200, 200); - - // create some gradients - // background - int b1 = color(190, 190, 190); - int b2 = color(20, 20, 20); - setGradient(0, 0, width, height, b1, b2, Y_AXIS); - //center squares - int c1 = color(255, 120, 0); - int c2 = color(10, 45, 255); - int c3 = color(10, 255, 15); - int c4 = color(125, 2, 140); - int c5 = color(255, 255, 0); - int c6 = color(25, 255, 200); - setGradient(25, 25, 75, 75, c1, c2, Y_AXIS); - setGradient(100, 25, 75, 75, c3, c4, X_AXIS); - setGradient(25, 100, 75, 75, c2, c5, X_AXIS); - setGradient(100, 100, 75, 75, c4, c6, Y_AXIS); -} - -public void setGradient(int x, int y, float w, float h, int c1, int c2, int axis ){ - // calculate differences between color components - float deltaR = red(c2)-red(c1); - float deltaG = green(c2)-green(c1); - float deltaB = blue(c2)-blue(c1); - - // choose axis - if(axis == Y_AXIS){ - /*nested for loops set pixels - in a basic table structure */ - // column - for (int i=x; i<=(x+w); i++){ - // row - for (int j = y; j<=(y+h); j++){ - int c = color( - (red(c1)+(j-y)*(deltaR/h)), - (green(c1)+(j-y)*(deltaG/h)), - (blue(c1)+(j-y)*(deltaB/h)) - ); - set(i, j, c); - } - } - } - else if(axis == X_AXIS){ - // column - for (int i=y; i<=(y+h); i++){ - // row - for (int j = x; j<=(x+w); j++){ - int c = color( - (red(c1)+(j-x)*(deltaR/h)), - (green(c1)+(j-x)*(deltaG/h)), - (blue(c1)+(j-x)*(deltaB/h)) - ); - set(j, i, c); - } - } - } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "LinearGradient" }); - } -} diff --git a/java/examples/Basics/Color/LinearGradient/applet/LinearGradient.pde b/java/examples/Basics/Color/LinearGradient/applet/LinearGradient.pde deleted file mode 100644 index f41fc2b66..000000000 --- a/java/examples/Basics/Color/LinearGradient/applet/LinearGradient.pde +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Simple Linear Gradient - * by Ira Greenberg. - * - * Using the convenient red(), green() - * and blue() component functions, - * generate some linear gradients. - */ - -// constants -int Y_AXIS = 1; -int X_AXIS = 2; - -void setup(){ - size(200, 200); - - // create some gradients - // background - color b1 = color(190, 190, 190); - color b2 = color(20, 20, 20); - setGradient(0, 0, width, height, b1, b2, Y_AXIS); - //center squares - color c1 = color(255, 120, 0); - color c2 = color(10, 45, 255); - color c3 = color(10, 255, 15); - color c4 = color(125, 2, 140); - color c5 = color(255, 255, 0); - color c6 = color(25, 255, 200); - setGradient(25, 25, 75, 75, c1, c2, Y_AXIS); - setGradient(100, 25, 75, 75, c3, c4, X_AXIS); - setGradient(25, 100, 75, 75, c2, c5, X_AXIS); - setGradient(100, 100, 75, 75, c4, c6, Y_AXIS); -} - -void setGradient(int x, int y, float w, float h, color c1, color c2, int axis ){ - // calculate differences between color components - float deltaR = red(c2)-red(c1); - float deltaG = green(c2)-green(c1); - float deltaB = blue(c2)-blue(c1); - - // choose axis - if(axis == Y_AXIS){ - /*nested for loops set pixels - in a basic table structure */ - // column - for (int i=x; i<=(x+w); i++){ - // row - for (int j = y; j<=(y+h); j++){ - color c = color( - (red(c1)+(j-y)*(deltaR/h)), - (green(c1)+(j-y)*(deltaG/h)), - (blue(c1)+(j-y)*(deltaB/h)) - ); - set(i, j, c); - } - } - } - else if(axis == X_AXIS){ - // column - for (int i=y; i<=(y+h); i++){ - // row - for (int j = x; j<=(x+w); j++){ - color c = color( - (red(c1)+(j-x)*(deltaR/h)), - (green(c1)+(j-x)*(deltaG/h)), - (blue(c1)+(j-x)*(deltaB/h)) - ); - set(j, i, c); - } - } - } -} - diff --git a/java/examples/Basics/Color/LinearGradient/applet/loading.gif b/java/examples/Basics/Color/LinearGradient/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Color/RadialGradient/applet/RadialGradient.java b/java/examples/Basics/Color/RadialGradient/applet/RadialGradient.java deleted file mode 100644 index 1ba6eaa19..000000000 --- a/java/examples/Basics/Color/RadialGradient/applet/RadialGradient.java +++ /dev/null @@ -1,78 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class RadialGradient extends PApplet { - -/** - * Simple Radial Gradient - * by Ira Greenberg. - * - * Using the convenient red(), green() - * and blue() component functions, - * generate an array of radial gradients. - */ - -public void setup(){ - size(200, 200); - background(0); - smooth(); - - // create a simple table of gradients - int columns = 4; - int radius = (width/columns)/2; - // create some gradients - for (int i=radius; i< width; i+=radius*2){ - for (int j =radius; j< height; j+=radius*2){ - createGradient(i, j, radius, - color(PApplet.parseInt(random(255)), PApplet.parseInt(random(255)), PApplet.parseInt(random(255))), - color(PApplet.parseInt(random(255)), PApplet.parseInt(random(255)), PApplet.parseInt(random(255)))); - } - } -} - -public void createGradient (float x, float y, float radius, int c1, int c2){ - float px = 0, py = 0, angle = 0; - - // calculate differences between color components - float deltaR = red(c2)-red(c1); - float deltaG = green(c2)-green(c1); - float deltaB = blue(c2)-blue(c1); - // hack to ensure there are no holes in gradient - // needs to be increased, as radius increases - float gapFiller = 8.0f; - - for (int i=0; i< radius; i++){ - for (float j=0; j<360; j+=1.0f/gapFiller){ - px = x+cos(radians(angle))*i; - py = y+sin(radians(angle))*i; - angle+=1.0f/gapFiller; - int c = color( - (red(c1)+(i)*(deltaR/radius)), - (green(c1)+(i)*(deltaG/radius)), - (blue(c1)+(i)*(deltaB/radius)) - ); - set(PApplet.parseInt(px), PApplet.parseInt(py), c); - } - } - // adds smooth edge - // hack anti-aliasing - noFill(); - strokeWeight(3); - ellipse(x, y, radius*2, radius*2); -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "RadialGradient" }); - } -} diff --git a/java/examples/Basics/Color/RadialGradient/applet/RadialGradient.pde b/java/examples/Basics/Color/RadialGradient/applet/RadialGradient.pde deleted file mode 100644 index f5ba2b3fe..000000000 --- a/java/examples/Basics/Color/RadialGradient/applet/RadialGradient.pde +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Simple Radial Gradient - * by Ira Greenberg. - * - * Using the convenient red(), green() - * and blue() component functions, - * generate an array of radial gradients. - */ - -void setup(){ - size(200, 200); - background(0); - smooth(); - - // create a simple table of gradients - int columns = 4; - int radius = (width/columns)/2; - // create some gradients - for (int i=radius; i< width; i+=radius*2){ - for (int j =radius; j< height; j+=radius*2){ - createGradient(i, j, radius, - color(int(random(255)), int(random(255)), int(random(255))), - color(int(random(255)), int(random(255)), int(random(255)))); - } - } -} - -void createGradient (float x, float y, float radius, color c1, color c2){ - float px = 0, py = 0, angle = 0; - - // calculate differences between color components - float deltaR = red(c2)-red(c1); - float deltaG = green(c2)-green(c1); - float deltaB = blue(c2)-blue(c1); - // hack to ensure there are no holes in gradient - // needs to be increased, as radius increases - float gapFiller = 8.0; - - for (int i=0; i< radius; i++){ - for (float j=0; j<360; j+=1.0/gapFiller){ - px = x+cos(radians(angle))*i; - py = y+sin(radians(angle))*i; - angle+=1.0/gapFiller; - color c = color( - (red(c1)+(i)*(deltaR/radius)), - (green(c1)+(i)*(deltaG/radius)), - (blue(c1)+(i)*(deltaB/radius)) - ); - set(int(px), int(py), c); - } - } - // adds smooth edge - // hack anti-aliasing - noFill(); - strokeWeight(3); - ellipse(x, y, radius*2, radius*2); -} - diff --git a/java/examples/Basics/Color/RadialGradient/applet/loading.gif b/java/examples/Basics/Color/RadialGradient/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG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?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Color/Reading/applet/Reading.java b/java/examples/Basics/Color/Reading/applet/Reading.java deleted file mode 100644 index 5ce02d462..000000000 --- a/java/examples/Basics/Color/Reading/applet/Reading.java +++ /dev/null @@ -1,63 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Reading extends PApplet { - public void setup() {/** - * Reading. - * - * An image is recreated from its individual component colors. - * The many colors of the image are created through modulating the - * red, green, and blue values. This is an exageration of an LCD display. - */ - -size(200, 200); -noStroke(); -background(0); - -// Load an image from the data directory -PImage c; -c = loadImage("cait.jpg"); - -int xoff = 0; -int yoff = 0; -int p = 2; -int pix = p*3; - - -for(int i = 0; i < c.width*c.height; i += 1) -{ - int here = c.pixels[i]; - - fill(red(here), 0, 0); - rect(xoff, yoff, p, pix); - - fill(0, green(here), 0); - rect(xoff+p, yoff, p, pix); - - fill(0, 0, blue(here)); - rect(xoff+p*2, yoff, p, pix); - - xoff+=pix; - if(xoff >= width-pix) { - xoff = 0; - yoff += pix; - } -} - - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "Reading" }); - } -} diff --git a/java/examples/Basics/Color/Reading/applet/Reading.pde b/java/examples/Basics/Color/Reading/applet/Reading.pde deleted file mode 100644 index 6f1ec2042..000000000 --- a/java/examples/Basics/Color/Reading/applet/Reading.pde +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Reading. - * - * An image is recreated from its individual component colors. - * The many colors of the image are created through modulating the - * red, green, and blue values. This is an exageration of an LCD display. - */ - -size(200, 200); -noStroke(); -background(0); - -// Load an image from the data directory -PImage c; -c = loadImage("cait.jpg"); - -int xoff = 0; -int yoff = 0; -int p = 2; -int pix = p*3; - - -for(int i = 0; i < c.width*c.height; i += 1) -{ - int here = c.pixels[i]; - - fill(red(here), 0, 0); - rect(xoff, yoff, p, pix); - - fill(0, green(here), 0); - rect(xoff+p, yoff, p, pix); - - fill(0, 0, blue(here)); - rect(xoff+p*2, yoff, p, pix); - - xoff+=pix; - if(xoff >= width-pix) { - xoff = 0; - yoff += pix; - } -} - diff --git a/java/examples/Basics/Color/Reading/applet/loading.gif b/java/examples/Basics/Color/Reading/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW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J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Color/Relativity/applet/Relativity.java b/java/examples/Basics/Color/Relativity/applet/Relativity.java deleted file mode 100644 index 3612db49e..000000000 --- a/java/examples/Basics/Color/Relativity/applet/Relativity.java +++ /dev/null @@ -1,62 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Relativity extends PApplet { - -/** - * Relativity. - * - * Each color is perceived in relation to other colors. - * The top and bottom bars each contain the same component colors, - * but a different display order causes individual colors to appear differently. - */ - -int a, b, c, d, e; - -public void setup() { - size(200, 200); - noStroke(); - a = color(165, 167, 20); - b = color(77, 86, 59); - c = color(42, 106, 105); - d = color(165, 89, 20); - e = color(146, 150, 127); - noLoop(); -} - -public void draw() { - drawBand(a, b, c, d, e, 0, 4); - drawBand(c, a, d, b, e, height/2, 4); -} - -public void drawBand(int v, int w, int x, int y, int z, int ypos, int barWidth) { - int num = 5; - int[] colorOrder = { v, w, x, y, z }; - for(int i = 0; i < width; i += barWidth*num) { - for(int j = 0; j < num; j++) { - fill(colorOrder[j]); - rect(i+j*barWidth, ypos, barWidth, height/2); - } - } -} - - - - - - - - static public void main(String args[]) { - PApplet.main(new String[] { "Relativity" }); - } -} diff --git a/java/examples/Basics/Color/Relativity/applet/Relativity.pde b/java/examples/Basics/Color/Relativity/applet/Relativity.pde deleted file mode 100644 index 59a3365a6..000000000 --- a/java/examples/Basics/Color/Relativity/applet/Relativity.pde +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Relativity. - * - * Each color is perceived in relation to other colors. - * The top and bottom bars each contain the same component colors, - * but a different display order causes individual colors to appear differently. - */ - -color a, b, c, d, e; - -void setup() { - size(200, 200); - noStroke(); - a = color(165, 167, 20); - b = color(77, 86, 59); - c = color(42, 106, 105); - d = color(165, 89, 20); - e = color(146, 150, 127); - noLoop(); -} - -void draw() { - drawBand(a, b, c, d, e, 0, 4); - drawBand(c, a, d, b, e, height/2, 4); -} - -void drawBand(color v, color w, color x, color y, color z, int ypos, int barWidth) { - int num = 5; - color[] colorOrder = { v, w, x, y, z }; - for(int i = 0; i < width; i += barWidth*num) { - for(int j = 0; j < num; j++) { - fill(colorOrder[j]); - rect(i+j*barWidth, ypos, barWidth, height/2); - } - } -} - - - - - - diff --git a/java/examples/Basics/Color/Relativity/applet/loading.gif b/java/examples/Basics/Color/Relativity/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-V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QlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Color/Saturation/applet/Saturation.java b/java/examples/Basics/Color/Saturation/applet/Saturation.java deleted file mode 100644 index 62ac4f2f0..000000000 --- a/java/examples/Basics/Color/Saturation/applet/Saturation.java +++ /dev/null @@ -1,52 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Saturation extends PApplet { - -/** - * Saturation. - * - * Saturation is the strength or purity of the color and represents the - * amount of gray in proportion to the hue. A "saturated" color is pure - * and an "unsaturated" color has a large percentage of gray. - * Move the cursor vertically over each bar to alter its saturation. - */ - -int barWidth = 5; -int[] saturation; - -public void setup() -{ - size(200, 200); - colorMode(HSB, 360, height, height); - saturation = new int[width/barWidth]; -} - -public void draw() -{ - int j = 0; - for (int i=0; i<=(width-barWidth); i+=barWidth) { - noStroke(); - if ((mouseX > i) && (mouseX < i+barWidth)) { - saturation[j] = mouseY; - } - fill(i, saturation[j], height/1.5f); - rect(i, 0, barWidth, height); - j++; - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Saturation" }); - } -} diff --git a/java/examples/Basics/Color/Saturation/applet/Saturation.pde b/java/examples/Basics/Color/Saturation/applet/Saturation.pde deleted file mode 100644 index 0902ead92..000000000 --- a/java/examples/Basics/Color/Saturation/applet/Saturation.pde +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Saturation. - * - * Saturation is the strength or purity of the color and represents the - * amount of gray in proportion to the hue. A "saturated" color is pure - * and an "unsaturated" color has a large percentage of gray. - * Move the cursor vertically over each bar to alter its saturation. - */ - -int barWidth = 5; -int[] saturation; - -void setup() -{ - size(200, 200); - colorMode(HSB, 360, height, height); - saturation = new int[width/barWidth]; -} - -void draw() -{ - int j = 0; - for (int i=0; i<=(width-barWidth); i+=barWidth) { - noStroke(); - if ((mouseX > i) && (mouseX < i+barWidth)) { - saturation[j] = mouseY; - } - fill(i, saturation[j], height/1.5); - rect(i, 0, barWidth, height); - j++; - } -} diff --git a/java/examples/Basics/Color/Saturation/applet/loading.gif b/java/examples/Basics/Color/Saturation/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#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CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Color/WaveGradient/applet/WaveGradient.java b/java/examples/Basics/Color/WaveGradient/applet/WaveGradient.java deleted file mode 100644 index c5cdd68ff..000000000 --- a/java/examples/Basics/Color/WaveGradient/applet/WaveGradient.java +++ /dev/null @@ -1,59 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class WaveGradient extends PApplet { - -/** - * Wave Gradient - * by Ira Greenberg. - * - * Generate a gradient along a sin() wave. - */ - -float angle = 0; -float px = 0, py = 0; -float amplitude = 30; -float frequency = 0; -float fillGap = 2.5f; -int c; - -public void setup() { - size(200, 200); - background(200,200,200); - noLoop(); -} - -public void draw() { - for (int i =- 75; i < height+75; i++){ - // Reset angle to 0, so waves stack properly - angle = 0; - // Increasing frequency causes more gaps - frequency+=.006f; - for (float j=0; j}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&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(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Control/Conditionals1/applet/Conditionals1.java b/java/examples/Basics/Control/Conditionals1/applet/Conditionals1.java deleted file mode 100644 index 956b2ab70..000000000 --- a/java/examples/Basics/Control/Conditionals1/applet/Conditionals1.java +++ /dev/null @@ -1,47 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Conditionals1 extends PApplet { - public void setup() {/** - * Conditionals 1. - * - * Conditions are like questions. - * They allow a program to decide to take one action if - * the answer to a question is true or to do another action - * if the answer to the question is false. - * The questions asked within a program are always logical - * or relational statements. For example, if the variable 'i' is - * equal to zero then draw a line. - */ - -size(200, 200); -background(0); - -for(int i=10; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0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pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Control/Conditionals2/applet/Conditionals2.java b/java/examples/Basics/Control/Conditionals2/applet/Conditionals2.java deleted file mode 100644 index 2622d3f25..000000000 --- a/java/examples/Basics/Control/Conditionals2/applet/Conditionals2.java +++ /dev/null @@ -1,47 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Conditionals2 extends PApplet { - public void setup() {/** - * Conditionals 2. - * - * We extend the language of conditionals by adding the - * keyword "else". This allows conditionals to ask - * two or more sequential questions, each with a different - * action. - */ - -size(200, 200); -background(0); - -for(int i=2; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_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5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Control/EmbeddedIteration/applet/EmbeddedIteration.java b/java/examples/Basics/Control/EmbeddedIteration/applet/EmbeddedIteration.java deleted file mode 100644 index 8c0056bbf..000000000 --- a/java/examples/Basics/Control/EmbeddedIteration/applet/EmbeddedIteration.java +++ /dev/null @@ -1,48 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class EmbeddedIteration extends PApplet { - public void setup() {/** - * Embedding Iteration. - * - * Embedding "for" structures allows repetition in two dimensions. - */ - -float box_size = 11; -float box_space = 12; -int margin = 7; - -size(200, 200); -background(0); -noStroke(); - -// Draw gray boxes - -for (int i = margin; i < height-margin; i += box_space){ - if(box_size > 0){ - for(int j = margin; j < width-margin; j+= box_space){ - fill(255-box_size*10); - rect(j, i, box_size, box_size); - } - box_size = box_size - 0.6f; - } -} - - - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "EmbeddedIteration" }); - } -} diff --git a/java/examples/Basics/Control/EmbeddedIteration/applet/EmbeddedIteration.pde b/java/examples/Basics/Control/EmbeddedIteration/applet/EmbeddedIteration.pde deleted file mode 100644 index 3473aca2e..000000000 --- a/java/examples/Basics/Control/EmbeddedIteration/applet/EmbeddedIteration.pde +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Embedding Iteration. - * - * Embedding "for" structures allows repetition in two dimensions. - */ - -float box_size = 11; -float box_space = 12; -int margin = 7; - -size(200, 200); -background(0); -noStroke(); - -// Draw gray boxes - -for (int i = margin; i < height-margin; i += box_space){ - if(box_size > 0){ - for(int j = margin; j < width-margin; j+= box_space){ - fill(255-box_size*10); - rect(j, i, box_size, box_size); - } - box_size = box_size - 0.6; - } -} - - diff --git a/java/examples/Basics/Control/EmbeddedIteration/applet/loading.gif b/java/examples/Basics/Control/EmbeddedIteration/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QI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java b/java/examples/Basics/Control/Iteration/applet/Iteration.java deleted file mode 100644 index 56274253b..000000000 --- a/java/examples/Basics/Control/Iteration/applet/Iteration.java +++ /dev/null @@ -1,66 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Iteration extends PApplet { - public void setup() {/** - * Iteration. - * - * Iteration with a "for" structure constructs repetitive forms. - */ - -int k; -int xpos1 = 100; -int xpos2 = 118; -int count = 0; -int timey = 0; -int num = 12; - -size(200, 200); -background(102); -noStroke(); - -// Draw gray bars -fill(255); -k=60; -for(int i=0; i < num/3; i++) { - rect(25, k, 155, 5); - k+=10; -} - -// Black bars -fill(51); -k = 40; -for(int i=0; i < num; i++) { - rect(105, k, 30, 5); - k += 10; -} -k = 15; -for(int i = 0; i < num; i++) { - rect(125, k, 30, 5); - k +=10; -} - -// Thin lines -k = 42; -fill(0); -for(int i=0; i < num-1; i++) { - rect(36, k, 20, 1); - k+=10; -} - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "Iteration" }); - } -} diff --git a/java/examples/Basics/Control/Iteration/applet/Iteration.pde b/java/examples/Basics/Control/Iteration/applet/Iteration.pde deleted file mode 100644 index 722806122..000000000 --- a/java/examples/Basics/Control/Iteration/applet/Iteration.pde +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Iteration. - * - * Iteration with a "for" structure constructs repetitive forms. - */ - -int k; -int xpos1 = 100; -int xpos2 = 118; -int count = 0; -int timey = 0; -int num = 12; - -size(200, 200); -background(102); -noStroke(); - -// Draw gray bars -fill(255); -k=60; -for(int i=0; i < num/3; i++) { - rect(25, k, 155, 5); - k+=10; -} - -// Black bars -fill(51); -k = 40; -for(int i=0; i < num; i++) { - rect(105, k, 30, 5); - k += 10; -} -k = 15; -for(int i = 0; i < num; i++) { - rect(125, k, 30, 5); - k +=10; -} - -// Thin lines -k = 42; -fill(0); -for(int i=0; i < num-1; i++) { - rect(36, k, 20, 1); - k+=10; -} diff --git a/java/examples/Basics/Control/Iteration/applet/loading.gif b/java/examples/Basics/Control/Iteration/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Control/LogicalOperators/applet/LogicalOperators.java b/java/examples/Basics/Control/LogicalOperators/applet/LogicalOperators.java deleted file mode 100644 index bf9354786..000000000 --- a/java/examples/Basics/Control/LogicalOperators/applet/LogicalOperators.java +++ /dev/null @@ -1,66 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class LogicalOperators extends PApplet { - public void setup() {/** - * Logical Operators. - * - * The logical operators for AND (&&) and OR (||) are used to - * combine simple relational statements into more complex expressions. - * The NOT (!) operator is used to negate a boolean statement. - */ - -size(200, 200); -background(126); - -boolean op = false; - -for(int i=5; i<=195; i+=5) { - // Logical AND - stroke(0); - if((i > 35) && (i < 100)) { - line(5, i, 95, i); - op = false; - } - - // Logical OR - stroke(76); - if((i <= 35) || (i >= 100)) { - line(105, i, 195, i); - op = true; - } - - // Testing if a boolean value is "true" - // The expression "if(op)" is equivalent to "if(op == true)" - if(op) { - stroke(0); - point(width/2, i); - } - - // Testing if a boolean value is "false" - // The expression "if(!op)" is equivalent to "if(op == false)" - if(!op) { - stroke(255); - point(width/4, i); - } -} - - - - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "LogicalOperators" }); - } -} diff --git a/java/examples/Basics/Control/LogicalOperators/applet/LogicalOperators.pde b/java/examples/Basics/Control/LogicalOperators/applet/LogicalOperators.pde deleted file mode 100644 index d9329c004..000000000 --- a/java/examples/Basics/Control/LogicalOperators/applet/LogicalOperators.pde +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Logical Operators. - * - * The logical operators for AND (&&) and OR (||) are used to - * combine simple relational statements into more complex expressions. - * The NOT (!) operator is used to negate a boolean statement. - */ - -size(200, 200); -background(126); - -boolean op = false; - -for(int i=5; i<=195; i+=5) { - // Logical AND - stroke(0); - if((i > 35) && (i < 100)) { - line(5, i, 95, i); - op = false; - } - - // Logical OR - stroke(76); - if((i <= 35) || (i >= 100)) { - line(105, i, 195, i); - op = true; - } - - // Testing if a boolean value is "true" - // The expression "if(op)" is equivalent to "if(op == true)" - if(op) { - stroke(0); - point(width/2, i); - } - - // Testing if a boolean value is "false" - // The expression "if(!op)" is equivalent to "if(op == false)" - if(!op) { - stroke(255); - point(width/4, i); - } -} - - - diff --git a/java/examples/Basics/Control/LogicalOperators/applet/loading.gif b/java/examples/Basics/Control/LogicalOperators/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Data/CharactersStrings/applet/CharactersStrings.java b/java/examples/Basics/Data/CharactersStrings/applet/CharactersStrings.java deleted file mode 100644 index 6d3433d02..000000000 --- a/java/examples/Basics/Data/CharactersStrings/applet/CharactersStrings.java +++ /dev/null @@ -1,101 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class CharactersStrings extends PApplet { - -/** - * Characters Strings. - * - * Click on the image to give it focus and then type letters to - * shift the location of the image. - * Characters are typographic symbols such as A, d, and %. - * The character datatype, abbreviated as char, stores letters and - * symbols in the Unicode format, a coding system developed to support - * a variety of world languages. Characters are distinguished from other - * symbols by putting them between single quotes ('P'). - * A string is a sequence of characters. A string is noted by surrounding - * a group of letters with double quotes ("Processing"). - * Chars and strings are most often used with the keyboard methods, - * to display text to the screen, and to load images or files. - */ - -PImage frog; -PFont fontA; -int lettersize = 90; -int xoffset; -char letter; - -public void setup() -{ - size(200, 200); - fontA = loadFont("Eureka90.vlw"); - textFont(fontA); - textSize(lettersize); - - // The String datatype must be capitalized because it is a complex datatype. - // A String is actually a class with its own methods, some of which are - // featured below. - String name= "rathausFrog"; - String extension = ".jpg"; - int nameLength = name.length(); - println("The length of " + name + " is " + nameLength + "."); - name = name.concat(extension); - nameLength = name.length(); - println("The length of " + name + " is " + nameLength + "."); - - // The parameter for the loadImage() method must be a string - // This line could also be written "frog = loadImage("rathausFrog.jpg"); - frog = loadImage(name); -} - -public void draw() -{ - background(51); // Set background to dark gray - - image(frog, xoffset, 0); - - // Draw an X - line(0, 0, width, height); - line(0, height, width, 0); - - // Get the width of the letter - int letterWidth = PApplet.parseInt(fontA.width(letter) * lettersize); - - // Draw the letter to the center of the screen - text(letter, width/2-letterWidth/2, height/2); -} - -public void keyPressed() -{ - // The variable "key" always contains the value of the most recent key pressed. - // If the key is an upper or lowercase letter between 'A' and 'z' - // the image is shifted to the corresponding value of that key - if(key >= 'A' && key <= 'z') { - letter = PApplet.parseChar(key); - // Scale the values to numbers between 0 and 100 - float scale = 100.0f/57.0f; - int temp = PApplet.parseInt((key - 'A') * scale); - // Set the offset for the image - xoffset = temp; - println(key); - } -} - - - - - - static public void main(String args[]) { - PApplet.main(new String[] { "CharactersStrings" }); - } -} diff --git a/java/examples/Basics/Data/CharactersStrings/applet/CharactersStrings.pde b/java/examples/Basics/Data/CharactersStrings/applet/CharactersStrings.pde deleted file mode 100644 index 868037671..000000000 --- a/java/examples/Basics/Data/CharactersStrings/applet/CharactersStrings.pde +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Characters Strings. - * - * Click on the image to give it focus and then type letters to - * shift the location of the image. - * Characters are typographic symbols such as A, d, and %. - * The character datatype, abbreviated as char, stores letters and - * symbols in the Unicode format, a coding system developed to support - * a variety of world languages. Characters are distinguished from other - * symbols by putting them between single quotes ('P'). - * A string is a sequence of characters. A string is noted by surrounding - * a group of letters with double quotes ("Processing"). - * Chars and strings are most often used with the keyboard methods, - * to display text to the screen, and to load images or files. - */ - -PImage frog; -PFont fontA; -int lettersize = 90; -int xoffset; -char letter; - -void setup() -{ - size(200, 200); - fontA = loadFont("Eureka90.vlw"); - textFont(fontA); - textSize(lettersize); - - // The String datatype must be capitalized because it is a complex datatype. - // A String is actually a class with its own methods, some of which are - // featured below. - String name= "rathausFrog"; - String extension = ".jpg"; - int nameLength = name.length(); - println("The length of " + name + " is " + nameLength + "."); - name = name.concat(extension); - nameLength = name.length(); - println("The length of " + name + " is " + nameLength + "."); - - // The parameter for the loadImage() method must be a string - // This line could also be written "frog = loadImage("rathausFrog.jpg"); - frog = loadImage(name); -} - -void draw() -{ - background(51); // Set background to dark gray - - image(frog, xoffset, 0); - - // Draw an X - line(0, 0, width, height); - line(0, height, width, 0); - - // Get the width of the letter - int letterWidth = int(fontA.width(letter) * lettersize); - - // Draw the letter to the center of the screen - text(letter, width/2-letterWidth/2, height/2); -} - -void keyPressed() -{ - // The variable "key" always contains the value of the most recent key pressed. - // If the key is an upper or lowercase letter between 'A' and 'z' - // the image is shifted to the corresponding value of that key - if(key >= 'A' && key <= 'z') { - letter = char(key); - // Scale the values to numbers between 0 and 100 - float scale = 100.0/57.0; - int temp = int((key - 'A') * scale); - // Set the offset for the image - xoffset = temp; - println(key); - } -} - - - - diff --git a/java/examples/Basics/Data/CharactersStrings/applet/loading.gif b/java/examples/Basics/Data/CharactersStrings/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Data/DatatypeConversion/applet/DatatypeConversion.java b/java/examples/Basics/Data/DatatypeConversion/applet/DatatypeConversion.java deleted file mode 100644 index d9b5077a0..000000000 --- a/java/examples/Basics/Data/DatatypeConversion/applet/DatatypeConversion.java +++ /dev/null @@ -1,49 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class DatatypeConversion extends PApplet { - public void setup() {/** - * Datatype Conversion. - * - * It is sometimes beneficial to convert a value from one type of - * data to another. Each of the conversion functions converts its parameter - * to an equivalent representation within its datatype. - * The conversion functions include int(), float(), char(), byte(), and others. - */ - -size(200, 200); -background(51); -noStroke(); - -char c; // Chars are used for storing typographic symbols -float f; // Floats are decimal numbers -int i; // Ints are values between 2,147,483,647 and -2147483648 -byte b; // Bytes are values between -128 and 128 - -c = 'A'; -f = PApplet.parseFloat(c); // Sets f = 65.0 -i = PApplet.parseInt(f * 1.4f); // Sets i to 91 -b = PApplet.parseByte(c / 2); // Sets b to 32 - -rect(f, 0, 40, 66); -fill(204); -rect(i, 67, 40, 66); -fill(255); -rect(b, 134, 40, 66); - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "DatatypeConversion" }); - } -} diff --git a/java/examples/Basics/Data/DatatypeConversion/applet/DatatypeConversion.pde b/java/examples/Basics/Data/DatatypeConversion/applet/DatatypeConversion.pde deleted file mode 100644 index 381afd181..000000000 --- a/java/examples/Basics/Data/DatatypeConversion/applet/DatatypeConversion.pde +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Datatype Conversion. - * - * It is sometimes beneficial to convert a value from one type of - * data to another. Each of the conversion functions converts its parameter - * to an equivalent representation within its datatype. - * The conversion functions include int(), float(), char(), byte(), and others. - */ - -size(200, 200); -background(51); -noStroke(); - -char c; // Chars are used for storing typographic symbols -float f; // Floats are decimal numbers -int i; // Ints are values between 2,147,483,647 and -2147483648 -byte b; // Bytes are values between -128 and 128 - -c = 'A'; -f = float(c); // Sets f = 65.0 -i = int(f * 1.4); // Sets i to 91 -b = byte(c / 2); // Sets b to 32 - -rect(f, 0, 40, 66); -fill(204); -rect(i, 67, 40, 66); -fill(255); -rect(b, 134, 40, 66); diff --git a/java/examples/Basics/Data/DatatypeConversion/applet/loading.gif b/java/examples/Basics/Data/DatatypeConversion/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Data/IntegersFloats/applet/IntegersFloats.java b/java/examples/Basics/Data/IntegersFloats/applet/IntegersFloats.java deleted file mode 100644 index e705fde4c..000000000 --- a/java/examples/Basics/Data/IntegersFloats/applet/IntegersFloats.java +++ /dev/null @@ -1,56 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class IntegersFloats extends PApplet { - -/** - * Integers Floats. - * - * Integers and floats are two different kinds of numerical data. - * An integer (more commonly called an int) is a number without - * a decimal point. A float is a floating-point number, which means - * it is a number that has a decimal place. Floats are used when - * more precision is needed. - */ - -int a = 0; // Create a variable "a" of the datatype "int" -float b = 0.0f; // Create a variable "b" of the datatype "float" - -public void setup() -{ - size(200, 200); - stroke(255); - frameRate(30); -} - -public void draw() -{ - background(51); - - a = a + 1; - b = b + 0.2f; - line(a, 0, a, height/2); - line(b, height/2, b, height); - - if(a > width) { - a = 0; - } - if(b > width) { - b = 0; - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "IntegersFloats" }); - } -} diff --git a/java/examples/Basics/Data/IntegersFloats/applet/IntegersFloats.pde b/java/examples/Basics/Data/IntegersFloats/applet/IntegersFloats.pde deleted file mode 100644 index 87bf67f19..000000000 --- a/java/examples/Basics/Data/IntegersFloats/applet/IntegersFloats.pde +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Integers Floats. - * - * Integers and floats are two different kinds of numerical data. - * An integer (more commonly called an int) is a number without - * a decimal point. A float is a floating-point number, which means - * it is a number that has a decimal place. Floats are used when - * more precision is needed. - */ - -int a = 0; // Create a variable "a" of the datatype "int" -float b = 0.0; // Create a variable "b" of the datatype "float" - -void setup() -{ - size(200, 200); - stroke(255); - frameRate(30); -} - -void draw() -{ - background(51); - - a = a + 1; - b = b + 0.2; - line(a, 0, a, height/2); - line(b, height/2, b, height); - - if(a > width) { - a = 0; - } - if(b > width) { - b = 0; - } -} diff --git a/java/examples/Basics/Data/IntegersFloats/applet/loading.gif b/java/examples/Basics/Data/IntegersFloats/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;P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H(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Data/TrueFalse/applet/TrueFalse.java b/java/examples/Basics/Data/TrueFalse/applet/TrueFalse.java deleted file mode 100644 index 0d30054b6..000000000 --- a/java/examples/Basics/Data/TrueFalse/applet/TrueFalse.java +++ /dev/null @@ -1,55 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class TrueFalse extends PApplet { - public void setup() {/** - * True/False. - * - * Boolean data is one bit of information. True or false. - * It is common to use Booleans with control statements to - * determine the flow of a program. In this example, when the - * boolean value "x" is true, vertical black lines are drawn and when - * the boolean value "x" is false, horizontal gray lines are drawn. - */ - -boolean x = false; - -size(200, 200); -background(0); -stroke(0); - -for (int i = 1; i < width; i += 2) -{ - if (i < width/2) { - x = true; - } else { - x = false; - } - - if (x) { - stroke(255); - line(i, 1, i, height-1); - } - - if (!x) { - stroke(126); - line(width/2 , i, width-2, i); - } -} - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "TrueFalse" }); - } -} diff --git a/java/examples/Basics/Data/TrueFalse/applet/TrueFalse.pde b/java/examples/Basics/Data/TrueFalse/applet/TrueFalse.pde deleted file mode 100644 index c4bb0531f..000000000 --- a/java/examples/Basics/Data/TrueFalse/applet/TrueFalse.pde +++ /dev/null @@ -1,34 +0,0 @@ -/** - * True/False. - * - * Boolean data is one bit of information. True or false. - * It is common to use Booleans with control statements to - * determine the flow of a program. In this example, when the - * boolean value "x" is true, vertical black lines are drawn and when - * the boolean value "x" is false, horizontal gray lines are drawn. - */ - -boolean x = false; - -size(200, 200); -background(0); -stroke(0); - -for (int i = 1; i < width; i += 2) -{ - if (i < width/2) { - x = true; - } else { - x = false; - } - - if (x) { - stroke(255); - line(i, 1, i, height-1); - } - - if (!x) { - stroke(126); - line(width/2 , i, width-2, i); - } -} diff --git a/java/examples/Basics/Data/TrueFalse/applet/loading.gif b/java/examples/Basics/Data/TrueFalse/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=f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)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Data/VariableScope/applet/VariableScope.java b/java/examples/Basics/Data/VariableScope/applet/VariableScope.java deleted file mode 100644 index 426ba59a1..000000000 --- a/java/examples/Basics/Data/VariableScope/applet/VariableScope.java +++ /dev/null @@ -1,81 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class VariableScope extends PApplet { - -/** - * Variable Scope. - * - * Variables may either have a global or local "scope". - * For example, variables declared within either the - * setup() or loop() functions may be only used in these - * functions. Global variables, variables declared outside - * of setup() and loop(), may be used anywhere within the program. - * If a local variable is declared with the same name as a - * global variable, the program will use the local variable to make - * its calculations within the current scope. Variables may be localized - * within classes, functions, and iterative statements. - */ - -int a = 20; // Create a global variable "a" - -public void setup() -{ - size(200, 200); - background(51); - stroke(255); - noLoop(); -} - -public void draw() -{ - // Draw a line using the global variable "a" - line(a, 0, a, height); - - // Create a new variable "a" local to the for() statement - for(int a=50; a<80; a += 2) { - line(a, 0, a, height); - } - - // Create a new variable "a" local to the loop() method - int a = 100; - // Draw a line using the new local variable "a" - line(a, 0, a, height); - - // Make a call to the custom function drawAnotherLine() - drawAnotherLine(); - - // Make a call to the custom function setYetAnotherLine() - drawYetAnotherLine(); -} - -public void drawAnotherLine() -{ - // Create a new variable "a" local to this method - int a = 185; - // Draw a line using the local variable "a" - line(a, 0, a, height); -} - -public void drawYetAnotherLine() -{ - // Because no new local variable "a" is set, - // this lines draws using the original global - // variable "a" which is set to the value 20. - line(a+2, 0, a+2, height); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "VariableScope" }); - } -} diff --git a/java/examples/Basics/Data/VariableScope/applet/VariableScope.pde b/java/examples/Basics/Data/VariableScope/applet/VariableScope.pde deleted file mode 100644 index 8c2ae3559..000000000 --- a/java/examples/Basics/Data/VariableScope/applet/VariableScope.pde +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Variable Scope. - * - * Variables may either have a global or local "scope". - * For example, variables declared within either the - * setup() or loop() functions may be only used in these - * functions. Global variables, variables declared outside - * of setup() and loop(), may be used anywhere within the program. - * If a local variable is declared with the same name as a - * global variable, the program will use the local variable to make - * its calculations within the current scope. Variables may be localized - * within classes, functions, and iterative statements. - */ - -int a = 20; // Create a global variable "a" - -void setup() -{ - size(200, 200); - background(51); - stroke(255); - noLoop(); -} - -void draw() -{ - // Draw a line using the global variable "a" - line(a, 0, a, height); - - // Create a new variable "a" local to the for() statement - for(int a=50; a<80; a += 2) { - line(a, 0, a, height); - } - - // Create a new variable "a" local to the loop() method - int a = 100; - // Draw a line using the new local variable "a" - line(a, 0, a, height); - - // Make a call to the custom function drawAnotherLine() - drawAnotherLine(); - - // Make a call to the custom function setYetAnotherLine() - drawYetAnotherLine(); -} - -void drawAnotherLine() -{ - // Create a new variable "a" local to this method - int a = 185; - // Draw a line using the local variable "a" - line(a, 0, a, height); -} - -void drawYetAnotherLine() -{ - // Because no new local variable "a" is set, - // this lines draws using the original global - // variable "a" which is set to the value 20. - line(a+2, 0, a+2, height); -} diff --git a/java/examples/Basics/Data/VariableScope/applet/loading.gif b/java/examples/Basics/Data/VariableScope/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000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(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Data/Variables/applet/Variables.java b/java/examples/Basics/Data/Variables/applet/Variables.java deleted file mode 100644 index 60471a43b..000000000 --- a/java/examples/Basics/Data/Variables/applet/Variables.java +++ /dev/null @@ -1,44 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Variables extends PApplet { - public void setup() {/** - * Variables. - * - * Variables are used for storing values. In this example, changing - * the values of variables 'a' and 'b' significantly change the composition. - */ - -size(200, 200); -background(0); -stroke(153); - -int a = 20; -int b = 50; -int c = a*8; -int d = a*9; -int e = b-a; -int f = b*2; -int g = f+e; - -line(a, f, b, g); -line(b, e, b, g); -line(b, e, d, c); -line(a, e, d-e, c); - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "Variables" }); - } -} diff --git a/java/examples/Basics/Data/Variables/applet/Variables.pde b/java/examples/Basics/Data/Variables/applet/Variables.pde deleted file mode 100644 index 9566ae472..000000000 --- a/java/examples/Basics/Data/Variables/applet/Variables.pde +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Variables. - * - * Variables are used for storing values. In this example, changing - * the values of variables 'a' and 'b' significantly change the composition. - */ - -size(200, 200); -background(0); -stroke(153); - -int a = 20; -int b = 50; -int c = a*8; -int d = a*9; -int e = b-a; -int f = b*2; -int g = f+e; - -line(a, f, b, g); -line(b, e, b, g); -line(b, e, d, c); -line(a, e, d-e, c); diff --git a/java/examples/Basics/Data/Variables/applet/loading.gif b/java/examples/Basics/Data/Variables/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$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vq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Form/Bezier/applet/Bezier.java b/java/examples/Basics/Form/Bezier/applet/Bezier.java deleted file mode 100644 index 1b0a14a3b..000000000 --- a/java/examples/Basics/Form/Bezier/applet/Bezier.java +++ /dev/null @@ -1,39 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Bezier extends PApplet { - public void setup() {/** - * Bezier. - * - * The first two parameters for the bezier() function specify the - * first point in the curve and the last two parameters specify - * the last point. The middle parameters set the control points - * that define the shape of the curve. - */ - -size(200, 200); -background(0); -stroke(255); -noFill(); -smooth(); - -for(int i = 0; i < 100; i += 20) { - bezier(90-(i/2.0f), 20+i, 210, 10, 220, 150, 120-(i/8.0f), 150+(i/4.0f)); -} - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "Bezier" }); - } -} diff --git a/java/examples/Basics/Form/Bezier/applet/Bezier.pde b/java/examples/Basics/Form/Bezier/applet/Bezier.pde deleted file mode 100644 index e0b53db21..000000000 --- a/java/examples/Basics/Form/Bezier/applet/Bezier.pde +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Bezier. - * - * The first two parameters for the bezier() function specify the - * first point in the curve and the last two parameters specify - * the last point. The middle parameters set the control points - * that define the shape of the curve. - */ - -size(200, 200); -background(0); -stroke(255); -noFill(); -smooth(); - -for(int i = 0; i < 100; i += 20) { - bezier(90-(i/2.0), 20+i, 210, 10, 220, 150, 120-(i/8.0), 150+(i/4.0)); -} diff --git a/java/examples/Basics/Form/Bezier/applet/loading.gif b/java/examples/Basics/Form/Bezier/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Form/BezierEllipse/applet/BezierEllipse.java b/java/examples/Basics/Form/BezierEllipse/applet/BezierEllipse.java deleted file mode 100644 index 7db24e9b7..000000000 --- a/java/examples/Basics/Form/BezierEllipse/applet/BezierEllipse.java +++ /dev/null @@ -1,123 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class BezierEllipse extends PApplet { - -/** - * Bezier Ellipse - * By Ira Greenberg - * - * Generates an ellipse using bezier() and - * trig functions. Approximately every 1/2 - * second a new ellipse is plotted using - * random values for control/anchor points. - */ - -// arrays to hold ellipse coordinate data -float[] px, py, cx, cy, cx2, cy2; - -// global variable-points in ellipse -int pts = 4; - -int controlPtCol = 0xff222222; -int anchorPtCol = 0xffBBBBBB; - -public void setup(){ - size(200, 200); - smooth(); - setEllipse(pts, 65, 65); - frameRate(1); -} - -public void draw(){ - background(145); - drawEllipse(); - setEllipse(PApplet.parseInt(random(3, 12)), random(-100, 150), random(-100, 150)); -} - -// draw ellipse with anchor/control points -public void drawEllipse(){ - strokeWeight(1.125f); - stroke(255); - noFill(); - // create ellipse - for (int i=0; i0){ - line(px[i], py[i], cx2[i-1], cy2[i-1]); - } - line(px[i], py[i], cx[i], cy[i]); - } - - for ( int i=0; i< pts; i++){ - fill(controlPtCol); - noStroke(); - //control handles - ellipse(cx[i], cy[i], 4, 4); - ellipse(cx2[i], cy2[i], 4, 4); - - fill(anchorPtCol); - stroke(0); - //anchor points - rect(px[i], py[i], 5, 5); - } -} - -// fill up arrays with ellipse coordinate data -public void setEllipse(int points, float radius, float controlRadius){ - pts = points; - px = new float[points]; - py = new float[points]; - cx = new float[points]; - cy = new float[points]; - cx2 = new float[points]; - cy2 = new float[points]; - float angle = 360.0f/points; - float controlAngle1 = angle/3.0f; - float controlAngle2 = controlAngle1*2.0f; - for ( int i=0; i0){ - line(px[i], py[i], cx2[i-1], cy2[i-1]); - } - line(px[i], py[i], cx[i], cy[i]); - } - - for ( int i=0; i< pts; i++){ - fill(controlPtCol); - noStroke(); - //control handles - ellipse(cx[i], cy[i], 4, 4); - ellipse(cx2[i], cy2[i], 4, 4); - - fill(anchorPtCol); - stroke(0); - //anchor points - rect(px[i], py[i], 5, 5); - } -} - -// fill up arrays with ellipse coordinate data -void setEllipse(int points, float radius, float controlRadius){ - pts = points; - px = new float[points]; - py = new float[points]; - cx = new float[points]; - cy = new float[points]; - cx2 = new float[points]; - cy2 = new float[points]; - float angle = 360.0/points; - float controlAngle1 = angle/3.0; - float controlAngle2 = controlAngle1*2.0; - for ( int i=0; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Form/PieChart/applet/PieChart.java b/java/examples/Basics/Form/PieChart/applet/PieChart.java deleted file mode 100644 index 35a008490..000000000 --- a/java/examples/Basics/Form/PieChart/applet/PieChart.java +++ /dev/null @@ -1,44 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class PieChart extends PApplet { - public void setup() {/** - * Pie Chart - * By Ira Greenberg - * - * Uses the arc() function to generate a pie chart from the data - * stored in an array. - */ - -size(200, 200); -background(100); -smooth(); -noStroke(); - -int diameter = 150; -int[] angs = {30, 10, 45, 35, 60, 38, 75, 67}; -float lastAng = 0; - -for (int i = 0; i < angs.length; i++){ - fill(angs[i] * 3.0f); - arc(width/2, height/2, diameter, diameter, lastAng, lastAng+radians(angs[i])); - lastAng += radians(angs[i]); -} - - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "PieChart" }); - } -} diff --git a/java/examples/Basics/Form/PieChart/applet/PieChart.pde b/java/examples/Basics/Form/PieChart/applet/PieChart.pde deleted file mode 100644 index 3c6720e1a..000000000 --- a/java/examples/Basics/Form/PieChart/applet/PieChart.pde +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Pie Chart - * By Ira Greenberg - * - * Uses the arc() function to generate a pie chart from the data - * stored in an array. - */ - -size(200, 200); -background(100); -smooth(); -noStroke(); - -int diameter = 150; -int[] angs = {30, 10, 45, 35, 60, 38, 75, 67}; -float lastAng = 0; - -for (int i = 0; i < angs.length; i++){ - fill(angs[i] * 3.0); - arc(width/2, height/2, diameter, diameter, lastAng, lastAng+radians(angs[i])); - lastAng += radians(angs[i]); -} - diff --git a/java/examples/Basics/Form/PieChart/applet/loading.gif b/java/examples/Basics/Form/PieChart/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZ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BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Form/PointsLines/applet/PointsLines.java b/java/examples/Basics/Form/PointsLines/applet/PointsLines.java deleted file mode 100644 index ad5b00407..000000000 --- a/java/examples/Basics/Form/PointsLines/applet/PointsLines.java +++ /dev/null @@ -1,53 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class PointsLines extends PApplet { - public void setup() {/** - * Points and Lines. - * - * Constructing a simple dimensional form with lines and rectangles. - * Changing the value of the variable 'd' scales the image. - * The four variables set the positions based on the value of 'd'. - */ - -int d = 40; -int p1 = d; -int p2 = p1+d; -int p3 = p2+d; -int p4 = p3+d; - -size(200, 200); -background(0); - -// Draw gray box -stroke(153); -line(p3, p3, p2, p3); -line(p2, p3, p2, p2); -line(p2, p2, p3, p2); -line(p3, p2, p3, p3); - -// Draw white points -stroke(255); -point(p1, p1); -point(p1, p3); -point(p2, p4); -point(p3, p1); -point(p4, p2); -point(p4, p4); - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "PointsLines" }); - } -} diff --git a/java/examples/Basics/Form/PointsLines/applet/PointsLines.pde b/java/examples/Basics/Form/PointsLines/applet/PointsLines.pde deleted file mode 100644 index 6c504f165..000000000 --- a/java/examples/Basics/Form/PointsLines/applet/PointsLines.pde +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Points and Lines. - * - * Constructing a simple dimensional form with lines and rectangles. - * Changing the value of the variable 'd' scales the image. - * The four variables set the positions based on the value of 'd'. - */ - -int d = 40; -int p1 = d; -int p2 = p1+d; -int p3 = p2+d; -int p4 = p3+d; - -size(200, 200); -background(0); - -// Draw gray box -stroke(153); -line(p3, p3, p2, p3); -line(p2, p3, p2, p2); -line(p2, p2, p3, p2); -line(p3, p2, p3, p3); - -// Draw white points -stroke(255); -point(p1, p1); -point(p1, p3); -point(p2, p4); -point(p3, p1); -point(p4, p2); -point(p4, p4); diff --git a/java/examples/Basics/Form/PointsLines/applet/loading.gif b/java/examples/Basics/Form/PointsLines/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0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q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Form/ShapePrimitives/applet/ShapePrimitives.java b/java/examples/Basics/Form/ShapePrimitives/applet/ShapePrimitives.java deleted file mode 100644 index 3356a28b7..000000000 --- a/java/examples/Basics/Form/ShapePrimitives/applet/ShapePrimitives.java +++ /dev/null @@ -1,42 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class ShapePrimitives extends PApplet { - public void setup() {/** - * Shape Primitives. - * - * The basic shape primitive functions are triangle(), - * rect(), quad(), and ellipse(). Squares are made - * with rect() and circles are made with - * ellipse(). Each of these functions requires a number - * of parameters which determines their position and size. - */ - -size(200, 200); -smooth(); -background(0); -noStroke(); -fill(226); -triangle(10, 10, 10, 200, 45, 200); -rect(45, 45, 35, 35); -quad(105, 10, 120, 10, 120, 200, 80, 200); -ellipse(140, 80, 40, 40); -triangle(160, 10, 195, 200, 160, 200); - - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "ShapePrimitives" }); - } -} diff --git a/java/examples/Basics/Form/ShapePrimitives/applet/ShapePrimitives.pde b/java/examples/Basics/Form/ShapePrimitives/applet/ShapePrimitives.pde deleted file mode 100644 index e06ca3929..000000000 --- a/java/examples/Basics/Form/ShapePrimitives/applet/ShapePrimitives.pde +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Shape Primitives. - * - * The basic shape primitive functions are triangle(), - * rect(), quad(), and ellipse(). Squares are made - * with rect() and circles are made with - * ellipse(). Each of these functions requires a number - * of parameters which determines their position and size. - */ - -size(200, 200); -smooth(); -background(0); -noStroke(); -fill(226); -triangle(10, 10, 10, 200, 45, 200); -rect(45, 45, 35, 35); -quad(105, 10, 120, 10, 120, 200, 80, 200); -ellipse(140, 80, 40, 40); -triangle(160, 10, 195, 200, 160, 200); - diff --git a/java/examples/Basics/Form/ShapePrimitives/applet/loading.gif b/java/examples/Basics/Form/ShapePrimitives/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy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@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Form/SimpleCurves/applet/SimpleCurves.java b/java/examples/Basics/Form/SimpleCurves/applet/SimpleCurves.java deleted file mode 100644 index 7a6f48e93..000000000 --- a/java/examples/Basics/Form/SimpleCurves/applet/SimpleCurves.java +++ /dev/null @@ -1,101 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class SimpleCurves extends PApplet { - -/** - * Simple Curves. - * - * Simple curves are drawn with simple equations. - * By using numbers with values between 0 and 1 in - * the equations, a series of elegant curves - * are created. The numbers are then scaled to fill the screen. - */ - -public void setup() { - size(200, 200); - colorMode(RGB, 100); - background(0); - noFill(); - noLoop(); -} - -public void draw() { - stroke(40); - beginShape(); - for(int i=0; i 1) { sa = 1; } - return 1-sa; -} - -public float squared(float sa) { - sa = sa*sa; - return sa; -} - - static public void main(String args[]) { - PApplet.main(new String[] { "SimpleCurves" }); - } -} diff --git a/java/examples/Basics/Form/SimpleCurves/applet/SimpleCurves.pde b/java/examples/Basics/Form/SimpleCurves/applet/SimpleCurves.pde deleted file mode 100644 index 8507d6dc1..000000000 --- a/java/examples/Basics/Form/SimpleCurves/applet/SimpleCurves.pde +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Simple Curves. - * - * Simple curves are drawn with simple equations. - * By using numbers with values between 0 and 1 in - * the equations, a series of elegant curves - * are created. The numbers are then scaled to fill the screen. - */ - -void setup() { - size(200, 200); - colorMode(RGB, 100); - background(0); - noFill(); - noLoop(); -} - -void draw() { - stroke(40); - beginShape(); - for(int i=0; i 1) { sa = 1; } - return 1-sa; -} - -float squared(float sa) { - sa = sa*sa; - return sa; -} diff --git a/java/examples/Basics/Form/SimpleCurves/applet/loading.gif b/java/examples/Basics/Form/SimpleCurves/applet/loading.gif deleted file mode 100644 index 1ddae5089f0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pa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Form/TriangleStrip/applet/TriangleStrip.java b/java/examples/Basics/Form/TriangleStrip/applet/TriangleStrip.java deleted file mode 100644 index ece5f8d81..000000000 --- a/java/examples/Basics/Form/TriangleStrip/applet/TriangleStrip.java +++ /dev/null @@ -1,57 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class TriangleStrip extends PApplet { - public void setup() {/** - * TRIANGLE_STRIP Mode - * By Ira Greenberg - * - * Generate a closed ring using vertex() - * function and beginShape(TRIANGLE_STRIP) - * mode. outerRad and innerRad variables - * control ring's outer/inner radii respectively. - * Trig functions generate ring. - */ - -size(200, 200); -background(204); -smooth(); - -int x = width/2; -int y = height/2; -int outerRad = 80; -int innerRad = 50; -float px = 0, py = 0, angle = 0; -float pts = 36; -float rot = 360.0f/pts; - -beginShape(TRIANGLE_STRIP); -for (int i = 0; i < pts; i++) { - px = x + cos(radians(angle))*outerRad; - py = y + sin(radians(angle))*outerRad; - angle += rot; - vertex(px, py); - px = x + cos(radians(angle))*innerRad; - py = y + sin(radians(angle))*innerRad; - vertex(px, py); - angle += rot; -} -endShape(); - - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "TriangleStrip" }); - } -} diff --git a/java/examples/Basics/Form/TriangleStrip/applet/TriangleStrip.pde b/java/examples/Basics/Form/TriangleStrip/applet/TriangleStrip.pde deleted file mode 100644 index fdb99d032..000000000 --- a/java/examples/Basics/Form/TriangleStrip/applet/TriangleStrip.pde +++ /dev/null @@ -1,36 +0,0 @@ -/** - * TRIANGLE_STRIP Mode - * By Ira Greenberg - * - * Generate a closed ring using vertex() - * function and beginShape(TRIANGLE_STRIP) - * mode. outerRad and innerRad variables - * control ring's outer/inner radii respectively. - * Trig functions generate ring. - */ - -size(200, 200); -background(204); -smooth(); - -int x = width/2; -int y = height/2; -int outerRad = 80; -int innerRad = 50; -float px = 0, py = 0, angle = 0; -float pts = 36; -float rot = 360.0/pts; - -beginShape(TRIANGLE_STRIP); -for (int i = 0; i < pts; i++) { - px = x + cos(radians(angle))*outerRad; - py = y + sin(radians(angle))*outerRad; - angle += rot; - vertex(px, py); - px = x + cos(radians(angle))*innerRad; - py = y + sin(radians(angle))*innerRad; - vertex(px, py); - angle += rot; -} -endShape(); - diff --git a/java/examples/Basics/Form/TriangleStrip/applet/loading.gif b/java/examples/Basics/Form/TriangleStrip/applet/loading.gif deleted file mode 100644 index 1ddae5089f0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pa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Form/Vertices/applet/Vertices.java b/java/examples/Basics/Form/Vertices/applet/Vertices.java deleted file mode 100644 index 062bc838f..000000000 --- a/java/examples/Basics/Form/Vertices/applet/Vertices.java +++ /dev/null @@ -1,68 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Vertices extends PApplet { - public void setup() {/** - * Vertices. - * - * The beginShape() function begins recording vertices - * for a shape and endShape() stops recording. - * A vertex is a location in space specified by X, Y, - * and sometimes Z coordinates. After calling the beginShape() function, - * a series of vertex() functions must follow. - * To stop drawing the shape, call the endShape() functions. - */ - -size(200, 200); -background(0); -noFill(); - -stroke(102); -beginShape(); -curveVertex(168, 182); -curveVertex(168, 182); -curveVertex(136, 38); -curveVertex(42, 34); -curveVertex(64, 200); -curveVertex(64, 200); -endShape(); - -stroke(51); -beginShape(LINES); -vertex(60, 40); -vertex(160, 10); -vertex(170, 150); -vertex(60, 150); -endShape(); - -stroke(126); -beginShape(); -vertex(60, 40); -bezierVertex(160, 10, 170, 150, 60, 150); -endShape(); - -stroke(255); -beginShape(POINTS); -vertex(60, 40); -vertex(160, 10); -vertex(170, 150); -vertex(60, 150); -endShape(); - - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "Vertices" }); - } -} diff --git a/java/examples/Basics/Form/Vertices/applet/Vertices.pde b/java/examples/Basics/Form/Vertices/applet/Vertices.pde deleted file mode 100644 index f8c705650..000000000 --- a/java/examples/Basics/Form/Vertices/applet/Vertices.pde +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Vertices. - * - * The beginShape() function begins recording vertices - * for a shape and endShape() stops recording. - * A vertex is a location in space specified by X, Y, - * and sometimes Z coordinates. After calling the beginShape() function, - * a series of vertex() functions must follow. - * To stop drawing the shape, call the endShape() functions. - */ - -size(200, 200); -background(0); -noFill(); - -stroke(102); -beginShape(); -curveVertex(168, 182); -curveVertex(168, 182); -curveVertex(136, 38); -curveVertex(42, 34); -curveVertex(64, 200); -curveVertex(64, 200); -endShape(); - -stroke(51); -beginShape(LINES); -vertex(60, 40); -vertex(160, 10); -vertex(170, 150); -vertex(60, 150); -endShape(); - -stroke(126); -beginShape(); -vertex(60, 40); -bezierVertex(160, 10, 170, 150, 60, 150); -endShape(); - -stroke(255); -beginShape(POINTS); -vertex(60, 40); -vertex(160, 10); -vertex(170, 150); -vertex(60, 150); -endShape(); - diff --git a/java/examples/Basics/Form/Vertices/applet/loading.gif b/java/examples/Basics/Form/Vertices/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Image/Alphamask/applet/Alphamask.java b/java/examples/Basics/Image/Alphamask/applet/Alphamask.java deleted file mode 100644 index 2d0e3317d..000000000 --- a/java/examples/Basics/Image/Alphamask/applet/Alphamask.java +++ /dev/null @@ -1,45 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Alphamask extends PApplet { - -/** - * Alpha Mask. - * - * Loads a "mask" for an image to specify the transparency - * in different parts of the image. The two images are blended - * together using the mask() method of PImage. - */ - -PImage img; -PImage maskImg; - -public void setup() -{ - size(200,200); - img = loadImage("test.jpg"); - maskImg = loadImage("mask.jpg"); - img.mask(maskImg); -} - -public void draw() -{ - background((mouseX+mouseY)/1.5f); - image(img, 50, 50); - image(img, mouseX-50, mouseY-50); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Alphamask" }); - } -} diff --git a/java/examples/Basics/Image/Alphamask/applet/Alphamask.pde b/java/examples/Basics/Image/Alphamask/applet/Alphamask.pde deleted file mode 100644 index 6eb55ef9f..000000000 --- a/java/examples/Basics/Image/Alphamask/applet/Alphamask.pde +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Alpha Mask. - * - * Loads a "mask" for an image to specify the transparency - * in different parts of the image. The two images are blended - * together using the mask() method of PImage. - */ - -PImage img; -PImage maskImg; - -void setup() -{ - size(200,200); - img = loadImage("test.jpg"); - maskImg = loadImage("mask.jpg"); - img.mask(maskImg); -} - -void draw() -{ - background((mouseX+mouseY)/1.5); - image(img, 50, 50); - image(img, mouseX-50, mouseY-50); -} diff --git a/java/examples/Basics/Image/Alphamask/applet/loading.gif b/java/examples/Basics/Image/Alphamask/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@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EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Image/BackgroundImage/applet/BackgroundImage.java b/java/examples/Basics/Image/BackgroundImage/applet/BackgroundImage.java deleted file mode 100644 index b56dafb5b..000000000 --- a/java/examples/Basics/Image/BackgroundImage/applet/BackgroundImage.java +++ /dev/null @@ -1,50 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class BackgroundImage extends PApplet { - -/** - * Background Image. - * - * This example presents the fastest way to load a background image - * into Processing. To load an image as the background, it must be - * the same width and height as the program. - */ - -PImage bg; -int a; - -public void setup() -{ - size(200,200); - frameRate(30); - // The background image must be the same size as the parameters - // into the size() method. In this program, the size of "milan_rubbish.jpg" - // is 200 x 200 pixels. - bg = loadImage("milan_rubbish.jpg"); -} - -public void draw() -{ - background(bg); - - a = (a + 1)%(width+32); - stroke(226, 204, 0); - line(0, a, width, a-26); - line(0, a-6, width, a-32); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "BackgroundImage" }); - } -} diff --git a/java/examples/Basics/Image/BackgroundImage/applet/BackgroundImage.pde b/java/examples/Basics/Image/BackgroundImage/applet/BackgroundImage.pde deleted file mode 100644 index 2c5f1aac8..000000000 --- a/java/examples/Basics/Image/BackgroundImage/applet/BackgroundImage.pde +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Background Image. - * - * This example presents the fastest way to load a background image - * into Processing. To load an image as the background, it must be - * the same width and height as the program. - */ - -PImage bg; -int a; - -void setup() -{ - size(200,200); - frameRate(30); - // The background image must be the same size as the parameters - // into the size() method. In this program, the size of "milan_rubbish.jpg" - // is 200 x 200 pixels. - bg = loadImage("milan_rubbish.jpg"); -} - -void draw() -{ - background(bg); - - a = (a + 1)%(width+32); - stroke(226, 204, 0); - line(0, a, width, a-26); - line(0, a-6, width, a-32); -} diff --git a/java/examples/Basics/Image/BackgroundImage/applet/loading.gif b/java/examples/Basics/Image/BackgroundImage/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W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RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Image/CreateImage/applet/CreateImage.java b/java/examples/Basics/Image/CreateImage/applet/CreateImage.java deleted file mode 100644 index 0ae2e5bd5..000000000 --- a/java/examples/Basics/Image/CreateImage/applet/CreateImage.java +++ /dev/null @@ -1,44 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class CreateImage extends PApplet { - -/** - * Create Image. - * - * The createImage() function provides a fresh buffer of pixels to play with. - * This example creates an image gradient. - */ - -PImage img; - -public void setup() -{ - size(200, 200); - img = createImage(120, 120, ARGB); - for(int i=0; i < img.pixels.length; i++) { - img.pixels[i] = color(0, 90, 102, i%img.width * 2); - } -} - -public void draw() -{ - background(204); - image(img, 33, 33); - image(img, mouseX-60, mouseY-60); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "CreateImage" }); - } -} diff --git a/java/examples/Basics/Image/CreateImage/applet/CreateImage.pde b/java/examples/Basics/Image/CreateImage/applet/CreateImage.pde deleted file mode 100644 index df095a75e..000000000 --- a/java/examples/Basics/Image/CreateImage/applet/CreateImage.pde +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Create Image. - * - * The createImage() function provides a fresh buffer of pixels to play with. - * This example creates an image gradient. - */ - -PImage img; - -void setup() -{ - size(200, 200); - img = createImage(120, 120, ARGB); - for(int i=0; i < img.pixels.length; i++) { - img.pixels[i] = color(0, 90, 102, i%img.width * 2); - } -} - -void draw() -{ - background(204); - image(img, 33, 33); - image(img, mouseX-60, mouseY-60); -} diff --git a/java/examples/Basics/Image/CreateImage/applet/loading.gif b/java/examples/Basics/Image/CreateImage/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Image/LoadDisplayImage/applet/LoadDisplayImage.java b/java/examples/Basics/Image/LoadDisplayImage/applet/LoadDisplayImage.java deleted file mode 100644 index 8807d2d60..000000000 --- a/java/examples/Basics/Image/LoadDisplayImage/applet/LoadDisplayImage.java +++ /dev/null @@ -1,44 +0,0 @@ -import processing.core.*; -import processing.xml.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class LoadDisplayImage extends PApplet { - -/** - * Load and Display - * - * Images can be loaded and displayed to the screen at their actual size - * or any other size. - */ - -PImage a; // Declare variable "a" of type PImage - -public void setup() { - size(200, 200); - // The file "jelly.jpg" must be in the data folder - // of the current sketch to load successfully - a = loadImage("jelly.jpg"); // Load the image into the program - noLoop(); // Makes draw() only run once -} - -public void draw() { - // Displays the image at its actual size at point (0,0) - image(a, 0, 0); - // Displays the image at point (100, 0) at half of its size - image(a, 100, 0, a.width/2, a.height/2); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "LoadDisplayImage" }); - } -} diff --git a/java/examples/Basics/Image/LoadDisplayImage/applet/LoadDisplayImage.pde b/java/examples/Basics/Image/LoadDisplayImage/applet/LoadDisplayImage.pde deleted file mode 100644 index 8252c5cbc..000000000 --- a/java/examples/Basics/Image/LoadDisplayImage/applet/LoadDisplayImage.pde +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Load and Display - * - * Images can be loaded and displayed to the screen at their actual size - * or any other size. - */ - -PImage a; // Declare variable "a" of type PImage - -void setup() { - size(200, 200); - // The file "jelly.jpg" must be in the data folder - // of the current sketch to load successfully - a = loadImage("jelly.jpg"); // Load the image into the program - noLoop(); // Makes draw() only run once -} - -void draw() { - // Displays the image at its actual size at point (0,0) - image(a, 0, 0); - // Displays the image at point (100, 0) at half of its size - image(a, 100, 0, a.width/2, a.height/2); -} diff --git a/java/examples/Basics/Image/LoadDisplayImage/applet/loading.gif b/java/examples/Basics/Image/LoadDisplayImage/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I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6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Image/Pointillism/applet/Pointillism.java b/java/examples/Basics/Image/Pointillism/applet/Pointillism.java deleted file mode 100644 index a80eac561..000000000 --- a/java/examples/Basics/Image/Pointillism/applet/Pointillism.java +++ /dev/null @@ -1,49 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Pointillism extends PApplet { - -/** - * Pointillism - * by Daniel Shiffman. - * - * Mouse horizontal location controls size of dots. - * Creates a simple pointillist effect using ellipses colored - * according to pixels in an image. - */ - -PImage a; - -public void setup() -{ - a = loadImage("eames.jpg"); - size(200,200); - noStroke(); - background(255); - smooth(); -} - -public void draw() -{ - float pointillize = map(mouseX, 0, width, 2, 18); - int x = PApplet.parseInt(random(a.width)); - int y = PApplet.parseInt(random(a.height)); - int pix = a.get(x, y); - fill(pix, 126); - ellipse(x, y, pointillize, pointillize); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Pointillism" }); - } -} diff --git a/java/examples/Basics/Image/Pointillism/applet/Pointillism.pde b/java/examples/Basics/Image/Pointillism/applet/Pointillism.pde deleted file mode 100644 index 53f5c3a48..000000000 --- a/java/examples/Basics/Image/Pointillism/applet/Pointillism.pde +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Pointillism - * by Daniel Shiffman. - * - * Mouse horizontal location controls size of dots. - * Creates a simple pointillist effect using ellipses colored - * according to pixels in an image. - */ - -PImage a; - -void setup() -{ - a = loadImage("eames.jpg"); - size(200,200); - noStroke(); - background(255); - smooth(); -} - -void draw() -{ - float pointillize = map(mouseX, 0, width, 2, 18); - int x = int(random(a.width)); - int y = int(random(a.height)); - color pix = a.get(x, y); - fill(pix, 126); - ellipse(x, y, pointillize, pointillize); -} diff --git a/java/examples/Basics/Image/Pointillism/applet/loading.gif b/java/examples/Basics/Image/Pointillism/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w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1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Image/Sprite/applet/Sprite.java b/java/examples/Basics/Image/Sprite/applet/Sprite.java deleted file mode 100644 index c777d010f..000000000 --- a/java/examples/Basics/Image/Sprite/applet/Sprite.java +++ /dev/null @@ -1,61 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Sprite extends PApplet { - -/** - * Sprite (Teddy) - * by James Patterson. - * - * Demonstrates loading and displaying a transparent GIF image. - */ - -PImage teddy; - -float xpos; -float ypos; -float drag = 30.0f; - -public void setup() -{ - size(200,200); - teddy = loadImage("teddy.gif"); - xpos = width/2; - ypos = height/2; - frameRate(60); -} - -public void draw() -{ - background(102); - - float difx = mouseX - xpos-teddy.width/2; - if(abs(difx) > 1.0f) { - xpos = xpos + difx/drag; - xpos = constrain(xpos, 0, width-teddy.width); - } - - float dify = mouseY - ypos-teddy.height/2; - if(abs(dify) > 1.0f) { - ypos = ypos + dify/drag; - ypos = constrain(ypos, 0, height-teddy.height); - } - - // Display the sprite at the position xpos, ypos - image(teddy, xpos, ypos); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Sprite" }); - } -} diff --git a/java/examples/Basics/Image/Sprite/applet/Sprite.pde b/java/examples/Basics/Image/Sprite/applet/Sprite.pde deleted file mode 100644 index b46edfc2f..000000000 --- a/java/examples/Basics/Image/Sprite/applet/Sprite.pde +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Sprite (Teddy) - * by James Patterson. - * - * Demonstrates loading and displaying a transparent GIF image. - */ - -PImage teddy; - -float xpos; -float ypos; -float drag = 30.0; - -void setup() -{ - size(200,200); - teddy = loadImage("teddy.gif"); - xpos = width/2; - ypos = height/2; - frameRate(60); -} - -void draw() -{ - background(102); - - float difx = mouseX - xpos-teddy.width/2; - if(abs(difx) > 1.0) { - xpos = xpos + difx/drag; - xpos = constrain(xpos, 0, width-teddy.width); - } - - float dify = mouseY - ypos-teddy.height/2; - if(abs(dify) > 1.0) { - ypos = ypos + dify/drag; - ypos = constrain(ypos, 0, height-teddy.height); - } - - // Display the sprite at the position xpos, ypos - image(teddy, xpos, ypos); -} diff --git a/java/examples/Basics/Image/Sprite/applet/loading.gif b/java/examples/Basics/Image/Sprite/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o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K=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Image/Transparency/applet/Transparency.java b/java/examples/Basics/Image/Transparency/applet/Transparency.java deleted file mode 100644 index 1aff169ee..000000000 --- a/java/examples/Basics/Image/Transparency/applet/Transparency.java +++ /dev/null @@ -1,50 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Transparency extends PApplet { - -/** - * Transparency. - * - * Move the pointer left and right across the image to change - * its position. This program overlays one image over another - * by modifying the alpha value of the image with the tint() function. - */ - -PImage a, b; -float offset; - -public void setup() { - size(200, 200); - a = loadImage("construct.jpg"); // Load an image into the program - b = loadImage("wash.jpg"); // Load an image into the program - frameRate(60); -} - -public void draw() { - image(a, 0, 0); - float offsetTarget = map(mouseX, 0, width, -b.width/2 - width/2, 0); - offset += (offsetTarget-offset)*0.05f; - tint(255, 153); - image(b, offset, 20); -} - - - - - - - static public void main(String args[]) { - PApplet.main(new String[] { "Transparency" }); - } -} diff --git a/java/examples/Basics/Image/Transparency/applet/Transparency.pde b/java/examples/Basics/Image/Transparency/applet/Transparency.pde deleted file mode 100644 index ec4f66658..000000000 --- a/java/examples/Basics/Image/Transparency/applet/Transparency.pde +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Transparency. - * - * Move the pointer left and right across the image to change - * its position. This program overlays one image over another - * by modifying the alpha value of the image with the tint() function. - */ - -PImage a, b; -float offset; - -void setup() { - size(200, 200); - a = loadImage("construct.jpg"); // Load an image into the program - b = loadImage("wash.jpg"); // Load an image into the program - frameRate(60); -} - -void draw() { - image(a, 0, 0); - float offsetTarget = map(mouseX, 0, width, -b.width/2 - width/2, 0); - offset += (offsetTarget-offset)*0.05; - tint(255, 153); - image(b, offset, 20); -} - - - - - diff --git a/java/examples/Basics/Image/Transparency/applet/loading.gif b/java/examples/Basics/Image/Transparency/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Input/Clock/applet/Clock.java b/java/examples/Basics/Input/Clock/applet/Clock.java deleted file mode 100644 index 7e3412158..000000000 --- a/java/examples/Basics/Input/Clock/applet/Clock.java +++ /dev/null @@ -1,59 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Clock extends PApplet { - -/** - * Clock. - * - * The current time can be read with the second(), minute(), - * and hour() functions. In this example, sin() and cos() values - * are used to set the position of the hands. - */ - -public void setup() { - size(200, 200); - stroke(255); - smooth(); -} -public void draw() { - background(0); - fill(80); - noStroke(); - // Angles for sin() and cos() start at 3 o'clock; - // subtract HALF_PI to make them start at the top - ellipse(100, 100, 160, 160); - float s = map(second(), 0, 60, 0, TWO_PI) - HALF_PI; - float m = map(minute() + norm(second(), 0, 60), 0, 60, 0, TWO_PI) - HALF_PI; - float h = map(hour() + norm(minute(), 0, 60), 0, 24, 0, TWO_PI * 2) - HALF_PI; - stroke(255); - strokeWeight(1); - line(100, 100, cos(s) * 72 + 100, sin(s) * 72 + 100); - strokeWeight(2); - line(100, 100, cos(m) * 60 + 100, sin(m) * 60 + 100); - strokeWeight(4); - line(100, 100, cos(h) * 50 + 100, sin(h) * 50 + 100); - - // Draw the minute ticks - strokeWeight(2); - for (int a = 0; a < 360; a+=6) { - float x = 100 + ( cos(radians(a)) * 72 ); - float y = 100 + ( sin(radians(a)) * 72 ); - point(x, y); - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Clock" }); - } -} diff --git a/java/examples/Basics/Input/Clock/applet/Clock.pde b/java/examples/Basics/Input/Clock/applet/Clock.pde deleted file mode 100644 index 397af66f0..000000000 --- a/java/examples/Basics/Input/Clock/applet/Clock.pde +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Clock. - * - * The current time can be read with the second(), minute(), - * and hour() functions. In this example, sin() and cos() values - * are used to set the position of the hands. - */ - -void setup() { - size(200, 200); - stroke(255); - smooth(); -} -void draw() { - background(0); - fill(80); - noStroke(); - // Angles for sin() and cos() start at 3 o'clock; - // subtract HALF_PI to make them start at the top - ellipse(100, 100, 160, 160); - float s = map(second(), 0, 60, 0, TWO_PI) - HALF_PI; - float m = map(minute() + norm(second(), 0, 60), 0, 60, 0, TWO_PI) - HALF_PI; - float h = map(hour() + norm(minute(), 0, 60), 0, 24, 0, TWO_PI * 2) - HALF_PI; - stroke(255); - strokeWeight(1); - line(100, 100, cos(s) * 72 + 100, sin(s) * 72 + 100); - strokeWeight(2); - line(100, 100, cos(m) * 60 + 100, sin(m) * 60 + 100); - strokeWeight(4); - line(100, 100, cos(h) * 50 + 100, sin(h) * 50 + 100); - - // Draw the minute ticks - strokeWeight(2); - for (int a = 0; a < 360; a+=6) { - float x = 100 + ( cos(radians(a)) * 72 ); - float y = 100 + ( sin(radians(a)) * 72 ); - point(x, y); - } -} diff --git a/java/examples/Basics/Input/Clock/applet/loading.gif b/java/examples/Basics/Input/Clock/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E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%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Input/Constrain/applet/Constrain.java b/java/examples/Basics/Input/Constrain/applet/Constrain.java deleted file mode 100644 index 1a11e1e02..000000000 --- a/java/examples/Basics/Input/Constrain/applet/Constrain.java +++ /dev/null @@ -1,60 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Constrain extends PApplet { - -/** - * Constrain. - * - * Move the mouse across the screen to move the circle. - * The program constrains the circle to its box. - */ - -float mx; -float my; -float easing = 0.05f; -float esize = 25.0f; -int box = 30; - -public void setup() -{ - size(200, 200); - noStroke(); - smooth(); - ellipseMode(CENTER_RADIUS); -} - -public void draw() -{ - background(51); - - if(abs(mouseX - mx) > 0.1f) { - mx = mx + (mouseX - mx) * easing; - } - if(abs(mouseY - my) > 0.1f) { - my = my + (mouseY- my) * easing; - } - - float distance = esize * 2; - mx = constrain(mx, box+distance, width-box-distance); - my = constrain(my, box+distance, height-box-distance); - fill(76); - rect(box+esize, box+esize, box*3, box*3); - fill(255); - ellipse(mx, my, esize, esize); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Constrain" }); - } -} diff --git a/java/examples/Basics/Input/Constrain/applet/Constrain.pde b/java/examples/Basics/Input/Constrain/applet/Constrain.pde deleted file mode 100644 index 6d57b97d6..000000000 --- a/java/examples/Basics/Input/Constrain/applet/Constrain.pde +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Constrain. - * - * Move the mouse across the screen to move the circle. - * The program constrains the circle to its box. - */ - -float mx; -float my; -float easing = 0.05; -float esize = 25.0; -int box = 30; - -void setup() -{ - size(200, 200); - noStroke(); - smooth(); - ellipseMode(CENTER_RADIUS); -} - -void draw() -{ - background(51); - - if(abs(mouseX - mx) > 0.1) { - mx = mx + (mouseX - mx) * easing; - } - if(abs(mouseY - my) > 0.1) { - my = my + (mouseY- my) * easing; - } - - float distance = esize * 2; - mx = constrain(mx, box+distance, width-box-distance); - my = constrain(my, box+distance, height-box-distance); - fill(76); - rect(box+esize, box+esize, box*3, box*3); - fill(255); - ellipse(mx, my, esize, esize); -} diff --git a/java/examples/Basics/Input/Constrain/applet/loading.gif b/java/examples/Basics/Input/Constrain/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po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o G1OPih>8w-$ diff --git a/java/examples/Basics/Input/Easing/applet/Easing.java b/java/examples/Basics/Input/Easing/applet/Easing.java deleted file mode 100644 index 7e6f2749f..000000000 --- a/java/examples/Basics/Input/Easing/applet/Easing.java +++ /dev/null @@ -1,61 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Easing extends PApplet { - -/** - * Easing. - * - * Move the mouse across the screen and the symbol will follow. - * Between drawing each frame of the animation, the program - * calculates the difference between the position of the - * symbol and the cursor. If the distance is larger than - * 1 pixel, the symbol moves part of the distance (0.05) from its - * current position toward the cursor. - */ - -float x; -float y; -float targetX, targetY; -float easing = 0.05f; - -public void setup() -{ - size(200, 200); - smooth(); - noStroke(); -} - -public void draw() -{ - background( 51 ); - - targetX = mouseX; - float dx = mouseX - x; - if(abs(dx) > 1) { - x += dx * easing; - } - - targetY = mouseY; - float dy = mouseY - y; - if(abs(dy) > 1) { - y += dy * easing; - } - - ellipse(x, y, 33, 33); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Easing" }); - } -} diff --git a/java/examples/Basics/Input/Easing/applet/Easing.pde b/java/examples/Basics/Input/Easing/applet/Easing.pde deleted file mode 100644 index 9ef837afc..000000000 --- a/java/examples/Basics/Input/Easing/applet/Easing.pde +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Easing. - * - * Move the mouse across the screen and the symbol will follow. - * Between drawing each frame of the animation, the program - * calculates the difference between the position of the - * symbol and the cursor. If the distance is larger than - * 1 pixel, the symbol moves part of the distance (0.05) from its - * current position toward the cursor. - */ - -float x; -float y; -float targetX, targetY; -float easing = 0.05; - -void setup() -{ - size(200, 200); - smooth(); - noStroke(); -} - -void draw() -{ - background( 51 ); - - targetX = mouseX; - float dx = mouseX - x; - if(abs(dx) > 1) { - x += dx * easing; - } - - targetY = mouseY; - float dy = mouseY - y; - if(abs(dy) > 1) { - y += dy * easing; - } - - ellipse(x, y, 33, 33); -} diff --git a/java/examples/Basics/Input/Easing/applet/loading.gif b/java/examples/Basics/Input/Easing/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Input/Keyboard/applet/Keyboard.java b/java/examples/Basics/Input/Keyboard/applet/Keyboard.java deleted file mode 100644 index 73d9c7202..000000000 --- a/java/examples/Basics/Input/Keyboard/applet/Keyboard.java +++ /dev/null @@ -1,60 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Keyboard extends PApplet { - -/** - * Keyboard. - * - * Click on the image to give it focus and press the letter keys - * to create forms in time and space. Each key has a unique identifying - * number called it's ASCII value. These numbers can be used to position - * shapes in space. - */ - -int numChars = 26; -int[] colors = new int[numChars]; -int keyIndex; -float keyScale; -int rectWidth; - - -public void setup() -{ - size(200, 200); - noStroke(); - background(0); - keyScale = 200/numChars-1.0f; - rectWidth = width/4; -} - -public void draw() -{ - if(keyPressed) { - if(key >= 'A' && key <= 'z') { - if(key <= 'Z') { - keyIndex = key-'A'; - } else { - keyIndex = key-'a'; - } - fill(millis()%255); - float beginRect = rectWidth/2 + keyIndex*keyScale-rectWidth/2; - rect(beginRect, 0.0f, rectWidth, height); - } - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Keyboard" }); - } -} diff --git a/java/examples/Basics/Input/Keyboard/applet/Keyboard.pde b/java/examples/Basics/Input/Keyboard/applet/Keyboard.pde deleted file mode 100644 index ee1a3c156..000000000 --- a/java/examples/Basics/Input/Keyboard/applet/Keyboard.pde +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Keyboard. - * - * Click on the image to give it focus and press the letter keys - * to create forms in time and space. Each key has a unique identifying - * number called it's ASCII value. These numbers can be used to position - * shapes in space. - */ - -int numChars = 26; -color[] colors = new color[numChars]; -int keyIndex; -float keyScale; -int rectWidth; - - -void setup() -{ - size(200, 200); - noStroke(); - background(0); - keyScale = 200/numChars-1.0; - rectWidth = width/4; -} - -void draw() -{ - if(keyPressed) { - if(key >= 'A' && key <= 'z') { - if(key <= 'Z') { - keyIndex = key-'A'; - } else { - keyIndex = key-'a'; - } - fill(millis()%255); - float beginRect = rectWidth/2 + keyIndex*keyScale-rectWidth/2; - rect(beginRect, 0.0, rectWidth, height); - } - } -} diff --git a/java/examples/Basics/Input/Keyboard/applet/loading.gif b/java/examples/Basics/Input/Keyboard/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Input/KeyboardFunctions/applet/KeyboardFunctions.java b/java/examples/Basics/Input/KeyboardFunctions/applet/KeyboardFunctions.java deleted file mode 100644 index 7d7d4b2f4..000000000 --- a/java/examples/Basics/Input/KeyboardFunctions/applet/KeyboardFunctions.java +++ /dev/null @@ -1,109 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class KeyboardFunctions extends PApplet { - -/** - * Keyboard Functions. - * Modified from code by Martin. - * Original 'Color Typewriter' concept by John Maeda. - * - * Click on the window to give it focus and press the letter keys to type colors. - * The keyboard function keyPressed() is called whenever - * a key is pressed. keyReleased() is another keyboard - * function that is called when a key is released. - */ - -int max_height = 20; -int min_height = 10; -int letter_height = max_height; // Height of the letters -int letter_width = 10; // Width of the letter - -int x = -letter_width; // X position of the letters -int y = 0; // Y position of the letters - -boolean newletter; - -int numChars = 26; // There are 26 characters in the alphabet -int[] colors = new int[numChars]; - -public void setup() -{ - size(200, 200); - noStroke(); - colorMode(RGB, numChars); - background(numChars/2); - // Set a gray value for each key - for(int i=0; i= 'A' && key <= 'z') { - int keyIndex; - if(key <= 'Z') { - keyIndex = key-'A'; - letter_height = max_height; - fill(colors[key-'A']); - } else { - keyIndex = key-'a'; - letter_height = min_height; - fill(colors[key-'a']); - } - } else { - fill(0); - letter_height = 10; - } - - newletter = true; - - // Update the "letter" position - x = ( x + letter_width ); - - // Wrap horizontally - if (x > width - letter_width) { - x = 0; - y+= max_height; - } - - // Wrap vertically - if( y > height - letter_height) { - y = 0; // reset y to 0 - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "KeyboardFunctions" }); - } -} diff --git a/java/examples/Basics/Input/KeyboardFunctions/applet/KeyboardFunctions.pde b/java/examples/Basics/Input/KeyboardFunctions/applet/KeyboardFunctions.pde deleted file mode 100644 index 882e92d63..000000000 --- a/java/examples/Basics/Input/KeyboardFunctions/applet/KeyboardFunctions.pde +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Keyboard Functions. - * Modified from code by Martin. - * Original 'Color Typewriter' concept by John Maeda. - * - * Click on the window to give it focus and press the letter keys to type colors. - * The keyboard function keyPressed() is called whenever - * a key is pressed. keyReleased() is another keyboard - * function that is called when a key is released. - */ - -int max_height = 20; -int min_height = 10; -int letter_height = max_height; // Height of the letters -int letter_width = 10; // Width of the letter - -int x = -letter_width; // X position of the letters -int y = 0; // Y position of the letters - -boolean newletter; - -int numChars = 26; // There are 26 characters in the alphabet -color[] colors = new color[numChars]; - -void setup() -{ - size(200, 200); - noStroke(); - colorMode(RGB, numChars); - background(numChars/2); - // Set a gray value for each key - for(int i=0; i= 'A' && key <= 'z') { - int keyIndex; - if(key <= 'Z') { - keyIndex = key-'A'; - letter_height = max_height; - fill(colors[key-'A']); - } else { - keyIndex = key-'a'; - letter_height = min_height; - fill(colors[key-'a']); - } - } else { - fill(0); - letter_height = 10; - } - - newletter = true; - - // Update the "letter" position - x = ( x + letter_width ); - - // Wrap horizontally - if (x > width - letter_width) { - x = 0; - y+= max_height; - } - - // Wrap vertically - if( y > height - letter_height) { - y = 0; // reset y to 0 - } -} diff --git a/java/examples/Basics/Input/KeyboardFunctions/applet/loading.gif b/java/examples/Basics/Input/KeyboardFunctions/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51T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2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Input/Milliseconds/applet/Milliseconds.java b/java/examples/Basics/Input/Milliseconds/applet/Milliseconds.java deleted file mode 100644 index aa72e8e14..000000000 --- a/java/examples/Basics/Input/Milliseconds/applet/Milliseconds.java +++ /dev/null @@ -1,46 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Milliseconds extends PApplet { - -/** - * Milliseconds. - * - * A millisecond is 1/1000 of a second. - * Processing keeps track of the number of milliseconds a program has run. - * By modifying this number with the modulo(%) operator, - * different patterns in time are created. - */ - -float scale; - -public void setup() -{ - size(200, 200); - noStroke(); - scale = width/10; -} - -public void draw() -{ - for(int i=0; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZ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%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Input/Mouse1D/applet/Mouse1D.java b/java/examples/Basics/Input/Mouse1D/applet/Mouse1D.java deleted file mode 100644 index c08cf2368..000000000 --- a/java/examples/Basics/Input/Mouse1D/applet/Mouse1D.java +++ /dev/null @@ -1,70 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Mouse1D extends PApplet { - -/** - * Mouse 1D. - * - * Move the mouse left and right to shift the balance. - * The "mouseX" variable is used to control both the - * size and color of the rectangles. - */ - -int gx = 15; -int gy = 35; -float leftColor = 0.0f; -float rightColor = 0.0f; - -public void setup() -{ - size(200, 200); - colorMode(RGB, 1.0f); - noStroke(); -} - -public void draw() -{ - background(0.0f); - update(mouseX); - fill(0.0f, leftColor + 0.4f, leftColor + 0.6f); - rect(width/4-gx, width/2-gx, gx*2, gx*2); - fill(0.0f, rightColor + 0.2f, rightColor + 0.4f); - rect(width/1.33f-gy, width/2-gy, gy*2, gy*2); -} - -public void update(int x) -{ - leftColor = -0.002f * x/2 + 0.06f; - rightColor = 0.002f * x/2 + 0.06f; - - gx = x/2; - gy = 100-x/2; - - if (gx < 10) { - gx = 10; - } else if (gx > 90) { - gx = 90; - } - - if (gy > 90) { - gy = 90; - } else if (gy < 10) { - gy = 10; - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Mouse1D" }); - } -} diff --git a/java/examples/Basics/Input/Mouse1D/applet/Mouse1D.pde b/java/examples/Basics/Input/Mouse1D/applet/Mouse1D.pde deleted file mode 100644 index 2d1da507f..000000000 --- a/java/examples/Basics/Input/Mouse1D/applet/Mouse1D.pde +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Mouse 1D. - * - * Move the mouse left and right to shift the balance. - * The "mouseX" variable is used to control both the - * size and color of the rectangles. - */ - -int gx = 15; -int gy = 35; -float leftColor = 0.0; -float rightColor = 0.0; - -void setup() -{ - size(200, 200); - colorMode(RGB, 1.0); - noStroke(); -} - -void draw() -{ - background(0.0); - update(mouseX); - fill(0.0, leftColor + 0.4, leftColor + 0.6); - rect(width/4-gx, width/2-gx, gx*2, gx*2); - fill(0.0, rightColor + 0.2, rightColor + 0.4); - rect(width/1.33-gy, width/2-gy, gy*2, gy*2); -} - -void update(int x) -{ - leftColor = -0.002 * x/2 + 0.06; - rightColor = 0.002 * x/2 + 0.06; - - gx = x/2; - gy = 100-x/2; - - if (gx < 10) { - gx = 10; - } else if (gx > 90) { - gx = 90; - } - - if (gy > 90) { - gy = 90; - } else if (gy < 10) { - gy = 10; - } -} diff --git a/java/examples/Basics/Input/Mouse1D/applet/loading.gif b/java/examples/Basics/Input/Mouse1D/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|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%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Input/Mouse2D/applet/Mouse2D.java b/java/examples/Basics/Input/Mouse2D/applet/Mouse2D.java deleted file mode 100644 index aee6375f4..000000000 --- a/java/examples/Basics/Input/Mouse2D/applet/Mouse2D.java +++ /dev/null @@ -1,45 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Mouse2D extends PApplet { - -/** - * Mouse 2D. - * - * Moving the mouse changes the position and size of each box. - */ - -public void setup() -{ - size(200, 200); - noStroke(); - colorMode(RGB, 255, 255, 255, 100); - rectMode(CENTER); -} - -public void draw() -{ - background(51); - fill(255, 80); - rect(mouseX, height/2, mouseY/2+10, mouseY/2+10); - fill(255, 80); - int inverseX = width-mouseX; - int inverseY = height-mouseY; - rect(inverseX, height/2, (inverseY/2)+10, (inverseY/2)+10); -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Mouse2D" }); - } -} diff --git a/java/examples/Basics/Input/Mouse2D/applet/Mouse2D.pde b/java/examples/Basics/Input/Mouse2D/applet/Mouse2D.pde deleted file mode 100644 index d1c36a258..000000000 --- a/java/examples/Basics/Input/Mouse2D/applet/Mouse2D.pde +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Mouse 2D. - * - * Moving the mouse changes the position and size of each box. - */ - -void setup() -{ - size(200, 200); - noStroke(); - colorMode(RGB, 255, 255, 255, 100); - rectMode(CENTER); -} - -void draw() -{ - background(51); - fill(255, 80); - rect(mouseX, height/2, mouseY/2+10, mouseY/2+10); - fill(255, 80); - int inverseX = width-mouseX; - int inverseY = height-mouseY; - rect(inverseX, height/2, (inverseY/2)+10, (inverseY/2)+10); -} - diff --git a/java/examples/Basics/Input/Mouse2D/applet/loading.gif b/java/examples/Basics/Input/Mouse2D/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK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examples/Basics/Input/MouseFunctions/applet/MouseFunctions.java b/java/examples/Basics/Input/MouseFunctions/applet/MouseFunctions.java deleted file mode 100644 index 5b89aeff0..000000000 --- a/java/examples/Basics/Input/MouseFunctions/applet/MouseFunctions.java +++ /dev/null @@ -1,88 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class MouseFunctions extends PApplet { - -/** - * Mouse Functions. - * - * Click on the box and drag it across the screen. - */ - -float bx; -float by; -int bs = 20; -boolean bover = false; -boolean locked = false; -float bdifx = 0.0f; -float bdify = 0.0f; - - -public void setup() -{ - size(200, 200); - bx = width/2.0f; - by = height/2.0f; - rectMode(CENTER_RADIUS); -} - -public void draw() -{ - background(0); - - // Test if the cursor is over the box - if (mouseX > bx-bs && mouseX < bx+bs && - mouseY > by-bs && mouseY < by+bs) { - bover = true; - if(!locked) { - stroke(255); - fill(153); - } - } else { - stroke(153); - fill(153); - bover = false; - } - - // Draw the box - rect(bx, by, bs, bs); -} - -public void mousePressed() { - if(bover) { - locked = true; - fill(255, 255, 255); - } else { - locked = false; - } - bdifx = mouseX-bx; - bdify = mouseY-by; - -} - -public void mouseDragged() { - if(locked) { - bx = mouseX-bdifx; - by = mouseY-bdify; - } -} - -public void mouseReleased() { - locked = false; -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "MouseFunctions" }); - } -} diff --git a/java/examples/Basics/Input/MouseFunctions/applet/MouseFunctions.pde b/java/examples/Basics/Input/MouseFunctions/applet/MouseFunctions.pde deleted file mode 100644 index 22717d718..000000000 --- a/java/examples/Basics/Input/MouseFunctions/applet/MouseFunctions.pde +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Mouse Functions. - * - * Click on the box and drag it across the screen. - */ - -float bx; -float by; -int bs = 20; -boolean bover = false; -boolean locked = false; -float bdifx = 0.0; -float bdify = 0.0; - - -void setup() -{ - size(200, 200); - bx = width/2.0; - by = height/2.0; - rectMode(CENTER_RADIUS); -} - -void draw() -{ - background(0); - - // Test if the cursor is over the box - if (mouseX > bx-bs && mouseX < bx+bs && - mouseY > by-bs && mouseY < by+bs) { - bover = true; - if(!locked) { - stroke(255); - fill(153); - } - } else { - stroke(153); - fill(153); - bover = false; - } - - // Draw the box - rect(bx, by, bs, bs); -} - -void mousePressed() { - if(bover) { - locked = true; - fill(255, 255, 255); - } else { - locked = false; - } - bdifx = mouseX-bx; - bdify = mouseY-by; - -} - -void mouseDragged() { - if(locked) { - bx = mouseX-bdifx; - by = mouseY-bdify; - } -} - -void mouseReleased() { - locked = false; -} - diff --git a/java/examples/Basics/Input/MouseFunctions/applet/loading.gif b/java/examples/Basics/Input/MouseFunctions/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2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f+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Input/MousePress/applet/MousePress.java b/java/examples/Basics/Input/MousePress/applet/MousePress.java deleted file mode 100644 index 82bc9f6ca..000000000 --- a/java/examples/Basics/Input/MousePress/applet/MousePress.java +++ /dev/null @@ -1,43 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class MousePress extends PApplet { - -/** - * Click. - * - * Move the mouse to position the shape. - * Press the mouse button to invert the color. - */ - - -public void setup() { - size(200, 200); - fill(126); - background(102); -} - -public void draw() { - if(mousePressed) { - stroke(255); - } else { - stroke(0); - } - line(mouseX-66, mouseY, mouseX+66, mouseY); - line(mouseX, mouseY-66, mouseX, mouseY+66); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "MousePress" }); - } -} diff --git a/java/examples/Basics/Input/MousePress/applet/MousePress.pde b/java/examples/Basics/Input/MousePress/applet/MousePress.pde deleted file mode 100644 index 526eced76..000000000 --- a/java/examples/Basics/Input/MousePress/applet/MousePress.pde +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Click. - * - * Move the mouse to position the shape. - * Press the mouse button to invert the color. - */ - - -void setup() { - size(200, 200); - fill(126); - background(102); -} - -void draw() { - if(mousePressed) { - stroke(255); - } else { - stroke(0); - } - line(mouseX-66, mouseY, mouseX+66, mouseY); - line(mouseX, mouseY-66, mouseX, mouseY+66); -} diff --git a/java/examples/Basics/Input/MousePress/applet/loading.gif b/java/examples/Basics/Input/MousePress/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 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Cq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Input/MouseSignals/applet/MouseSignals.java b/java/examples/Basics/Input/MouseSignals/applet/MouseSignals.java deleted file mode 100644 index b6cdf7896..000000000 --- a/java/examples/Basics/Input/MouseSignals/applet/MouseSignals.java +++ /dev/null @@ -1,74 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class MouseSignals extends PApplet { - -/** - * Mouse Signals. - * - * Move and click the mouse to generate signals. - * The top row is the signal from "mouseX", - * the middle row is the signal from "mouseY", - * and the bottom row is the signal from "mousePressed". - */ - -int[] xvals; -int[] yvals; -int[] bvals; - -public void setup() -{ - size(200, 200); - xvals = new int[width]; - yvals = new int[width]; - bvals = new int[width]; -} - -int arrayindex = 0; - -public void draw() -{ - background(102); - - for(int i=1; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Input/StoringInput/applet/StoringInput.java b/java/examples/Basics/Input/StoringInput/applet/StoringInput.java deleted file mode 100644 index 98d0ee88e..000000000 --- a/java/examples/Basics/Input/StoringInput/applet/StoringInput.java +++ /dev/null @@ -1,60 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class StoringInput extends PApplet { - -/** - * Storing Input. - * - * Move the mouse across the screen to change the position - * of the circles. The positions of the mouse are recorded - * into an array and played back every frame. Between each - * frame, the newest value are added to the end of each array - * and the oldest value is deleted. - */ - -int num = 60; -float mx[] = new float[num]; -float my[] = new float[num]; - -public void setup() -{ - size(200, 200); - smooth(); - noStroke(); - fill(255, 153); -} - -public void draw() -{ - background(51); - - // Reads throught the entire array - // and shifts the values to the left - for(int i=1; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Math/AdditiveWave/applet/AdditiveWave.java b/java/examples/Basics/Math/AdditiveWave/applet/AdditiveWave.java deleted file mode 100644 index 083c2d276..000000000 --- a/java/examples/Basics/Math/AdditiveWave/applet/AdditiveWave.java +++ /dev/null @@ -1,89 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class AdditiveWave extends PApplet { - -/** - * Additive Wave - * by Daniel Shiffman. - * - * Create a more complex wave by adding two waves together. - */ - -int xspacing = 8; // How far apart should each horizontal location be spaced -int w; // Width of entire wave -int maxwaves = 4; // total # of waves to add together - -float theta = 0.0f; -float[] amplitude = new float[maxwaves]; // Height of wave -float[] dx = new float[maxwaves]; // Value for incrementing X, to be calculated as a function of period and xspacing -float[] yvalues; // Using an array to store height values for the wave (not entirely necessary) - -public void setup() { - size(200, 200); - frameRate(30); - colorMode(RGB, 255, 255, 255, 100); - smooth(); - w = width + 16; - - for (int i = 0; i < maxwaves; i++) { - amplitude[i] = random(10,30); - float period = random(100,300); // How many pixels before the wave repeats - dx[i] = (TWO_PI / period) * xspacing; - } - - yvalues = new float[w/xspacing]; -} - -public void draw() { - background(0); - calcWave(); - renderWave(); -} - -public void calcWave() { - // Increment theta (try different values for 'angular velocity' here - theta += 0.02f; - - // Set all height values to zero - for (int i = 0; i < yvalues.length; i++) { - yvalues[i] = 0; - } - - // Accumulate wave height values - for (int j = 0; j < maxwaves; j++) { - float x = theta; - for (int i = 0; i < yvalues.length; i++) { - // Every other wave is cosine instead of sine - if (j % 2 == 0) yvalues[i] += sin(x)*amplitude[j]; - else yvalues[i] += cos(x)*amplitude[j]; - x+=dx[j]; - } - } -} - -public void renderWave() { - // A simple way to draw the wave with an ellipse at each location - noStroke(); - fill(255,50); - ellipseMode(CENTER); - for (int x = 0; x < yvalues.length; x++) { - ellipse(x*xspacing,width/2+yvalues[x],16,16); - } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "AdditiveWave" }); - } -} diff --git a/java/examples/Basics/Math/AdditiveWave/applet/AdditiveWave.pde b/java/examples/Basics/Math/AdditiveWave/applet/AdditiveWave.pde deleted file mode 100644 index 14ba9914f..000000000 --- a/java/examples/Basics/Math/AdditiveWave/applet/AdditiveWave.pde +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Additive Wave - * by Daniel Shiffman. - * - * Create a more complex wave by adding two waves together. - */ - -int xspacing = 8; // How far apart should each horizontal location be spaced -int w; // Width of entire wave -int maxwaves = 4; // total # of waves to add together - -float theta = 0.0; -float[] amplitude = new float[maxwaves]; // Height of wave -float[] dx = new float[maxwaves]; // Value for incrementing X, to be calculated as a function of period and xspacing -float[] yvalues; // Using an array to store height values for the wave (not entirely necessary) - -void setup() { - size(200, 200); - frameRate(30); - colorMode(RGB, 255, 255, 255, 100); - smooth(); - w = width + 16; - - for (int i = 0; i < maxwaves; i++) { - amplitude[i] = random(10,30); - float period = random(100,300); // How many pixels before the wave repeats - dx[i] = (TWO_PI / period) * xspacing; - } - - yvalues = new float[w/xspacing]; -} - -void draw() { - background(0); - calcWave(); - renderWave(); -} - -void calcWave() { - // Increment theta (try different values for 'angular velocity' here - theta += 0.02; - - // Set all height values to zero - for (int i = 0; i < yvalues.length; i++) { - yvalues[i] = 0; - } - - // Accumulate wave height values - for (int j = 0; j < maxwaves; j++) { - float x = theta; - for (int i = 0; i < yvalues.length; i++) { - // Every other wave is cosine instead of sine - if (j % 2 == 0) yvalues[i] += sin(x)*amplitude[j]; - else yvalues[i] += cos(x)*amplitude[j]; - x+=dx[j]; - } - } -} - -void renderWave() { - // A simple way to draw the wave with an ellipse at each location - noStroke(); - fill(255,50); - ellipseMode(CENTER); - for (int x = 0; x < yvalues.length; x++) { - ellipse(x*xspacing,width/2+yvalues[x],16,16); - } -} - diff --git a/java/examples/Basics/Math/AdditiveWave/applet/loading.gif b/java/examples/Basics/Math/AdditiveWave/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`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FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Math/Arctangent/applet/Arctangent.java b/java/examples/Basics/Math/Arctangent/applet/Arctangent.java deleted file mode 100644 index c0e2c9b5a..000000000 --- a/java/examples/Basics/Math/Arctangent/applet/Arctangent.java +++ /dev/null @@ -1,87 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Arctangent extends PApplet { - -/** - * Arctangent. - * - * Move the mouse to change the direction of the eyes. - * The atan2() function computes the angle from each eye - * to the cursor. - */ - -Eye e1, e2, e3, e4, e5; - -public void setup() -{ - size(200, 200); - smooth(); - noStroke(); - e1 = new Eye( 50, 16, 80); - e2 = new Eye( 64, 85, 40); - e3 = new Eye( 90, 200, 120); - e4 = new Eye(150, 44, 40); - e5 = new Eye(175, 120, 80); -} - -public void draw() -{ - background(102); - - e1.update(mouseX, mouseY); - e2.update(mouseX, mouseY); - e3.update(mouseX, mouseY); - e4.update(mouseX, mouseY); - e5.update(mouseX, mouseY); - - e1.display(); - e2.display(); - e3.display(); - e4.display(); - e5.display(); -} - -class Eye -{ - int ex, ey; - int size; - float angle = 0.0f; - - Eye(int x, int y, int s) { - ex = x; - ey = y; - size = s; - } - - public void update(int mx, int my) { - angle = atan2(my-ey, mx-ex); - } - - public void display() { - pushMatrix(); - translate(ex, ey); - fill(255); - ellipse(0, 0, size, size); - rotate(angle); - fill(153); - ellipse(size/4, 0, size/2, size/2); - popMatrix(); - } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Arctangent" }); - } -} diff --git a/java/examples/Basics/Math/Arctangent/applet/Arctangent.pde b/java/examples/Basics/Math/Arctangent/applet/Arctangent.pde deleted file mode 100644 index b03e0bda6..000000000 --- a/java/examples/Basics/Math/Arctangent/applet/Arctangent.pde +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Arctangent. - * - * Move the mouse to change the direction of the eyes. - * The atan2() function computes the angle from each eye - * to the cursor. - */ - -Eye e1, e2, e3, e4, e5; - -void setup() -{ - size(200, 200); - smooth(); - noStroke(); - e1 = new Eye( 50, 16, 80); - e2 = new Eye( 64, 85, 40); - e3 = new Eye( 90, 200, 120); - e4 = new Eye(150, 44, 40); - e5 = new Eye(175, 120, 80); -} - -void draw() -{ - background(102); - - e1.update(mouseX, mouseY); - e2.update(mouseX, mouseY); - e3.update(mouseX, mouseY); - e4.update(mouseX, mouseY); - e5.update(mouseX, mouseY); - - e1.display(); - e2.display(); - e3.display(); - e4.display(); - e5.display(); -} - -class Eye -{ - int ex, ey; - int size; - float angle = 0.0; - - Eye(int x, int y, int s) { - ex = x; - ey = y; - size = s; - } - - void update(int mx, int my) { - angle = atan2(my-ey, mx-ex); - } - - void display() { - pushMatrix(); - translate(ex, ey); - fill(255); - ellipse(0, 0, size, size); - rotate(angle); - fill(153); - ellipse(size/4, 0, size/2, size/2); - popMatrix(); - } -} - diff --git a/java/examples/Basics/Math/Arctangent/applet/loading.gif b/java/examples/Basics/Math/Arctangent/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Math/Distance1D/applet/Distance1D.java b/java/examples/Basics/Math/Distance1D/applet/Distance1D.java deleted file mode 100644 index 28b2212af..000000000 --- a/java/examples/Basics/Math/Distance1D/applet/Distance1D.java +++ /dev/null @@ -1,71 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Distance1D extends PApplet { - -/** - * Distance 1D. - * - * Move the mouse left and right to control the - * speed and direction of the moving shapes. - */ - -int thin = 8; -int thick = 36; -float xpos1 = 134.0f; -float xpos2 = 44.0f; -float xpos3 = 58.0f; -float xpos4 = 120.0f; - -public void setup() -{ - size(200, 200); - noStroke(); - frameRate(60); -} - -public void draw() -{ - background(0); - - float mx = mouseX * 0.4f - width/5.0f; - - fill(102); - rect(xpos2, 0, thick, height/2); - fill(204); - rect(xpos1, 0, thin, height/2); - fill(102); - rect(xpos4, height/2, thick, height/2); - fill(204); - rect(xpos3, height/2, thin, height/2); - - xpos1 += mx/16; - xpos2 += mx/64; - xpos3 -= mx/16; - xpos4 -= mx/64; - - if(xpos1 < -thin) { xpos1 = width; } - if(xpos1 > width) { xpos1 = -thin; } - if(xpos2 < -thick) { xpos2 = width; } - if(xpos2 > width) { xpos2 = -thick; } - if(xpos3 < -thin) { xpos3 = width; } - if(xpos3 > width) { xpos3 = -thin; } - if(xpos4 < -thick) { xpos4 = width; } - if(xpos4 > width) { xpos4 = -thick; } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Distance1D" }); - } -} diff --git a/java/examples/Basics/Math/Distance1D/applet/Distance1D.pde b/java/examples/Basics/Math/Distance1D/applet/Distance1D.pde deleted file mode 100644 index a17b3febc..000000000 --- a/java/examples/Basics/Math/Distance1D/applet/Distance1D.pde +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Distance 1D. - * - * Move the mouse left and right to control the - * speed and direction of the moving shapes. - */ - -int thin = 8; -int thick = 36; -float xpos1 = 134.0; -float xpos2 = 44.0; -float xpos3 = 58.0; -float xpos4 = 120.0; - -void setup() -{ - size(200, 200); - noStroke(); - frameRate(60); -} - -void draw() -{ - background(0); - - float mx = mouseX * 0.4 - width/5.0; - - fill(102); - rect(xpos2, 0, thick, height/2); - fill(204); - rect(xpos1, 0, thin, height/2); - fill(102); - rect(xpos4, height/2, thick, height/2); - fill(204); - rect(xpos3, height/2, thin, height/2); - - xpos1 += mx/16; - xpos2 += mx/64; - xpos3 -= mx/16; - xpos4 -= mx/64; - - if(xpos1 < -thin) { xpos1 = width; } - if(xpos1 > width) { xpos1 = -thin; } - if(xpos2 < -thick) { xpos2 = width; } - if(xpos2 > width) { xpos2 = -thick; } - if(xpos3 < -thin) { xpos3 = width; } - if(xpos3 > width) { xpos3 = -thin; } - if(xpos4 < -thick) { xpos4 = width; } - if(xpos4 > width) { xpos4 = -thick; } -} - diff --git a/java/examples/Basics/Math/Distance1D/applet/loading.gif b/java/examples/Basics/Math/Distance1D/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l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ps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Math/Distance2D/applet/Distance2D.java b/java/examples/Basics/Math/Distance2D/applet/Distance2D.java deleted file mode 100644 index c4fe4f70e..000000000 --- a/java/examples/Basics/Math/Distance2D/applet/Distance2D.java +++ /dev/null @@ -1,49 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Distance2D extends PApplet { - -/** - * Distance 2D. - * - * Move the mouse across the image to obscure and reveal the matrix. - * Measures the distance from the mouse to each square and sets the - * size proportionally. - */ - -float max_distance; - -public void setup() { - size(200, 200); - smooth(); - noStroke(); - max_distance = dist(0, 0, width, height); -} - -public void draw() -{ - background(51); - - for(int i = 0; i <= width; i += 20) { - for(int j = 0; j <= height; j += 20) { - float size = dist(mouseX, mouseY, i, j); - size = size/max_distance * 66; - ellipse(i, j, size, size); - } - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Distance2D" }); - } -} diff --git a/java/examples/Basics/Math/Distance2D/applet/Distance2D.pde b/java/examples/Basics/Math/Distance2D/applet/Distance2D.pde deleted file mode 100644 index e2bfe4b44..000000000 --- a/java/examples/Basics/Math/Distance2D/applet/Distance2D.pde +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Distance 2D. - * - * Move the mouse across the image to obscure and reveal the matrix. - * Measures the distance from the mouse to each square and sets the - * size proportionally. - */ - -float max_distance; - -void setup() { - size(200, 200); - smooth(); - noStroke(); - max_distance = dist(0, 0, width, height); -} - -void draw() -{ - background(51); - - for(int i = 0; i <= width; i += 20) { - for(int j = 0; j <= height; j += 20) { - float size = dist(mouseX, mouseY, i, j); - size = size/max_distance * 66; - ellipse(i, j, size, size); - } - } -} diff --git a/java/examples/Basics/Math/Distance2D/applet/loading.gif b/java/examples/Basics/Math/Distance2D/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Math/DoubleRandom/applet/DoubleRandom.java b/java/examples/Basics/Math/DoubleRandom/applet/DoubleRandom.java deleted file mode 100644 index bea794379..000000000 --- a/java/examples/Basics/Math/DoubleRandom/applet/DoubleRandom.java +++ /dev/null @@ -1,41 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class DoubleRandom extends PApplet { - public void setup() {/** - * Double Random - * by Ira Greenberg. - * - * Using 2 random() calls the and point() function - * to create an irregular sawtooth line. - */ - -size(200, 200); -background(0); -int totalPts = 300; -float steps = totalPts+1; -stroke(255); -float rand = 0; - -for (int i=1; i< steps; i++){ - point( (width/steps) * i, (height/2) + random(-rand, rand) ); - rand += random(-5, 5); -} - - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "DoubleRandom" }); - } -} diff --git a/java/examples/Basics/Math/DoubleRandom/applet/DoubleRandom.pde b/java/examples/Basics/Math/DoubleRandom/applet/DoubleRandom.pde deleted file mode 100644 index 10b1fe0c9..000000000 --- a/java/examples/Basics/Math/DoubleRandom/applet/DoubleRandom.pde +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Double Random - * by Ira Greenberg. - * - * Using 2 random() calls the and point() function - * to create an irregular sawtooth line. - */ - -size(200, 200); -background(0); -int totalPts = 300; -float steps = totalPts+1; -stroke(255); -float rand = 0; - -for (int i=1; i< steps; i++){ - point( (width/steps) * i, (height/2) + random(-rand, rand) ); - rand += random(-5, 5); -} - diff --git a/java/examples/Basics/Math/DoubleRandom/applet/loading.gif b/java/examples/Basics/Math/DoubleRandom/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|riju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!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Math/Graphing2DEquation/applet/Graphing2DEquation.java b/java/examples/Basics/Math/Graphing2DEquation/applet/Graphing2DEquation.java deleted file mode 100644 index 2049a3988..000000000 --- a/java/examples/Basics/Math/Graphing2DEquation/applet/Graphing2DEquation.java +++ /dev/null @@ -1,60 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Graphing2DEquation extends PApplet { - -/** - * Graphing 2D Equations - * by Daniel Shiffman. - * - * Graphics the following equation: - * sin(n*cos(r) + 5*theta) - * where n is a function of horizontal mouse location. - */ - -public void setup() { - size(200,200); - frameRate(30); -} - -public void draw() { - loadPixels(); - float n = (mouseX * 10.0f) / width; - float w = 16.0f; // 2D space width - float h = 16.0f; // 2D space height - float dx = w / width; // Increment x this amount per pixel - float dy = h / height; // Increment y this amount per pixel - float x = -w/2; // Start x at -1 * width / 2 - for (int i = 0; i < width; i++) { - float y = -h/2; // Start y at -1 * height / 2 - for (int j = 0; j < height; j++) { - float r = sqrt((x*x) + (y*y)); // Convert cartesian to polar - float theta = atan2(y,x); // Convert cartesian to polar - // Compute 2D polar coordinate function - float val = sin(n*cos(r) + 5 * theta); // Results in a value between -1 and 1 - //float val = cos(r); // Another simple function - //float val = sin(theta); // Another simple function - // Map resulting vale to grayscale value - pixels[i+j*width] = color((val + 1.0f) * 255.0f/2.0f); // Scale to between 0 and 255 - y += dy; // Increment y - } - x += dx; // Increment x - } - updatePixels(); -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Graphing2DEquation" }); - } -} diff --git a/java/examples/Basics/Math/Graphing2DEquation/applet/Graphing2DEquation.pde b/java/examples/Basics/Math/Graphing2DEquation/applet/Graphing2DEquation.pde deleted file mode 100644 index bd20ed864..000000000 --- a/java/examples/Basics/Math/Graphing2DEquation/applet/Graphing2DEquation.pde +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Graphing 2D Equations - * by Daniel Shiffman. - * - * Graphics the following equation: - * sin(n*cos(r) + 5*theta) - * where n is a function of horizontal mouse location. - */ - -void setup() { - size(200,200); - frameRate(30); -} - -void draw() { - loadPixels(); - float n = (mouseX * 10.0) / width; - float w = 16.0; // 2D space width - float h = 16.0; // 2D space height - float dx = w / width; // Increment x this amount per pixel - float dy = h / height; // Increment y this amount per pixel - float x = -w/2; // Start x at -1 * width / 2 - for (int i = 0; i < width; i++) { - float y = -h/2; // Start y at -1 * height / 2 - for (int j = 0; j < height; j++) { - float r = sqrt((x*x) + (y*y)); // Convert cartesian to polar - float theta = atan2(y,x); // Convert cartesian to polar - // Compute 2D polar coordinate function - float val = sin(n*cos(r) + 5 * theta); // Results in a value between -1 and 1 - //float val = cos(r); // Another simple function - //float val = sin(theta); // Another simple function - // Map resulting vale to grayscale value - pixels[i+j*width] = color((val + 1.0) * 255.0/2.0); // Scale to between 0 and 255 - y += dy; // Increment y - } - x += dx; // Increment x - } - updatePixels(); -} - diff --git a/java/examples/Basics/Math/Graphing2DEquation/applet/loading.gif b/java/examples/Basics/Math/Graphing2DEquation/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Math/IncrementDecrement/applet/IncrementDecrement.java b/java/examples/Basics/Math/IncrementDecrement/applet/IncrementDecrement.java deleted file mode 100644 index 87cdd99d6..000000000 --- a/java/examples/Basics/Math/IncrementDecrement/applet/IncrementDecrement.java +++ /dev/null @@ -1,66 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class IncrementDecrement extends PApplet { - -/** - * Increment Decrement. - * - * Writing "a++" is equivalent to "a = a + 1". - * Writing "a--" is equivalent to "a = a - 1". - */ - -int a; -int b; -boolean direction; - -public void setup() -{ - size(200, 200); - colorMode(RGB, width); - a = 0; - b = width; - direction = true; - frameRate(30); -} - -public void draw() -{ - a++; - if(a > width) { - a = 0; - direction = !direction; - } - if(direction == true){ - stroke(a); - } else { - stroke(width-a); - } - line(a, 0, a, height/2); - - b--; - if(b < 0) { - b = width; - } - if(direction == true) { - stroke(width-b); - } else { - stroke(b); - } - line(b, height/2+1, b, height); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "IncrementDecrement" }); - } -} diff --git a/java/examples/Basics/Math/IncrementDecrement/applet/IncrementDecrement.pde b/java/examples/Basics/Math/IncrementDecrement/applet/IncrementDecrement.pde deleted file mode 100644 index 8398c5faa..000000000 --- a/java/examples/Basics/Math/IncrementDecrement/applet/IncrementDecrement.pde +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Increment Decrement. - * - * Writing "a++" is equivalent to "a = a + 1". - * Writing "a--" is equivalent to "a = a - 1". - */ - -int a; -int b; -boolean direction; - -void setup() -{ - size(200, 200); - colorMode(RGB, width); - a = 0; - b = width; - direction = true; - frameRate(30); -} - -void draw() -{ - a++; - if(a > width) { - a = 0; - direction = !direction; - } - if(direction == true){ - stroke(a); - } else { - stroke(width-a); - } - line(a, 0, a, height/2); - - b--; - if(b < 0) { - b = width; - } - if(direction == true) { - stroke(width-b); - } else { - stroke(b); - } - line(b, height/2+1, b, height); -} diff --git a/java/examples/Basics/Math/IncrementDecrement/applet/loading.gif b/java/examples/Basics/Math/IncrementDecrement/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>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lHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Math/Modulo/applet/Modulo.java b/java/examples/Basics/Math/Modulo/applet/Modulo.java deleted file mode 100644 index b83b996bd..000000000 --- a/java/examples/Basics/Math/Modulo/applet/Modulo.java +++ /dev/null @@ -1,51 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Modulo extends PApplet { - -/** - * Modulo. - * - * The modulo operator (%) returns the remainder of a number - * divided by another. As in this example, it is often used - * to keep numerical values within a set range. - */ - -int num = 20; -float c; - -public void setup() -{ - size(200,200); - fill(255); - frameRate(30); -} - -public void draw() -{ - background(0); - c+=0.1f; - for(int i=1; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5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ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Math/Noise1D/applet/Noise1D.java b/java/examples/Basics/Math/Noise1D/applet/Noise1D.java deleted file mode 100644 index 6a5adbc66..000000000 --- a/java/examples/Basics/Math/Noise1D/applet/Noise1D.java +++ /dev/null @@ -1,57 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Noise1D extends PApplet { - -/** - * Noise1D. - * - * Using 1D Perlin Noise to assign location. - */ - -float xoff = 0.0f; -float xincrement = 0.01f; - -public void setup() { - size(200,200); - background(0); - frameRate(30); - smooth(); - noStroke(); -} - -public void draw() -{ - // Create an alpha blended background - fill(0, 10); - rect(0,0,width,height); - - //float n = random(0,width); // Try this line instead of noise - - // Get a noise value based on xoff and scale it according to the window's width - float n = noise(xoff)*width; - - // With each cycle, increment xoff - xoff += xincrement; - - // Draw the ellipse at the value produced by perlin noise - fill(200); - ellipse(n,height/2,16,16); -} - - - - static public void main(String args[]) { - PApplet.main(new String[] { "Noise1D" }); - } -} diff --git a/java/examples/Basics/Math/Noise1D/applet/Noise1D.pde b/java/examples/Basics/Math/Noise1D/applet/Noise1D.pde deleted file mode 100644 index 99d02b85d..000000000 --- a/java/examples/Basics/Math/Noise1D/applet/Noise1D.pde +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Noise1D. - * - * Using 1D Perlin Noise to assign location. - */ - -float xoff = 0.0; -float xincrement = 0.01; - -void setup() { - size(200,200); - background(0); - frameRate(30); - smooth(); - noStroke(); -} - -void draw() -{ - // Create an alpha blended background - fill(0, 10); - rect(0,0,width,height); - - //float n = random(0,width); // Try this line instead of noise - - // Get a noise value based on xoff and scale it according to the window's width - float n = noise(xoff)*width; - - // With each cycle, increment xoff - xoff += xincrement; - - // Draw the ellipse at the value produced by perlin noise - fill(200); - ellipse(n,height/2,16,16); -} - - diff --git a/java/examples/Basics/Math/Noise1D/applet/loading.gif b/java/examples/Basics/Math/Noise1D/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-X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;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Math/Noise2D/applet/Noise2D.java b/java/examples/Basics/Math/Noise2D/applet/Noise2D.java deleted file mode 100644 index 32097009c..000000000 --- a/java/examples/Basics/Math/Noise2D/applet/Noise2D.java +++ /dev/null @@ -1,67 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Noise2D extends PApplet { - -/** - * Noise2D - * by Daniel Shiffman. - * - * Using 2D noise to create simple texture. - */ - -float increment = 0.02f; - -public void setup() { - size(200,200); - noLoop(); -} - -public void draw() { - background(0); - - // Optional: adjust noise detail here - // noiseDetail(8,0.65f); - - loadPixels(); - - float xoff = 0.0f; // Start xoff at 0 - - // For every x,y coordinate in a 2D space, calculate a noise value and produce a brightness value - for (int x = 0; x < width; x++) { - xoff += increment; // Increment xoff - float yoff = 0.0f; // For every xoff, start yoff at 0 - for (int y = 0; y < height; y++) { - yoff += increment; // Increment yoff - - // Calculate noise and scale by 255 - float bright = noise(xoff,yoff)*255; - - // Try using this line instead - //float bright = random(0,255); - - // Set each pixel onscreen to a grayscale value - pixels[x+y*width] = color(bright); - } - } - - updatePixels(); -} - - - - - static public void main(String args[]) { - PApplet.main(new String[] { "Noise2D" }); - } -} diff --git a/java/examples/Basics/Math/Noise2D/applet/Noise2D.pde b/java/examples/Basics/Math/Noise2D/applet/Noise2D.pde deleted file mode 100644 index e5e04b010..000000000 --- a/java/examples/Basics/Math/Noise2D/applet/Noise2D.pde +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Noise2D - * by Daniel Shiffman. - * - * Using 2D noise to create simple texture. - */ - -float increment = 0.02; - -void setup() { - size(200,200); - noLoop(); -} - -void draw() { - background(0); - - // Optional: adjust noise detail here - // noiseDetail(8,0.65f); - - loadPixels(); - - float xoff = 0.0; // Start xoff at 0 - - // For every x,y coordinate in a 2D space, calculate a noise value and produce a brightness value - for (int x = 0; x < width; x++) { - xoff += increment; // Increment xoff - float yoff = 0.0; // For every xoff, start yoff at 0 - for (int y = 0; y < height; y++) { - yoff += increment; // Increment yoff - - // Calculate noise and scale by 255 - float bright = noise(xoff,yoff)*255; - - // Try using this line instead - //float bright = random(0,255); - - // Set each pixel onscreen to a grayscale value - pixels[x+y*width] = color(bright); - } - } - - updatePixels(); -} - - - diff --git a/java/examples/Basics/Math/Noise2D/applet/loading.gif b/java/examples/Basics/Math/Noise2D/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q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~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Math/Noise3D/applet/Noise3D.java b/java/examples/Basics/Math/Noise3D/applet/Noise3D.java deleted file mode 100644 index 1bcbe7f0d..000000000 --- a/java/examples/Basics/Math/Noise3D/applet/Noise3D.java +++ /dev/null @@ -1,74 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Noise3D extends PApplet { - -/** - * Noise3D. - * - * Using 3D noise to create simple animated texture. - * Here, the third dimension ('z') is treated as time. - */ - -float increment = 0.01f; -// The noise function's 3rd argument, a global variable that increments once per cycle -float zoff = 0.0f; -// We will increment zoff differently than xoff and yoff -float zincrement = 0.02f; - -public void setup() { - size(200,200); - frameRate(30); -} - -public void draw() { - background(0); - - // Optional: adjust noise detail here - // noiseDetail(8,0.65f); - - loadPixels(); - - float xoff = 0.0f; // Start xoff at 0 - - // For every x,y coordinate in a 2D space, calculate a noise value and produce a brightness value - for (int x = 0; x < width; x++) { - xoff += increment; // Increment xoff - float yoff = 0.0f; // For every xoff, start yoff at 0 - for (int y = 0; y < height; y++) { - yoff += increment; // Increment yoff - - // Calculate noise and scale by 255 - float bright = noise(xoff,yoff,zoff)*255; - - // Try using this line instead - //float bright = random(0,255); - - // Set each pixel onscreen to a grayscale value - pixels[x+y*width] = color(bright,bright,bright); - } - } - updatePixels(); - - zoff += zincrement; // Increment zoff - - -} - - - - - static public void main(String args[]) { - PApplet.main(new String[] { "Noise3D" }); - } -} diff --git a/java/examples/Basics/Math/Noise3D/applet/Noise3D.pde b/java/examples/Basics/Math/Noise3D/applet/Noise3D.pde deleted file mode 100644 index 24bcfddc8..000000000 --- a/java/examples/Basics/Math/Noise3D/applet/Noise3D.pde +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Noise3D. - * - * Using 3D noise to create simple animated texture. - * Here, the third dimension ('z') is treated as time. - */ - -float increment = 0.01; -// The noise function's 3rd argument, a global variable that increments once per cycle -float zoff = 0.0; -// We will increment zoff differently than xoff and yoff -float zincrement = 0.02; - -void setup() { - size(200,200); - frameRate(30); -} - -void draw() { - background(0); - - // Optional: adjust noise detail here - // noiseDetail(8,0.65f); - - loadPixels(); - - float xoff = 0.0; // Start xoff at 0 - - // For every x,y coordinate in a 2D space, calculate a noise value and produce a brightness value - for (int x = 0; x < width; x++) { - xoff += increment; // Increment xoff - float yoff = 0.0; // For every xoff, start yoff at 0 - for (int y = 0; y < height; y++) { - yoff += increment; // Increment yoff - - // Calculate noise and scale by 255 - float bright = noise(xoff,yoff,zoff)*255; - - // Try using this line instead - //float bright = random(0,255); - - // Set each pixel onscreen to a grayscale value - pixels[x+y*width] = color(bright,bright,bright); - } - } - updatePixels(); - - zoff += zincrement; // Increment zoff - - -} - - - diff --git a/java/examples/Basics/Math/Noise3D/applet/loading.gif b/java/examples/Basics/Math/Noise3D/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8L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(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Math/NoiseWave/applet/NoiseWave.java b/java/examples/Basics/Math/NoiseWave/applet/NoiseWave.java deleted file mode 100644 index 4ecc653a6..000000000 --- a/java/examples/Basics/Math/NoiseWave/applet/NoiseWave.java +++ /dev/null @@ -1,80 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class NoiseWave extends PApplet { - -/** - * Noise Wave - * by Daniel Shiffman. - * - * Using Perlin Noise to generate a wave-like pattern. - */ - -int xspacing = 8; // How far apart should each horizontal location be spaced -int w; // Width of entire wave - -float yoff = 0.0f; // 2nd dimension of perlin noise -float[] yvalues; // Using an array to store height values for the wave (not entirely necessary) - -public void setup() { - size(200,200); - frameRate(30); - colorMode(RGB,255,255,255,100); - smooth(); - w = width+16; - yvalues = new float[w/xspacing]; -} - -public void draw() { - background(0); - calcWave(); - renderWave(); - -} - -public void calcWave() { - float dx = 0.05f; - float dy = 0.01f; - float amplitude = 100.0f; - - // Increment y ('time') - yoff += dy; - - //float xoff = 0.0; // Option #1 - float xoff = yoff; // Option #2 - - for (int i = 0; i < yvalues.length; i++) { - // Using 2D noise function - //yvalues[i] = (2*noise(xoff,yoff)-1)*amplitude; // Option #1 - // Using 1D noise function - yvalues[i] = (2*noise(xoff)-1)*amplitude; // Option #2 - xoff+=dx; - } - -} - -public void renderWave() { - // A simple way to draw the wave with an ellipse at each location - for (int x = 0; x < yvalues.length; x++) { - noStroke(); - fill(255,50); - ellipseMode(CENTER); - ellipse(x*xspacing,width/2+yvalues[x],16,16); - } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "NoiseWave" }); - } -} diff --git a/java/examples/Basics/Math/NoiseWave/applet/NoiseWave.pde b/java/examples/Basics/Math/NoiseWave/applet/NoiseWave.pde deleted file mode 100644 index 9a632fafa..000000000 --- a/java/examples/Basics/Math/NoiseWave/applet/NoiseWave.pde +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Noise Wave - * by Daniel Shiffman. - * - * Using Perlin Noise to generate a wave-like pattern. - */ - -int xspacing = 8; // How far apart should each horizontal location be spaced -int w; // Width of entire wave - -float yoff = 0.0f; // 2nd dimension of perlin noise -float[] yvalues; // Using an array to store height values for the wave (not entirely necessary) - -void setup() { - size(200,200); - frameRate(30); - colorMode(RGB,255,255,255,100); - smooth(); - w = width+16; - yvalues = new float[w/xspacing]; -} - -void draw() { - background(0); - calcWave(); - renderWave(); - -} - -void calcWave() { - float dx = 0.05f; - float dy = 0.01f; - float amplitude = 100.0f; - - // Increment y ('time') - yoff += dy; - - //float xoff = 0.0; // Option #1 - float xoff = yoff; // Option #2 - - for (int i = 0; i < yvalues.length; i++) { - // Using 2D noise function - //yvalues[i] = (2*noise(xoff,yoff)-1)*amplitude; // Option #1 - // Using 1D noise function - yvalues[i] = (2*noise(xoff)-1)*amplitude; // Option #2 - xoff+=dx; - } - -} - -void renderWave() { - // A simple way to draw the wave with an ellipse at each location - for (int x = 0; x < yvalues.length; x++) { - noStroke(); - fill(255,50); - ellipseMode(CENTER); - ellipse(x*xspacing,width/2+yvalues[x],16,16); - } -} - diff --git a/java/examples/Basics/Math/NoiseWave/applet/loading.gif b/java/examples/Basics/Math/NoiseWave/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hj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atorPrecedence/applet/OperatorPrecedence.java deleted file mode 100644 index 60bb03f4e..000000000 --- a/java/examples/Basics/Math/OperatorPrecedence/applet/OperatorPrecedence.java +++ /dev/null @@ -1,79 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class OperatorPrecedence extends PApplet { - public void setup() {/** - * Operator_Precedence - * - * If you don't explicitly state the order in which - * an expression is evaluated, they are evaluated based - * on the operator precedence. For example, in the statement - * "4+2*8", the 2 will first be multiplied by 8 and then the result will - * be added to 4. This is because the "*" has a higher precedence - * than the "+". To avoid ambiguity in reading the program, - * it is recommended that is statement is written as "4+(2*8)". - * The order of evaluation can be controlled through placement of - * parenthesis in the code. A table of operator precedence follows below. - * - */ - -// The highest precedence is at the top of the list and -// the lowest is at the bottom. -// Multiplicative: * / % -// Additive: + - -// Relational: < > <= >= -// Equality: == != -// Logical AND: && -// Logical OR: || -// Assignment: = += -= *= /= %= - -size(200, 200); -background(51); -noFill(); -stroke(51); - -stroke(204); -for(int i=0; i< width-20; i+= 4) { - // The 30 is added to 70 and then evaluated - // if it is greater than the current value of "i" - // For clarity, write as "if(i > (30 + 70)) {" - if(i > 30 + 70) { - line(i, 0, i, 50); - } -} - -stroke(255); -// The 2 is multiplied by the 8 and the result is added to the 5 -// For clarity, write as "rect(5 + (2 * 8), 0, 90, 20);" -rect(4 + 2 * 8, 52, 90, 48); -rect((4 + 2) * 8, 100, 90, 49); - -stroke(153); -for(int i=0; i< width; i+= 2) { - // The relational statements are evaluated - // first, and then the logical AND statements and - // finally the logical OR. For clarity, write as: - // "if(((i > 10) && (i < 50)) || ((i > 80) && (i < 160))) {" - if(i > 20 && i < 50 || i > 100 && i < width-20) { - line(i, 151, i, height-1); - } -} - - - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "OperatorPrecedence" }); - } -} diff --git a/java/examples/Basics/Math/OperatorPrecedence/applet/OperatorPrecedence.pde b/java/examples/Basics/Math/OperatorPrecedence/applet/OperatorPrecedence.pde deleted file mode 100644 index 7f8cf52ca..000000000 --- a/java/examples/Basics/Math/OperatorPrecedence/applet/OperatorPrecedence.pde +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Operator_Precedence - * - * If you don't explicitly state the order in which - * an expression is evaluated, they are evaluated based - * on the operator precedence. For example, in the statement - * "4+2*8", the 2 will first be multiplied by 8 and then the result will - * be added to 4. This is because the "*" has a higher precedence - * than the "+". To avoid ambiguity in reading the program, - * it is recommended that is statement is written as "4+(2*8)". - * The order of evaluation can be controlled through placement of - * parenthesis in the code. A table of operator precedence follows below. - * - */ - -// The highest precedence is at the top of the list and -// the lowest is at the bottom. -// Multiplicative: * / % -// Additive: + - -// Relational: < > <= >= -// Equality: == != -// Logical AND: && -// Logical OR: || -// Assignment: = += -= *= /= %= - -size(200, 200); -background(51); -noFill(); -stroke(51); - -stroke(204); -for(int i=0; i< width-20; i+= 4) { - // The 30 is added to 70 and then evaluated - // if it is greater than the current value of "i" - // For clarity, write as "if(i > (30 + 70)) {" - if(i > 30 + 70) { - line(i, 0, i, 50); - } -} - -stroke(255); -// The 2 is multiplied by the 8 and the result is added to the 5 -// For clarity, write as "rect(5 + (2 * 8), 0, 90, 20);" -rect(4 + 2 * 8, 52, 90, 48); -rect((4 + 2) * 8, 100, 90, 49); - -stroke(153); -for(int i=0; i< width; i+= 2) { - // The relational statements are evaluated - // first, and then the logical AND statements and - // finally the logical OR. For clarity, write as: - // "if(((i > 10) && (i < 50)) || ((i > 80) && (i < 160))) {" - if(i > 20 && i < 50 || i > 100 && i < width-20) { - line(i, 151, i, height-1); - } -} - - diff --git a/java/examples/Basics/Math/OperatorPrecedence/applet/loading.gif b/java/examples/Basics/Math/OperatorPrecedence/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0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q1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Math/PolarToCartesian/applet/PolarToCartesian.java b/java/examples/Basics/Math/PolarToCartesian/applet/PolarToCartesian.java deleted file mode 100644 index 75a8ea736..000000000 --- a/java/examples/Basics/Math/PolarToCartesian/applet/PolarToCartesian.java +++ /dev/null @@ -1,72 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class PolarToCartesian extends PApplet { - -/** - * PolarToCartesian - * by Daniel Shiffman. - * - * Convert a polar coordinate (r,theta) to cartesian (x,y): - * x = r * cos(theta) - * y = r * sin(theta) - */ - -float r; - -// Angle and angular velocity, accleration -float theta; -float theta_vel; -float theta_acc; - -public void setup() { - size(200,200); - frameRate(30); - smooth(); - - // Initialize all values - r = 50.0f; - theta = 0.0f; - theta_vel = 0.0f; - theta_acc = 0.0001f; -} - -public void draw() { - background(0); - // Translate the origin point to the center of the screen - translate(width/2,height/2); - - // Convert polar to cartesian - float x = r * cos(theta); - float y = r * sin(theta); - - // Draw the ellipse at the cartesian coordinate - ellipseMode(CENTER); - noStroke(); - fill(200); - ellipse(x,y,16,16); - - // Apply acceleration and velocity to angle (r remains static in this example) - theta_vel += theta_acc; - theta += theta_vel; - -} - - - - - - static public void main(String args[]) { - PApplet.main(new String[] { "PolarToCartesian" }); - } -} diff --git a/java/examples/Basics/Math/PolarToCartesian/applet/PolarToCartesian.pde b/java/examples/Basics/Math/PolarToCartesian/applet/PolarToCartesian.pde deleted file mode 100644 index fdcd948db..000000000 --- a/java/examples/Basics/Math/PolarToCartesian/applet/PolarToCartesian.pde +++ /dev/null @@ -1,52 +0,0 @@ -/** - * PolarToCartesian - * by Daniel Shiffman. - * - * Convert a polar coordinate (r,theta) to cartesian (x,y): - * x = r * cos(theta) - * y = r * sin(theta) - */ - -float r; - -// Angle and angular velocity, accleration -float theta; -float theta_vel; -float theta_acc; - -void setup() { - size(200,200); - frameRate(30); - smooth(); - - // Initialize all values - r = 50.0f; - theta = 0.0f; - theta_vel = 0.0f; - theta_acc = 0.0001f; -} - -void draw() { - background(0); - // Translate the origin point to the center of the screen - translate(width/2,height/2); - - // Convert polar to cartesian - float x = r * cos(theta); - float y = r * sin(theta); - - // Draw the ellipse at the cartesian coordinate - ellipseMode(CENTER); - noStroke(); - fill(200); - ellipse(x,y,16,16); - - // Apply acceleration and velocity to angle (r remains static in this example) - theta_vel += theta_acc; - theta += theta_vel; - -} - - - - diff --git a/java/examples/Basics/Math/PolarToCartesian/applet/loading.gif b/java/examples/Basics/Math/PolarToCartesian/applet/loading.gif deleted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Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Math/Random/applet/Random.java b/java/examples/Basics/Math/Random/applet/Random.java deleted file mode 100644 index ca26fea54..000000000 --- a/java/examples/Basics/Math/Random/applet/Random.java +++ /dev/null @@ -1,40 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Random extends PApplet { - public void setup() {/** - * Random. - * - * Random numbers create the basis of this image. - * Each time the program is loaded the result is different. - */ - -size(200, 200); -smooth(); -background(0); -strokeWeight(10); - -for(int i = 0; i < width; i++) { - float r = random(255); - float x = random(0, width); - stroke(r, 100); - line(i, 0, x, height); -} - - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "Random" }); - } -} diff --git a/java/examples/Basics/Math/Random/applet/Random.pde b/java/examples/Basics/Math/Random/applet/Random.pde deleted file mode 100644 index 5fa97b8f0..000000000 --- a/java/examples/Basics/Math/Random/applet/Random.pde +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Random. - * - * Random numbers create the basis of this image. - * Each time the program is loaded the result is different. - */ - -size(200, 200); -smooth(); -background(0); -strokeWeight(10); - -for(int i = 0; i < width; i++) { - float r = random(255); - float x = random(0, width); - stroke(r, 100); - line(i, 0, x, height); -} - diff --git a/java/examples/Basics/Math/Random/applet/loading.gif b/java/examples/Basics/Math/Random/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h z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2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Math/Sine/applet/Sine.java b/java/examples/Basics/Math/Sine/applet/Sine.java deleted file mode 100644 index a29502d3b..000000000 --- a/java/examples/Basics/Math/Sine/applet/Sine.java +++ /dev/null @@ -1,66 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Sine extends PApplet { - -/** - * Sine. - * - * Smoothly scaling size with the sin() function. - */ - -float spin = 0.0f; -float diameter = 84.0f; -float angle; - -float angle_rot; -int rad_points = 90; - -public void setup() -{ - size(200, 200); - noStroke(); - smooth(); -} - -public void draw() -{ - background(153); - - translate(130, 65); - - fill(255); - ellipse(0, 0, 16, 16); - - angle_rot = 0; - fill(51); - - for(int i=0; i<5; i++) { - pushMatrix(); - rotate(angle_rot + -45); - ellipse(-116, 0, diameter, diameter); - popMatrix(); - angle_rot += PI*2/5; - } - - diameter = 34 * sin(angle) + 168; - - angle += 0.02f; - if (angle > TWO_PI) { angle = 0; } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Sine" }); - } -} diff --git a/java/examples/Basics/Math/Sine/applet/Sine.pde b/java/examples/Basics/Math/Sine/applet/Sine.pde deleted file mode 100644 index 848add369..000000000 --- a/java/examples/Basics/Math/Sine/applet/Sine.pde +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Sine. - * - * Smoothly scaling size with the sin() function. - */ - -float spin = 0.0; -float diameter = 84.0; -float angle; - -float angle_rot; -int rad_points = 90; - -void setup() -{ - size(200, 200); - noStroke(); - smooth(); -} - -void draw() -{ - background(153); - - translate(130, 65); - - fill(255); - ellipse(0, 0, 16, 16); - - angle_rot = 0; - fill(51); - - for(int i=0; i<5; i++) { - pushMatrix(); - rotate(angle_rot + -45); - ellipse(-116, 0, diameter, diameter); - popMatrix(); - angle_rot += PI*2/5; - } - - diameter = 34 * sin(angle) + 168; - - angle += 0.02; - if (angle > TWO_PI) { angle = 0; } -} - diff --git a/java/examples/Basics/Math/Sine/applet/loading.gif b/java/examples/Basics/Math/Sine/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK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examples/Basics/Math/SineCosine/applet/SineCosine.java b/java/examples/Basics/Math/SineCosine/applet/SineCosine.java deleted file mode 100644 index c308f7fed..000000000 --- a/java/examples/Basics/Math/SineCosine/applet/SineCosine.java +++ /dev/null @@ -1,79 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class SineCosine extends PApplet { - -/** - * Sine Cosine. - * - * Linear movement with sin() and cos(). - * Numbers between 0 and PI*2 (TWO_PI which is roughly 6.28) - * are put into these functions and numbers between -1 and 1 are - * returned. These values are then scaled to produce larger movements. - */ - -int i = 45; -int j = 225; -float pos1 = 0; -float pos2 = 0; -float pos3 = 0; -float pos4 = 0; -int sc = 40; - -public void setup() -{ - size(200, 200); - noStroke(); - smooth(); -} - -public void draw() -{ - background(0); - - fill(51); - rect(60, 60, 80, 80); - - fill(255); - ellipse(pos1, 36, 32, 32); - - fill(153); - ellipse(36, pos2, 32, 32); - - fill(255); - ellipse(pos3, 164, 32, 32); - - fill(153); - ellipse(164, pos4, 32, 32); - - i += 3; - j -= 3; - - if(i > 405) { - i = 45; - j = 225; - } - - float ang1 = radians(i); // convert degrees to radians - float ang2 = radians(j); // convert degrees to radians - pos1 = width/2 + (sc * cos(ang1)); - pos2 = width/2 + (sc * sin(ang1)); - pos3 = width/2 + (sc * cos(ang2)); - pos4 = width/2 + (sc * sin(ang2)); -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "SineCosine" }); - } -} diff --git a/java/examples/Basics/Math/SineCosine/applet/SineCosine.pde b/java/examples/Basics/Math/SineCosine/applet/SineCosine.pde deleted file mode 100644 index 4a40ddee2..000000000 --- a/java/examples/Basics/Math/SineCosine/applet/SineCosine.pde +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Sine Cosine. - * - * Linear movement with sin() and cos(). - * Numbers between 0 and PI*2 (TWO_PI which is roughly 6.28) - * are put into these functions and numbers between -1 and 1 are - * returned. These values are then scaled to produce larger movements. - */ - -int i = 45; -int j = 225; -float pos1 = 0; -float pos2 = 0; -float pos3 = 0; -float pos4 = 0; -int sc = 40; - -void setup() -{ - size(200, 200); - noStroke(); - smooth(); -} - -void draw() -{ - background(0); - - fill(51); - rect(60, 60, 80, 80); - - fill(255); - ellipse(pos1, 36, 32, 32); - - fill(153); - ellipse(36, pos2, 32, 32); - - fill(255); - ellipse(pos3, 164, 32, 32); - - fill(153); - ellipse(164, pos4, 32, 32); - - i += 3; - j -= 3; - - if(i > 405) { - i = 45; - j = 225; - } - - float ang1 = radians(i); // convert degrees to radians - float ang2 = radians(j); // convert degrees to radians - pos1 = width/2 + (sc * cos(ang1)); - pos2 = width/2 + (sc * sin(ang1)); - pos3 = width/2 + (sc * cos(ang2)); - pos4 = width/2 + (sc * sin(ang2)); -} - diff --git a/java/examples/Basics/Math/SineCosine/applet/loading.gif b/java/examples/Basics/Math/SineCosine/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$O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xkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Math/SineWave/applet/SineWave.java b/java/examples/Basics/Math/SineWave/applet/SineWave.java deleted file mode 100644 index 165700473..000000000 --- a/java/examples/Basics/Math/SineWave/applet/SineWave.java +++ /dev/null @@ -1,75 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class SineWave extends PApplet { - -/** - * Sine Wave - * by Daniel Shiffman. - * - * Render a simple sine wave. - */ - -int xspacing = 8; // How far apart should each horizontal location be spaced -int w; // Width of entire wave - -float theta = 0.0f; // Start angle at 0 -float amplitude = 75.0f; // Height of wave -float period = 500.0f; // How many pixels before the wave repeats -float dx; // Value for incrementing X, a function of period and xspacing -float[] yvalues; // Using an array to store height values for the wave - -public void setup() { - size(200,200); - frameRate(30); - colorMode(RGB,255,255,255,100); - smooth(); - w = width+16; - dx = (TWO_PI / period) * xspacing; - yvalues = new float[w/xspacing]; -} - -public void draw() { - background(0); - calcWave(); - renderWave(); - -} - -public void calcWave() { - // Increment theta (try different values for 'angular velocity' here - theta += 0.02f; - - // For every x value, calculate a y value with sine function - float x = theta; - for (int i = 0; i < yvalues.length; i++) { - yvalues[i] = sin(x)*amplitude; - x+=dx; - } -} - -public void renderWave() { - // A simple way to draw the wave with an ellipse at each location - for (int x = 0; x < yvalues.length; x++) { - noStroke(); - fill(255,50); - ellipseMode(CENTER); - ellipse(x*xspacing,width/2+yvalues[x],16,16); - } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "SineWave" }); - } -} diff --git a/java/examples/Basics/Math/SineWave/applet/SineWave.pde b/java/examples/Basics/Math/SineWave/applet/SineWave.pde deleted file mode 100644 index da47bed36..000000000 --- a/java/examples/Basics/Math/SineWave/applet/SineWave.pde +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Sine Wave - * by Daniel Shiffman. - * - * Render a simple sine wave. - */ - -int xspacing = 8; // How far apart should each horizontal location be spaced -int w; // Width of entire wave - -float theta = 0.0; // Start angle at 0 -float amplitude = 75.0; // Height of wave -float period = 500.0; // How many pixels before the wave repeats -float dx; // Value for incrementing X, a function of period and xspacing -float[] yvalues; // Using an array to store height values for the wave - -void setup() { - size(200,200); - frameRate(30); - colorMode(RGB,255,255,255,100); - smooth(); - w = width+16; - dx = (TWO_PI / period) * xspacing; - yvalues = new float[w/xspacing]; -} - -void draw() { - background(0); - calcWave(); - renderWave(); - -} - -void calcWave() { - // Increment theta (try different values for 'angular velocity' here - theta += 0.02; - - // For every x value, calculate a y value with sine function - float x = theta; - for (int i = 0; i < yvalues.length; i++) { - yvalues[i] = sin(x)*amplitude; - x+=dx; - } -} - -void renderWave() { - // A simple way to draw the wave with an ellipse at each location - for (int x = 0; x < yvalues.length; x++) { - noStroke(); - fill(255,50); - ellipseMode(CENTER); - ellipse(x*xspacing,width/2+yvalues[x],16,16); - } -} - diff --git a/java/examples/Basics/Math/SineWave/applet/loading.gif b/java/examples/Basics/Math/SineWave/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@Tt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sO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Objects/CompositeObjects/applet/CompositeObjects.java b/java/examples/Basics/Objects/CompositeObjects/applet/CompositeObjects.java deleted file mode 100644 index 3da16d412..000000000 --- a/java/examples/Basics/Objects/CompositeObjects/applet/CompositeObjects.java +++ /dev/null @@ -1,125 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class CompositeObjects extends PApplet { - -/** - * Composite Objects - * - * An object can include several other objects. Creating such composite objects - * is a good way to use the principles of modularity and build higher levels of - * abstraction within a program. - */ - -EggRing er1, er2; - -public void setup() -{ - size(200, 200); - smooth(); - er1 = new EggRing(66, 132, 0.1f, 66); - er2 = new EggRing(132, 180, 0.05f, 132); -} - -public void draw() -{ - background(0); - er1.transmit(); - er2.transmit(); -} - -class EggRing -{ - Egg ovoid; - Ring circle = new Ring(); - EggRing(int x, int y, float t, float sp) { - ovoid = new Egg(x, y, t, sp); - circle.start(x, y - sp/2); - } - public void transmit() { - ovoid.wobble(); - ovoid.display(); - circle.grow(); - circle.display(); - if (circle.on == false) { - circle.on = true; - } - } -} - -class Egg { - float x, y; // X-coordinate, y-coordinate - float tilt; // Left and right angle offset - float angle; // Used to define the tilt - float scalar; // Height of the egg - // Constructor - Egg(int xpos, int ypos, float t, float s) { - x = xpos; - y = ypos; - tilt = t; - scalar = s / 100.0f; - } - public void wobble() { - tilt = cos(angle) / 8; - angle += 0.1f; - } - public void display() { - noStroke(); - fill(255); - pushMatrix(); - translate(x, y); - rotate(tilt); - scale(scalar); - beginShape(); - vertex(0, -100); - bezierVertex(25, -100, 40, -65, 40, -40); - bezierVertex(40, -15, 25, 0, 0, 0); - bezierVertex(-25, 0, -40, -15, -40, -40); - bezierVertex(-40, -65, -25, -100, 0, -100); - endShape(); - popMatrix(); - } -} - -class Ring { - float x, y; // X-coordinate, y-coordinate - float diameter; // Diameter of the ring - boolean on = false; // Turns the display on and off - public void start(float xpos, float ypos) { - x = xpos; - y = ypos; - on = true; - diameter = 1; - } - public void grow() { - if (on == true) { - diameter += 0.5f; - if (diameter > width*2) { - diameter = 0.0f; - } - } - } - public void display() { - if (on == true) { - noFill(); - strokeWeight(4); - stroke(155, 153); - ellipse(x, y, diameter, diameter); - } - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "CompositeObjects" }); - } -} diff --git a/java/examples/Basics/Objects/CompositeObjects/applet/CompositeObjects.pde b/java/examples/Basics/Objects/CompositeObjects/applet/CompositeObjects.pde deleted file mode 100644 index 171c03ae9..000000000 --- a/java/examples/Basics/Objects/CompositeObjects/applet/CompositeObjects.pde +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Composite Objects - * - * An object can include several other objects. Creating such composite objects - * is a good way to use the principles of modularity and build higher levels of - * abstraction within a program. - */ - -EggRing er1, er2; - -void setup() -{ - size(200, 200); - smooth(); - er1 = new EggRing(66, 132, 0.1, 66); - er2 = new EggRing(132, 180, 0.05, 132); -} - -void draw() -{ - background(0); - er1.transmit(); - er2.transmit(); -} - -class EggRing -{ - Egg ovoid; - Ring circle = new Ring(); - EggRing(int x, int y, float t, float sp) { - ovoid = new Egg(x, y, t, sp); - circle.start(x, y - sp/2); - } - void transmit() { - ovoid.wobble(); - ovoid.display(); - circle.grow(); - circle.display(); - if (circle.on == false) { - circle.on = true; - } - } -} - -class Egg { - float x, y; // X-coordinate, y-coordinate - float tilt; // Left and right angle offset - float angle; // Used to define the tilt - float scalar; // Height of the egg - // Constructor - Egg(int xpos, int ypos, float t, float s) { - x = xpos; - y = ypos; - tilt = t; - scalar = s / 100.0; - } - void wobble() { - tilt = cos(angle) / 8; - angle += 0.1; - } - void display() { - noStroke(); - fill(255); - pushMatrix(); - translate(x, y); - rotate(tilt); - scale(scalar); - beginShape(); - vertex(0, -100); - bezierVertex(25, -100, 40, -65, 40, -40); - bezierVertex(40, -15, 25, 0, 0, 0); - bezierVertex(-25, 0, -40, -15, -40, -40); - bezierVertex(-40, -65, -25, -100, 0, -100); - endShape(); - popMatrix(); - } -} - -class Ring { - float x, y; // X-coordinate, y-coordinate - float diameter; // Diameter of the ring - boolean on = false; // Turns the display on and off - void start(float xpos, float ypos) { - x = xpos; - y = ypos; - on = true; - diameter = 1; - } - void grow() { - if (on == true) { - diameter += 0.5; - if (diameter > width*2) { - diameter = 0.0; - } - } - } - void display() { - if (on == true) { - noFill(); - strokeWeight(4); - stroke(155, 153); - ellipse(x, y, diameter, diameter); - } - } -} diff --git a/java/examples/Basics/Objects/CompositeObjects/applet/loading.gif b/java/examples/Basics/Objects/CompositeObjects/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*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FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Objects/Inheritance/applet/Inheritance.java b/java/examples/Basics/Objects/Inheritance/applet/Inheritance.java deleted file mode 100644 index 6b517719f..000000000 --- a/java/examples/Basics/Objects/Inheritance/applet/Inheritance.java +++ /dev/null @@ -1,98 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Inheritance extends PApplet { - -/** - * Inheritance - * - * A class can be defined using another class as a foundation. In object-oriented - * programming terminology, one class can inherit fi elds and methods from another. - * An object that inherits from another is called a subclass, and the object it - * inherits from is called a superclass. A subclass extends the superclass. - */ - -SpinSpots spots; -SpinArm arm; - -public void setup() -{ - size(200, 200); - smooth(); - arm = new SpinArm(width/2, height/2, 0.01f); - spots = new SpinSpots(width/2, height/2, -0.02f, 33.0f); -} - -public void draw() -{ - background(204); - arm.update(); - arm.display(); - spots.update(); - spots.display(); -} - -class Spin -{ - float x, y, speed; - float angle = 0.0f; - Spin(float xpos, float ypos, float s) { - x = xpos; - y = ypos; - speed = s; - } - public void update() { - angle += speed; - } -} - -class SpinArm extends Spin -{ - SpinArm(float x, float y, float s) { - super(x, y, s); - } - public void display() { - strokeWeight(1); - stroke(0); - pushMatrix(); - translate(x, y); - angle += speed; - rotate(angle); - line(0, 0, 66, 0); - popMatrix(); - } -} - -class SpinSpots extends Spin -{ - float dim; - SpinSpots(float x, float y, float s, float d) { - super(x, y, s); - dim = d; - } - public void display() { - noStroke(); - pushMatrix(); - translate(x, y); - angle += speed; - rotate(angle); - ellipse(-dim/2, 0, dim, dim); - ellipse(dim/2, 0, dim, dim); - popMatrix(); - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Inheritance" }); - } -} diff --git a/java/examples/Basics/Objects/Inheritance/applet/Inheritance.pde b/java/examples/Basics/Objects/Inheritance/applet/Inheritance.pde deleted file mode 100644 index 6c4af0bc8..000000000 --- a/java/examples/Basics/Objects/Inheritance/applet/Inheritance.pde +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Inheritance - * - * A class can be defined using another class as a foundation. In object-oriented - * programming terminology, one class can inherit fi elds and methods from another. - * An object that inherits from another is called a subclass, and the object it - * inherits from is called a superclass. A subclass extends the superclass. - */ - -SpinSpots spots; -SpinArm arm; - -void setup() -{ - size(200, 200); - smooth(); - arm = new SpinArm(width/2, height/2, 0.01); - spots = new SpinSpots(width/2, height/2, -0.02, 33.0); -} - -void draw() -{ - background(204); - arm.update(); - arm.display(); - spots.update(); - spots.display(); -} - -class Spin -{ - float x, y, speed; - float angle = 0.0; - Spin(float xpos, float ypos, float s) { - x = xpos; - y = ypos; - speed = s; - } - void update() { - angle += speed; - } -} - -class SpinArm extends Spin -{ - SpinArm(float x, float y, float s) { - super(x, y, s); - } - void display() { - strokeWeight(1); - stroke(0); - pushMatrix(); - translate(x, y); - angle += speed; - rotate(angle); - line(0, 0, 66, 0); - popMatrix(); - } -} - -class SpinSpots extends Spin -{ - float dim; - SpinSpots(float x, float y, float s, float d) { - super(x, y, s); - dim = d; - } - void display() { - noStroke(); - pushMatrix(); - translate(x, y); - angle += speed; - rotate(angle); - ellipse(-dim/2, 0, dim, dim); - ellipse(dim/2, 0, dim, dim); - popMatrix(); - } -} diff --git a/java/examples/Basics/Objects/Inheritance/applet/loading.gif b/java/examples/Basics/Objects/Inheritance/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`t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w-$ diff --git a/java/examples/Basics/Objects/MultipleConstructors/applet/MultipleConstructors.java b/java/examples/Basics/Objects/MultipleConstructors/applet/MultipleConstructors.java deleted file mode 100644 index db8031348..000000000 --- a/java/examples/Basics/Objects/MultipleConstructors/applet/MultipleConstructors.java +++ /dev/null @@ -1,67 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class MultipleConstructors extends PApplet { - -/** - * Multiple constructors - * - * A class can have multiple constructors that assign the fields in different ways. - * Sometimes it's beneficial to specify every aspect of an object's data by assigning - * parameters to the fields, but other times it might be appropriate to define only - * one or a few. - */ - -Spot sp1, sp2; -public void setup() -{ - size(200, 200); - background(204); - smooth(); - noLoop(); - // Run the constructor without parameters - sp1 = new Spot(); - // Run the constructor with three parameters - sp2 = new Spot(122, 100, 40); -} - -public void draw() { - sp1.display(); - sp2.display(); -} - -class Spot { - float x, y, radius; - // First version of the Spot constructor; - // the fields are assigned default values - Spot() { - x = 66; - y = 100; - radius = 16; - } - // Second version of the Spot constructor; - // the fields are assigned with parameters - Spot(float xpos, float ypos, float r) { - x = xpos; - y = ypos; - radius = r; - } - public void display() { - ellipse(x, y, radius*2, radius*2); - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "MultipleConstructors" }); - } -} diff --git a/java/examples/Basics/Objects/MultipleConstructors/applet/MultipleConstructors.pde b/java/examples/Basics/Objects/MultipleConstructors/applet/MultipleConstructors.pde deleted file mode 100644 index fd57edbfd..000000000 --- a/java/examples/Basics/Objects/MultipleConstructors/applet/MultipleConstructors.pde +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Multiple constructors - * - * A class can have multiple constructors that assign the fields in different ways. - * Sometimes it's beneficial to specify every aspect of an object's data by assigning - * parameters to the fields, but other times it might be appropriate to define only - * one or a few. - */ - -Spot sp1, sp2; -void setup() -{ - size(200, 200); - background(204); - smooth(); - noLoop(); - // Run the constructor without parameters - sp1 = new Spot(); - // Run the constructor with three parameters - sp2 = new Spot(122, 100, 40); -} - -void draw() { - sp1.display(); - sp2.display(); -} - -class Spot { - float x, y, radius; - // First version of the Spot constructor; - // the fields are assigned default values - Spot() { - x = 66; - y = 100; - radius = 16; - } - // Second version of the Spot constructor; - // the fields are assigned with parameters - Spot(float xpos, float ypos, float r) { - x = xpos; - y = ypos; - radius = r; - } - void display() { - ellipse(x, y, radius*2, radius*2); - } -} diff --git a/java/examples/Basics/Objects/MultipleConstructors/applet/loading.gif b/java/examples/Basics/Objects/MultipleConstructors/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh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uzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Objects/Neighborhood/applet/Neighborhood.java b/java/examples/Basics/Objects/Neighborhood/applet/Neighborhood.java deleted file mode 100644 index d6646893c..000000000 --- a/java/examples/Basics/Objects/Neighborhood/applet/Neighborhood.java +++ /dev/null @@ -1,323 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Neighborhood extends PApplet { - -/** - * Neighborhood (OOP Example) - * By Ira Greenberg - * - * Draw a neighborhood of houses using - * Door, Window, Roof and House classes. - * Good example of class composition, with component - * Door, Window, Roof class references encapsulated - * within House class. This arrangement allows - * House class to handle placement and sizing of - * its components, while still allowing user - * customization of the individual components. - */ - -public void setup(){ - size(200, 200); - background(190); - smooth(); - // Ground plane - int groundHeight = 10; - fill(0); - rect(0, height-groundHeight, width, groundHeight); - fill(255); - - // Center the houses - translate(12, 0); - - // Houses - Door door1 = new Door(20, 40); - Window window1 = new Window(50, 62, false, Window.DOUBLE); - Roof roof1 = new Roof(Roof.DOME); - House house1 = new House(75, 75, door1, window1, roof1, House.MIDDLE_DOOR); - house1.drawHouse(0, height-groundHeight-house1.h, true); - - Door door2 = new Door(20, 40); - Window window2 = new Window(50, 62, true, Window.QUAD); - Roof roof2 = new Roof(Roof.GAMBREL); - House house2 = new House(100, 60, door2, window2, roof2, House.LEFT_DOOR); - house2.drawHouse(house1.x + house1.w, height-groundHeight-house2.h, true); -} - -class Door{ - //door properties - int x; - int y; - int w; - int h; - - // for knob - int knobLoc = 1; - //constants - final static int RT = 0; - final static int LFT = 1; - - // constructor - Door(int w, int h){ - this.w = w; - this.h = h; - } - - // draw the door - public void drawDoor(int x, int y) { - rect(x, y, w, h); - int knobsize = w/10; - if (knobLoc == 0){ - //right side - ellipse(x+w-knobsize, y+h/2, knobsize, knobsize); - } - else { - //left side - ellipse(x+knobsize, y+h/2, knobsize, knobsize); - } - } - - // set knob position - public void setKnob(int knobLoc){ - this. knobLoc = knobLoc; - } -} - -class Window{ - //window properties - int x; - int y; - int w; - int h; - - // customized features - boolean hasSash = false; - - // single, double, quad pane - int style = 0; - //constants - final static int SINGLE = 0; - final static int DOUBLE = 1; - final static int QUAD = 2; - - // constructor 1 - Window(int w, int h){ - this.w = w; - this.h = h; - } - // constructor 2 - Window(int w, int h, int style){ - this.w = w; - this.h = h; - this.style = style; - } - // constructor 3 - Window(int w, int h, boolean hasSash, int style){ - this.w = w; - this.h = h; - this.hasSash = hasSash; - this.style = style; - } - - // draw the window - public void drawWindow(int x, int y) { - //local variables - int margin = 0; - int winHt = 0; - int winWdth = 0; - - if (hasSash){ - margin = w/15; - } - - switch(style){ - case 0: - //outer window (sash) - rect(x, y, w, h); - //inner window - rect(x+margin, y+margin, w-margin*2, h-margin*2); - break; - case 1: - winHt = (h-margin*3)/2; - //outer window (sash) - rect(x, y, w, h); - //inner window (top) - rect(x+margin, y+margin, w-margin*2, winHt); - //inner windows (bottom) - rect(x+margin, y+winHt+margin*2, w-margin*2, winHt); - break; - case 2: - winWdth = (w-margin*3)/2; - winHt = (h-margin*3)/2; - //outer window (sash) - rect(x, y, w, h); - //inner window (top-left) - rect(x+margin, y+margin, winWdth, winHt); - //inner window (top-right) - rect(x+winWdth+margin*2, y+margin, winWdth, winHt); - //inner windows (bottom-left) - rect(x+margin, y+winHt+margin*2, winWdth, winHt); - //inner windows (bottom-right) - rect(x+winWdth+margin*2, y+winHt+margin*2, winWdth, winHt); - break; - } - } - - // set window style (number of panes) - public void setStyle(int style){ - this.style = style; - } -} - -class Roof{ - //roof properties - int x; - int y; - int w; - int h; - - // roof style - int style = 0; - //constants - final static int CATHEDRAL = 0; - final static int GAMBREL = 1; - final static int DOME = 2; - - // default constructor - Roof(){ - } - - // constructor 2 - Roof(int style){ - this.style = style; - } - - // draw the roof - public void drawRoof(int x, int y, int w, int h) { - switch(style){ - case 0: - beginShape(); - vertex(x, y); - vertex(x+w/2, y-h/3); - vertex(x+w, y); - endShape(CLOSE); - break; - case 1: - beginShape(); - vertex(x, y); - vertex(x+w/7, y-h/4); - vertex(x+w/2, y-h/2); - vertex(x+(w-w/7), y-h/4); - vertex(x+w, y); - endShape(CLOSE); - break; - case 2: - ellipseMode(CORNER); - arc(x, y-h/2, w, h, PI, TWO_PI); - line(x, y, x+w, y); - break; - } - - } - - // set roof style - public void setStyle(int style){ - this.style = style; - } -} - -class House{ - //house properties - int x; - int y; - int w; - int h; - - //component reference variables - Door door; - Window window; - Roof roof; - - //optional autosize variable - boolean AutoSizeComponents = false; - - //door placement - int doorLoc = 0; - //constants - final static int MIDDLE_DOOR = 0; - final static int LEFT_DOOR = 1; - final static int RIGHT_DOOR = 2; - - //constructor - House(int w, int h, Door door, Window window, Roof roof, int doorLoc) { - this.w = w; - this.h = h; - this.door = door; - this.window = window; - this.roof = roof; - this.doorLoc = doorLoc; - } - - public void drawHouse(int x, int y, boolean AutoSizeComponents) { - this.x = x; - this.y =y; - this.AutoSizeComponents = AutoSizeComponents; - - //automatically sizes doors and windows - if(AutoSizeComponents){ - //autosize door - door.h = h/4; - door.w = door.h/2; - - //autosize windows - window.h = h/3; - window.w = window.h/2; - - } - // draw bldg block - rect(x, y, w, h); - - // draw door - switch(doorLoc){ - case 0: - door.drawDoor(x+w/2-door.w/2, y+h-door.h); - break; - case 1: - door.drawDoor(x+w/8, y+h-door.h); - break; - case 2: - door.drawDoor(x+w-w/8-door.w, y+h-door.h); - break; - } - - // draw windows - int windowMargin = (w-window.w*2)/3; - window.drawWindow(x+windowMargin, y+h/6); - window.drawWindow(x+windowMargin*2+window.w, y+h/6); - - // draw roof - roof.drawRoof(x, y, w, h); - } - - // catch drawHouse method without boolean argument - public void drawHouse(int x, int y){ - // recall with required 3rd argument - drawHouse(x, y, false); - } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Neighborhood" }); - } -} diff --git a/java/examples/Basics/Objects/Neighborhood/applet/Neighborhood.pde b/java/examples/Basics/Objects/Neighborhood/applet/Neighborhood.pde deleted file mode 100644 index f70893d25..000000000 --- a/java/examples/Basics/Objects/Neighborhood/applet/Neighborhood.pde +++ /dev/null @@ -1,303 +0,0 @@ -/** - * Neighborhood (OOP Example) - * By Ira Greenberg - * - * Draw a neighborhood of houses using - * Door, Window, Roof and House classes. - * Good example of class composition, with component - * Door, Window, Roof class references encapsulated - * within House class. This arrangement allows - * House class to handle placement and sizing of - * its components, while still allowing user - * customization of the individual components. - */ - -void setup(){ - size(200, 200); - background(190); - smooth(); - // Ground plane - int groundHeight = 10; - fill(0); - rect(0, height-groundHeight, width, groundHeight); - fill(255); - - // Center the houses - translate(12, 0); - - // Houses - Door door1 = new Door(20, 40); - Window window1 = new Window(50, 62, false, Window.DOUBLE); - Roof roof1 = new Roof(Roof.DOME); - House house1 = new House(75, 75, door1, window1, roof1, House.MIDDLE_DOOR); - house1.drawHouse(0, height-groundHeight-house1.h, true); - - Door door2 = new Door(20, 40); - Window window2 = new Window(50, 62, true, Window.QUAD); - Roof roof2 = new Roof(Roof.GAMBREL); - House house2 = new House(100, 60, door2, window2, roof2, House.LEFT_DOOR); - house2.drawHouse(house1.x + house1.w, height-groundHeight-house2.h, true); -} - -class Door{ - //door properties - int x; - int y; - int w; - int h; - - // for knob - int knobLoc = 1; - //constants - final static int RT = 0; - final static int LFT = 1; - - // constructor - Door(int w, int h){ - this.w = w; - this.h = h; - } - - // draw the door - void drawDoor(int x, int y) { - rect(x, y, w, h); - int knobsize = w/10; - if (knobLoc == 0){ - //right side - ellipse(x+w-knobsize, y+h/2, knobsize, knobsize); - } - else { - //left side - ellipse(x+knobsize, y+h/2, knobsize, knobsize); - } - } - - // set knob position - void setKnob(int knobLoc){ - this. knobLoc = knobLoc; - } -} - -class Window{ - //window properties - int x; - int y; - int w; - int h; - - // customized features - boolean hasSash = false; - - // single, double, quad pane - int style = 0; - //constants - final static int SINGLE = 0; - final static int DOUBLE = 1; - final static int QUAD = 2; - - // constructor 1 - Window(int w, int h){ - this.w = w; - this.h = h; - } - // constructor 2 - Window(int w, int h, int style){ - this.w = w; - this.h = h; - this.style = style; - } - // constructor 3 - Window(int w, int h, boolean hasSash, int style){ - this.w = w; - this.h = h; - this.hasSash = hasSash; - this.style = style; - } - - // draw the window - void drawWindow(int x, int y) { - //local variables - int margin = 0; - int winHt = 0; - int winWdth = 0; - - if (hasSash){ - margin = w/15; - } - - switch(style){ - case 0: - //outer window (sash) - rect(x, y, w, h); - //inner window - rect(x+margin, y+margin, w-margin*2, h-margin*2); - break; - case 1: - winHt = (h-margin*3)/2; - //outer window (sash) - rect(x, y, w, h); - //inner window (top) - rect(x+margin, y+margin, w-margin*2, winHt); - //inner windows (bottom) - rect(x+margin, y+winHt+margin*2, w-margin*2, winHt); - break; - case 2: - winWdth = (w-margin*3)/2; - winHt = (h-margin*3)/2; - //outer window (sash) - rect(x, y, w, h); - //inner window (top-left) - rect(x+margin, y+margin, winWdth, winHt); - //inner window (top-right) - rect(x+winWdth+margin*2, y+margin, winWdth, winHt); - //inner windows (bottom-left) - rect(x+margin, y+winHt+margin*2, winWdth, winHt); - //inner windows (bottom-right) - rect(x+winWdth+margin*2, y+winHt+margin*2, winWdth, winHt); - break; - } - } - - // set window style (number of panes) - void setStyle(int style){ - this.style = style; - } -} - -class Roof{ - //roof properties - int x; - int y; - int w; - int h; - - // roof style - int style = 0; - //constants - final static int CATHEDRAL = 0; - final static int GAMBREL = 1; - final static int DOME = 2; - - // default constructor - Roof(){ - } - - // constructor 2 - Roof(int style){ - this.style = style; - } - - // draw the roof - void drawRoof(int x, int y, int w, int h) { - switch(style){ - case 0: - beginShape(); - vertex(x, y); - vertex(x+w/2, y-h/3); - vertex(x+w, y); - endShape(CLOSE); - break; - case 1: - beginShape(); - vertex(x, y); - vertex(x+w/7, y-h/4); - vertex(x+w/2, y-h/2); - vertex(x+(w-w/7), y-h/4); - vertex(x+w, y); - endShape(CLOSE); - break; - case 2: - ellipseMode(CORNER); - arc(x, y-h/2, w, h, PI, TWO_PI); - line(x, y, x+w, y); - break; - } - - } - - // set roof style - void setStyle(int style){ - this.style = style; - } -} - -class House{ - //house properties - int x; - int y; - int w; - int h; - - //component reference variables - Door door; - Window window; - Roof roof; - - //optional autosize variable - boolean AutoSizeComponents = false; - - //door placement - int doorLoc = 0; - //constants - final static int MIDDLE_DOOR = 0; - final static int LEFT_DOOR = 1; - final static int RIGHT_DOOR = 2; - - //constructor - House(int w, int h, Door door, Window window, Roof roof, int doorLoc) { - this.w = w; - this.h = h; - this.door = door; - this.window = window; - this.roof = roof; - this.doorLoc = doorLoc; - } - - void drawHouse(int x, int y, boolean AutoSizeComponents) { - this.x = x; - this.y =y; - this.AutoSizeComponents = AutoSizeComponents; - - //automatically sizes doors and windows - if(AutoSizeComponents){ - //autosize door - door.h = h/4; - door.w = door.h/2; - - //autosize windows - window.h = h/3; - window.w = window.h/2; - - } - // draw bldg block - rect(x, y, w, h); - - // draw door - switch(doorLoc){ - case 0: - door.drawDoor(x+w/2-door.w/2, y+h-door.h); - break; - case 1: - door.drawDoor(x+w/8, y+h-door.h); - break; - case 2: - door.drawDoor(x+w-w/8-door.w, y+h-door.h); - break; - } - - // draw windows - int windowMargin = (w-window.w*2)/3; - window.drawWindow(x+windowMargin, y+h/6); - window.drawWindow(x+windowMargin*2+window.w, y+h/6); - - // draw roof - roof.drawRoof(x, y, w, h); - } - - // catch drawHouse method without boolean argument - void drawHouse(int x, int y){ - // recall with required 3rd argument - drawHouse(x, y, false); - } -} - diff --git a/java/examples/Basics/Objects/Neighborhood/applet/loading.gif b/java/examples/Basics/Objects/Neighborhood/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#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NvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Objects/Objects/applet/Objects.java b/java/examples/Basics/Objects/Objects/applet/Objects.java deleted file mode 100644 index 88f03739f..000000000 --- a/java/examples/Basics/Objects/Objects/applet/Objects.java +++ /dev/null @@ -1,91 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Objects extends PApplet { - -/** - * Objects - * by hbarragan. - * - * Move the cursor across the image to change the speed and positions - * of the geometry. The class MRect defines a group of lines. - */ - -MRect r1, r2, r3, r4; - -public void setup() -{ - size(200, 200); - fill(255, 204); - noStroke(); - r1 = new MRect(1, 134.0f, 0.532f, 0.083f*height, 10.0f, 60.0f); - r2 = new MRect(2, 44.0f, 0.166f, 0.332f*height, 5.0f, 50.0f); - r3 = new MRect(2, 58.0f, 0.332f, 0.4482f*height, 10.0f, 35.0f); - r4 = new MRect(1, 120.0f, 0.0498f, 0.913f*height, 15.0f, 60.0f); -} - -public void draw() -{ - background(0); - - r1.display(); - r2.display(); - r3.display(); - r4.display(); - - r1.move(mouseX-(width/2), mouseY+(height*0.1f), 30); - r2.move((mouseX+(width*0.05f))%width, mouseY+(height*0.025f), 20); - r3.move(mouseX/4, mouseY-(height*0.025f), 40); - r4.move(mouseX-(width/2), (height-mouseY), 50); -} - -class MRect -{ - int w; // single bar width - float xpos; // rect xposition - float h; // rect height - float ypos ; // rect yposition - float d; // single bar distance - float t; // number of bars - - MRect(int iw, float ixp, float ih, float iyp, float id, float it) { - w = iw; - xpos = ixp; - h = ih; - ypos = iyp; - d = id; - t = it; - } - - public void move (float posX, float posY, float damping) { - float dif = ypos - posY; - if (abs(dif) > 1) { - ypos -= dif/damping; - } - dif = xpos - posX; - if (abs(dif) > 1) { - xpos -= dif/damping; - } - } - - public void display() { - for (int i=0; i 1) { - ypos -= dif/damping; - } - dif = xpos - posX; - if (abs(dif) > 1) { - xpos -= dif/damping; - } - } - - void display() { - for (int i=0; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG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)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Shape/DisableStyle/applet/DisableStyle.java b/java/examples/Basics/Shape/DisableStyle/applet/DisableStyle.java deleted file mode 100644 index 14a716f4c..000000000 --- a/java/examples/Basics/Shape/DisableStyle/applet/DisableStyle.java +++ /dev/null @@ -1,55 +0,0 @@ -import processing.core.*; -import processing.xml.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class DisableStyle extends PApplet { - -/** - * Ignore Styles. - * Illustration by George Brower. - * - * Shapes are loaded with style information that tells them how - * to draw (the color, stroke weight, etc.) The disableStyle() - * method of PShape turns off this information. The enableStyle() - * method turns it back on. - */ - -PShape bot; - -public void setup() { - size(640, 360); - smooth(); - // The file "bot1.svg" must be in the data folder - // of the current sketch to load successfully - bot = loadShape("bot1.svg"); - noLoop(); -} - -public void draw() { - background(102); - - // Draw left bot - bot.disableStyle(); // Ignore the colors in the SVG - fill(0, 102, 153); // Set the SVG fill to blue - stroke(255); // Set the SVG fill to white - shape(bot, 20, 25, 300, 300); - - // Draw right bot - bot.enableStyle(); - shape(bot, 320, 25, 300, 300); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "DisableStyle" }); - } -} diff --git a/java/examples/Basics/Shape/DisableStyle/applet/DisableStyle.pde b/java/examples/Basics/Shape/DisableStyle/applet/DisableStyle.pde deleted file mode 100644 index 656132ce2..000000000 --- a/java/examples/Basics/Shape/DisableStyle/applet/DisableStyle.pde +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Ignore Styles. - * Illustration by George Brower. - * - * Shapes are loaded with style information that tells them how - * to draw (the color, stroke weight, etc.) The disableStyle() - * method of PShape turns off this information. The enableStyle() - * method turns it back on. - */ - -PShape bot; - -void setup() { - size(640, 360); - smooth(); - // The file "bot1.svg" must be in the data folder - // of the current sketch to load successfully - bot = loadShape("bot1.svg"); - noLoop(); -} - -void draw() { - background(102); - - // Draw left bot - bot.disableStyle(); // Ignore the colors in the SVG - fill(0, 102, 153); // Set the SVG fill to blue - stroke(255); // Set the SVG fill to white - shape(bot, 20, 25, 300, 300); - - // Draw right bot - bot.enableStyle(); - shape(bot, 320, 25, 300, 300); -} diff --git a/java/examples/Basics/Shape/DisableStyle/applet/loading.gif b/java/examples/Basics/Shape/DisableStyle/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&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| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Shape/GetChild/applet/GetChild.java b/java/examples/Basics/Shape/GetChild/applet/GetChild.java deleted file mode 100644 index 2854fbb45..000000000 --- a/java/examples/Basics/Shape/GetChild/applet/GetChild.java +++ /dev/null @@ -1,66 +0,0 @@ -import processing.core.*; -import processing.xml.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class GetChild extends PApplet { - -/** - * Get Child. - * - * SVG files can be made of many individual shapes. - * Each of these shapes (called a "child") has its own name - * that can be used to extract it from the "parent" file. - * This example loads a map of the United States and creates - * two new PShape objects by extracting the data from two states. - */ - -PShape usa; -PShape michigan; -PShape ohio; - -public void setup() { - size(640, 360); - usa = loadShape("usa-wikipedia.svg"); - michigan = usa.getChild("MI"); - ohio = usa.getChild("OH"); - smooth(); // Improves the drawing quality of the SVG - noLoop(); -} - -public void draw() { - background(255); - - // Draw the full map - shape(usa, -600, -180); - - // Disable the colors found in the SVG file - michigan.disableStyle(); - // Set our own coloring - fill(0, 51, 102); - noStroke(); - // Draw a single state - shape(michigan, -600, -180); // Boo Wolverines! - - // Disable the colors found in the SVG file - ohio.disableStyle(); - // Set our own coloring - fill(153, 0, 0); - noStroke(); - // Draw a single state - shape(ohio, -600, -180); // Go Buckeyes! -} - - static public void main(String args[]) { - PApplet.main(new String[] { "GetChild" }); - } -} diff --git a/java/examples/Basics/Shape/GetChild/applet/GetChild.pde b/java/examples/Basics/Shape/GetChild/applet/GetChild.pde deleted file mode 100644 index 0e1e69407..000000000 --- a/java/examples/Basics/Shape/GetChild/applet/GetChild.pde +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Get Child. - * - * SVG files can be made of many individual shapes. - * Each of these shapes (called a "child") has its own name - * that can be used to extract it from the "parent" file. - * This example loads a map of the United States and creates - * two new PShape objects by extracting the data from two states. - */ - -PShape usa; -PShape michigan; -PShape ohio; - -void setup() { - size(640, 360); - usa = loadShape("usa-wikipedia.svg"); - michigan = usa.getChild("MI"); - ohio = usa.getChild("OH"); - smooth(); // Improves the drawing quality of the SVG - noLoop(); -} - -void draw() { - background(255); - - // Draw the full map - shape(usa, -600, -180); - - // Disable the colors found in the SVG file - michigan.disableStyle(); - // Set our own coloring - fill(0, 51, 102); - noStroke(); - // Draw a single state - shape(michigan, -600, -180); // Boo Wolverines! - - // Disable the colors found in the SVG file - ohio.disableStyle(); - // Set our own coloring - fill(153, 0, 0); - noStroke(); - // Draw a single state - shape(ohio, -600, -180); // Go Buckeyes! -} diff --git a/java/examples/Basics/Shape/GetChild/applet/loading.gif b/java/examples/Basics/Shape/GetChild/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`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f*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Shape/LoadDisplayShape/applet/LoadDisplayShape.java b/java/examples/Basics/Shape/LoadDisplayShape/applet/LoadDisplayShape.java deleted file mode 100644 index f7dc4e0af..000000000 --- a/java/examples/Basics/Shape/LoadDisplayShape/applet/LoadDisplayShape.java +++ /dev/null @@ -1,47 +0,0 @@ -import processing.core.*; -import processing.xml.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class LoadDisplayShape extends PApplet { - -/** - * Load and Display a Shape. - * Illustration by George Brower. - * - * The loadShape() command is used to read simple SVG (Scalable Vector Graphics) - * files into a Processing sketch. This library was specifically tested under - * SVG files created from Adobe Illustrator. For now, we can't guarantee that - * it'll work for SVGs created with anything else. - */ - -PShape bot; - -public void setup() { - size(640, 360); - smooth(); - // The file "bot1.svg" must be in the data folder - // of the current sketch to load successfully - bot = loadShape("bot1.svg"); - noLoop(); // Only run draw() once -} - -public void draw(){ - background(102); - shape(bot, 110, 90, 100, 100); // Draw at coordinate (10, 10) at size 100 x 100 - shape(bot, 280, 40); // Draw at coordinate (70, 60) at the default size -} - - static public void main(String args[]) { - PApplet.main(new String[] { "LoadDisplayShape" }); - } -} diff --git a/java/examples/Basics/Shape/LoadDisplayShape/applet/LoadDisplayShape.pde b/java/examples/Basics/Shape/LoadDisplayShape/applet/LoadDisplayShape.pde deleted file mode 100644 index 3d18b4b4a..000000000 --- a/java/examples/Basics/Shape/LoadDisplayShape/applet/LoadDisplayShape.pde +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Load and Display a Shape. - * Illustration by George Brower. - * - * The loadShape() command is used to read simple SVG (Scalable Vector Graphics) - * files into a Processing sketch. This library was specifically tested under - * SVG files created from Adobe Illustrator. For now, we can't guarantee that - * it'll work for SVGs created with anything else. - */ - -PShape bot; - -void setup() { - size(640, 360); - smooth(); - // The file "bot1.svg" must be in the data folder - // of the current sketch to load successfully - bot = loadShape("bot1.svg"); - noLoop(); // Only run draw() once -} - -void draw(){ - background(102); - shape(bot, 110, 90, 100, 100); // Draw at coordinate (10, 10) at size 100 x 100 - shape(bot, 280, 40); // Draw at coordinate (70, 60) at the default size -} diff --git a/java/examples/Basics/Shape/LoadDisplayShape/applet/loading.gif b/java/examples/Basics/Shape/LoadDisplayShape/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#j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kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Shape/ScaleShape/applet/ScaleShape.java b/java/examples/Basics/Shape/ScaleShape/applet/ScaleShape.java deleted file mode 100644 index 3a6aa5e19..000000000 --- a/java/examples/Basics/Shape/ScaleShape/applet/ScaleShape.java +++ /dev/null @@ -1,47 +0,0 @@ -import processing.core.*; -import processing.xml.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class ScaleShape extends PApplet { - -/** - * Scale Shape. - * Illustration by George Brower. - * - * Move the mouse left and right to zoom the SVG file. - * This shows how, unlike an imported image, the lines - * remain smooth at any size. - */ - -PShape bot; - -public void setup() { - size(640, 360); - smooth(); - // The file "bot1.svg" must be in the data folder - // of the current sketch to load successfully - bot = loadShape("bot1.svg"); -} - -public void draw() { - background(102); - translate(width/2, height/2); - float zoom = map(mouseX, 0, width, 0.1f, 4.5f); - scale(zoom); - shape(bot, -140, -140); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "ScaleShape" }); - } -} diff --git a/java/examples/Basics/Shape/ScaleShape/applet/ScaleShape.pde b/java/examples/Basics/Shape/ScaleShape/applet/ScaleShape.pde deleted file mode 100644 index 879f20b68..000000000 --- a/java/examples/Basics/Shape/ScaleShape/applet/ScaleShape.pde +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Scale Shape. - * Illustration by George Brower. - * - * Move the mouse left and right to zoom the SVG file. - * This shows how, unlike an imported image, the lines - * remain smooth at any size. - */ - -PShape bot; - -void setup() { - size(640, 360); - smooth(); - // The file "bot1.svg" must be in the data folder - // of the current sketch to load successfully - bot = loadShape("bot1.svg"); -} - -void draw() { - background(102); - translate(width/2, height/2); - float zoom = map(mouseX, 0, width, 0.1, 4.5); - scale(zoom); - shape(bot, -140, -140); -} diff --git a/java/examples/Basics/Shape/ScaleShape/applet/loading.gif b/java/examples/Basics/Shape/ScaleShape/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Structure/Coordinates/applet/Coordinates.java b/java/examples/Basics/Structure/Coordinates/applet/Coordinates.java deleted file mode 100644 index cc173b9aa..000000000 --- a/java/examples/Basics/Structure/Coordinates/applet/Coordinates.java +++ /dev/null @@ -1,62 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Coordinates extends PApplet { - public void setup() {/** - * Coordinates. - * - * All shapes drawn to the screen have a position that is specified as a coordinate. - * All coordinates are measured as the distance from the origin in units of pixels. - * The origin [0, 0] is the coordinate is in the upper left of the window - * and the coordinate in the lower right is [width-1, height-1]. - */ - -// Sets the screen to be 200, 200, so the width of the window is 200 pixels -// and the height of the window is 200 pixels -size(200, 200); -background(0); -noFill(); -stroke(255); - -// The two parameters of the point() method each specify coordinates. -// This call to point() draws at the position [100, 100] -point(width/2, height/2); - -// Draws to the position [100, 50] -point(width/2, height/4); - -// It is also possible to specify a point with any parameter, -// but only coordinates on the screen are visible -point(60, 30); -point(60, 134); -point(160, 50); -point(280, -800); -point(201, 100); - -// Coordinates are used for drawing all shapes, not just points. -// Parameters for different methods are used for different purposes. -// For example, the first two parameters to line() specify the coordinates of the -// first point and the second two parameters specify the second point -stroke(204); -line(0, 73, width, 73); - -// The first two parameters to rect() are coordinates -// and the second two are the width and height -rect(110, 55, 40, 36); - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "Coordinates" }); - } -} diff --git a/java/examples/Basics/Structure/Coordinates/applet/Coordinates.pde b/java/examples/Basics/Structure/Coordinates/applet/Coordinates.pde deleted file mode 100644 index c63c147b7..000000000 --- a/java/examples/Basics/Structure/Coordinates/applet/Coordinates.pde +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Coordinates. - * - * All shapes drawn to the screen have a position that is specified as a coordinate. - * All coordinates are measured as the distance from the origin in units of pixels. - * The origin [0, 0] is the coordinate is in the upper left of the window - * and the coordinate in the lower right is [width-1, height-1]. - */ - -// Sets the screen to be 200, 200, so the width of the window is 200 pixels -// and the height of the window is 200 pixels -size(200, 200); -background(0); -noFill(); -stroke(255); - -// The two parameters of the point() method each specify coordinates. -// This call to point() draws at the position [100, 100] -point(width/2, height/2); - -// Draws to the position [100, 50] -point(width/2, height/4); - -// It is also possible to specify a point with any parameter, -// but only coordinates on the screen are visible -point(60, 30); -point(60, 134); -point(160, 50); -point(280, -800); -point(201, 100); - -// Coordinates are used for drawing all shapes, not just points. -// Parameters for different methods are used for different purposes. -// For example, the first two parameters to line() specify the coordinates of the -// first point and the second two parameters specify the second point -stroke(204); -line(0, 73, width, 73); - -// The first two parameters to rect() are coordinates -// and the second two are the width and height -rect(110, 55, 40, 36); diff --git a/java/examples/Basics/Structure/Coordinates/applet/loading.gif b/java/examples/Basics/Structure/Coordinates/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)m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ug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Structure/CreateGraphics/applet/CreateGraphics.java b/java/examples/Basics/Structure/CreateGraphics/applet/CreateGraphics.java deleted file mode 100644 index 8c2eaf6bb..000000000 --- a/java/examples/Basics/Structure/CreateGraphics/applet/CreateGraphics.java +++ /dev/null @@ -1,53 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class CreateGraphics extends PApplet { - -/** - * Create Graphics. - * - * The createGraphics() function creates an object from the PGraphics class - * (PGraphics is the main graphics and rendering context for Processing). - * The beginDraw() method is necessary to prepare for drawing and endDraw() is - * necessary to finish. Use this class if you need to draw into an off-screen - * graphics buffer or to maintain two contexts with different properties. - */ - -PGraphics pg; - -public void setup() { - size(200, 200); - pg = createGraphics(80, 80, P3D); -} - -public void draw() { - fill(0, 12); - rect(0, 0, width, height); - fill(255); - noStroke(); - ellipse(mouseX, mouseY, 60, 60); - - pg.beginDraw(); - pg.background(102); - pg.noFill(); - pg.stroke(255); - pg.ellipse(mouseX-60, mouseY-60, 60, 60); - pg.endDraw(); - - image(pg, 60, 60); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "CreateGraphics" }); - } -} diff --git a/java/examples/Basics/Structure/CreateGraphics/applet/CreateGraphics.pde b/java/examples/Basics/Structure/CreateGraphics/applet/CreateGraphics.pde deleted file mode 100644 index 5bd6710bb..000000000 --- a/java/examples/Basics/Structure/CreateGraphics/applet/CreateGraphics.pde +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Create Graphics. - * - * The createGraphics() function creates an object from the PGraphics class - * (PGraphics is the main graphics and rendering context for Processing). - * The beginDraw() method is necessary to prepare for drawing and endDraw() is - * necessary to finish. Use this class if you need to draw into an off-screen - * graphics buffer or to maintain two contexts with different properties. - */ - -PGraphics pg; - -void setup() { - size(200, 200); - pg = createGraphics(80, 80, P3D); -} - -void draw() { - fill(0, 12); - rect(0, 0, width, height); - fill(255); - noStroke(); - ellipse(mouseX, mouseY, 60, 60); - - pg.beginDraw(); - pg.background(102); - pg.noFill(); - pg.stroke(255); - pg.ellipse(mouseX-60, mouseY-60, 60, 60); - pg.endDraw(); - - image(pg, 60, 60); -} diff --git a/java/examples/Basics/Structure/CreateGraphics/applet/loading.gif b/java/examples/Basics/Structure/CreateGraphics/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLC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D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Structure/Functions/applet/Functions.java b/java/examples/Basics/Structure/Functions/applet/Functions.java deleted file mode 100644 index ab4ff45a2..000000000 --- a/java/examples/Basics/Structure/Functions/applet/Functions.java +++ /dev/null @@ -1,53 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Functions extends PApplet { - -/** - * Functions. - * - * The drawTarget() function makes it easy to draw many distinct targets. - * Each call to drawTarget() specifies the position, size, and number of - * rings for each target. - */ - -public void setup() -{ - size(200, 200); - background(51); - noStroke(); - smooth(); - noLoop(); -} - -public void draw() -{ - drawTarget(68, 34, 200, 10); - drawTarget(152, 16, 100, 3); - drawTarget(100, 144, 80, 5); -} - -public void drawTarget(int xloc, int yloc, int size, int num) -{ - float grayvalues = 255/num; - float steps = size/num; - for(int i=0; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cw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G%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Structure/Loop/applet/Loop.java b/java/examples/Basics/Structure/Loop/applet/Loop.java deleted file mode 100644 index 8ef7bc7d1..000000000 --- a/java/examples/Basics/Structure/Loop/applet/Loop.java +++ /dev/null @@ -1,60 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Loop extends PApplet { - -/** - * Loop. - * - * The loop() function causes draw() to execute - * continuously. If noLoop is called in setup() - * the draw() is only executed once. In this example - * click the mouse to execute loop(), which will - * cause the draw() the execute continuously. - */ - -// The statements in the setup() function -// execute once when the program begins -public void setup() -{ - size(200, 200); // Size should be the first statement - stroke(255); // Set stroke color to white - noLoop(); -} - -float y = 100; - -// The statements in draw() are run until the -// program is stopped. Each statement is run in -// sequence and after the last line is read, the first -// line is run again. -public void draw() -{ - background(0); // Set the background to black - line(0, y, width, y); - - y = y - 1; - if (y < 0) { - y = height; - } -} - -public void mousePressed() -{ - loop(); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Loop" }); - } -} diff --git a/java/examples/Basics/Structure/Loop/applet/Loop.pde b/java/examples/Basics/Structure/Loop/applet/Loop.pde deleted file mode 100644 index 0f6e96d01..000000000 --- a/java/examples/Basics/Structure/Loop/applet/Loop.pde +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Loop. - * - * The loop() function causes draw() to execute - * continuously. If noLoop is called in setup() - * the draw() is only executed once. In this example - * click the mouse to execute loop(), which will - * cause the draw() the execute continuously. - */ - -// The statements in the setup() function -// execute once when the program begins -void setup() -{ - size(200, 200); // Size should be the first statement - stroke(255); // Set stroke color to white - noLoop(); -} - -float y = 100; - -// The statements in draw() are run until the -// program is stopped. Each statement is run in -// sequence and after the last line is read, the first -// line is run again. -void draw() -{ - background(0); // Set the background to black - line(0, y, width, y); - - y = y - 1; - if (y < 0) { - y = height; - } -} - -void mousePressed() -{ - loop(); -} diff --git a/java/examples/Basics/Structure/Loop/applet/loading.gif b/java/examples/Basics/Structure/Loop/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa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ted file mode 100644 index 67681015b..000000000 --- a/java/examples/Basics/Structure/NoLoop/applet/NoLoop.java +++ /dev/null @@ -1,53 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class NoLoop extends PApplet { - -/** - * No Loop. - * - * The noLoop() function causes draw() to only - * execute once. Without calling noLoop(), draw() - * executed continually. - */ - -// The statements in the setup() function -// execute once when the program begins -public void setup() -{ - size(200, 200); // Size should be the first statement - stroke(255); // Set line drawing color to white - frameRate(30); - noLoop(); -} - -float y = 100; - -// The statements in draw() are executed until the -// program is stopped. Each statement is executed in -// sequence and after the last line is read, the first -// line is executed again. -public void draw() -{ - background(0); // Set the background to black - y = y - 1; - if (y < 0) { y = height; } - line(0, y, width, y); -} - - - - static public void main(String args[]) { - PApplet.main(new String[] { "NoLoop" }); - } -} diff --git a/java/examples/Basics/Structure/NoLoop/applet/NoLoop.pde b/java/examples/Basics/Structure/NoLoop/applet/NoLoop.pde deleted file mode 100644 index cb0d954d2..000000000 --- a/java/examples/Basics/Structure/NoLoop/applet/NoLoop.pde +++ /dev/null @@ -1,33 +0,0 @@ -/** - * No Loop. - * - * The noLoop() function causes draw() to only - * execute once. Without calling noLoop(), draw() - * executed continually. - */ - -// The statements in the setup() function -// execute once when the program begins -void setup() -{ - size(200, 200); // Size should be the first statement - stroke(255); // Set line drawing color to white - frameRate(30); - noLoop(); -} - -float y = 100; - -// The statements in draw() are executed until the -// program is stopped. Each statement is executed in -// sequence and after the last line is read, the first -// line is executed again. -void draw() -{ - background(0); // Set the background to black - y = y - 1; - if (y < 0) { y = height; } - line(0, y, width, y); -} - - diff --git a/java/examples/Basics/Structure/NoLoop/applet/loading.gif b/java/examples/Basics/Structure/NoLoop/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT bin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fcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Structure/Recursion/applet/Recursion.java b/java/examples/Basics/Structure/Recursion/applet/Recursion.java deleted file mode 100644 index c739d0b06..000000000 --- a/java/examples/Basics/Structure/Recursion/applet/Recursion.java +++ /dev/null @@ -1,52 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Recursion extends PApplet { - -/** - * Recursion. - * - * A demonstration of recursion, which means functions call themselves. - * Notice how the drawCircle() function calls itself at the end of its block. - * It continues to do this until the variable "level" is equal to 1. - */ - -public void setup() -{ - size(200, 200); - noStroke(); - smooth(); - noLoop(); -} - -public void draw() -{ - drawCircle(126, 170, 6); -} - -public void drawCircle(int x, int radius, int level) -{ - float tt = 126 * level/4.0f; - fill(tt); - ellipse(x, 100, radius*2, radius*2); - if(level > 1) { - level = level - 1; - drawCircle(x - radius/2, radius/2, level); - drawCircle(x + radius/2, radius/2, level); - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Recursion" }); - } -} diff --git a/java/examples/Basics/Structure/Recursion/applet/Recursion.pde b/java/examples/Basics/Structure/Recursion/applet/Recursion.pde deleted file mode 100644 index 2e77668f4..000000000 --- a/java/examples/Basics/Structure/Recursion/applet/Recursion.pde +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Recursion. - * - * A demonstration of recursion, which means functions call themselves. - * Notice how the drawCircle() function calls itself at the end of its block. - * It continues to do this until the variable "level" is equal to 1. - */ - -void setup() -{ - size(200, 200); - noStroke(); - smooth(); - noLoop(); -} - -void draw() -{ - drawCircle(126, 170, 6); -} - -void drawCircle(int x, int radius, int level) -{ - float tt = 126 * level/4.0; - fill(tt); - ellipse(x, 100, radius*2, radius*2); - if(level > 1) { - level = level - 1; - drawCircle(x - radius/2, radius/2, level); - drawCircle(x + radius/2, radius/2, level); - } -} diff --git a/java/examples/Basics/Structure/Recursion/applet/loading.gif b/java/examples/Basics/Structure/Recursion/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`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%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Structure/Recursion2/applet/Recursion2.java b/java/examples/Basics/Structure/Recursion2/applet/Recursion2.java deleted file mode 100644 index baa0fa0bb..000000000 --- a/java/examples/Basics/Structure/Recursion2/applet/Recursion2.java +++ /dev/null @@ -1,52 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Recursion2 extends PApplet { - -/** - * Recursion. - * - * A demonstration of recursion, which means functions call themselves. - * Notice how the drawCircle() function calls itself at the end of its block. - * It continues to do this until the variable "level" is equal to 1. - */ - -public void setup() -{ - size(200, 200); - noStroke(); - smooth(); - drawCircle(100, 100, 80, 8); -} - -public void drawCircle(float x, float y, int radius, int level) -{ - float tt = 126 * level/6.0f; - fill(tt, 153); - ellipse(x, y, radius*2, radius*2); - if(level > 1) { - level = level - 1; - int num = PApplet.parseInt(random(2, 6)); - for(int i=0; i 1) { - level = level - 1; - int num = int(random(2, 6)); - for(int i=0; i}>*LOe9f#Jf~YMPyu5XIn*qd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QjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Structure/Redraw/applet/Redraw.java b/java/examples/Basics/Structure/Redraw/applet/Redraw.java deleted file mode 100644 index f00e2d0eb..000000000 --- a/java/examples/Basics/Structure/Redraw/applet/Redraw.java +++ /dev/null @@ -1,57 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Redraw extends PApplet { - -/** - * Redraw. - * - * The redraw() function makes draw() execute once. - * In this example, draw() is executed once every time - * the mouse is clicked. - */ - -// The statements in the setup() function -// execute once when the program begins -public void setup() -{ - size(200, 200); // Size should be the first statement - stroke(255); // Set line drawing color to white - noLoop(); -} - -float y = 100; - -// The statements in draw() are executed until the -// program is stopped. Each statement is executed in -// sequence and after the last line is read, the first -// line is executed again. -public void draw() -{ - background(0); // Set the background to black - y = y - 1; - if (y < 0) { y = height; } - line(0, y, width, y); -} - -public void mousePressed() -{ - redraw(); -} - - - - static public void main(String args[]) { - PApplet.main(new String[] { "Redraw" }); - } -} diff --git a/java/examples/Basics/Structure/Redraw/applet/Redraw.pde b/java/examples/Basics/Structure/Redraw/applet/Redraw.pde deleted file mode 100644 index 01e82b6bf..000000000 --- a/java/examples/Basics/Structure/Redraw/applet/Redraw.pde +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Redraw. - * - * The redraw() function makes draw() execute once. - * In this example, draw() is executed once every time - * the mouse is clicked. - */ - -// The statements in the setup() function -// execute once when the program begins -void setup() -{ - size(200, 200); // Size should be the first statement - stroke(255); // Set line drawing color to white - noLoop(); -} - -float y = 100; - -// The statements in draw() are executed until the -// program is stopped. Each statement is executed in -// sequence and after the last line is read, the first -// line is executed again. -void draw() -{ - background(0); // Set the background to black - y = y - 1; - if (y < 0) { y = height; } - line(0, y, width, y); -} - -void mousePressed() -{ - redraw(); -} - - diff --git a/java/examples/Basics/Structure/Redraw/applet/loading.gif b/java/examples/Basics/Structure/Redraw/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-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?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Structure/SetupDraw/applet/SetupDraw.java b/java/examples/Basics/Structure/SetupDraw/applet/SetupDraw.java deleted file mode 100644 index 9aeb6201f..000000000 --- a/java/examples/Basics/Structure/SetupDraw/applet/SetupDraw.java +++ /dev/null @@ -1,50 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class SetupDraw extends PApplet { - -/** - * Setup and Draw. - * - * The draw() function creates a structure in which - * to write programs that change with time. - */ - -// The statements in the setup() function -// execute once when the program begins -public void setup() -{ - size(200, 200); // Size should be the first statement - stroke(255); // Set line drawing color to white - frameRate(30); -} - -float y = 100; - -// The statements in draw() are executed until the -// program is stopped. Each statement is executed in -// sequence and after the last line is read, the first -// line is executed again. -public void draw() -{ - background(0); // Set the background to black - y = y - 1; - if (y < 0) { y = height; } - line(0, y, width, y); -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "SetupDraw" }); - } -} diff --git a/java/examples/Basics/Structure/SetupDraw/applet/SetupDraw.pde b/java/examples/Basics/Structure/SetupDraw/applet/SetupDraw.pde deleted file mode 100644 index 191aff0f4..000000000 --- a/java/examples/Basics/Structure/SetupDraw/applet/SetupDraw.pde +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Setup and Draw. - * - * The draw() function creates a structure in which - * to write programs that change with time. - */ - -// The statements in the setup() function -// execute once when the program begins -void setup() -{ - size(200, 200); // Size should be the first statement - stroke(255); // Set line drawing color to white - frameRate(30); -} - -float y = 100; - -// The statements in draw() are executed until the -// program is stopped. Each statement is executed in -// sequence and after the last line is read, the first -// line is executed again. -void draw() -{ - background(0); // Set the background to black - y = y - 1; - if (y < 0) { y = height; } - line(0, y, width, y); -} - diff --git a/java/examples/Basics/Structure/SetupDraw/applet/loading.gif b/java/examples/Basics/Structure/SetupDraw/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE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X_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Structure/StatementsComments/applet/StatementsComments.java b/java/examples/Basics/Structure/StatementsComments/applet/StatementsComments.java deleted file mode 100644 index c3bb42923..000000000 --- a/java/examples/Basics/Structure/StatementsComments/applet/StatementsComments.java +++ /dev/null @@ -1,41 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class StatementsComments extends PApplet { - public void setup() {/** - * Statements and Comments. - * - * Statements are the elements that make up programs. - * The ";" (semi-colon) symbol is used to end statements. - * It is called the "statement terminator." - * Comments are used for making notes to help people better understand programs. - * A comment begins with two forward slashes ("//"). - */ - -// The size function is a statement that tells the computer -// how large to make the window. -// Each function statement has zero or more parameters. -// Parameters are data passed into the function -// and used as values for specifying what the computer will do. -size(200, 200); - -// The background function is a statement that tells the computer -// which color to make the background of the window -background(102); - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "StatementsComments" }); - } -} diff --git a/java/examples/Basics/Structure/StatementsComments/applet/StatementsComments.pde b/java/examples/Basics/Structure/StatementsComments/applet/StatementsComments.pde deleted file mode 100644 index 9ab2417fc..000000000 --- a/java/examples/Basics/Structure/StatementsComments/applet/StatementsComments.pde +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Statements and Comments. - * - * Statements are the elements that make up programs. - * The ";" (semi-colon) symbol is used to end statements. - * It is called the "statement terminator." - * Comments are used for making notes to help people better understand programs. - * A comment begins with two forward slashes ("//"). - */ - -// The size function is a statement that tells the computer -// how large to make the window. -// Each function statement has zero or more parameters. -// Parameters are data passed into the function -// and used as values for specifying what the computer will do. -size(200, 200); - -// The background function is a statement that tells the computer -// which color to make the background of the window -background(102); diff --git a/java/examples/Basics/Structure/StatementsComments/applet/loading.gif b/java/examples/Basics/Structure/StatementsComments/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Structure/WidthHeight/applet/WidthHeight.java b/java/examples/Basics/Structure/WidthHeight/applet/WidthHeight.java deleted file mode 100644 index 13afddd2a..000000000 --- a/java/examples/Basics/Structure/WidthHeight/applet/WidthHeight.java +++ /dev/null @@ -1,37 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class WidthHeight extends PApplet { - public void setup() {/** - * Width and Height. - * - * The 'width' and 'height' variables contain the width and height - * of the display window as defined in the size() function. - */ - -size(200, 200); -background(127); -noStroke(); -for(int i=0; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Transform/Arm/applet/Arm.java b/java/examples/Basics/Transform/Arm/applet/Arm.java deleted file mode 100644 index ccec6be96..000000000 --- a/java/examples/Basics/Transform/Arm/applet/Arm.java +++ /dev/null @@ -1,59 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Arm extends PApplet { - -/** - * Arm. - * - * The angle of each segment is controlled with the mouseX and - * mouseY position. The transformations applied to the first segment - * are also applied to the second segment because they are inside - * the same pushMatrix() and popMatrix() group. -*/ - -float x = 50; -float y = 100; -float angle1 = 0.0f; -float angle2 = 0.0f; -float segLength = 50; - -public void setup() { - size(200, 200); - smooth(); - strokeWeight(20.0f); - stroke(0, 100); -} - -public void draw() { - background(226); - - angle1 = (mouseX/PApplet.parseFloat(width) - 0.5f) * -PI; - angle2 = (mouseY/PApplet.parseFloat(height) - 0.5f) * PI; - - pushMatrix(); - segment(x, y, angle1); - segment(segLength, 0, angle2); - popMatrix(); -} - -public void segment(float x, float y, float a) { - translate(x, y); - rotate(a); - line(0, 0, segLength, 0); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Arm" }); - } -} diff --git a/java/examples/Basics/Transform/Arm/applet/Arm.pde b/java/examples/Basics/Transform/Arm/applet/Arm.pde deleted file mode 100644 index 8169d914d..000000000 --- a/java/examples/Basics/Transform/Arm/applet/Arm.pde +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Arm. - * - * The angle of each segment is controlled with the mouseX and - * mouseY position. The transformations applied to the first segment - * are also applied to the second segment because they are inside - * the same pushMatrix() and popMatrix() group. -*/ - -float x = 50; -float y = 100; -float angle1 = 0.0; -float angle2 = 0.0; -float segLength = 50; - -void setup() { - size(200, 200); - smooth(); - strokeWeight(20.0); - stroke(0, 100); -} - -void draw() { - background(226); - - angle1 = (mouseX/float(width) - 0.5) * -PI; - angle2 = (mouseY/float(height) - 0.5) * PI; - - pushMatrix(); - segment(x, y, angle1); - segment(segLength, 0, angle2); - popMatrix(); -} - -void segment(float x, float y, float a) { - translate(x, y); - rotate(a); - line(0, 0, segLength, 0); -} diff --git a/java/examples/Basics/Transform/Arm/applet/loading.gif b/java/examples/Basics/Transform/Arm/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpV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x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Transform/Rotate/applet/Rotate.java b/java/examples/Basics/Transform/Rotate/applet/Rotate.java deleted file mode 100644 index 6d37c00a6..000000000 --- a/java/examples/Basics/Transform/Rotate/applet/Rotate.java +++ /dev/null @@ -1,58 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Rotate extends PApplet { - -/** - * Rotate. - * - * Rotating a square around the Z axis. To get the results - * you expect, send the rotate function angle parameters that are - * values between 0 and PI*2 (TWO_PI which is roughly 6.28). If you prefer to - * think about angles as degrees (0-360), you can use the radians() - * method to convert your values. For example: scale(radians(90)) - * is identical to the statement scale(PI/2). - */ - -public void setup() -{ - size(200,200); - noStroke(); - fill(255); - frameRate(30); -} - -float angle; -float cosine; -float jitter; - -public void draw() -{ - background(102); - - if(second()%2 == 0){ - jitter = (random(-0.1f, 0.1f)); - } - angle = angle + jitter; - cosine = cos(angle); - - translate(width/2, height/2); - rotate(cosine); - rectMode(CENTER); - rect(0, 0, 115, 115); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Rotate" }); - } -} diff --git a/java/examples/Basics/Transform/Rotate/applet/Rotate.pde b/java/examples/Basics/Transform/Rotate/applet/Rotate.pde deleted file mode 100644 index 1950efd7a..000000000 --- a/java/examples/Basics/Transform/Rotate/applet/Rotate.pde +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Rotate. - * - * Rotating a square around the Z axis. To get the results - * you expect, send the rotate function angle parameters that are - * values between 0 and PI*2 (TWO_PI which is roughly 6.28). If you prefer to - * think about angles as degrees (0-360), you can use the radians() - * method to convert your values. For example: scale(radians(90)) - * is identical to the statement scale(PI/2). - */ - -void setup() -{ - size(200,200); - noStroke(); - fill(255); - frameRate(30); -} - -float angle; -float cosine; -float jitter; - -void draw() -{ - background(102); - - if(second()%2 == 0){ - jitter = (random(-0.1, 0.1)); - } - angle = angle + jitter; - cosine = cos(angle); - - translate(width/2, height/2); - rotate(cosine); - rectMode(CENTER); - rect(0, 0, 115, 115); -} diff --git a/java/examples/Basics/Transform/Rotate/applet/loading.gif b/java/examples/Basics/Transform/Rotate/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEE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5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Transform/Scale/applet/Scale.java b/java/examples/Basics/Transform/Scale/applet/Scale.java deleted file mode 100644 index d8adf49b3..000000000 --- a/java/examples/Basics/Transform/Scale/applet/Scale.java +++ /dev/null @@ -1,58 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Scale extends PApplet { - -/** - * Scale - * by Denis Grutze. - * - * Paramenters for the scale() function are values specified - * as decimal percentages. For example, the method call scale(2.0) - * will increase the dimension of the shape by 200 percent. - * Objects always scale from the origin. - */ - -float a = 0.0f; -float s = 0.0f; - -public void setup() -{ - size(200,200); - noStroke(); - rectMode(CENTER); - frameRate(30); -} - -public void draw() -{ - background(102); - - a = a + 0.04f; - s = cos(a)*2; - - translate(width/2, height/2); - scale(s); - fill(51); - rect(0, 0, 50, 50); - - translate(75, 0); - fill(255); - scale(s); - rect(0, 0, 50, 50); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Scale" }); - } -} diff --git a/java/examples/Basics/Transform/Scale/applet/Scale.pde b/java/examples/Basics/Transform/Scale/applet/Scale.pde deleted file mode 100644 index dc41a584d..000000000 --- a/java/examples/Basics/Transform/Scale/applet/Scale.pde +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Scale - * by Denis Grutze. - * - * Paramenters for the scale() function are values specified - * as decimal percentages. For example, the method call scale(2.0) - * will increase the dimension of the shape by 200 percent. - * Objects always scale from the origin. - */ - -float a = 0.0; -float s = 0.0; - -void setup() -{ - size(200,200); - noStroke(); - rectMode(CENTER); - frameRate(30); -} - -void draw() -{ - background(102); - - a = a + 0.04; - s = cos(a)*2; - - translate(width/2, height/2); - scale(s); - fill(51); - rect(0, 0, 50, 50); - - translate(75, 0); - fill(255); - scale(s); - rect(0, 0, 50, 50); -} diff --git a/java/examples/Basics/Transform/Scale/applet/loading.gif b/java/examples/Basics/Transform/Scale/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&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(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Transform/Translate/applet/Translate.java b/java/examples/Basics/Transform/Translate/applet/Translate.java deleted file mode 100644 index c62a13544..000000000 --- a/java/examples/Basics/Transform/Translate/applet/Translate.java +++ /dev/null @@ -1,61 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Translate extends PApplet { - -/** - * Translate. - * - * The translate() function allows objects to be moved - * to any location within the window. The first parameter - * sets the x-axis offset and the second parameter sets the - * y-axis offset. - */ - -float x, y; -float size = 40.0f; - -public void setup() -{ - size(200,200); - noStroke(); - frameRate(30); -} - -public void draw() -{ - background(102); - - x = x + 0.8f; - - if (x > width + size) { - x = -size; - } - - translate(x, height/2-size/2); - fill(255); - rect(-size/2, -size/2, size, size); - - // Transforms accumulate. - // Notice how this rect moves twice - // as fast as the other, but it has - // the same parameter for the x-axis value - translate(x, size); - fill(0); - rect(-size/2, -size/2, size, size); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Translate" }); - } -} diff --git a/java/examples/Basics/Transform/Translate/applet/Translate.pde b/java/examples/Basics/Transform/Translate/applet/Translate.pde deleted file mode 100644 index 81b39af9d..000000000 --- a/java/examples/Basics/Transform/Translate/applet/Translate.pde +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Translate. - * - * The translate() function allows objects to be moved - * to any location within the window. The first parameter - * sets the x-axis offset and the second parameter sets the - * y-axis offset. - */ - -float x, y; -float size = 40.0; - -void setup() -{ - size(200,200); - noStroke(); - frameRate(30); -} - -void draw() -{ - background(102); - - x = x + 0.8; - - if (x > width + size) { - x = -size; - } - - translate(x, height/2-size/2); - fill(255); - rect(-size/2, -size/2, size, size); - - // Transforms accumulate. - // Notice how this rect moves twice - // as fast as the other, but it has - // the same parameter for the x-axis value - translate(x, size); - fill(0); - rect(-size/2, -size/2, size, size); -} diff --git a/java/examples/Basics/Transform/Translate/applet/loading.gif b/java/examples/Basics/Transform/Translate/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`t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w-$ diff --git a/java/examples/Basics/Transform/TriangleFlower/applet/TriangleFlower.java b/java/examples/Basics/Transform/TriangleFlower/applet/TriangleFlower.java deleted file mode 100644 index b4bf9b0ad..000000000 --- a/java/examples/Basics/Transform/TriangleFlower/applet/TriangleFlower.java +++ /dev/null @@ -1,63 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class TriangleFlower extends PApplet { - -/** - * Triangle Flower - * by Ira Greenberg. - * - * Using rotate() and triangle() functions generate a pretty - * flower. Uncomment the line "// rotate(rot+=radians(spin));" - * in the triBlur() function for a nice variation. - */ - -Point[]p = new Point[3]; -float shift = 1.0f; -float fade = 0; -float fillCol = 0; -float rot = 0; -float spin = 0; - -public void setup(){ - size(200, 200); - background(0); - smooth(); - fade = 255.0f/(width/2.0f/shift); - spin = 360.0f/(width/2.0f/shift); - p[0] = new Point(-width/2, height/2); - p[1] = new Point(width/2, height/2); - p[2] = new Point(0, -height/2); - noStroke(); - translate(width/2, height/2); - triBlur(); -} - -public void triBlur(){ - fill(fillCol); - fillCol+=fade; - rotate(spin); - // another interesting variation: uncomment the line below - // rotate(rot+=radians(spin)); - triangle(p[0].x+=shift, p[0].y-=shift/2, p[1].x-=shift, p[1].y-=shift/2, p[2].x, p[2].y+=shift); - if(p[0].x<0){ - // recursive call - triBlur(); - } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "TriangleFlower" }); - } -} diff --git a/java/examples/Basics/Transform/TriangleFlower/applet/TriangleFlower.pde b/java/examples/Basics/Transform/TriangleFlower/applet/TriangleFlower.pde deleted file mode 100644 index e46988519..000000000 --- a/java/examples/Basics/Transform/TriangleFlower/applet/TriangleFlower.pde +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Triangle Flower - * by Ira Greenberg. - * - * Using rotate() and triangle() functions generate a pretty - * flower. Uncomment the line "// rotate(rot+=radians(spin));" - * in the triBlur() function for a nice variation. - */ - -Point[]p = new Point[3]; -float shift = 1.0; -float fade = 0; -float fillCol = 0; -float rot = 0; -float spin = 0; - -void setup(){ - size(200, 200); - background(0); - smooth(); - fade = 255.0/(width/2.0/shift); - spin = 360.0/(width/2.0/shift); - p[0] = new Point(-width/2, height/2); - p[1] = new Point(width/2, height/2); - p[2] = new Point(0, -height/2); - noStroke(); - translate(width/2, height/2); - triBlur(); -} - -void triBlur(){ - fill(fillCol); - fillCol+=fade; - rotate(spin); - // another interesting variation: uncomment the line below - // rotate(rot+=radians(spin)); - triangle(p[0].x+=shift, p[0].y-=shift/2, p[1].x-=shift, p[1].y-=shift/2, p[2].x, p[2].y+=shift); - if(p[0].x<0){ - // recursive call - triBlur(); - } -} - diff --git a/java/examples/Basics/Transform/TriangleFlower/applet/loading.gif b/java/examples/Basics/Transform/TriangleFlower/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H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M(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Typography/Letters/applet/Letters.java b/java/examples/Basics/Typography/Letters/applet/Letters.java deleted file mode 100644 index da77d549a..000000000 --- a/java/examples/Basics/Typography/Letters/applet/Letters.java +++ /dev/null @@ -1,86 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Letters extends PApplet { - -/** - * Letters. - * - * Draws letters to the screen. - */ - -PFont fontA; - -public void setup() -{ - size(200, 200); - background(0); - // Load the font. Fonts must be placed within the data - // directory of your sketch. A font must first be created - // using the 'Create Font...' option in the Tools menu. - fontA = loadFont("CourierNew36.vlw"); - textFont(fontA, 36); - textAlign(CENTER); - noLoop(); -} - -public void draw() -{ - // Set the gray value of the letters - fill(255); - - // Set the left and top margin - int margin = 6; - int gap = 30; - translate(margin*1.5f, margin*2); - - // Create a matrix of letterforms - int counter = 0; - for(int i=0; i= 26) { - counter = 0; - } - } - } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Letters" }); - } -} diff --git a/java/examples/Basics/Typography/Letters/applet/Letters.pde b/java/examples/Basics/Typography/Letters/applet/Letters.pde deleted file mode 100644 index 82e943f2f..000000000 --- a/java/examples/Basics/Typography/Letters/applet/Letters.pde +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Letters. - * - * Draws letters to the screen. - */ - -PFont fontA; - -void setup() -{ - size(200, 200); - background(0); - // Load the font. Fonts must be placed within the data - // directory of your sketch. A font must first be created - // using the 'Create Font...' option in the Tools menu. - fontA = loadFont("CourierNew36.vlw"); - textFont(fontA, 36); - textAlign(CENTER); - noLoop(); -} - -void draw() -{ - // Set the gray value of the letters - fill(255); - - // Set the left and top margin - int margin = 6; - int gap = 30; - translate(margin*1.5, margin*2); - - // Create a matrix of letterforms - int counter = 0; - for(int i=0; i= 26) { - counter = 0; - } - } - } -} - diff --git a/java/examples/Basics/Typography/Letters/applet/loading.gif b/java/examples/Basics/Typography/Letters/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk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applet/Words.java deleted file mode 100644 index 192678348..000000000 --- a/java/examples/Basics/Typography/Words/applet/Words.java +++ /dev/null @@ -1,62 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Words extends PApplet { - -/** - * Words. - * - * The text() function is used for writing words to the screen. - * - * Created 15 January 2003 - * Updated 11 August 2008 - */ - - -int x = 30; -PFont fontA; - -public void setup() -{ - size(200, 200); - background(102); - - // Load the font. Fonts must be placed within the data - // directory of your sketch. Use Tools > Create Font - // to create a distributable bitmap font. - // For vector fonts, use the createFont() function. - fontA = loadFont("Ziggurat-HTF-Black-32.vlw"); - - // Set the font and its size (in units of pixels) - textFont(fontA, 32); - - // Only draw once - noLoop(); -} - -public void draw() { - // Use fill() to change the value or color of the text - fill(0); - text("ichi", x, 60); - fill(51); - text("ni", x, 95); - fill(204); - text("san", x, 130); - fill(255); - text("shi", x, 165); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Words" }); - } -} diff --git a/java/examples/Basics/Typography/Words/applet/Words.pde b/java/examples/Basics/Typography/Words/applet/Words.pde deleted file mode 100644 index e7622a4c7..000000000 --- a/java/examples/Basics/Typography/Words/applet/Words.pde +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Words. - * - * The text() function is used for writing words to the screen. - * - * Created 15 January 2003 - * Updated 11 August 2008 - */ - - -int x = 30; -PFont fontA; - -void setup() -{ - size(200, 200); - background(102); - - // Load the font. Fonts must be placed within the data - // directory of your sketch. Use Tools > Create Font - // to create a distributable bitmap font. - // For vector fonts, use the createFont() function. - fontA = loadFont("Ziggurat-HTF-Black-32.vlw"); - - // Set the font and its size (in units of pixels) - textFont(fontA, 32); - - // Only draw once - noLoop(); -} - -void draw() { - // Use fill() to change the value or color of the text - fill(0); - text("ichi", x, 60); - fill(51); - text("ni", x, 95); - fill(204); - text("san", x, 130); - fill(255); - text("shi", x, 165); -} diff --git a/java/examples/Basics/Typography/Words/applet/loading.gif b/java/examples/Basics/Typography/Words/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Web/EmbeddedLinks/applet/EmbeddedLinks.java b/java/examples/Basics/Web/EmbeddedLinks/applet/EmbeddedLinks.java deleted file mode 100644 index 1ee4b1a64..000000000 --- a/java/examples/Basics/Web/EmbeddedLinks/applet/EmbeddedLinks.java +++ /dev/null @@ -1,93 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class EmbeddedLinks extends PApplet { - -/** - * Loading URLs. - * - * Click on the left button to open a different URL in the same window (Only - * works online). Click on the right button to open a URL in a new browser window. -*/ - -boolean overLeftButton = false; -boolean overRightButton = false; - -public void setup() -{ - size(200, 200); -} - -public void draw() -{ - background(204); - - // Left buttom - if(overLeftButton == true) { - fill(255); - } else { - noFill(); - } - rect(20, 60, 75, 75); - rect(50, 90, 15, 15); - - // Right button - if(overRightButton == true) { - fill(255); - } else { - noFill(); - } - rect(105, 60, 75, 75); - line(135, 105, 155, 85); - line(140, 85, 155, 85); - line(155, 85, 155, 100); -} - -public void mousePressed() -{ - if(overLeftButton) { - link("http://www.processing.org"); - } else if (overRightButton) { - link("http://www.processing.org", "_new"); - } -} - -public void mouseMoved() { - checkButtons(); -} - -public void mouseDragged() { - checkButtons(); -} - -public void checkButtons() { - if(mouseX > 20 && mouseX < 95 && - mouseY > 60 && mouseY <135) { - overLeftButton = true; - } else if (mouseX > 105 && mouseX < 180 && - mouseY > 60 && mouseY <135) { - overRightButton = true; - } else { - overLeftButton = overRightButton = false; - } - -} - - - - - - static public void main(String args[]) { - PApplet.main(new String[] { "EmbeddedLinks" }); - } -} diff --git a/java/examples/Basics/Web/EmbeddedLinks/applet/EmbeddedLinks.pde b/java/examples/Basics/Web/EmbeddedLinks/applet/EmbeddedLinks.pde deleted file mode 100644 index ab41385c7..000000000 --- a/java/examples/Basics/Web/EmbeddedLinks/applet/EmbeddedLinks.pde +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Loading URLs. - * - * Click on the left button to open a different URL in the same window (Only - * works online). Click on the right button to open a URL in a new browser window. -*/ - -boolean overLeftButton = false; -boolean overRightButton = false; - -void setup() -{ - size(200, 200); -} - -void draw() -{ - background(204); - - // Left buttom - if(overLeftButton == true) { - fill(255); - } else { - noFill(); - } - rect(20, 60, 75, 75); - rect(50, 90, 15, 15); - - // Right button - if(overRightButton == true) { - fill(255); - } else { - noFill(); - } - rect(105, 60, 75, 75); - line(135, 105, 155, 85); - line(140, 85, 155, 85); - line(155, 85, 155, 100); -} - -void mousePressed() -{ - if(overLeftButton) { - link("http://www.processing.org"); - } else if (overRightButton) { - link("http://www.processing.org", "_new"); - } -} - -void mouseMoved() { - checkButtons(); -} - -void mouseDragged() { - checkButtons(); -} - -void checkButtons() { - if(mouseX > 20 && mouseX < 95 && - mouseY > 60 && mouseY <135) { - overLeftButton = true; - } else if (mouseX > 105 && mouseX < 180 && - mouseY > 60 && mouseY <135) { - overRightButton = true; - } else { - overLeftButton = overRightButton = false; - } - -} - - - - diff --git a/java/examples/Basics/Web/EmbeddedLinks/applet/loading.gif b/java/examples/Basics/Web/EmbeddedLinks/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cw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G%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Basics/Web/LoadingImages/applet/LoadingImages.java b/java/examples/Basics/Web/LoadingImages/applet/LoadingImages.java deleted file mode 100644 index 76bab8631..000000000 --- a/java/examples/Basics/Web/LoadingImages/applet/LoadingImages.java +++ /dev/null @@ -1,37 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class LoadingImages extends PApplet { - public void setup() {/** - * Loading Images. - * - * Loading a recent image from the US National Weather Service. - * Notice the date in the upper left corner of the image. - * Processing applications can only load images from the network - * while running in the Processing environment. This example will - * not run in a web broswer and will only work when the computer - * is connected to the Internet. - */ - -size(200, 200); -PImage img1; -img1 = loadImage("http://www.processing.org/img/processing_beta_cover.gif"); -image(img1, 0, 45); - - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "LoadingImages" }); - } -} diff --git a/java/examples/Basics/Web/LoadingImages/applet/LoadingImages.pde b/java/examples/Basics/Web/LoadingImages/applet/LoadingImages.pde deleted file mode 100644 index 325fbba56..000000000 --- a/java/examples/Basics/Web/LoadingImages/applet/LoadingImages.pde +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Loading Images. - * - * Loading a recent image from the US National Weather Service. - * Notice the date in the upper left corner of the image. - * Processing applications can only load images from the network - * while running in the Processing environment. This example will - * not run in a web broswer and will only work when the computer - * is connected to the Internet. - */ - -size(200, 200); -PImage img1; -img1 = loadImage("http://www.processing.org/img/processing_beta_cover.gif"); -image(img1, 0, 45); - diff --git a/java/examples/Basics/Web/LoadingImages/applet/loading.gif b/java/examples/Basics/Web/LoadingImages/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Advanced Data/ArrayListClass/applet/ArrayListClass.java b/java/examples/Topics/Advanced Data/ArrayListClass/applet/ArrayListClass.java deleted file mode 100644 index 52f4341d4..000000000 --- a/java/examples/Topics/Advanced Data/ArrayListClass/applet/ArrayListClass.java +++ /dev/null @@ -1,122 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class ArrayListClass extends PApplet { - -/** - * ArrayList of objects - * by Daniel Shiffman. - * - * This example demonstrates how to use a Java ArrayList to store - * a variable number of objects. Items can be added and removed - * from the ArrayList. - * - * Click the mouse to add bouncing balls. - */ - -ArrayList balls; -int ballWidth = 48; - -public void setup() { - size(200, 200); - smooth(); - noStroke(); - - // Create an empty ArrayList - balls = new ArrayList(); - - // Start by adding one element - balls.add(new Ball(width/2, 0, ballWidth)); -} - -public void draw() { - background(255); - - // With an array, we say balls.length, with an ArrayList, we say balls.size() - // The length of an ArrayList is dynamic - // Notice how we are looping through the ArrayList backwards - // This is because we are deleting elements from the list - for (int i = balls.size()-1; i >= 0; i--) { - // An ArrayList doesn't know what it is storing so we have to cast the object coming out - Ball ball = (Ball) balls.get(i); - ball.move(); - ball.display(); - if (ball.finished()) { - // Items can be deleted with remove() - balls.remove(i); - } - - } - -} - -public void mousePressed() { - // A new ball object is added to the ArrayList (by default to the end) - balls.add(new Ball(mouseX, mouseY, ballWidth)); -} - -// Simple bouncing ball class - -class Ball { - - float x; - float y; - float speed; - float gravity; - float w; - float life = 255; - - Ball(float tempX, float tempY, float tempW) { - x = tempX; - y = tempY; - w = tempW; - speed = 0; - gravity = 0.1f; - } - - public void move() { - // Add gravity to speed - speed = speed + gravity; - // Add speed to y location - y = y + speed; - // If square reaches the bottom - // Reverse speed - if (y > height) { - // Dampening - speed = speed * -0.8f; - y = height; - } - } - - public boolean finished() { - // Balls fade out - life--; - if (life < 0) { - return true; - } else { - return false; - } - } - - public void display() { - // Display the circle - fill(0,life); - //stroke(0,life); - ellipse(x,y,w,w); - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "ArrayListClass" }); - } -} diff --git a/java/examples/Topics/Advanced Data/ArrayListClass/applet/ArrayListClass.pde b/java/examples/Topics/Advanced Data/ArrayListClass/applet/ArrayListClass.pde deleted file mode 100644 index 09521cb17..000000000 --- a/java/examples/Topics/Advanced Data/ArrayListClass/applet/ArrayListClass.pde +++ /dev/null @@ -1,52 +0,0 @@ -/** - * ArrayList of objects - * by Daniel Shiffman. - * - * This example demonstrates how to use a Java ArrayList to store - * a variable number of objects. Items can be added and removed - * from the ArrayList. - * - * Click the mouse to add bouncing balls. - */ - -ArrayList balls; -int ballWidth = 48; - -void setup() { - size(200, 200); - smooth(); - noStroke(); - - // Create an empty ArrayList - balls = new ArrayList(); - - // Start by adding one element - balls.add(new Ball(width/2, 0, ballWidth)); -} - -void draw() { - background(255); - - // With an array, we say balls.length, with an ArrayList, we say balls.size() - // The length of an ArrayList is dynamic - // Notice how we are looping through the ArrayList backwards - // This is because we are deleting elements from the list - for (int i = balls.size()-1; i >= 0; i--) { - // An ArrayList doesn't know what it is storing so we have to cast the object coming out - Ball ball = (Ball) balls.get(i); - ball.move(); - ball.display(); - if (ball.finished()) { - // Items can be deleted with remove() - balls.remove(i); - } - - } - -} - -void mousePressed() { - // A new ball object is added to the ArrayList (by default to the end) - balls.add(new Ball(mouseX, mouseY, ballWidth)); -} - diff --git a/java/examples/Topics/Advanced Data/ArrayListClass/applet/Ball.pde b/java/examples/Topics/Advanced Data/ArrayListClass/applet/Ball.pde deleted file mode 100644 index 3f613b787..000000000 --- a/java/examples/Topics/Advanced Data/ArrayListClass/applet/Ball.pde +++ /dev/null @@ -1,50 +0,0 @@ -// Simple bouncing ball class - -class Ball { - - float x; - float y; - float speed; - float gravity; - float w; - float life = 255; - - Ball(float tempX, float tempY, float tempW) { - x = tempX; - y = tempY; - w = tempW; - speed = 0; - gravity = 0.1; - } - - void move() { - // Add gravity to speed - speed = speed + gravity; - // Add speed to y location - y = y + speed; - // If square reaches the bottom - // Reverse speed - if (y > height) { - // Dampening - speed = speed * -0.8; - y = height; - } - } - - boolean finished() { - // Balls fade out - life--; - if (life < 0) { - return true; - } else { - return false; - } - } - - void display() { - // Display the circle - fill(0,life); - //stroke(0,life); - ellipse(x,y,w,w); - } -} diff --git a/java/examples/Topics/Advanced Data/ArrayListClass/applet/loading.gif b/java/examples/Topics/Advanced Data/ArrayListClass/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Advanced Data/HashMapClass/applet/HashMapClass.java b/java/examples/Topics/Advanced Data/HashMapClass/applet/HashMapClass.java deleted file mode 100644 index 9b485958f..000000000 --- a/java/examples/Topics/Advanced Data/HashMapClass/applet/HashMapClass.java +++ /dev/null @@ -1,126 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class HashMapClass extends PApplet { - -/** - * HashMap example - * by Daniel Shiffman. - * - * This example demonstrates how to use a HashMap to store - * a collection of objects referenced by a key. - * This is much like an array, only instead of accessing elements - * with a numeric index, we use a String. - * If you are familiar with associative arrays from other languages, - * this is the same idea. - * - * This example uses the HashMap to perform a simple concordance - * http://en.wikipedia.org/wiki/Concordance_(publishing) - */ - - -// HashMap object -HashMap words; - -// Array of all words from input file -String[] tokens; -int counter; - -PFont f; - -public void setup() { - size(640, 360); - words = new HashMap(); - - // Load file and chop it up - String[] lines = loadStrings("dracula.txt"); - String allText = join(lines," "); - tokens = splitTokens(allText," ,.?!:;[]-"); - f = createFont("Georgia",36,true); -} - -public void draw() { - background(255); - fill(0); - - // Look at words one at a time - String s = tokens[counter]; - counter = (counter + 1) % tokens.length; - - // Is the word in the HashMap - if (words.containsKey(s)) { - // Get the word object and increase the count - // We access objects from a HashMap via its key, the String - Word w = (Word) words.get(s); - w.count(); - } else { - // Otherwise make a new word - Word w = new Word(s); - // And add to the HashMap - // put() takes two arguments, "key" and "value" - // The key for us is the String and the value is the Word object - words.put(s,w); - } - - // Make an iterator to look at all the things in the HashMap - Iterator i = words.values().iterator(); - - // x and y will be used to locate each word - float x = 0; - float y = height-10; - - while (i.hasNext()) { - // Look at each word - Word w = (Word) i.next(); - - // Only display words that appear 3 times - if (w.count > 3) { - // The size is the count - int fsize = constrain(w.count,0,100); - textFont(f,fsize); - text(w.word,x,y); - // Move along the x-axis - x+=textWidth(w.word+" "); - } - - // If x gets to the end, move Y - if (x > width) { - x = 0; - y -= 100; - // If y gets to the end, we're done - if (y < 0) { - break; - } - } - } -} -class Word { - - int count; - String word; - - Word(String s) { - word = s; - count = 1; - } - - public void count() { - count++; - } - -} - - static public void main(String args[]) { - PApplet.main(new String[] { "HashMapClass" }); - } -} diff --git a/java/examples/Topics/Advanced Data/HashMapClass/applet/HashMapClass.pde b/java/examples/Topics/Advanced Data/HashMapClass/applet/HashMapClass.pde deleted file mode 100644 index 3f0489aa7..000000000 --- a/java/examples/Topics/Advanced Data/HashMapClass/applet/HashMapClass.pde +++ /dev/null @@ -1,91 +0,0 @@ -/** - * HashMap example - * by Daniel Shiffman. - * - * This example demonstrates how to use a HashMap to store - * a collection of objects referenced by a key. - * This is much like an array, only instead of accessing elements - * with a numeric index, we use a String. - * If you are familiar with associative arrays from other languages, - * this is the same idea. - * - * This example uses the HashMap to perform a simple concordance - * http://en.wikipedia.org/wiki/Concordance_(publishing) - */ - - -// HashMap object -HashMap words; - -// Array of all words from input file -String[] tokens; -int counter; - -PFont f; - -void setup() { - size(640, 360); - words = new HashMap(); - - // Load file and chop it up - String[] lines = loadStrings("dracula.txt"); - String allText = join(lines," "); - tokens = splitTokens(allText," ,.?!:;[]-"); - f = createFont("Georgia",36,true); -} - -void draw() { - background(255); - fill(0); - - // Look at words one at a time - String s = tokens[counter]; - counter = (counter + 1) % tokens.length; - - // Is the word in the HashMap - if (words.containsKey(s)) { - // Get the word object and increase the count - // We access objects from a HashMap via its key, the String - Word w = (Word) words.get(s); - w.count(); - } else { - // Otherwise make a new word - Word w = new Word(s); - // And add to the HashMap - // put() takes two arguments, "key" and "value" - // The key for us is the String and the value is the Word object - words.put(s,w); - } - - // Make an iterator to look at all the things in the HashMap - Iterator i = words.values().iterator(); - - // x and y will be used to locate each word - float x = 0; - float y = height-10; - - while (i.hasNext()) { - // Look at each word - Word w = (Word) i.next(); - - // Only display words that appear 3 times - if (w.count > 3) { - // The size is the count - int fsize = constrain(w.count,0,100); - textFont(f,fsize); - text(w.word,x,y); - // Move along the x-axis - x+=textWidth(w.word+" "); - } - - // If x gets to the end, move Y - if (x > width) { - x = 0; - y -= 100; - // If y gets to the end, we're done - if (y < 0) { - break; - } - } - } -} diff --git a/java/examples/Topics/Advanced Data/HashMapClass/applet/Word.pde b/java/examples/Topics/Advanced Data/HashMapClass/applet/Word.pde deleted file mode 100644 index cc8568491..000000000 --- a/java/examples/Topics/Advanced Data/HashMapClass/applet/Word.pde +++ /dev/null @@ -1,15 +0,0 @@ -class Word { - - int count; - String word; - - Word(String s) { - word = s; - count = 1; - } - - void count() { - count++; - } - -} diff --git a/java/examples/Topics/Advanced Data/HashMapClass/applet/loading.gif b/java/examples/Topics/Advanced Data/HashMapClass/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Animation/AnimatedSprite/applet/AnimatedSprite.java b/java/examples/Topics/Animation/AnimatedSprite/applet/AnimatedSprite.java deleted file mode 100644 index c0c731c82..000000000 --- a/java/examples/Topics/Animation/AnimatedSprite/applet/AnimatedSprite.java +++ /dev/null @@ -1,86 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class AnimatedSprite extends PApplet { - -/** - * Animated Sprite (Shifty + Teddy) - * by James Patterson. - * - * Press the mouse button to change animations. - * Demonstrates loading, displaying, and animating GIF images. - * It would be easy to write a program to display - * animated GIFs, but would not allow as much control over - * the display sequence and rate of display. - */ - -Animation animation1, animation2; -float xpos, ypos; -float drag = 30.0f; - -public void setup() { - size(200, 200); - background(255, 204, 0); - frameRate(24); - animation1 = new Animation("PT_Shifty_", 38); - animation2 = new Animation("PT_Teddy_", 60); -} - -public void draw() { - float difx = mouseX - xpos; - if (abs(difx) > 1.0f) { - xpos = xpos + difx/drag; - xpos = constrain(xpos, 0, width); - } - - // Display the sprite at the position xpos, ypos - if (mousePressed) { - background(153, 153, 0); - animation1.display(xpos-animation1.getWidth()/2, ypos); - } else { - background(255, 204, 0); - animation2.display(xpos-animation1.getWidth()/2, ypos); - } -} -// Class for animating a sequence of GIFs - -class Animation { - PImage[] images; - int imageCount; - int frame; - - Animation(String imagePrefix, int count) { - imageCount = count; - images = new PImage[imageCount]; - - for (int i = 0; i < imageCount; i++) { - // Use nf() to number format 'i' into four digits - String filename = imagePrefix + nf(i, 4) + ".gif"; - images[i] = loadImage(filename); - } - } - - public void display(float xpos, float ypos) { - frame = (frame+1) % imageCount; - image(images[frame], xpos, ypos); - } - - public int getWidth() { - return images[0].width; - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "AnimatedSprite" }); - } -} diff --git a/java/examples/Topics/Animation/AnimatedSprite/applet/AnimatedSprite.pde b/java/examples/Topics/Animation/AnimatedSprite/applet/AnimatedSprite.pde deleted file mode 100644 index 1c13f0199..000000000 --- a/java/examples/Topics/Animation/AnimatedSprite/applet/AnimatedSprite.pde +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Animated Sprite (Shifty + Teddy) - * by James Patterson. - * - * Press the mouse button to change animations. - * Demonstrates loading, displaying, and animating GIF images. - * It would be easy to write a program to display - * animated GIFs, but would not allow as much control over - * the display sequence and rate of display. - */ - -Animation animation1, animation2; -float xpos, ypos; -float drag = 30.0; - -void setup() { - size(200, 200); - background(255, 204, 0); - frameRate(24); - animation1 = new Animation("PT_Shifty_", 38); - animation2 = new Animation("PT_Teddy_", 60); -} - -void draw() { - float difx = mouseX - xpos; - if (abs(difx) > 1.0) { - xpos = xpos + difx/drag; - xpos = constrain(xpos, 0, width); - } - - // Display the sprite at the position xpos, ypos - if (mousePressed) { - background(153, 153, 0); - animation1.display(xpos-animation1.getWidth()/2, ypos); - } else { - background(255, 204, 0); - animation2.display(xpos-animation1.getWidth()/2, ypos); - } -} diff --git a/java/examples/Topics/Animation/AnimatedSprite/applet/Animation.pde b/java/examples/Topics/Animation/AnimatedSprite/applet/Animation.pde deleted file mode 100644 index 6c98ef20b..000000000 --- a/java/examples/Topics/Animation/AnimatedSprite/applet/Animation.pde +++ /dev/null @@ -1,27 +0,0 @@ -// Class for animating a sequence of GIFs - -class Animation { - PImage[] images; - int imageCount; - int frame; - - Animation(String imagePrefix, int count) { - imageCount = count; - images = new PImage[imageCount]; - - for (int i = 0; i < imageCount; i++) { - // Use nf() to number format 'i' into four digits - String filename = imagePrefix + nf(i, 4) + ".gif"; - images[i] = loadImage(filename); - } - } - - void display(float xpos, float ypos) { - frame = (frame+1) % imageCount; - image(images[frame], xpos, ypos); - } - - int getWidth() { - return images[0].width; - } -} diff --git a/java/examples/Topics/Animation/AnimatedSprite/applet/loading.gif b/java/examples/Topics/Animation/AnimatedSprite/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~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R2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Animation/Sequential/applet/Sequential.java b/java/examples/Topics/Animation/Sequential/applet/Sequential.java deleted file mode 100644 index 6118f5f8b..000000000 --- a/java/examples/Topics/Animation/Sequential/applet/Sequential.java +++ /dev/null @@ -1,66 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Sequential extends PApplet { - -/** - * Sequential - * by James Patterson. - * - * Displaying a sequence of images creates the illusion of motion. - * Twelve images are loaded and each is displayed individually in a loop. - */ - -int numFrames = 12; // The number of frames in the animation -int frame = 0; -PImage[] images = new PImage[numFrames]; - -public void setup() -{ - size(200, 200); - frameRate(30); - - images[0] = loadImage("PT_anim0000.gif"); - images[1] = loadImage("PT_anim0001.gif"); - images[2] = loadImage("PT_anim0002.gif"); - images[3] = loadImage("PT_anim0003.gif"); - images[4] = loadImage("PT_anim0004.gif"); - images[5] = loadImage("PT_anim0005.gif"); - images[6] = loadImage("PT_anim0006.gif"); - images[7] = loadImage("PT_anim0007.gif"); - images[8] = loadImage("PT_anim0008.gif"); - images[9] = loadImage("PT_anim0009.gif"); - images[10] = loadImage("PT_anim0010.gif"); - images[11] = loadImage("PT_anim0011.gif"); - - // If you don't want to load each image separately - // and you know how many frames you have, you - // can create the filenames as the program runs. - // The nf() command does number formatting, which will - // ensure that the number is (in this case) 4 digits. - //for(int i=0; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+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ellular Automata/Conway/applet/Conway.java deleted file mode 100644 index c38dd80db..000000000 --- a/java/examples/Topics/Cellular Automata/Conway/applet/Conway.java +++ /dev/null @@ -1,101 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Conway extends PApplet { - -/** - * Conway's Game of Life - * by Mike Davis. - * - * This program is a simple version of Conway's - * game of Life. A lit point turns off if there - * are fewer than two or more than three surrounding - * lit points. An unlit point turns on if there - * are exactly three lit neighbors. The 'density' - * parameter determines how much of the board will - * start out lit. - */ - -int sx, sy; -float density = 0.5f; -int[][][] world; - -public void setup() -{ - size(640, 200, P3D); - frameRate(12); - sx = width; - sy = height; - world = new int[sx][sy][2]; - stroke(255); - - // Set random cells to 'on' - for (int i = 0; i < sx * sy * density; i++) { - world[(int)random(sx)][(int)random(sy)][1] = 1; - } -} - -public void draw() -{ - background(0); - - // Drawing and update cycle - for (int x = 0; x < sx; x=x+1) { - for (int y = 0; y < sy; y=y+1) { - //if (world[x][y][1] == 1) - // Change recommended by The.Lucky.Mutt - if ((world[x][y][1] == 1) || (world[x][y][1] == 0 && world[x][y][0] == 1)) - { - world[x][y][0] = 1; - point(x, y); - } - if (world[x][y][1] == -1) - { - world[x][y][0] = 0; - } - world[x][y][1] = 0; - } - } - // Birth and death cycle - for (int x = 0; x < sx; x=x+1) { - for (int y = 0; y < sy; y=y+1) { - int count = neighbors(x, y); - if (count == 3 && world[x][y][0] == 0) - { - world[x][y][1] = 1; - } - if ((count < 2 || count > 3) && world[x][y][0] == 1) - { - world[x][y][1] = -1; - } - } - } -} - -// Count the number of adjacent cells 'on' -public int neighbors(int x, int y) -{ - return world[(x + 1) % sx][y][0] + - world[x][(y + 1) % sy][0] + - world[(x + sx - 1) % sx][y][0] + - world[x][(y + sy - 1) % sy][0] + - world[(x + 1) % sx][(y + 1) % sy][0] + - world[(x + sx - 1) % sx][(y + 1) % sy][0] + - world[(x + sx - 1) % sx][(y + sy - 1) % sy][0] + - world[(x + 1) % sx][(y + sy - 1) % sy][0]; -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Conway" }); - } -} diff --git a/java/examples/Topics/Cellular Automata/Conway/applet/Conway.pde b/java/examples/Topics/Cellular Automata/Conway/applet/Conway.pde deleted file mode 100644 index d75bb342b..000000000 --- a/java/examples/Topics/Cellular Automata/Conway/applet/Conway.pde +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Conway's Game of Life - * by Mike Davis. - * - * This program is a simple version of Conway's - * game of Life. A lit point turns off if there - * are fewer than two or more than three surrounding - * lit points. An unlit point turns on if there - * are exactly three lit neighbors. The 'density' - * parameter determines how much of the board will - * start out lit. - */ - -int sx, sy; -float density = 0.5; -int[][][] world; - -void setup() -{ - size(640, 200, P3D); - frameRate(12); - sx = width; - sy = height; - world = new int[sx][sy][2]; - stroke(255); - - // Set random cells to 'on' - for (int i = 0; i < sx * sy * density; i++) { - world[(int)random(sx)][(int)random(sy)][1] = 1; - } -} - -void draw() -{ - background(0); - - // Drawing and update cycle - for (int x = 0; x < sx; x=x+1) { - for (int y = 0; y < sy; y=y+1) { - //if (world[x][y][1] == 1) - // Change recommended by The.Lucky.Mutt - if ((world[x][y][1] == 1) || (world[x][y][1] == 0 && world[x][y][0] == 1)) - { - world[x][y][0] = 1; - point(x, y); - } - if (world[x][y][1] == -1) - { - world[x][y][0] = 0; - } - world[x][y][1] = 0; - } - } - // Birth and death cycle - for (int x = 0; x < sx; x=x+1) { - for (int y = 0; y < sy; y=y+1) { - int count = neighbors(x, y); - if (count == 3 && world[x][y][0] == 0) - { - world[x][y][1] = 1; - } - if ((count < 2 || count > 3) && world[x][y][0] == 1) - { - world[x][y][1] = -1; - } - } - } -} - -// Count the number of adjacent cells 'on' -int neighbors(int x, int y) -{ - return world[(x + 1) % sx][y][0] + - world[x][(y + 1) % sy][0] + - world[(x + sx - 1) % sx][y][0] + - world[x][(y + sy - 1) % sy][0] + - world[(x + 1) % sx][(y + 1) % sy][0] + - world[(x + sx - 1) % sx][(y + 1) % sy][0] + - world[(x + sx - 1) % sx][(y + sy - 1) % sy][0] + - world[(x + 1) % sx][(y + sy - 1) % sy][0]; -} diff --git a/java/examples/Topics/Cellular Automata/Conway/applet/loading.gif b/java/examples/Topics/Cellular Automata/Conway/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Cellular Automata/Spore1/applet/Spore1.java b/java/examples/Topics/Cellular Automata/Spore1/applet/Spore1.java deleted file mode 100644 index 840dad342..000000000 --- a/java/examples/Topics/Cellular Automata/Spore1/applet/Spore1.java +++ /dev/null @@ -1,153 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Spore1 extends PApplet { - -/** - * Spore 1 - * by Mike Davis. - * - * A short program for alife experiments. Click in the window to restart. - * Each cell is represented by a pixel on the display as well as an entry in - * the array 'cells'. Each cell has a run() method, which performs actions - * based on the cell's surroundings. Cells run one at a time (to avoid conflicts - * like wanting to move to the same space) and in random order. - */ - -World w; -int numcells = 0; -int maxcells = 6700; -Cell[] cells = new Cell[maxcells]; -int spore_color; -// set lower for smoother animation, higher for faster simulation -int runs_per_loop = 10000; -int black = color(0, 0, 0); - -public void setup() -{ - size(640, 200, P2D); - frameRate(24); - clearscr(); - w = new World(); - spore_color = color(172, 255, 128); - seed(); -} - -public void seed() -{ - // Add cells at random places - for (int i = 0; i < maxcells; i++) - { - int cX = (int)random(width); - int cY = (int)random(height); - if (w.getpix(cX, cY) == black) - { - w.setpix(cX, cY, spore_color); - cells[numcells] = new Cell(cX, cY); - numcells++; - } - } -} - -public void draw() -{ - // Run cells in random order - for (int i = 0; i < runs_per_loop; i++) { - int selected = min((int)random(numcells), numcells - 1); - cells[selected].run(); - } -} - -public void clearscr() -{ - background(0); -} - -class Cell -{ - int x, y; - Cell(int xin, int yin) - { - x = xin; - y = yin; - } - - // Perform action based on surroundings - public void run() - { - // Fix cell coordinates - while(x < 0) { - x+=width; - } - while(x > width - 1) { - x-=width; - } - while(y < 0) { - y+=height; - } - while(y > height - 1) { - y-=height; - } - - // Cell instructions - if (w.getpix(x + 1, y) == black) { - move(0, 1); - } else if (w.getpix(x, y - 1) != black && w.getpix(x, y + 1) != black) { - move((int)random(9) - 4, (int)random(9) - 4); - } - } - - // Will move the cell (dx, dy) units if that space is empty - public void move(int dx, int dy) { - if (w.getpix(x + dx, y + dy) == black) { - w.setpix(x + dx, y + dy, w.getpix(x, y)); - w.setpix(x, y, color(0)); - x += dx; - y += dy; - } - } -} - -// The World class simply provides two functions, get and set, which access the -// display in the same way as getPixel and setPixel. The only difference is that -// the World class's get and set do screen wraparound ("toroidal coordinates"). -class World -{ - public void setpix(int x, int y, int c) { - while(x < 0) x+=width; - while(x > width - 1) x-=width; - while(y < 0) y+=height; - while(y > height - 1) y-=height; - set(x, y, c); - } - - public int getpix(int x, int y) { - while(x < 0) x+=width; - while(x > width - 1) x-=width; - while(y < 0) y+=height; - while(y > height - 1) y-=height; - return get(x, y); - } -} - -public void mousePressed() -{ - numcells = 0; - setup(); -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Spore1" }); - } -} diff --git a/java/examples/Topics/Cellular Automata/Spore1/applet/Spore1.pde b/java/examples/Topics/Cellular Automata/Spore1/applet/Spore1.pde deleted file mode 100644 index 46ec059b1..000000000 --- a/java/examples/Topics/Cellular Automata/Spore1/applet/Spore1.pde +++ /dev/null @@ -1,133 +0,0 @@ -/** - * Spore 1 - * by Mike Davis. - * - * A short program for alife experiments. Click in the window to restart. - * Each cell is represented by a pixel on the display as well as an entry in - * the array 'cells'. Each cell has a run() method, which performs actions - * based on the cell's surroundings. Cells run one at a time (to avoid conflicts - * like wanting to move to the same space) and in random order. - */ - -World w; -int numcells = 0; -int maxcells = 6700; -Cell[] cells = new Cell[maxcells]; -color spore_color; -// set lower for smoother animation, higher for faster simulation -int runs_per_loop = 10000; -color black = color(0, 0, 0); - -void setup() -{ - size(640, 200, P2D); - frameRate(24); - clearscr(); - w = new World(); - spore_color = color(172, 255, 128); - seed(); -} - -void seed() -{ - // Add cells at random places - for (int i = 0; i < maxcells; i++) - { - int cX = (int)random(width); - int cY = (int)random(height); - if (w.getpix(cX, cY) == black) - { - w.setpix(cX, cY, spore_color); - cells[numcells] = new Cell(cX, cY); - numcells++; - } - } -} - -void draw() -{ - // Run cells in random order - for (int i = 0; i < runs_per_loop; i++) { - int selected = min((int)random(numcells), numcells - 1); - cells[selected].run(); - } -} - -void clearscr() -{ - background(0); -} - -class Cell -{ - int x, y; - Cell(int xin, int yin) - { - x = xin; - y = yin; - } - - // Perform action based on surroundings - void run() - { - // Fix cell coordinates - while(x < 0) { - x+=width; - } - while(x > width - 1) { - x-=width; - } - while(y < 0) { - y+=height; - } - while(y > height - 1) { - y-=height; - } - - // Cell instructions - if (w.getpix(x + 1, y) == black) { - move(0, 1); - } else if (w.getpix(x, y - 1) != black && w.getpix(x, y + 1) != black) { - move((int)random(9) - 4, (int)random(9) - 4); - } - } - - // Will move the cell (dx, dy) units if that space is empty - void move(int dx, int dy) { - if (w.getpix(x + dx, y + dy) == black) { - w.setpix(x + dx, y + dy, w.getpix(x, y)); - w.setpix(x, y, color(0)); - x += dx; - y += dy; - } - } -} - -// The World class simply provides two functions, get and set, which access the -// display in the same way as getPixel and setPixel. The only difference is that -// the World class's get and set do screen wraparound ("toroidal coordinates"). -class World -{ - void setpix(int x, int y, int c) { - while(x < 0) x+=width; - while(x > width - 1) x-=width; - while(y < 0) y+=height; - while(y > height - 1) y-=height; - set(x, y, c); - } - - color getpix(int x, int y) { - while(x < 0) x+=width; - while(x > width - 1) x-=width; - while(y < 0) y+=height; - while(y > height - 1) y-=height; - return get(x, y); - } -} - -void mousePressed() -{ - numcells = 0; - setup(); -} - diff --git a/java/examples/Topics/Cellular Automata/Spore1/applet/loading.gif b/java/examples/Topics/Cellular Automata/Spore1/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQ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O#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Cellular Automata/Spore2/applet/Spore2.java b/java/examples/Topics/Cellular Automata/Spore2/applet/Spore2.java deleted file mode 100644 index b90c5c513..000000000 --- a/java/examples/Topics/Cellular Automata/Spore2/applet/Spore2.java +++ /dev/null @@ -1,196 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Spore2 extends PApplet { - -/** - * Spore 2 - * by Mike Davis. - * - * A short program for alife experiments. Click in the window to restart. - * Each cell is represented by a pixel on the display as well as an entry in - * the array 'cells'. Each cell has a run() method, which performs actions - * based on the cell's surroundings. Cells run one at a time (to avoid conflicts - * like wanting to move to the same space) and in random order. - */ - -World w; -int maxcells = 8000; -int numcells; -Cell[] cells = new Cell[maxcells]; -int spore1, spore2, spore3, spore4; -int black = color(0, 0, 0); -// set lower for smoother animation, higher for faster simulation -int runs_per_loop = 10000; - -public void setup() -{ - size(640, 200, P2D); - frameRate(24); - clearscr(); - w = new World(); - spore1 = color(128, 172, 255); - spore2 = color(64, 128, 255); - spore3 = color(255, 128, 172); - spore4 = color(255, 64, 128); - numcells = 0; - seed(); -} - -public void seed() -{ - // Add cells at random places - for (int i = 0; i < maxcells; i++) - { - int cX = PApplet.parseInt(random(width)); - int cY = PApplet.parseInt(random(height)); - int c; - float r = random(1); - if (r < 0.25f) c = spore1; - else if (r < 0.5f) c = spore2; - else if (r < 0.75f) c = spore3; - else c = spore4; - if (w.getpix(cX, cY) == black) - { - w.setpix(cX, cY, c); - cells[numcells] = new Cell(cX, cY); - numcells++; - } - } -} - -public void draw() -{ - // Run cells in random order - for (int i = 0; i < runs_per_loop; i++) { - int selected = min((int)random(numcells), numcells - 1); - cells[selected].run(); - } - - println(frameRate); -} - -public void clearscr() -{ - for (int y = 0; y < height; y++) { - for (int x = 0; x < width; x++) { - set(x, y, color(0)); - } - } -} - -class Cell -{ - int x, y; - Cell(int xin, int yin) - { - x = xin; - y = yin; - } - // Perform action based on surroundings - public void run() - { - // Fix cell coordinates - while(x < 0) { - x+=width; - } - while(x > width - 1) { - x-=width; - } - while(y < 0) { - y+=height; - } - while(y > height - 1) { - y-=height; - } - - // Cell instructions - int myColor = w.getpix(x, y); - if (myColor == spore1) { - if (w.getpix(x - 1, y + 1) == black && w.getpix(x + 1, y + 1) == black && w.getpix(x, y + 1) == black) move(0, 1); - else if (w.getpix(x - 1, y) == spore2 && w.getpix(x - 1, y - 1) != black) move(0, -1); - else if (w.getpix(x - 1, y) == spore2 && w.getpix(x - 1, y - 1) == black) move(-1, -1); - else if (w.getpix(x + 1, y) == spore1 && w.getpix(x + 1, y - 1) != black) move(0, -1); - else if (w.getpix(x + 1, y) == spore1 && w.getpix(x + 1, y - 1) == black) move(1, -1); - else move((int)random(3) - 1, 0); - } else if (myColor == spore2) { - if (w.getpix(x - 1, y + 1) == black && w.getpix(x + 1, y + 1) == black && w.getpix(x, y + 1) == black) move(0, 1); - else if (w.getpix(x + 1, y) == spore1 && w.getpix(x + 1, y - 1) != black) move(0, -1); - else if (w.getpix(x + 1, y) == spore1 && w.getpix(x + 1, y - 1) == black) move(1, -1); - else if (w.getpix(x - 1, y) == spore2 && w.getpix(x - 1, y - 1) != black) move(0, -1); - else if (w.getpix(x - 1, y) == spore2 && w.getpix(x - 1, y - 1) == black) move(-1, -1); - else move((int)random(3) - 1, 0); - } - else if (myColor == spore3) - { - if (w.getpix(x - 1, y - 1) == black && w.getpix(x + 1, y - 1) == black && w.getpix(x, y - 1) == black) move(0, -1); - else if (w.getpix(x - 1, y) == spore4 && w.getpix(x - 1, y + 1) != black) move(0, 1); - else if (w.getpix(x - 1, y) == spore4 && w.getpix(x - 1, y + 1) == black) move(-1, 1); - else if (w.getpix(x + 1, y) == spore3 && w.getpix(x + 1, y + 1) != black) move(0, 1); - else if (w.getpix(x + 1, y) == spore3 && w.getpix(x + 1, y + 1) == black) move(1, 1); - else move((int)random(3) - 1, 0); - } - else if (myColor == spore4) - { - if (w.getpix(x - 1, y - 1) == black && w.getpix(x + 1, y - 1) == black && w.getpix(x, y - 1) == black) move(0, -1); - else if (w.getpix(x + 1, y) == spore3 && w.getpix(x + 1, y + 1) != black) move(0, 1); - else if (w.getpix(x + 1, y) == spore3 && w.getpix(x + 1, y + 1) == black) move(1, 1); - else if (w.getpix(x - 1, y) == spore4 && w.getpix(x - 1, y + 1) != black) move(0, 1); - else if (w.getpix(x - 1, y) == spore4 && w.getpix(x - 1, y + 1) == black) move(-1, 1); - else move((int)random(3) - 1, 0); - } - } - - // Will move the cell (dx, dy) units if that space is empty - public void move(int dx, int dy) { - if (w.getpix(x + dx, y + dy) == black) { - w.setpix(x + dx, y + dy, w.getpix(x, y)); - w.setpix(x, y, color(0)); - x += dx; - y += dy; - } - } -} - -// The World class simply provides two functions, get and set, which access the -// display in the same way as getPixel and setPixel. The only difference is that -// the World class's get and set do screen wraparound ("toroidal coordinates"). -class World -{ - public void setpix(int x, int y, int c) { - while(x < 0) x+=width; - while(x > width - 1) x-=width; - while(y < 0) y+=height; - while(y > height - 1) y-=height; - set(x, y, c); - } - - public int getpix(int x, int y) { - while(x < 0) x+=width; - while(x > width - 1) x-=width; - while(y < 0) y+=height; - while(y > height - 1) y-=height; - return get(x, y); - } -} - -public void mousePressed() -{ - setup(); -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Spore2" }); - } -} diff --git a/java/examples/Topics/Cellular Automata/Spore2/applet/Spore2.pde b/java/examples/Topics/Cellular Automata/Spore2/applet/Spore2.pde deleted file mode 100644 index fdca1b043..000000000 --- a/java/examples/Topics/Cellular Automata/Spore2/applet/Spore2.pde +++ /dev/null @@ -1,176 +0,0 @@ -/** - * Spore 2 - * by Mike Davis. - * - * A short program for alife experiments. Click in the window to restart. - * Each cell is represented by a pixel on the display as well as an entry in - * the array 'cells'. Each cell has a run() method, which performs actions - * based on the cell's surroundings. Cells run one at a time (to avoid conflicts - * like wanting to move to the same space) and in random order. - */ - -World w; -int maxcells = 8000; -int numcells; -Cell[] cells = new Cell[maxcells]; -color spore1, spore2, spore3, spore4; -color black = color(0, 0, 0); -// set lower for smoother animation, higher for faster simulation -int runs_per_loop = 10000; - -void setup() -{ - size(640, 200, P2D); - frameRate(24); - clearscr(); - w = new World(); - spore1 = color(128, 172, 255); - spore2 = color(64, 128, 255); - spore3 = color(255, 128, 172); - spore4 = color(255, 64, 128); - numcells = 0; - seed(); -} - -void seed() -{ - // Add cells at random places - for (int i = 0; i < maxcells; i++) - { - int cX = int(random(width)); - int cY = int(random(height)); - int c; - float r = random(1); - if (r < 0.25) c = spore1; - else if (r < 0.5) c = spore2; - else if (r < 0.75) c = spore3; - else c = spore4; - if (w.getpix(cX, cY) == black) - { - w.setpix(cX, cY, c); - cells[numcells] = new Cell(cX, cY); - numcells++; - } - } -} - -void draw() -{ - // Run cells in random order - for (int i = 0; i < runs_per_loop; i++) { - int selected = min((int)random(numcells), numcells - 1); - cells[selected].run(); - } - - println(frameRate); -} - -void clearscr() -{ - for (int y = 0; y < height; y++) { - for (int x = 0; x < width; x++) { - set(x, y, color(0)); - } - } -} - -class Cell -{ - int x, y; - Cell(int xin, int yin) - { - x = xin; - y = yin; - } - // Perform action based on surroundings - void run() - { - // Fix cell coordinates - while(x < 0) { - x+=width; - } - while(x > width - 1) { - x-=width; - } - while(y < 0) { - y+=height; - } - while(y > height - 1) { - y-=height; - } - - // Cell instructions - int myColor = w.getpix(x, y); - if (myColor == spore1) { - if (w.getpix(x - 1, y + 1) == black && w.getpix(x + 1, y + 1) == black && w.getpix(x, y + 1) == black) move(0, 1); - else if (w.getpix(x - 1, y) == spore2 && w.getpix(x - 1, y - 1) != black) move(0, -1); - else if (w.getpix(x - 1, y) == spore2 && w.getpix(x - 1, y - 1) == black) move(-1, -1); - else if (w.getpix(x + 1, y) == spore1 && w.getpix(x + 1, y - 1) != black) move(0, -1); - else if (w.getpix(x + 1, y) == spore1 && w.getpix(x + 1, y - 1) == black) move(1, -1); - else move((int)random(3) - 1, 0); - } else if (myColor == spore2) { - if (w.getpix(x - 1, y + 1) == black && w.getpix(x + 1, y + 1) == black && w.getpix(x, y + 1) == black) move(0, 1); - else if (w.getpix(x + 1, y) == spore1 && w.getpix(x + 1, y - 1) != black) move(0, -1); - else if (w.getpix(x + 1, y) == spore1 && w.getpix(x + 1, y - 1) == black) move(1, -1); - else if (w.getpix(x - 1, y) == spore2 && w.getpix(x - 1, y - 1) != black) move(0, -1); - else if (w.getpix(x - 1, y) == spore2 && w.getpix(x - 1, y - 1) == black) move(-1, -1); - else move((int)random(3) - 1, 0); - } - else if (myColor == spore3) - { - if (w.getpix(x - 1, y - 1) == black && w.getpix(x + 1, y - 1) == black && w.getpix(x, y - 1) == black) move(0, -1); - else if (w.getpix(x - 1, y) == spore4 && w.getpix(x - 1, y + 1) != black) move(0, 1); - else if (w.getpix(x - 1, y) == spore4 && w.getpix(x - 1, y + 1) == black) move(-1, 1); - else if (w.getpix(x + 1, y) == spore3 && w.getpix(x + 1, y + 1) != black) move(0, 1); - else if (w.getpix(x + 1, y) == spore3 && w.getpix(x + 1, y + 1) == black) move(1, 1); - else move((int)random(3) - 1, 0); - } - else if (myColor == spore4) - { - if (w.getpix(x - 1, y - 1) == black && w.getpix(x + 1, y - 1) == black && w.getpix(x, y - 1) == black) move(0, -1); - else if (w.getpix(x + 1, y) == spore3 && w.getpix(x + 1, y + 1) != black) move(0, 1); - else if (w.getpix(x + 1, y) == spore3 && w.getpix(x + 1, y + 1) == black) move(1, 1); - else if (w.getpix(x - 1, y) == spore4 && w.getpix(x - 1, y + 1) != black) move(0, 1); - else if (w.getpix(x - 1, y) == spore4 && w.getpix(x - 1, y + 1) == black) move(-1, 1); - else move((int)random(3) - 1, 0); - } - } - - // Will move the cell (dx, dy) units if that space is empty - void move(int dx, int dy) { - if (w.getpix(x + dx, y + dy) == black) { - w.setpix(x + dx, y + dy, w.getpix(x, y)); - w.setpix(x, y, color(0)); - x += dx; - y += dy; - } - } -} - -// The World class simply provides two functions, get and set, which access the -// display in the same way as getPixel and setPixel. The only difference is that -// the World class's get and set do screen wraparound ("toroidal coordinates"). -class World -{ - void setpix(int x, int y, int c) { - while(x < 0) x+=width; - while(x > width - 1) x-=width; - while(y < 0) y+=height; - while(y > height - 1) y-=height; - set(x, y, c); - } - - color getpix(int x, int y) { - while(x < 0) x+=width; - while(x > width - 1) x-=width; - while(y < 0) y+=height; - while(y > height - 1) y-=height; - return get(x, y); - } -} - -void mousePressed() -{ - setup(); -} - diff --git a/java/examples/Topics/Cellular Automata/Spore2/applet/loading.gif b/java/examples/Topics/Cellular Automata/Spore2/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1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|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Cellular Automata/Wolfram/applet/CA.pde b/java/examples/Topics/Cellular Automata/Wolfram/applet/CA.pde deleted file mode 100644 index 30d02a378..000000000 --- a/java/examples/Topics/Cellular Automata/Wolfram/applet/CA.pde +++ /dev/null @@ -1,94 +0,0 @@ -class CA { - - int[] cells; // An array of 0s and 1s - int generation; // How many generations? - int scl; // How many pixels wide/high is each cell? - - int[] rules; // An array to store the ruleset, for example {0,1,1,0,1,1,0,1} - - CA(int[] r) { - rules = r; - scl = 1; - cells = new int[width/scl]; - restart(); - } - - CA() { - scl = 1; - cells = new int[width/scl]; - randomize(); - restart(); - } - - // Set the rules of the CA - void setRules(int[] r) { - rules = r; - } - - // Make a random ruleset - void randomize() { - for (int i = 0; i < 8; i++) { - rules[i] = int(random(2)); - } - } - - // Reset to generation 0 - void restart() { - for (int i = 0; i < cells.length; i++) { - cells[i] = 0; - } - cells[cells.length/2] = 1; // We arbitrarily start with just the middle cell having a state of "1" - generation = 0; - } - - // The process of creating the new generation - void generate() { - // First we create an empty array for the new values - int[] nextgen = new int[cells.length]; - // For every spot, determine new state by examing current state, and neighbor states - // Ignore edges that only have one neighor - for (int i = 1; i < cells.length-1; i++) { - int left = cells[i-1]; // Left neighbor state - int me = cells[i]; // Current state - int right = cells[i+1]; // Right neighbor state - nextgen[i] = rules(left,me,right); // Compute next generation state based on ruleset - } - // Copy the array into current value - cells = (int[]) nextgen.clone(); - generation++; - } - - // This is the easy part, just draw the cells, fill 255 for '1', fill 0 for '0' - void render() { - for (int i = 0; i < cells.length; i++) { - if (cells[i] == 1) fill(255); - else fill(0); - noStroke(); - rect(i*scl,generation*scl, scl,scl); - } - } - - // Implementing the Wolfram rules - // Could be improved and made more concise, but here we can explicitly see what is going on for each case - int rules (int a, int b, int c) { - if (a == 1 && b == 1 && c == 1) return rules[0]; - if (a == 1 && b == 1 && c == 0) return rules[1]; - if (a == 1 && b == 0 && c == 1) return rules[2]; - if (a == 1 && b == 0 && c == 0) return rules[3]; - if (a == 0 && b == 1 && c == 1) return rules[4]; - if (a == 0 && b == 1 && c == 0) return rules[5]; - if (a == 0 && b == 0 && c == 1) return rules[6]; - if (a == 0 && b == 0 && c == 0) return rules[7]; - return 0; - } - - // The CA is done if it reaches the bottom of the screen - boolean finished() { - if (generation > height/scl) { - return true; - } else { - return false; - } - } -} - diff --git a/java/examples/Topics/Cellular Automata/Wolfram/applet/Wolfram.java b/java/examples/Topics/Cellular Automata/Wolfram/applet/Wolfram.java deleted file mode 100644 index 4674c38af..000000000 --- a/java/examples/Topics/Cellular Automata/Wolfram/applet/Wolfram.java +++ /dev/null @@ -1,152 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Wolfram extends PApplet { - -/** - * Wolfram Cellular Automata - * by Daniel Shiffman. - * - * Simple demonstration of a Wolfram 1-dimensional cellular automata - * When the system reaches bottom of the window, it restarts with a new ruleset - * Mouse click restarts as well. - */ - -CA ca; // An instance object to describe the Wolfram basic Cellular Automata - -public void setup() { - size(640, 360, P2D); - frameRate(30); - background(0); - int[] ruleset = {0,1,0,1,1,0,1,0}; // An initial rule system - ca = new CA(ruleset); // Initialize CA -} - -public void draw() { - ca.render(); // Draw the CA - ca.generate(); // Generate the next level - - if (ca.finished()) { // If we're done, clear the screen, pick a new ruleset and restart - background(0); - ca.randomize(); - ca.restart(); - } -} - -public void mousePressed() { - background(0); - ca.randomize(); - ca.restart(); -} - - - -class CA { - - int[] cells; // An array of 0s and 1s - int generation; // How many generations? - int scl; // How many pixels wide/high is each cell? - - int[] rules; // An array to store the ruleset, for example {0,1,1,0,1,1,0,1} - - CA(int[] r) { - rules = r; - scl = 1; - cells = new int[width/scl]; - restart(); - } - - CA() { - scl = 1; - cells = new int[width/scl]; - randomize(); - restart(); - } - - // Set the rules of the CA - public void setRules(int[] r) { - rules = r; - } - - // Make a random ruleset - public void randomize() { - for (int i = 0; i < 8; i++) { - rules[i] = PApplet.parseInt(random(2)); - } - } - - // Reset to generation 0 - public void restart() { - for (int i = 0; i < cells.length; i++) { - cells[i] = 0; - } - cells[cells.length/2] = 1; // We arbitrarily start with just the middle cell having a state of "1" - generation = 0; - } - - // The process of creating the new generation - public void generate() { - // First we create an empty array for the new values - int[] nextgen = new int[cells.length]; - // For every spot, determine new state by examing current state, and neighbor states - // Ignore edges that only have one neighor - for (int i = 1; i < cells.length-1; i++) { - int left = cells[i-1]; // Left neighbor state - int me = cells[i]; // Current state - int right = cells[i+1]; // Right neighbor state - nextgen[i] = rules(left,me,right); // Compute next generation state based on ruleset - } - // Copy the array into current value - cells = (int[]) nextgen.clone(); - generation++; - } - - // This is the easy part, just draw the cells, fill 255 for '1', fill 0 for '0' - public void render() { - for (int i = 0; i < cells.length; i++) { - if (cells[i] == 1) fill(255); - else fill(0); - noStroke(); - rect(i*scl,generation*scl, scl,scl); - } - } - - // Implementing the Wolfram rules - // Could be improved and made more concise, but here we can explicitly see what is going on for each case - public int rules (int a, int b, int c) { - if (a == 1 && b == 1 && c == 1) return rules[0]; - if (a == 1 && b == 1 && c == 0) return rules[1]; - if (a == 1 && b == 0 && c == 1) return rules[2]; - if (a == 1 && b == 0 && c == 0) return rules[3]; - if (a == 0 && b == 1 && c == 1) return rules[4]; - if (a == 0 && b == 1 && c == 0) return rules[5]; - if (a == 0 && b == 0 && c == 1) return rules[6]; - if (a == 0 && b == 0 && c == 0) return rules[7]; - return 0; - } - - // The CA is done if it reaches the bottom of the screen - public boolean finished() { - if (generation > height/scl) { - return true; - } else { - return false; - } - } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Wolfram" }); - } -} diff --git a/java/examples/Topics/Cellular Automata/Wolfram/applet/Wolfram.pde b/java/examples/Topics/Cellular Automata/Wolfram/applet/Wolfram.pde deleted file mode 100644 index 328e6b9b9..000000000 --- a/java/examples/Topics/Cellular Automata/Wolfram/applet/Wolfram.pde +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Wolfram Cellular Automata - * by Daniel Shiffman. - * - * Simple demonstration of a Wolfram 1-dimensional cellular automata - * When the system reaches bottom of the window, it restarts with a new ruleset - * Mouse click restarts as well. - */ - -CA ca; // An instance object to describe the Wolfram basic Cellular Automata - -void setup() { - size(640, 360, P2D); - frameRate(30); - background(0); - int[] ruleset = {0,1,0,1,1,0,1,0}; // An initial rule system - ca = new CA(ruleset); // Initialize CA -} - -void draw() { - ca.render(); // Draw the CA - ca.generate(); // Generate the next level - - if (ca.finished()) { // If we're done, clear the screen, pick a new ruleset and restart - background(0); - ca.randomize(); - ca.restart(); - } -} - -void mousePressed() { - background(0); - ca.randomize(); - ca.restart(); -} - - - diff --git a/java/examples/Topics/Cellular Automata/Wolfram/applet/loading.gif b/java/examples/Topics/Cellular Automata/Wolfram/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Drawing/Animator/applet/Animator.java b/java/examples/Topics/Drawing/Animator/applet/Animator.java deleted file mode 100644 index 6fe4e0183..000000000 --- a/java/examples/Topics/Drawing/Animator/applet/Animator.java +++ /dev/null @@ -1,69 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Animator extends PApplet { - -/** - * Animator. - * - * Click and drag to draw and start the program. - * - * A simple animation tool that displays a continuous cycle of - * twenty-four images. Each image is displayed for 30 milliseconds - * to create animation. While each image is displayed, it\u2019s possible - * to draw directly into it by pressing the mouse and moving the cursor. - * - */ - -int currentFrame = 0; -PImage[] frames = new PImage[24]; -int lastTime = 0; - -public void setup() -{ - size(640, 200); - strokeWeight(12); - smooth(); - background(204); - for (int i = 0; i < frames.length; i++) { - frames[i] = get(); // Create a blank frame - } -} - -public void draw() -{ - int currentTime = millis(); - if (currentTime > lastTime+30) { - nextFrame(); - lastTime = currentTime; - } - if (mousePressed == true) { - line(pmouseX, pmouseY, mouseX, mouseY); - } -} - -public void nextFrame() -{ - frames[currentFrame] = get(); // Get the display window - currentFrame++; // Increment to next frame - if (currentFrame >= frames.length) { - currentFrame = 0; - } - image(frames[currentFrame], 0, 0); -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Animator" }); - } -} diff --git a/java/examples/Topics/Drawing/Animator/applet/Animator.pde b/java/examples/Topics/Drawing/Animator/applet/Animator.pde deleted file mode 100644 index 883602eea..000000000 --- a/java/examples/Topics/Drawing/Animator/applet/Animator.pde +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Animator. - * - * Click and drag to draw and start the program. - * - * A simple animation tool that displays a continuous cycle of - * twenty-four images. Each image is displayed for 30 milliseconds - * to create animation. While each image is displayed, it’s possible - * to draw directly into it by pressing the mouse and moving the cursor. - * - */ - -int currentFrame = 0; -PImage[] frames = new PImage[24]; -int lastTime = 0; - -void setup() -{ - size(640, 200); - strokeWeight(12); - smooth(); - background(204); - for (int i = 0; i < frames.length; i++) { - frames[i] = get(); // Create a blank frame - } -} - -void draw() -{ - int currentTime = millis(); - if (currentTime > lastTime+30) { - nextFrame(); - lastTime = currentTime; - } - if (mousePressed == true) { - line(pmouseX, pmouseY, mouseX, mouseY); - } -} - -void nextFrame() -{ - frames[currentFrame] = get(); // Get the display window - currentFrame++; // Increment to next frame - if (currentFrame >= frames.length) { - currentFrame = 0; - } - image(frames[currentFrame], 0, 0); -} - diff --git a/java/examples/Topics/Drawing/Animator/applet/loading.gif b/java/examples/Topics/Drawing/Animator/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Drawing/ContinuousLines/applet/ContinuousLines.java b/java/examples/Topics/Drawing/ContinuousLines/applet/ContinuousLines.java deleted file mode 100644 index 1d2178c95..000000000 --- a/java/examples/Topics/Drawing/ContinuousLines/applet/ContinuousLines.java +++ /dev/null @@ -1,37 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class ContinuousLines extends PApplet { - -/** - * Continuous Lines. - * - * Click and drag the mouse to draw a line. - */ - -public void setup() { - size(640, 200); - background(102); -} - -public void draw() { - stroke(255); - if(mousePressed) { - line(mouseX, mouseY, pmouseX, pmouseY); - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "ContinuousLines" }); - } -} diff --git a/java/examples/Topics/Drawing/ContinuousLines/applet/ContinuousLines.pde b/java/examples/Topics/Drawing/ContinuousLines/applet/ContinuousLines.pde deleted file mode 100644 index 9687331ba..000000000 --- a/java/examples/Topics/Drawing/ContinuousLines/applet/ContinuousLines.pde +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Continuous Lines. - * - * Click and drag the mouse to draw a line. - */ - -void setup() { - size(640, 200); - background(102); -} - -void draw() { - stroke(255); - if(mousePressed) { - line(mouseX, mouseY, pmouseX, pmouseY); - } -} diff --git a/java/examples/Topics/Drawing/ContinuousLines/applet/loading.gif b/java/examples/Topics/Drawing/ContinuousLines/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)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QHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Drawing/CustomTool/applet/CustomTool.java b/java/examples/Topics/Drawing/CustomTool/applet/CustomTool.java deleted file mode 100644 index b444c5e95..000000000 --- a/java/examples/Topics/Drawing/CustomTool/applet/CustomTool.java +++ /dev/null @@ -1,104 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class CustomTool extends PApplet { - -/** - * Custom Tool. - * - * Move the cursor across the screen to draw. - * In addition to creating software tools to simulate pens and pencils, - * it is possible to create unique tools to draw with. - */ - -int dots = 1000; -float[] dX = new float[dots]; -float[] dY = new float[dots]; - -float l_0 = 0.0f; -float h_0 = 0.0f; - -float legX = 0.0f; -float legY = 0.0f; -float thighX = 0.0f; -float thighY = 0.0f; - -float l = 60.0f; // Length of the 'leg' -float h = 90.0f; // Height of the 'leg' - -float nmx, nmy = 0.0f; -float mx, my = 0.0f; - -int currentValue = 0; -int valdir = 1; - -public void setup() -{ - size(640, 360); - noStroke(); - smooth(); - background(102); -} - -public void draw() -{ - // Smooth the mouse - nmx = mouseX; - nmy = mouseY; - if((abs(mx - nmx) > 1.0f) || (abs(my - nmy) > 1.0f)) { - mx = mx - (mx-nmx)/20.0f; - my = my - (my-nmy)/20.0f; - - // Set the drawing value - currentValue += 1* valdir; - if(currentValue > 255 || currentValue <= 0) { - valdir *= -1; - } - } - - iKinematics(); - kinematics(); - - pushMatrix(); - translate(width/2, height/2); - stroke(currentValue); - line(thighX, thighY, legX, legY); - popMatrix(); - - stroke(255); - point(legX + width/2, legY + height/2); -} - -public void kinematics() -{ - thighX = h*cos(h_0); - thighY = h*sin(h_0); - legX = thighX + l*cos(h_0 - l_0); - legY = thighY + l*sin(h_0 - l_0); -} - -public void iKinematics() -{ - float tx = mx - width/2.0f; - float ty = my - height/2.0f; - float c2 = (tx*tx + ty*ty - h*h - l*l)/(2*h*l); //in degrees - float s2 = sqrt(abs(1 - c2*c2)); // the sign here determines the bend in the joint - l_0 = -atan2(s2, c2); - h_0 = atan2(ty, tx) - atan2(l*s2, h+l*c2); -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "CustomTool" }); - } -} diff --git a/java/examples/Topics/Drawing/CustomTool/applet/CustomTool.pde b/java/examples/Topics/Drawing/CustomTool/applet/CustomTool.pde deleted file mode 100644 index 96c3ec67c..000000000 --- a/java/examples/Topics/Drawing/CustomTool/applet/CustomTool.pde +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Custom Tool. - * - * Move the cursor across the screen to draw. - * In addition to creating software tools to simulate pens and pencils, - * it is possible to create unique tools to draw with. - */ - -int dots = 1000; -float[] dX = new float[dots]; -float[] dY = new float[dots]; - -float l_0 = 0.0; -float h_0 = 0.0; - -float legX = 0.0; -float legY = 0.0; -float thighX = 0.0; -float thighY = 0.0; - -float l = 60.0; // Length of the 'leg' -float h = 90.0; // Height of the 'leg' - -float nmx, nmy = 0.0; -float mx, my = 0.0; - -int currentValue = 0; -int valdir = 1; - -void setup() -{ - size(640, 360); - noStroke(); - smooth(); - background(102); -} - -void draw() -{ - // Smooth the mouse - nmx = mouseX; - nmy = mouseY; - if((abs(mx - nmx) > 1.0) || (abs(my - nmy) > 1.0)) { - mx = mx - (mx-nmx)/20.0; - my = my - (my-nmy)/20.0; - - // Set the drawing value - currentValue += 1* valdir; - if(currentValue > 255 || currentValue <= 0) { - valdir *= -1; - } - } - - iKinematics(); - kinematics(); - - pushMatrix(); - translate(width/2, height/2); - stroke(currentValue); - line(thighX, thighY, legX, legY); - popMatrix(); - - stroke(255); - point(legX + width/2, legY + height/2); -} - -void kinematics() -{ - thighX = h*cos(h_0); - thighY = h*sin(h_0); - legX = thighX + l*cos(h_0 - l_0); - legY = thighY + l*sin(h_0 - l_0); -} - -void iKinematics() -{ - float tx = mx - width/2.0; - float ty = my - height/2.0; - float c2 = (tx*tx + ty*ty - h*h - l*l)/(2*h*l); //in degrees - float s2 = sqrt(abs(1 - c2*c2)); // the sign here determines the bend in the joint - l_0 = -atan2(s2, c2); - h_0 = atan2(ty, tx) - atan2(l*s2, h+l*c2); -} - diff --git a/java/examples/Topics/Drawing/CustomTool/applet/loading.gif b/java/examples/Topics/Drawing/CustomTool/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}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{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Drawing/Pattern/applet/Pattern.java b/java/examples/Topics/Drawing/Pattern/applet/Pattern.java deleted file mode 100644 index eb395338c..000000000 --- a/java/examples/Topics/Drawing/Pattern/applet/Pattern.java +++ /dev/null @@ -1,54 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Pattern extends PApplet { - -/** - * Patterns. - * - * Move the cursor over the image to draw with a software tool - * which responds to the speed of the mouse. - */ - -public void setup() -{ - size(640, 360); - background(102); - smooth(); -} - -public void draw() -{ - // Call the variableEllipse() method and send it the - // parameters for the current mouse position - // and the previous mouse position - variableEllipse(mouseX, mouseY, pmouseX, pmouseY); -} - - -// The simple method variableEllipse() was created specifically -// for this program. It calculates the speed of the mouse -// and draws a small ellipse if the mouse is moving slowly -// and draws a large ellipse if the mouse is moving quickly - -public void variableEllipse(int x, int y, int px, int py) -{ - float speed = abs(x-px) + abs(y-py); - stroke(speed); - ellipse(x, y, speed, speed); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Pattern" }); - } -} diff --git a/java/examples/Topics/Drawing/Pattern/applet/Pattern.pde b/java/examples/Topics/Drawing/Pattern/applet/Pattern.pde deleted file mode 100644 index 882b19d74..000000000 --- a/java/examples/Topics/Drawing/Pattern/applet/Pattern.pde +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Patterns. - * - * Move the cursor over the image to draw with a software tool - * which responds to the speed of the mouse. - */ - -void setup() -{ - size(640, 360); - background(102); - smooth(); -} - -void draw() -{ - // Call the variableEllipse() method and send it the - // parameters for the current mouse position - // and the previous mouse position - variableEllipse(mouseX, mouseY, pmouseX, pmouseY); -} - - -// The simple method variableEllipse() was created specifically -// for this program. It calculates the speed of the mouse -// and draws a small ellipse if the mouse is moving slowly -// and draws a large ellipse if the mouse is moving quickly - -void variableEllipse(int x, int y, int px, int py) -{ - float speed = abs(x-px) + abs(y-py); - stroke(speed); - ellipse(x, y, speed, speed); -} diff --git a/java/examples/Topics/Drawing/Pattern/applet/loading.gif b/java/examples/Topics/Drawing/Pattern/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`t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w-$ diff --git a/java/examples/Topics/Drawing/Pulses/applet/Pulses.java b/java/examples/Topics/Drawing/Pulses/applet/Pulses.java deleted file mode 100644 index 4646c9a5d..000000000 --- a/java/examples/Topics/Drawing/Pulses/applet/Pulses.java +++ /dev/null @@ -1,53 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Pulses extends PApplet { - -/** - * Pulses. - * - * Software drawing instruments can follow a rhythm or abide by rules independent - * of drawn gestures. This is a form of collaborative drawing in which the draftsperson - * controls some aspects of the image and the software controls others. - */ - -int angle = 0; - -public void setup() { - size(640, 360); - background(102); - smooth(); - noStroke(); - fill(0, 102); -} - -public void draw() { - // Draw only when mouse is pressed - if (mousePressed == true) { - angle += 10; - float val = cos(radians(angle)) * 6.0f; - for (int a = 0; a < 360; a += 75) { - float xoff = cos(radians(a)) * val; - float yoff = sin(radians(a)) * val; - fill(0); - ellipse(mouseX + xoff, mouseY + yoff, val, val); - } - fill(255); - ellipse(mouseX, mouseY, 2, 2); - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Pulses" }); - } -} diff --git a/java/examples/Topics/Drawing/Pulses/applet/Pulses.pde b/java/examples/Topics/Drawing/Pulses/applet/Pulses.pde deleted file mode 100644 index c8b07ec52..000000000 --- a/java/examples/Topics/Drawing/Pulses/applet/Pulses.pde +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Pulses. - * - * Software drawing instruments can follow a rhythm or abide by rules independent - * of drawn gestures. This is a form of collaborative drawing in which the draftsperson - * controls some aspects of the image and the software controls others. - */ - -int angle = 0; - -void setup() { - size(640, 360); - background(102); - smooth(); - noStroke(); - fill(0, 102); -} - -void draw() { - // Draw only when mouse is pressed - if (mousePressed == true) { - angle += 10; - float val = cos(radians(angle)) * 6.0; - for (int a = 0; a < 360; a += 75) { - float xoff = cos(radians(a)) * val; - float yoff = sin(radians(a)) * val; - fill(0); - ellipse(mouseX + xoff, mouseY + yoff, val, val); - } - fill(255); - ellipse(mouseX, mouseY, 2, 2); - } -} diff --git a/java/examples/Topics/Drawing/Pulses/applet/loading.gif b/java/examples/Topics/Drawing/Pulses/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Drawing/ScribblePlotter/applet/ScribblePlotter.java b/java/examples/Topics/Drawing/ScribblePlotter/applet/ScribblePlotter.java deleted file mode 100644 index 48f6f20e4..000000000 --- a/java/examples/Topics/Drawing/ScribblePlotter/applet/ScribblePlotter.java +++ /dev/null @@ -1,111 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class ScribblePlotter extends PApplet { - -/** - * Scribble Plotter - * by Ira Greenberg. - * - * Using 2-dimensional arrays, record end points - * and replot scribbles between points. - */ - -int SCRIBBLE = 0; -int HATCHING = 1; - -public void setup(){ - size(640, 360); - background(0); - - // Create arrays to hold x, y coords - float[]x = new float[4]; - float[]y = new float[4]; - // create a convenient 2-dimensional - // array to hold x, y arrays - float[][]xy = {x, y}; - - // Record points - // X positions - xy[0][0] = 125; - xy[0][1] = 475; - xy[0][2] = 475; - xy[0][3] = 125; - - // Y positions - xy[1][0] = 100; - xy[1][1] = 100; - xy[1][2] = 260; - xy[1][3] = 260; - - // Call plotting function - makeRect(xy); -} - -public void makeRect(float[][]pts){ - stroke(255); - smooth(); - - // Scribble variables, that get passed as arguments to the scribble function - int steps = 100; - float scribVal = 3.0f; - for (int i = 0; i < pts[0].length; i++){ - // Plots vertices - strokeWeight(5); - point(pts[0][i], pts[1][i]); - - // Call scribble function - strokeWeight(.5f); - if (i > 0){ - scribble(pts[0][i], pts[1][i], pts[0][i-1], pts[1][i-1], steps, scribVal, SCRIBBLE); - } - if (i == pts[0].length-1){ - // Show some hatching between last 2 points - scribble(pts[0][i], pts[1][i], pts[0][0], pts[1][0], steps, scribVal*2, HATCHING); - } - } -} - -/* - Scribble function plots lines between end points, - determined by steps and scribVal arguments. - two styles are available: SCRIBBLE and HATCHING, which - are interestingly only dependent on parentheses - placement in the line() function calls. -*/ - -public void scribble(float x1, float y1, float x2, float y2, int steps, float scribVal, int style){ - - float xStep = (x2-x1)/steps; - float yStep = (y2-y1)/steps; - for (int i = 0; i < steps; i++){ - if(style == SCRIBBLE){ - if (i < steps-1){ - line(x1, y1, x1+=xStep+random(-scribVal, scribVal), y1+=yStep+random(-scribVal, scribVal)); - } - else { - // extra line needed to attach line back to point- not necessary in HATCHING style - line(x1, y1, x2, y2); - } - } - else if (style == HATCHING){ - line(x1, y1, (x1+=xStep)+random(-scribVal, scribVal), (y1+=yStep)+random(-scribVal, scribVal)); - } - } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "ScribblePlotter" }); - } -} diff --git a/java/examples/Topics/Drawing/ScribblePlotter/applet/ScribblePlotter.pde b/java/examples/Topics/Drawing/ScribblePlotter/applet/ScribblePlotter.pde deleted file mode 100644 index f5dcbf6ef..000000000 --- a/java/examples/Topics/Drawing/ScribblePlotter/applet/ScribblePlotter.pde +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Scribble Plotter - * by Ira Greenberg. - * - * Using 2-dimensional arrays, record end points - * and replot scribbles between points. - */ - -int SCRIBBLE = 0; -int HATCHING = 1; - -void setup(){ - size(640, 360); - background(0); - - // Create arrays to hold x, y coords - float[]x = new float[4]; - float[]y = new float[4]; - // create a convenient 2-dimensional - // array to hold x, y arrays - float[][]xy = {x, y}; - - // Record points - // X positions - xy[0][0] = 125; - xy[0][1] = 475; - xy[0][2] = 475; - xy[0][3] = 125; - - // Y positions - xy[1][0] = 100; - xy[1][1] = 100; - xy[1][2] = 260; - xy[1][3] = 260; - - // Call plotting function - makeRect(xy); -} - -void makeRect(float[][]pts){ - stroke(255); - smooth(); - - // Scribble variables, that get passed as arguments to the scribble function - int steps = 100; - float scribVal = 3.0; - for (int i = 0; i < pts[0].length; i++){ - // Plots vertices - strokeWeight(5); - point(pts[0][i], pts[1][i]); - - // Call scribble function - strokeWeight(.5); - if (i > 0){ - scribble(pts[0][i], pts[1][i], pts[0][i-1], pts[1][i-1], steps, scribVal, SCRIBBLE); - } - if (i == pts[0].length-1){ - // Show some hatching between last 2 points - scribble(pts[0][i], pts[1][i], pts[0][0], pts[1][0], steps, scribVal*2, HATCHING); - } - } -} - -/* - Scribble function plots lines between end points, - determined by steps and scribVal arguments. - two styles are available: SCRIBBLE and HATCHING, which - are interestingly only dependent on parentheses - placement in the line() function calls. -*/ - -void scribble(float x1, float y1, float x2, float y2, int steps, float scribVal, int style){ - - float xStep = (x2-x1)/steps; - float yStep = (y2-y1)/steps; - for (int i = 0; i < steps; i++){ - if(style == SCRIBBLE){ - if (i < steps-1){ - line(x1, y1, x1+=xStep+random(-scribVal, scribVal), y1+=yStep+random(-scribVal, scribVal)); - } - else { - // extra line needed to attach line back to point- not necessary in HATCHING style - line(x1, y1, x2, y2); - } - } - else if (style == HATCHING){ - line(x1, y1, (x1+=xStep)+random(-scribVal, scribVal), (y1+=yStep)+random(-scribVal, scribVal)); - } - } -} - diff --git a/java/examples/Topics/Drawing/ScribblePlotter/applet/loading.gif b/java/examples/Topics/Drawing/ScribblePlotter/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0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=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Effects/FireCube/applet/FireCube.java b/java/examples/Topics/Effects/FireCube/applet/FireCube.java deleted file mode 100644 index e21d13601..000000000 --- a/java/examples/Topics/Effects/FireCube/applet/FireCube.java +++ /dev/null @@ -1,132 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class FireCube extends PApplet { - -/** - * Fire Cube demo effect - * by luis2048. - * - * A rotating wireframe cube with flames rising up the screen. - * The fire effect has been used quite often for oldskool demos. - * First you create a palette of 256 colors ranging from red to - * yellow (including black). For every frame, calculate each row - * of pixels based on the two rows below it: The value of each pixel, - * becomes the sum of the 3 pixels below it (one directly below, one - * to the left, and one to the right), and one pixel directly two - * rows below it. Then divide the sum so that the fire dies out as - * it rises. - */ - -// This will contain the pixels used to calculate the fire effect -int[][] fire; - -// Flame colors -int[] palette; -float angle; -int[] calc1,calc2,calc3,calc4,calc5; - -PGraphics pg; - -public void setup(){ - size(640, 360, P3D); - - // Create buffered image for 3d cube - pg = createGraphics(width, height, P3D); - - calc1 = new int[width]; - calc3 = new int[width]; - calc4 = new int[width]; - calc2 = new int[height]; - calc5 = new int[height]; - - colorMode(HSB); - - fire = new int[width][height]; - palette = new int[255]; - - // Generate the palette - for(int x = 0; x < palette.length; x++) { - //Hue goes from 0 to 85: red to yellow - //Saturation is always the maximum: 255 - //Lightness is 0..255 for x=0..128, and 255 for x=128..255 - palette[x] = color(x/3, 255, constrain(x*3, 0, 255)); - } - - // Precalculate which pixel values to add during animation loop - // this speeds up the effect by 10fps - for (int x = 0; x < width; x++) { - calc1[x] = x % width; - calc3[x] = (x - 1 + width) % width; - calc4[x] = (x + 1) % width; - } - - for(int y = 0; y < height; y++) { - calc2[y] = (y + 1) % height; - calc5[y] = (y + 2) % height; - } -} - -public void draw() { - angle = angle + 0.05f; - - // Rotating wireframe cube - pg.beginDraw(); - pg.translate(width >> 1, height >> 1); - pg.rotateX(sin(angle/2)); - pg.rotateY(cos(angle/2)); - pg.background(0); - pg.stroke(128); - pg.scale(25); - pg.noFill(); - pg.box(4); - pg.endDraw(); - - // Randomize the bottom row of the fire buffer - for(int x = 0; x < width; x++) - { - fire[x][height-1] = PApplet.parseInt(random(0,190)) ; - } - - loadPixels(); - - int counter = 0; - // Do the fire calculations for every pixel, from top to bottom - for (int y = 0; y < height; y++) { - for(int x = 0; x < width; x++) { - // Add pixel values around current pixel - - fire[x][y] = - ((fire[calc3[x]][calc2[y]] - + fire[calc1[x]][calc2[y]] - + fire[calc4[x]][calc2[y]] - + fire[calc1[x]][calc5[y]]) << 5) / 129; - - // Output everything to screen using our palette colors - pixels[counter] = palette[fire[x][y]]; - - // Extract the red value using right shift and bit mask - // equivalent of red(pg.pixels[x+y*w]) - if ((pg.pixels[counter++] >> 16 & 0xFF) == 128) { - // Only map 3D cube 'lit' pixels onto fire array needed for next frame - fire[x][y] = 128; - } - } - } - updatePixels(); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "FireCube" }); - } -} diff --git a/java/examples/Topics/Effects/FireCube/applet/FireCube.pde b/java/examples/Topics/Effects/FireCube/applet/FireCube.pde deleted file mode 100644 index b66a50c1d..000000000 --- a/java/examples/Topics/Effects/FireCube/applet/FireCube.pde +++ /dev/null @@ -1,112 +0,0 @@ -/** - * Fire Cube demo effect - * by luis2048. - * - * A rotating wireframe cube with flames rising up the screen. - * The fire effect has been used quite often for oldskool demos. - * First you create a palette of 256 colors ranging from red to - * yellow (including black). For every frame, calculate each row - * of pixels based on the two rows below it: The value of each pixel, - * becomes the sum of the 3 pixels below it (one directly below, one - * to the left, and one to the right), and one pixel directly two - * rows below it. Then divide the sum so that the fire dies out as - * it rises. - */ - -// This will contain the pixels used to calculate the fire effect -int[][] fire; - -// Flame colors -color[] palette; -float angle; -int[] calc1,calc2,calc3,calc4,calc5; - -PGraphics pg; - -void setup(){ - size(640, 360, P3D); - - // Create buffered image for 3d cube - pg = createGraphics(width, height, P3D); - - calc1 = new int[width]; - calc3 = new int[width]; - calc4 = new int[width]; - calc2 = new int[height]; - calc5 = new int[height]; - - colorMode(HSB); - - fire = new int[width][height]; - palette = new color[255]; - - // Generate the palette - for(int x = 0; x < palette.length; x++) { - //Hue goes from 0 to 85: red to yellow - //Saturation is always the maximum: 255 - //Lightness is 0..255 for x=0..128, and 255 for x=128..255 - palette[x] = color(x/3, 255, constrain(x*3, 0, 255)); - } - - // Precalculate which pixel values to add during animation loop - // this speeds up the effect by 10fps - for (int x = 0; x < width; x++) { - calc1[x] = x % width; - calc3[x] = (x - 1 + width) % width; - calc4[x] = (x + 1) % width; - } - - for(int y = 0; y < height; y++) { - calc2[y] = (y + 1) % height; - calc5[y] = (y + 2) % height; - } -} - -void draw() { - angle = angle + 0.05; - - // Rotating wireframe cube - pg.beginDraw(); - pg.translate(width >> 1, height >> 1); - pg.rotateX(sin(angle/2)); - pg.rotateY(cos(angle/2)); - pg.background(0); - pg.stroke(128); - pg.scale(25); - pg.noFill(); - pg.box(4); - pg.endDraw(); - - // Randomize the bottom row of the fire buffer - for(int x = 0; x < width; x++) - { - fire[x][height-1] = int(random(0,190)) ; - } - - loadPixels(); - - int counter = 0; - // Do the fire calculations for every pixel, from top to bottom - for (int y = 0; y < height; y++) { - for(int x = 0; x < width; x++) { - // Add pixel values around current pixel - - fire[x][y] = - ((fire[calc3[x]][calc2[y]] - + fire[calc1[x]][calc2[y]] - + fire[calc4[x]][calc2[y]] - + fire[calc1[x]][calc5[y]]) << 5) / 129; - - // Output everything to screen using our palette colors - pixels[counter] = palette[fire[x][y]]; - - // Extract the red value using right shift and bit mask - // equivalent of red(pg.pixels[x+y*w]) - if ((pg.pixels[counter++] >> 16 & 0xFF) == 128) { - // Only map 3D cube 'lit' pixels onto fire array needed for next frame - fire[x][y] = 128; - } - } - } - updatePixels(); -} diff --git a/java/examples/Topics/Effects/FireCube/applet/loading.gif b/java/examples/Topics/Effects/FireCube/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Effects/Lens/applet/Lens.java b/java/examples/Topics/Effects/Lens/applet/Lens.java deleted file mode 100644 index 1ec9e055c..000000000 --- a/java/examples/Topics/Effects/Lens/applet/Lens.java +++ /dev/null @@ -1,125 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Lens extends PApplet { - -/** - * Lens Demo Effect - * by luis2048. - * - * A picture is shown and it looks like a magnifying glass - * is drawn over the picture. One of the most famous demos - * that has a lens effect is 2nd reality by future crew. - * The trick is to precalculate the entire effect. Just make - * an array that for each pixel in the destination picture - * tells which pixel to take from the source picture. This - * array is called the transformation array. The tricky part - * is to calculate the transformation array to make the - * destination look like a lens is beeing held over the source - * picture. Based on lens formula by on Abe Racadabra. - */ - -int lensD = 256; // Lens diameter -int[] lensArray = new int[lensD*lensD]; // Height and width of lens - -PGraphics lensEffect; -PImage lensImage; -PImage lensImage2; - -int xx = 0; -int yy = 0; -int dx = 1; -int dy = 1; - -public void setup() { - - size(640, 360); - - // Create buffered image for lens effect - lensEffect = createGraphics(width, height, JAVA2D); - - // Load background image - lensEffect.beginDraw(); - lensEffect.image(loadImage("red_smoke.jpg"), 0, 0, - lensEffect.width, lensEffect.height); - lensEffect.endDraw(); - - // Create buffered image for image to warp - lensImage = createGraphics(lensD, lensD, JAVA2D); - lensImage2 = createGraphics(lensD, lensD, JAVA2D); - - // Lens algorithm (transformation array) - int magFactor = 40; // Magnification factor - int m, a, b; - - int r = lensD / 2; - float s = sqrt(r*r - magFactor*magFactor); - - for (int y = -r; y < r; y++) { - for (int x = -r ;x < r; x++) { - if(x*x + y*y >= s*s) { - a = x; - b = y; - } - else { - float z = sqrt(r*r - x*x - y*y); - a = PApplet.parseInt(x * magFactor / z + 0.5f); - b = PApplet.parseInt(y * magFactor / z + 0.5f); - } - lensArray[(y + r)*lensD + (x + r)] = (b + r) * lensD + (a + r); - } - } -} - -public void draw() { - - // Bounce lens around the screen - if((xx+dx+lensD > lensEffect.width) || (xx+dx < 0)) { - dx =- dx; - } - if((yy+dy+lensD > lensEffect.height) || (yy+dy < 0)) { - dy =- dy; - } - xx += dx; - yy += dy; - - lensImage = createGraphics(lensD, lensD, JAVA2D); - - // save the backgrounlensD of lensHeight*lensWilensDth pixels rectangle at the coorlensDinates - // where the lens effect will be applielensD. - lensImage2.copy(lensEffect, xx, yy, lensD, lensD, 0, 0, lensD, lensD); - - // output into a bufferelensD image for reuse - lensImage.loadPixels(); - - // For each pixel in the destination rectangle, apply the color - // from the appropriate pixel in the saved background. The lensArray - // array tells the offset into the saved background. - for (int i = 0; i < lensImage.pixels.length; i++) { - lensImage.pixels[i] = lensImage2.pixels[lensArray[i]]; - } - lensImage.updatePixels(); - - // Restore the original picture - image(lensEffect, 0, 0, width, height); - - // Overlay the lens square - image(lensImage, xx, yy, lensD, lensD); - -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Lens" }); - } -} diff --git a/java/examples/Topics/Effects/Lens/applet/Lens.pde b/java/examples/Topics/Effects/Lens/applet/Lens.pde deleted file mode 100644 index 766a10600..000000000 --- a/java/examples/Topics/Effects/Lens/applet/Lens.pde +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Lens Demo Effect - * by luis2048. - * - * A picture is shown and it looks like a magnifying glass - * is drawn over the picture. One of the most famous demos - * that has a lens effect is 2nd reality by future crew. - * The trick is to precalculate the entire effect. Just make - * an array that for each pixel in the destination picture - * tells which pixel to take from the source picture. This - * array is called the transformation array. The tricky part - * is to calculate the transformation array to make the - * destination look like a lens is beeing held over the source - * picture. Based on lens formula by on Abe Racadabra. - */ - -int lensD = 256; // Lens diameter -int[] lensArray = new int[lensD*lensD]; // Height and width of lens - -PGraphics lensEffect; -PImage lensImage; -PImage lensImage2; - -int xx = 0; -int yy = 0; -int dx = 1; -int dy = 1; - -void setup() { - - size(640, 360); - - // Create buffered image for lens effect - lensEffect = createGraphics(width, height, JAVA2D); - - // Load background image - lensEffect.beginDraw(); - lensEffect.image(loadImage("red_smoke.jpg"), 0, 0, - lensEffect.width, lensEffect.height); - lensEffect.endDraw(); - - // Create buffered image for image to warp - lensImage = createGraphics(lensD, lensD, JAVA2D); - lensImage2 = createGraphics(lensD, lensD, JAVA2D); - - // Lens algorithm (transformation array) - int magFactor = 40; // Magnification factor - int m, a, b; - - int r = lensD / 2; - float s = sqrt(r*r - magFactor*magFactor); - - for (int y = -r; y < r; y++) { - for (int x = -r ;x < r; x++) { - if(x*x + y*y >= s*s) { - a = x; - b = y; - } - else { - float z = sqrt(r*r - x*x - y*y); - a = int(x * magFactor / z + 0.5); - b = int(y * magFactor / z + 0.5); - } - lensArray[(y + r)*lensD + (x + r)] = (b + r) * lensD + (a + r); - } - } -} - -void draw() { - - // Bounce lens around the screen - if((xx+dx+lensD > lensEffect.width) || (xx+dx < 0)) { - dx =- dx; - } - if((yy+dy+lensD > lensEffect.height) || (yy+dy < 0)) { - dy =- dy; - } - xx += dx; - yy += dy; - - lensImage = createGraphics(lensD, lensD, JAVA2D); - - // save the backgrounlensD of lensHeight*lensWilensDth pixels rectangle at the coorlensDinates - // where the lens effect will be applielensD. - lensImage2.copy(lensEffect, xx, yy, lensD, lensD, 0, 0, lensD, lensD); - - // output into a bufferelensD image for reuse - lensImage.loadPixels(); - - // For each pixel in the destination rectangle, apply the color - // from the appropriate pixel in the saved background. The lensArray - // array tells the offset into the saved background. - for (int i = 0; i < lensImage.pixels.length; i++) { - lensImage.pixels[i] = lensImage2.pixels[lensArray[i]]; - } - lensImage.updatePixels(); - - // Restore the original picture - image(lensEffect, 0, 0, width, height); - - // Overlay the lens square - image(lensImage, xx, yy, lensD, lensD); - -} - diff --git a/java/examples/Topics/Effects/Lens/applet/loading.gif b/java/examples/Topics/Effects/Lens/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC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ZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Effects/Metaball/applet/Metaball.java b/java/examples/Topics/Effects/Metaball/applet/Metaball.java deleted file mode 100644 index fe2731751..000000000 --- a/java/examples/Topics/Effects/Metaball/applet/Metaball.java +++ /dev/null @@ -1,96 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Metaball extends PApplet { - -/** - * Metaball Demo Effect - * by luis2048. - * - * Organic-looking n-dimensional objects. The technique for rendering - * metaballs was invented by Jim Blinn in the early 1980s. Each metaball - * is defined as a function in n-dimensions. - */ - -int numBlobs = 3; - -int[] blogPx = { 0, 90, 90 }; -int[] blogPy = { 0, 120, 45 }; - -// Movement vector for each blob -int[] blogDx = { 1, 1, 1 }; -int[] blogDy = { 1, 1, 1 }; - -PGraphics pg; -int[][] vy,vx; - -public void setup() { - size(640, 360); - pg = createGraphics(160, 90, P2D); - vy = new int[numBlobs][pg.height]; - vx = new int[numBlobs][pg.width]; -} - -public void draw() { - for (int i=0; i pg.width) { - blogDx[i] = -1; - } - if (blogPy[i] < 0) { - blogDy[i] = 1; - } - if (blogPy[i] > pg.height) { - blogDy[i]=-1; - } - - for (int x = 0; x < pg.width; x++) { - vx[i][x] = PApplet.parseInt(sq(blogPx[i]-x)); - } - - for (int y = 0; y < pg.height; y++) { - vy[i][y] = PApplet.parseInt(sq(blogPy[i]-y)); - } - } - - // Output into a buffered image for reuse - pg.beginDraw(); - pg.loadPixels(); - for (int y = 0; y < pg.height; y++) { - for (int x = 0; x < pg.width; x++) { - int m = 1; - for (int i = 0; i < numBlobs; i++) { - // Increase this number to make your blobs bigger - m += 60000/(vy[i][y] + vx[i][x]+1); - } - pg.pixels[x+y*pg.width] = color(0, m+x, (x+m+y)/2); - } - } - pg.updatePixels(); - pg.endDraw(); - - // Display the results - image(pg, 0, 0, width, height); -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Metaball" }); - } -} diff --git a/java/examples/Topics/Effects/Metaball/applet/Metaball.pde b/java/examples/Topics/Effects/Metaball/applet/Metaball.pde deleted file mode 100644 index cde5d1c4a..000000000 --- a/java/examples/Topics/Effects/Metaball/applet/Metaball.pde +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Metaball Demo Effect - * by luis2048. - * - * Organic-looking n-dimensional objects. The technique for rendering - * metaballs was invented by Jim Blinn in the early 1980s. Each metaball - * is defined as a function in n-dimensions. - */ - -int numBlobs = 3; - -int[] blogPx = { 0, 90, 90 }; -int[] blogPy = { 0, 120, 45 }; - -// Movement vector for each blob -int[] blogDx = { 1, 1, 1 }; -int[] blogDy = { 1, 1, 1 }; - -PGraphics pg; -int[][] vy,vx; - -void setup() { - size(640, 360); - pg = createGraphics(160, 90, P2D); - vy = new int[numBlobs][pg.height]; - vx = new int[numBlobs][pg.width]; -} - -void draw() { - for (int i=0; i pg.width) { - blogDx[i] = -1; - } - if (blogPy[i] < 0) { - blogDy[i] = 1; - } - if (blogPy[i] > pg.height) { - blogDy[i]=-1; - } - - for (int x = 0; x < pg.width; x++) { - vx[i][x] = int(sq(blogPx[i]-x)); - } - - for (int y = 0; y < pg.height; y++) { - vy[i][y] = int(sq(blogPy[i]-y)); - } - } - - // Output into a buffered image for reuse - pg.beginDraw(); - pg.loadPixels(); - for (int y = 0; y < pg.height; y++) { - for (int x = 0; x < pg.width; x++) { - int m = 1; - for (int i = 0; i < numBlobs; i++) { - // Increase this number to make your blobs bigger - m += 60000/(vy[i][y] + vx[i][x]+1); - } - pg.pixels[x+y*pg.width] = color(0, m+x, (x+m+y)/2); - } - } - pg.updatePixels(); - pg.endDraw(); - - // Display the results - image(pg, 0, 0, width, height); -} - diff --git a/java/examples/Topics/Effects/Metaball/applet/loading.gif b/java/examples/Topics/Effects/Metaball/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdl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CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Effects/Plasma/applet/Plasma.java b/java/examples/Topics/Effects/Plasma/applet/Plasma.java deleted file mode 100644 index 7f09d75ac..000000000 --- a/java/examples/Topics/Effects/Plasma/applet/Plasma.java +++ /dev/null @@ -1,80 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Plasma extends PApplet { - -/** - * Plasma Demo Effect - * by luis2048. - * - * Cycles of changing colours warped to give an illusion - * of liquid, organic movement.Colors are the sum of sine - * functions and various formulas. Based on formula by Robert Klep. - */ - -int pixelSize=2; -PGraphics pg; - -public void setup(){ - size(640, 360); - // Create buffered image for plasma effect - pg = createGraphics(160, 90, P2D); - colorMode(HSB); - noSmooth(); -} - -public void draw() -{ - float xc = 25; - - // Enable this to control the speed of animation regardless of CPU power - // int timeDisplacement = millis()/30; - - // This runs plasma as fast as your computer can handle - int timeDisplacement = frameCount; - - // No need to do this math for every pixel - float calculation1 = sin( radians(timeDisplacement * 0.61655617f)); - float calculation2 = sin( radians(timeDisplacement * -3.6352262f)); - - // Output into a buffered image for reuse - pg.beginDraw(); - pg.loadPixels(); - - // Plasma algorithm - for (int x = 0; x < pg.width; x++, xc += pixelSize) - { - float yc = 25; - float s1 = 128 + 128 * sin(radians(xc) * calculation1 ); - - for (int y = 0; y < pg.height; y++, yc += pixelSize) - { - float s2 = 128 + 128 * sin(radians(yc) * calculation2 ); - float s3 = 128 + 128 * sin(radians((xc + yc + timeDisplacement * 5) / 2)); - float s = (s1+ s2 + s3) / 3; - pg.pixels[x+y*pg.width] = color(s, 255 - s / 2.0f, 255); - } - } - pg.updatePixels(); - pg.endDraw(); - - // display the results - image(pg,0,0,width,height); - -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Plasma" }); - } -} diff --git a/java/examples/Topics/Effects/Plasma/applet/Plasma.pde b/java/examples/Topics/Effects/Plasma/applet/Plasma.pde deleted file mode 100644 index 04b20d84d..000000000 --- a/java/examples/Topics/Effects/Plasma/applet/Plasma.pde +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Plasma Demo Effect - * by luis2048. - * - * Cycles of changing colours warped to give an illusion - * of liquid, organic movement.Colors are the sum of sine - * functions and various formulas. Based on formula by Robert Klep. - */ - -int pixelSize=2; -PGraphics pg; - -void setup(){ - size(640, 360); - // Create buffered image for plasma effect - pg = createGraphics(160, 90, P2D); - colorMode(HSB); - noSmooth(); -} - -void draw() -{ - float xc = 25; - - // Enable this to control the speed of animation regardless of CPU power - // int timeDisplacement = millis()/30; - - // This runs plasma as fast as your computer can handle - int timeDisplacement = frameCount; - - // No need to do this math for every pixel - float calculation1 = sin( radians(timeDisplacement * 0.61655617)); - float calculation2 = sin( radians(timeDisplacement * -3.6352262)); - - // Output into a buffered image for reuse - pg.beginDraw(); - pg.loadPixels(); - - // Plasma algorithm - for (int x = 0; x < pg.width; x++, xc += pixelSize) - { - float yc = 25; - float s1 = 128 + 128 * sin(radians(xc) * calculation1 ); - - for (int y = 0; y < pg.height; y++, yc += pixelSize) - { - float s2 = 128 + 128 * sin(radians(yc) * calculation2 ); - float s3 = 128 + 128 * sin(radians((xc + yc + timeDisplacement * 5) / 2)); - float s = (s1+ s2 + s3) / 3; - pg.pixels[x+y*pg.width] = color(s, 255 - s / 2.0, 255); - } - } - pg.updatePixels(); - pg.endDraw(); - - // display the results - image(pg,0,0,width,height); - -} - diff --git a/java/examples/Topics/Effects/Plasma/applet/loading.gif b/java/examples/Topics/Effects/Plasma/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Effects/Tunnel/applet/Tunnel.java b/java/examples/Topics/Effects/Tunnel/applet/Tunnel.java deleted file mode 100644 index 90a166184..000000000 --- a/java/examples/Topics/Effects/Tunnel/applet/Tunnel.java +++ /dev/null @@ -1,133 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Tunnel extends PApplet { - -/** - * Tunnel Demo Effect - * by luis2048. - * - * This effect shows a tunnel in which you fly while the tunnel - * rotates, seemingly in 3D. The animation of the tunnel actually - * isn't calculated on the fly while the animation runs, but is - * precalculated. These calculations are stored in two tables: - * one for the angle and one for the distance. For every frame, - * go through every pixel (x,y) and use the angle and distance - * tables to get which pixel of the texture it should draw at the - * current pixel. To look like its rotating and zooming, the values - * of the angle and distance tables are shifted. - */ - -int x, y, radius, l; -PGraphics tunnelEffect; -PImage textureImg; - -// build lookup table -int[][] distanceTable; -int[][] angleTable; -int[][] shadeTable; -int w, h; - -public void setup(){ - size(640, 360); - - // Load texture 512 x 512 - textureImg=loadImage("red_smoke.jpg"); - - // Create buffer screen - tunnelEffect = createGraphics(320, 200, P2D); - w = tunnelEffect.width; - h = tunnelEffect.height; - - float ratio = 32.0f; - int angle; - int depth; - int shade = 0; - - // Make the tables twice as big as the screen. - // The center of the buffers is now the position (w,h). - distanceTable= new int[2 * w][2 * h]; - angleTable= new int[2 * w][2 * h]; - - for (int x = 0; x < w*2; x++) - { - for (int y = 0; y < h*2; y++) - { - depth = PApplet.parseInt(ratio * textureImg.height - / sqrt(PApplet.parseFloat((x - w) * (x - w) + (y - h) * (y - h)))) ; - angle = PApplet.parseInt(0.5f * textureImg.width * atan2(PApplet.parseFloat(y - h), - PApplet.parseFloat(x - w)) / PI) ; - - // The distance table contains for every pixel of the - // screen, the inverse of the distance to the center of - // the screen this pixel has. - distanceTable[x][y] = depth ; - - // The angle table contains the angle of every pixel of the screen, - // where the center of the screen represents the origin. - angleTable[x][y] = angle ; - } - } -} - - -public void draw() { - - tunnelEffect.beginDraw(); - tunnelEffect.loadPixels(); - - float timeDisplacement = millis() / 1000.0f; - - // Calculate the shift values out of the time value - int shiftX = PApplet.parseInt(textureImg.width * .2f * timeDisplacement+300); // speed of zoom - int shiftY = PApplet.parseInt(textureImg.height * .15f * timeDisplacement+300); //speed of spin - - // Calculate the look values out of the time value - // by using sine functions, it'll alternate between - // looking left/right and up/down - int shiftLookX = w / 2 + PApplet.parseInt(w / 4 * sin(timeDisplacement)); - int shiftLookY = h / 2 + PApplet.parseInt(h / 4 * sin(timeDisplacement * 1.5f)); - - for (int y = 0; y < h; y++) { - for (int x = 0; x < w; x++) { - - // Make sure that x + shiftLookX never goes outside - // the dimensions of the table - int texture_x = constrain((distanceTable[x + shiftLookX][y + shiftLookY] - + shiftX) % textureImg.width ,0, textureImg.width); - - int texture_y = (angleTable[x + shiftLookX][y + shiftLookY] - + shiftY) % textureImg.height; - - tunnelEffect.pixels[x+y*w] = textureImg.pixels[texture_y - * textureImg.width + texture_x]; - - // Test lookuptables - // tunnelEffect.pixels[x+y*w] = color( 0,texture_x,texture_y); - } - } - - tunnelEffect.updatePixels(); - tunnelEffect.endDraw(); - - // Display the results - image(tunnelEffect, 0, 0, width, height); - -} - - - - static public void main(String args[]) { - PApplet.main(new String[] { "Tunnel" }); - } -} diff --git a/java/examples/Topics/Effects/Tunnel/applet/Tunnel.pde b/java/examples/Topics/Effects/Tunnel/applet/Tunnel.pde deleted file mode 100644 index c5155fc86..000000000 --- a/java/examples/Topics/Effects/Tunnel/applet/Tunnel.pde +++ /dev/null @@ -1,113 +0,0 @@ -/** - * Tunnel Demo Effect - * by luis2048. - * - * This effect shows a tunnel in which you fly while the tunnel - * rotates, seemingly in 3D. The animation of the tunnel actually - * isn't calculated on the fly while the animation runs, but is - * precalculated. These calculations are stored in two tables: - * one for the angle and one for the distance. For every frame, - * go through every pixel (x,y) and use the angle and distance - * tables to get which pixel of the texture it should draw at the - * current pixel. To look like its rotating and zooming, the values - * of the angle and distance tables are shifted. - */ - -int x, y, radius, l; -PGraphics tunnelEffect; -PImage textureImg; - -// build lookup table -int[][] distanceTable; -int[][] angleTable; -int[][] shadeTable; -int w, h; - -void setup(){ - size(640, 360); - - // Load texture 512 x 512 - textureImg=loadImage("red_smoke.jpg"); - - // Create buffer screen - tunnelEffect = createGraphics(320, 200, P2D); - w = tunnelEffect.width; - h = tunnelEffect.height; - - float ratio = 32.0; - int angle; - int depth; - int shade = 0; - - // Make the tables twice as big as the screen. - // The center of the buffers is now the position (w,h). - distanceTable= new int[2 * w][2 * h]; - angleTable= new int[2 * w][2 * h]; - - for (int x = 0; x < w*2; x++) - { - for (int y = 0; y < h*2; y++) - { - depth = int(ratio * textureImg.height - / sqrt(float((x - w) * (x - w) + (y - h) * (y - h)))) ; - angle = int(0.5 * textureImg.width * atan2(float(y - h), - float(x - w)) / PI) ; - - // The distance table contains for every pixel of the - // screen, the inverse of the distance to the center of - // the screen this pixel has. - distanceTable[x][y] = depth ; - - // The angle table contains the angle of every pixel of the screen, - // where the center of the screen represents the origin. - angleTable[x][y] = angle ; - } - } -} - - -void draw() { - - tunnelEffect.beginDraw(); - tunnelEffect.loadPixels(); - - float timeDisplacement = millis() / 1000.0; - - // Calculate the shift values out of the time value - int shiftX = int(textureImg.width * .2 * timeDisplacement+300); // speed of zoom - int shiftY = int(textureImg.height * .15 * timeDisplacement+300); //speed of spin - - // Calculate the look values out of the time value - // by using sine functions, it'll alternate between - // looking left/right and up/down - int shiftLookX = w / 2 + int(w / 4 * sin(timeDisplacement)); - int shiftLookY = h / 2 + int(h / 4 * sin(timeDisplacement * 1.5)); - - for (int y = 0; y < h; y++) { - for (int x = 0; x < w; x++) { - - // Make sure that x + shiftLookX never goes outside - // the dimensions of the table - int texture_x = constrain((distanceTable[x + shiftLookX][y + shiftLookY] - + shiftX) % textureImg.width ,0, textureImg.width); - - int texture_y = (angleTable[x + shiftLookX][y + shiftLookY] - + shiftY) % textureImg.height; - - tunnelEffect.pixels[x+y*w] = textureImg.pixels[texture_y - * textureImg.width + texture_x]; - - // Test lookuptables - // tunnelEffect.pixels[x+y*w] = color( 0,texture_x,texture_y); - } - } - - tunnelEffect.updatePixels(); - tunnelEffect.endDraw(); - - // Display the results - image(tunnelEffect, 0, 0, width, height); - -} - - diff --git a/java/examples/Topics/Effects/Tunnel/applet/loading.gif b/java/examples/Topics/Effects/Tunnel/applet/loading.gif deleted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Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Effects/UnlimitedSprites/applet/UnlimitedSprites.java b/java/examples/Topics/Effects/UnlimitedSprites/applet/UnlimitedSprites.java deleted file mode 100644 index f88ac2f34..000000000 --- a/java/examples/Topics/Effects/UnlimitedSprites/applet/UnlimitedSprites.java +++ /dev/null @@ -1,80 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class UnlimitedSprites extends PApplet { - -/** - * Unlimited Sprites Demo Effect - * by luis2048. - * - * An infinate number of sprites drawn to screen. It's basically - * a flick-book effect; you draw the same sprite in different - * positions on different bufffer 'screens' and flip between them. - * When you've drawn on all frames, you loop back to the beginning - * and repeat. - */ - -PGraphics[] spriteFrames = new PGraphics[6]; -PImage sprite; - -float x, y; -float xang = 0.0f; -float yang = 0.0f; -int surf = 0; - -public void setup() { - size(640, 360); - noSmooth(); - background(0); - - // Create sprite - sprite=loadImage("Aqua-Ball-48x48.png"); - - // Create blank surfaces to draw on - for (int i = 0; i < spriteFrames.length; i++) { - spriteFrames[i] = createGraphics(width, height, JAVA2D); - } -} - -public void draw() -{ - background(0); - - // Get X, Y positions - x = (width/2)*sin((radians(xang))*0.95f); - y = (height/2)*cos((radians(yang))*0.97f); - - // Inc the angle of the sine - xang += 1.17f; - yang += 1.39f; - - // Blit our 'bob' on the 'active' surface - spriteFrames[surf].beginDraw(); - spriteFrames[surf].image(sprite, x+(width/2)-32, y+(height/2)-32); - spriteFrames[surf].endDraw(); - - // Blit the active surface to the screen - image(spriteFrames[surf], 0, 0, width, height); - - // Inc the active surface number - surf = (surf+1) % spriteFrames.length; - - // Display the results - //image(spriteEffect, 0, 0, width, height); -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "UnlimitedSprites" }); - } -} diff --git a/java/examples/Topics/Effects/UnlimitedSprites/applet/UnlimitedSprites.pde b/java/examples/Topics/Effects/UnlimitedSprites/applet/UnlimitedSprites.pde deleted file mode 100644 index 6395eeaa1..000000000 --- a/java/examples/Topics/Effects/UnlimitedSprites/applet/UnlimitedSprites.pde +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Unlimited Sprites Demo Effect - * by luis2048. - * - * An infinate number of sprites drawn to screen. It's basically - * a flick-book effect; you draw the same sprite in different - * positions on different bufffer 'screens' and flip between them. - * When you've drawn on all frames, you loop back to the beginning - * and repeat. - */ - -PGraphics[] spriteFrames = new PGraphics[6]; -PImage sprite; - -float x, y; -float xang = 0.0; -float yang = 0.0; -int surf = 0; - -void setup() { - size(640, 360); - noSmooth(); - background(0); - - // Create sprite - sprite=loadImage("Aqua-Ball-48x48.png"); - - // Create blank surfaces to draw on - for (int i = 0; i < spriteFrames.length; i++) { - spriteFrames[i] = createGraphics(width, height, JAVA2D); - } -} - -void draw() -{ - background(0); - - // Get X, Y positions - x = (width/2)*sin((radians(xang))*0.95); - y = (height/2)*cos((radians(yang))*0.97); - - // Inc the angle of the sine - xang += 1.17; - yang += 1.39; - - // Blit our 'bob' on the 'active' surface - spriteFrames[surf].beginDraw(); - spriteFrames[surf].image(sprite, x+(width/2)-32, y+(height/2)-32); - spriteFrames[surf].endDraw(); - - // Blit the active surface to the screen - image(spriteFrames[surf], 0, 0, width, height); - - // Inc the active surface number - surf = (surf+1) % spriteFrames.length; - - // Display the results - //image(spriteEffect, 0, 0, width, height); -} - diff --git a/java/examples/Topics/Effects/UnlimitedSprites/applet/loading.gif b/java/examples/Topics/Effects/UnlimitedSprites/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w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1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Effects/Wormhole/applet/Wormhole.java b/java/examples/Topics/Effects/Wormhole/applet/Wormhole.java deleted file mode 100644 index 3f2f27156..000000000 --- a/java/examples/Topics/Effects/Wormhole/applet/Wormhole.java +++ /dev/null @@ -1,90 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Wormhole extends PApplet { - -/** - * Wormhole Demo Effect - * by luis2048. - * - * A funnel-shaped hole sucking its texture to the middle. - * The effect is accomplished like the tunnel effect but with - * a 15 x 15 texture and static lookup table. The texture is shifted - * and mapped to the static lookup table. - */ - -PImage wormImg, wormTexture; -int[] reg = new int[15]; - -public void setup() { - size(640, 360); - noSmooth(); - - // Reference image used to transpose texture - wormImg = loadImage("wormhole.png"); - wormImg.resize(width, height); - wormImg.loadPixels(); - - // Texture image array - wormTexture = loadImage("texture.gif"); - wormTexture.loadPixels(); -} - -// Moves the bottom row of pixels to the top and shifting remaining pixels 1 over -public void shiftup() { - for (int k = 0; k < 15; k++) { - reg[k] = wormTexture.pixels[k]; - } - - for (int k = 15; k < 225; k++) { - wormTexture.pixels[k-15] = wormTexture.pixels[k]; - } - for (int k = 0; k < 15; k++) { - wormTexture.pixels[k+210] = reg[k]; - } -} - -// Moves left column of pixels to the right and shifting remaining pixels 1 over -public void shiftright() { - for(int k = 0; k < 15; k++) { - reg[k] = wormTexture.pixels[15*k+14]; - for(int i = 14;i > 0; i--) { - wormTexture.pixels[15*k+i] = wormTexture.pixels[15*k+(i-1)]; - } - wormTexture.pixels[15*k] = reg[k]; - } -} - -public void draw() { - // Load pixel data array - loadPixels(); - - // Loop through all pixels - for (int i = 0; i < pixels.length; i++){ - // Map texture to wormhole in a bit shift blue - pixels[i] = wormTexture.pixels[constrain(wormImg.pixels[i] & 0xFF , 0 , 224)]; - } - - updatePixels(); - - shiftright(); - shiftup(); -} - - - - - static public void main(String args[]) { - PApplet.main(new String[] { "Wormhole" }); - } -} diff --git a/java/examples/Topics/Effects/Wormhole/applet/Wormhole.pde b/java/examples/Topics/Effects/Wormhole/applet/Wormhole.pde deleted file mode 100644 index cb1762983..000000000 --- a/java/examples/Topics/Effects/Wormhole/applet/Wormhole.pde +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Wormhole Demo Effect - * by luis2048. - * - * A funnel-shaped hole sucking its texture to the middle. - * The effect is accomplished like the tunnel effect but with - * a 15 x 15 texture and static lookup table. The texture is shifted - * and mapped to the static lookup table. - */ - -PImage wormImg, wormTexture; -int[] reg = new int[15]; - -void setup() { - size(640, 360); - noSmooth(); - - // Reference image used to transpose texture - wormImg = loadImage("wormhole.png"); - wormImg.resize(width, height); - wormImg.loadPixels(); - - // Texture image array - wormTexture = loadImage("texture.gif"); - wormTexture.loadPixels(); -} - -// Moves the bottom row of pixels to the top and shifting remaining pixels 1 over -void shiftup() { - for (int k = 0; k < 15; k++) { - reg[k] = wormTexture.pixels[k]; - } - - for (int k = 15; k < 225; k++) { - wormTexture.pixels[k-15] = wormTexture.pixels[k]; - } - for (int k = 0; k < 15; k++) { - wormTexture.pixels[k+210] = reg[k]; - } -} - -// Moves left column of pixels to the right and shifting remaining pixels 1 over -void shiftright() { - for(int k = 0; k < 15; k++) { - reg[k] = wormTexture.pixels[15*k+14]; - for(int i = 14;i > 0; i--) { - wormTexture.pixels[15*k+i] = wormTexture.pixels[15*k+(i-1)]; - } - wormTexture.pixels[15*k] = reg[k]; - } -} - -void draw() { - // Load pixel data array - loadPixels(); - - // Loop through all pixels - for (int i = 0; i < pixels.length; i++){ - // Map texture to wormhole in a bit shift blue - pixels[i] = wormTexture.pixels[constrain(wormImg.pixels[i] & 0xFF , 0 , 224)]; - } - - updatePixels(); - - shiftright(); - shiftup(); -} - - - diff --git a/java/examples/Topics/Effects/Wormhole/applet/loading.gif b/java/examples/Topics/Effects/Wormhole/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF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/java/examples/Topics/Fractals and L-Systems/Koch/applet/Koch.java deleted file mode 100644 index d8ae610a9..000000000 --- a/java/examples/Topics/Fractals and L-Systems/Koch/applet/Koch.java +++ /dev/null @@ -1,195 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Koch extends PApplet { - -/** - * Koch Curve - * by Daniel Shiffman. - * - * Renders a simple fractal, the Koch snowflake. - * Each recursive level drawn in sequence. - */ - -KochFractal k; - -public void setup() { - size(640, 360); - background(0); - frameRate(1); // Animate slowly - k = new KochFractal(); - smooth(); -} - -public void draw() { - background(0); - // Draws the snowflake! - k.render(); - // Iterate - k.nextLevel(); - // Let's not do it more than 5 times. . . - if (k.getCount() > 5) { - k.restart(); - } - -} - - -// A class to manage the list of line segments in the snowflake pattern - -class KochFractal { - Point start; // A point for the start - Point end; // A point for the end - ArrayList lines; // A list to keep track of all the lines - int count; - - public KochFractal() - { - start = new Point(0,height/2 + height/4); - end = new Point(width,height/2 + height/4); - lines = new ArrayList(); - restart(); - } - - public void nextLevel() - { - // For every line that is in the arraylist - // create 4 more lines in a new arraylist - lines = iterate(lines); - count++; - } - - public void restart() - { - count = 0; // Reset count - lines.clear(); // Empty the array list - lines.add(new KochLine(start,end)); // Add the initial line (from one end point to the other) - } - - public int getCount() { - return count; - } - - // This is easy, just draw all the lines - public void render() - { - for(int i = 0; i < lines.size(); i++) { - KochLine l = (KochLine)lines.get(i); - l.render(); - } - } - - // This is where the **MAGIC** happens - // Step 1: Create an empty arraylist - // Step 2: For every line currently in the arraylist - // - calculate 4 line segments based on Koch algorithm - // - add all 4 line segments into the new arraylist - // Step 3: Return the new arraylist and it becomes the list of line segments for the structure - - // As we do this over and over again, each line gets broken into 4 lines, which gets broken into 4 lines, and so on. . . - public ArrayList iterate(ArrayList before) - { - ArrayList now = new ArrayList(); //Create emtpy list - for(int i = 0; i < before.size(); i++) - { - KochLine l = (KochLine)lines.get(i); // A line segment inside the list - // Calculate 5 koch points (done for us by the line object) - Point a = l.start(); - Point b = l.kochleft(); - Point c = l.kochmiddle(); - Point d = l.kochright(); - Point e = l.end(); - // Make line segments between all the points and add them - now.add(new KochLine(a,b)); - now.add(new KochLine(b,c)); - now.add(new KochLine(c,d)); - now.add(new KochLine(d,e)); - } - return now; - } - -} - - -// A class to describe one line segment in the fractal -// Includes methods to calculate midpoints along the line according to the Koch algorithm - -class KochLine { - - // Two points, - // a is the "left" point and - // b is the "right point - Point a,b; - - KochLine(Point a_, Point b_) { - a = a_.copy(); - b = b_.copy(); - } - - public void render() { - stroke(255); - line(a.x,a.y,b.x,b.y); - } - - public Point start() { - return a.copy(); - } - - public Point end() { - return b.copy(); - } - - // This is easy, just 1/3 of the way - public Point kochleft() - { - float x = a.x + (b.x - a.x) / 3f; - float y = a.y + (b.y - a.y) / 3f; - return new Point(x,y); - } - - // More complicated, have to use a little trig to figure out where this point is! - public Point kochmiddle() - { - float x = a.x + 0.5f * (b.x - a.x) + (sin(radians(60))*(b.y-a.y)) / 3; - float y = a.y + 0.5f * (b.y - a.y) - (sin(radians(60))*(b.x-a.x)) / 3; - return new Point(x,y); - } - - // Easy, just 2/3 of the way - public Point kochright() - { - float x = a.x + 2*(b.x - a.x) / 3f; - float y = a.y + 2*(b.y - a.y) / 3f; - return new Point(x,y); - } - -} - -class Point { - float x,y; - - Point(float x_, float y_) { - x = x_; - y = y_; - } - - public Point copy() { - return new Point(x,y); - } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Koch" }); - } -} diff --git a/java/examples/Topics/Fractals and L-Systems/Koch/applet/Koch.pde b/java/examples/Topics/Fractals and L-Systems/Koch/applet/Koch.pde deleted file mode 100644 index 317e1eb42..000000000 --- a/java/examples/Topics/Fractals and L-Systems/Koch/applet/Koch.pde +++ /dev/null @@ -1,175 +0,0 @@ -/** - * Koch Curve - * by Daniel Shiffman. - * - * Renders a simple fractal, the Koch snowflake. - * Each recursive level drawn in sequence. - */ - -KochFractal k; - -void setup() { - size(640, 360); - background(0); - frameRate(1); // Animate slowly - k = new KochFractal(); - smooth(); -} - -void draw() { - background(0); - // Draws the snowflake! - k.render(); - // Iterate - k.nextLevel(); - // Let's not do it more than 5 times. . . - if (k.getCount() > 5) { - k.restart(); - } - -} - - -// A class to manage the list of line segments in the snowflake pattern - -class KochFractal { - Point start; // A point for the start - Point end; // A point for the end - ArrayList lines; // A list to keep track of all the lines - int count; - - public KochFractal() - { - start = new Point(0,height/2 + height/4); - end = new Point(width,height/2 + height/4); - lines = new ArrayList(); - restart(); - } - - void nextLevel() - { - // For every line that is in the arraylist - // create 4 more lines in a new arraylist - lines = iterate(lines); - count++; - } - - void restart() - { - count = 0; // Reset count - lines.clear(); // Empty the array list - lines.add(new KochLine(start,end)); // Add the initial line (from one end point to the other) - } - - int getCount() { - return count; - } - - // This is easy, just draw all the lines - void render() - { - for(int i = 0; i < lines.size(); i++) { - KochLine l = (KochLine)lines.get(i); - l.render(); - } - } - - // This is where the **MAGIC** happens - // Step 1: Create an empty arraylist - // Step 2: For every line currently in the arraylist - // - calculate 4 line segments based on Koch algorithm - // - add all 4 line segments into the new arraylist - // Step 3: Return the new arraylist and it becomes the list of line segments for the structure - - // As we do this over and over again, each line gets broken into 4 lines, which gets broken into 4 lines, and so on. . . - ArrayList iterate(ArrayList before) - { - ArrayList now = new ArrayList(); //Create emtpy list - for(int i = 0; i < before.size(); i++) - { - KochLine l = (KochLine)lines.get(i); // A line segment inside the list - // Calculate 5 koch points (done for us by the line object) - Point a = l.start(); - Point b = l.kochleft(); - Point c = l.kochmiddle(); - Point d = l.kochright(); - Point e = l.end(); - // Make line segments between all the points and add them - now.add(new KochLine(a,b)); - now.add(new KochLine(b,c)); - now.add(new KochLine(c,d)); - now.add(new KochLine(d,e)); - } - return now; - } - -} - - -// A class to describe one line segment in the fractal -// Includes methods to calculate midpoints along the line according to the Koch algorithm - -class KochLine { - - // Two points, - // a is the "left" point and - // b is the "right point - Point a,b; - - KochLine(Point a_, Point b_) { - a = a_.copy(); - b = b_.copy(); - } - - void render() { - stroke(255); - line(a.x,a.y,b.x,b.y); - } - - Point start() { - return a.copy(); - } - - Point end() { - return b.copy(); - } - - // This is easy, just 1/3 of the way - Point kochleft() - { - float x = a.x + (b.x - a.x) / 3f; - float y = a.y + (b.y - a.y) / 3f; - return new Point(x,y); - } - - // More complicated, have to use a little trig to figure out where this point is! - Point kochmiddle() - { - float x = a.x + 0.5f * (b.x - a.x) + (sin(radians(60))*(b.y-a.y)) / 3; - float y = a.y + 0.5f * (b.y - a.y) - (sin(radians(60))*(b.x-a.x)) / 3; - return new Point(x,y); - } - - // Easy, just 2/3 of the way - Point kochright() - { - float x = a.x + 2*(b.x - a.x) / 3f; - float y = a.y + 2*(b.y - a.y) / 3f; - return new Point(x,y); - } - -} - -class Point { - float x,y; - - Point(float x_, float y_) { - x = x_; - y = y_; - } - - Point copy() { - return new Point(x,y); - } -} - diff --git a/java/examples/Topics/Fractals and L-Systems/Koch/applet/loading.gif b/java/examples/Topics/Fractals and L-Systems/Koch/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9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Rfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Fractals and L-Systems/Mandelbrot/applet/Mandelbrot.java b/java/examples/Topics/Fractals and L-Systems/Mandelbrot/applet/Mandelbrot.java deleted file mode 100644 index 61353d360..000000000 --- a/java/examples/Topics/Fractals and L-Systems/Mandelbrot/applet/Mandelbrot.java +++ /dev/null @@ -1,95 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Mandelbrot extends PApplet { - -/** - * The Mandelbrot Set - * by Daniel Shiffman. - * - * Simple rendering of the Mandelbrot set. - */ - -// Establish a range of values on the complex plane -// A different range will allow us to "zoom" in or out on the fractal -// float xmin = -1.5; float ymin = -.1; float wh = 0.15; -float xmin = -2.5f; -float ymin = -2; -float wh = 4; - -public void setup() { - size(200, 200); - noLoop(); - background(0); -} - -public void draw() { - - loadPixels(); - - // Maximum number of iterations for each point on the complex plane - int maxiterations = 200; - - // x goes from xmin to xmax - float xmax = xmin + wh; - // y goes from ymin to ymax - float ymax = ymin + wh; - - // Calculate amount we increment x,y for each pixel - float dx = (xmax - xmin) / (width); - float dy = (ymax - ymin) / (height); - - // Start y - float y = ymin; - for(int j = 0; j < height; j++) { - // Start x - float x = xmin; - for(int i = 0; i < width; i++) { - - // Now we test, as we iterate z = z^2 + cm does z tend towards infinity? - float a = x; - float b = y; - int n = 0; - while (n < maxiterations) { - float aa = a * a; - float bb = b * b; - float twoab = 2.0f * a * b; - a = aa - bb + x; - b = twoab + y; - // Infinty in our finite world is simple, let's just consider it 16 - if(aa + bb > 16.0f) { - break; // Bail - } - n++; - } - - // We color each pixel based on how long it takes to get to infinity - // If we never got there, let's pick the color black - if (n == maxiterations) { - pixels[i+j*width] = 0; - } else { - // Gosh, we could make fancy colors here if we wanted - pixels[i+j*width] = color(n*16 % 255); - } - x += dx; - } - y += dy; - } - updatePixels(); -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Mandelbrot" }); - } -} diff --git a/java/examples/Topics/Fractals and L-Systems/Mandelbrot/applet/Mandelbrot.pde b/java/examples/Topics/Fractals and L-Systems/Mandelbrot/applet/Mandelbrot.pde deleted file mode 100644 index f38307cac..000000000 --- a/java/examples/Topics/Fractals and L-Systems/Mandelbrot/applet/Mandelbrot.pde +++ /dev/null @@ -1,75 +0,0 @@ -/** - * The Mandelbrot Set - * by Daniel Shiffman. - * - * Simple rendering of the Mandelbrot set. - */ - -// Establish a range of values on the complex plane -// A different range will allow us to "zoom" in or out on the fractal -// float xmin = -1.5; float ymin = -.1; float wh = 0.15; -float xmin = -2.5; -float ymin = -2; -float wh = 4; - -void setup() { - size(200, 200); - noLoop(); - background(0); -} - -void draw() { - - loadPixels(); - - // Maximum number of iterations for each point on the complex plane - int maxiterations = 200; - - // x goes from xmin to xmax - float xmax = xmin + wh; - // y goes from ymin to ymax - float ymax = ymin + wh; - - // Calculate amount we increment x,y for each pixel - float dx = (xmax - xmin) / (width); - float dy = (ymax - ymin) / (height); - - // Start y - float y = ymin; - for(int j = 0; j < height; j++) { - // Start x - float x = xmin; - for(int i = 0; i < width; i++) { - - // Now we test, as we iterate z = z^2 + cm does z tend towards infinity? - float a = x; - float b = y; - int n = 0; - while (n < maxiterations) { - float aa = a * a; - float bb = b * b; - float twoab = 2.0 * a * b; - a = aa - bb + x; - b = twoab + y; - // Infinty in our finite world is simple, let's just consider it 16 - if(aa + bb > 16.0) { - break; // Bail - } - n++; - } - - // We color each pixel based on how long it takes to get to infinity - // If we never got there, let's pick the color black - if (n == maxiterations) { - pixels[i+j*width] = 0; - } else { - // Gosh, we could make fancy colors here if we wanted - pixels[i+j*width] = color(n*16 % 255); - } - x += dx; - } - y += dy; - } - updatePixels(); -} - diff --git a/java/examples/Topics/Fractals and L-Systems/Mandelbrot/applet/loading.gif b/java/examples/Topics/Fractals and L-Systems/Mandelbrot/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$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OPih>8w-$ diff --git a/java/examples/Topics/Fractals and L-Systems/PenroseSnowflake/applet/LSystem.pde b/java/examples/Topics/Fractals and L-Systems/PenroseSnowflake/applet/LSystem.pde deleted file mode 100644 index 10e694d12..000000000 --- a/java/examples/Topics/Fractals and L-Systems/PenroseSnowflake/applet/LSystem.pde +++ /dev/null @@ -1,76 +0,0 @@ -class LSystem -{ - int steps = 0; - - String axiom; - String rule; - String production; - - float startLength; - float drawLength; - float theta; - - int generations; - - LSystem() { - axiom = "F"; - rule = "F+F-F"; - startLength = 90.0; - theta = radians(120.0); - reset(); - } - - void reset() { - production = axiom; - drawLength = startLength; - generations = 0; - } - - int getAge() { - return generations; - } - - void render() { - translate(width/2, height/2); - steps += 5; - if (steps > production.length()) { - steps = production.length(); - } - for (int i = 0; i < steps; i++) { - char step = production.charAt(i); - if (step == 'F') { - rect(0, 0, -drawLength, -drawLength); - noFill(); - translate(0, -drawLength); - } - else if (step == '+') { - rotate(theta); - } - else if (step == '-') { - rotate(-theta); - } - else if (step == '[') { - pushMatrix(); - } - else if (step == ']') { - popMatrix(); - } - } - } - - void simulate(int gen) { - while (getAge() < gen) { - production = iterate(production, rule); - } - } - - String iterate(String prod_, String rule_) { - drawLength = drawLength * 0.6; - generations++; - String newProduction = prod_; - newProduction = newProduction.replaceAll("F", rule_); - return newProduction; - } -} - - diff --git a/java/examples/Topics/Fractals and L-Systems/PenroseSnowflake/applet/PenroseSnowflake.java b/java/examples/Topics/Fractals and L-Systems/PenroseSnowflake/applet/PenroseSnowflake.java deleted file mode 100644 index 1e12287ba..000000000 --- a/java/examples/Topics/Fractals and L-Systems/PenroseSnowflake/applet/PenroseSnowflake.java +++ /dev/null @@ -1,220 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class PenroseSnowflake extends PApplet { - -/** - * Penrose Snowflake L-System - * by Geraldine Sarmiento (NYU ITP). - * - * This code was based on Patrick Dwyer's L-System class. - */ - -PenroseSnowflakeLSystem ps; - -public void setup() { - size(640, 360); - stroke(255); - noFill(); - smooth(); - ps = new PenroseSnowflakeLSystem(); - ps.simulate(4); -} - -public void draw() { - background(0); - ps.render(); -} - - -class LSystem -{ - int steps = 0; - - String axiom; - String rule; - String production; - - float startLength; - float drawLength; - float theta; - - int generations; - - LSystem() { - axiom = "F"; - rule = "F+F-F"; - startLength = 90.0f; - theta = radians(120.0f); - reset(); - } - - public void reset() { - production = axiom; - drawLength = startLength; - generations = 0; - } - - public int getAge() { - return generations; - } - - public void render() { - translate(width/2, height/2); - steps += 5; - if (steps > production.length()) { - steps = production.length(); - } - for (int i = 0; i < steps; i++) { - char step = production.charAt(i); - if (step == 'F') { - rect(0, 0, -drawLength, -drawLength); - noFill(); - translate(0, -drawLength); - } - else if (step == '+') { - rotate(theta); - } - else if (step == '-') { - rotate(-theta); - } - else if (step == '[') { - pushMatrix(); - } - else if (step == ']') { - popMatrix(); - } - } - } - - public void simulate(int gen) { - while (getAge() < gen) { - production = iterate(production, rule); - } - } - - public String iterate(String prod_, String rule_) { - drawLength = drawLength * 0.6f; - generations++; - String newProduction = prod_; - newProduction = newProduction.replaceAll("F", rule_); - return newProduction; - } -} - - -class PenroseSnowflakeLSystem extends LSystem { - - String ruleF; - - PenroseSnowflakeLSystem() { - axiom = "F3-F3-F3-F3-F"; - ruleF = "F3-F3-F45-F++F3-F"; - startLength = 450.0f; - theta = radians(18); - reset(); - } - - public void useRule(String r_) { - rule = r_; - } - - public void useAxiom(String a_) { - axiom = a_; - } - - public void useLength(float l_) { - startLength = l_; - } - - public void useTheta(float t_) { - theta = radians(t_); - } - - public void reset() { - production = axiom; - drawLength = startLength; - generations = 0; - } - - public int getAge() { - return generations; - } - - public void render() { - translate(width, height); - int repeats = 1; - - steps += 3; - if (steps > production.length()) { - steps = production.length(); - } - - for (int i = 0; i < steps; i++) { - char step = production.charAt(i); - if (step == 'F') { - for (int j = 0; j < repeats; j++) { - line(0,0,0, -drawLength); - translate(0, -drawLength); - } - repeats = 1; - } - else if (step == '+') { - for (int j = 0; j < repeats; j++) { - rotate(theta); - } - repeats = 1; - } - else if (step == '-') { - for (int j =0; j < repeats; j++) { - rotate(-theta); - } - repeats = 1; - } - else if (step == '[') { - pushMatrix(); - } - else if (step == ']') { - popMatrix(); - } - else if ( (step >= 48) && (step <= 57) ) { - repeats += step - 48; - } - } - } - - - public String iterate(String prod_, String rule_) { - String newProduction = ""; - for (int i = 0; i < prod_.length(); i++) { - char step = production.charAt(i); - if (step == 'F') { - newProduction = newProduction + ruleF; - } - else { - if (step != 'F') { - newProduction = newProduction + step; - } - } - } - drawLength = drawLength * 0.4f; - generations++; - return newProduction; - } - -} - - static public void main(String args[]) { - PApplet.main(new String[] { "PenroseSnowflake" }); - } -} diff --git a/java/examples/Topics/Fractals and L-Systems/PenroseSnowflake/applet/PenroseSnowflake.pde b/java/examples/Topics/Fractals and L-Systems/PenroseSnowflake/applet/PenroseSnowflake.pde deleted file mode 100644 index 8fe1c9393..000000000 --- a/java/examples/Topics/Fractals and L-Systems/PenroseSnowflake/applet/PenroseSnowflake.pde +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Penrose Snowflake L-System - * by Geraldine Sarmiento (NYU ITP). - * - * This code was based on Patrick Dwyer's L-System class. - */ - -PenroseSnowflakeLSystem ps; - -void setup() { - size(640, 360); - stroke(255); - noFill(); - smooth(); - ps = new PenroseSnowflakeLSystem(); - ps.simulate(4); -} - -void draw() { - background(0); - ps.render(); -} - - diff --git a/java/examples/Topics/Fractals and L-Systems/PenroseSnowflake/applet/PenroseSnowflakeLSystem.pde b/java/examples/Topics/Fractals and L-Systems/PenroseSnowflake/applet/PenroseSnowflakeLSystem.pde deleted file mode 100644 index df1f775b0..000000000 --- a/java/examples/Topics/Fractals and L-Systems/PenroseSnowflake/applet/PenroseSnowflakeLSystem.pde +++ /dev/null @@ -1,100 +0,0 @@ -class PenroseSnowflakeLSystem extends LSystem { - - String ruleF; - - PenroseSnowflakeLSystem() { - axiom = "F3-F3-F3-F3-F"; - ruleF = "F3-F3-F45-F++F3-F"; - startLength = 450.0; - theta = radians(18); - reset(); - } - - void useRule(String r_) { - rule = r_; - } - - void useAxiom(String a_) { - axiom = a_; - } - - void useLength(float l_) { - startLength = l_; - } - - void useTheta(float t_) { - theta = radians(t_); - } - - void reset() { - production = axiom; - drawLength = startLength; - generations = 0; - } - - int getAge() { - return generations; - } - - void render() { - translate(width, height); - int repeats = 1; - - steps += 3; - if (steps > production.length()) { - steps = production.length(); - } - - for (int i = 0; i < steps; i++) { - char step = production.charAt(i); - if (step == 'F') { - for (int j = 0; j < repeats; j++) { - line(0,0,0, -drawLength); - translate(0, -drawLength); - } - repeats = 1; - } - else if (step == '+') { - for (int j = 0; j < repeats; j++) { - rotate(theta); - } - repeats = 1; - } - else if (step == '-') { - for (int j =0; j < repeats; j++) { - rotate(-theta); - } - repeats = 1; - } - else if (step == '[') { - pushMatrix(); - } - else if (step == ']') { - popMatrix(); - } - else if ( (step >= 48) && (step <= 57) ) { - repeats += step - 48; - } - } - } - - - String iterate(String prod_, String rule_) { - String newProduction = ""; - for (int i = 0; i < prod_.length(); i++) { - char step = production.charAt(i); - if (step == 'F') { - newProduction = newProduction + ruleF; - } - else { - if (step != 'F') { - newProduction = newProduction + step; - } - } - } - drawLength = drawLength * 0.4; - generations++; - return newProduction; - } - -} diff --git a/java/examples/Topics/Fractals and L-Systems/PenroseSnowflake/applet/loading.gif b/java/examples/Topics/Fractals and L-Systems/PenroseSnowflake/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8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v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Fractals and L-Systems/PenroseTile/applet/LSystem.pde b/java/examples/Topics/Fractals and L-Systems/PenroseTile/applet/LSystem.pde deleted file mode 100644 index 8f00ddaf5..000000000 --- a/java/examples/Topics/Fractals and L-Systems/PenroseTile/applet/LSystem.pde +++ /dev/null @@ -1,74 +0,0 @@ -class LSystem -{ - int steps = 0; - - String axiom; - String rule; - String production; - - float startLength; - float drawLength; - float theta; - - int generations; - - LSystem() { - axiom = "F"; - rule = "F+F-F"; - startLength = 190.0; - theta = radians(120.0); - reset(); - } - - void reset() { - production = axiom; - drawLength = startLength; - generations = 0; - } - - int getAge() { - return generations; - } - - void render() { - translate(width/2, height/2); - steps += 5; - if (steps > production.length()) { - steps = production.length(); - } - for (int i = 0; i < steps; i++) { - char step = production.charAt(i); - if (step == 'F') { - rect(0, 0, -drawLength, -drawLength); - noFill(); - translate(0, -drawLength); - } - else if (step == '+') { - rotate(theta); - } - else if (step == '-') { - rotate(-theta); - } - else if (step == '[') { - pushMatrix(); - } - else if (step == ']') { - popMatrix(); - } - } - } - - void simulate(int gen) { - while (getAge() < gen) { - production = iterate(production, rule); - } - } - - String iterate(String prod_, String rule_) { - drawLength = drawLength * 0.6; - generations++; - String newProduction = prod_; - newProduction = newProduction.replaceAll("F", rule_); - return newProduction; - } -} diff --git a/java/examples/Topics/Fractals and L-Systems/PenroseTile/applet/PenroseLSystem.pde b/java/examples/Topics/Fractals and L-Systems/PenroseTile/applet/PenroseLSystem.pde deleted file mode 100644 index 16a7f1c43..000000000 --- a/java/examples/Topics/Fractals and L-Systems/PenroseTile/applet/PenroseLSystem.pde +++ /dev/null @@ -1,128 +0,0 @@ -class PenroseLSystem extends LSystem { - - int steps = 0; - float somestep = 0.1; - String ruleW; - String ruleX; - String ruleY; - String ruleZ; - - PenroseLSystem() { - axiom = "[X]++[X]++[X]++[X]++[X]"; - ruleW = "YF++ZF4-XF[-YF4-WF]++"; - ruleX = "+YF--ZF[3-WF--XF]+"; - ruleY = "-WF++XF[+++YF++ZF]-"; - ruleZ = "--YF++++WF[+ZF++++XF]--XF"; - startLength = 460.0; - theta = radians(36); - reset(); - } - - void useRule(String r_) { - rule = r_; - } - - void useAxiom(String a_) { - axiom = a_; - } - - void useLength(float l_) { - startLength = l_; - } - - void useTheta(float t_) { - theta = radians(t_); - } - - void reset() { - production = axiom; - drawLength = startLength; - generations = 0; - } - - int getAge() { - return generations; - } - - void render() { - translate(width/2, height/2); - int pushes = 0; - int repeats = 1; - steps += 12; - if (steps > production.length()) { - steps = production.length(); - } - - for (int i = 0; i < steps; i++) { - char step = production.charAt(i); - if (step == 'F') { - stroke(255, 60); - for (int j = 0; j < repeats; j++) { - line(0, 0, 0, -drawLength); - noFill(); - translate(0, -drawLength); - } - repeats = 1; - } - else if (step == '+') { - for (int j = 0; j < repeats; j++) { - rotate(theta); - } - repeats = 1; - } - else if (step == '-') { - for (int j =0; j < repeats; j++) { - rotate(-theta); - } - repeats = 1; - } - else if (step == '[') { - pushes++; - pushMatrix(); - } - else if (step == ']') { - popMatrix(); - pushes--; - } - else if ( (step >= 48) && (step <= 57) ) { - repeats = (int)step - 48; - } - } - - // Unpush if we need too - while (pushes > 0) { - popMatrix(); - pushes--; - } - } - - String iterate(String prod_, String rule_) { - String newProduction = ""; - for (int i = 0; i < prod_.length(); i++) { - char step = production.charAt(i); - if (step == 'W') { - newProduction = newProduction + ruleW; - } - else if (step == 'X') { - newProduction = newProduction + ruleX; - } - else if (step == 'Y') { - newProduction = newProduction + ruleY; - } - else if (step == 'Z') { - newProduction = newProduction + ruleZ; - } - else { - if (step != 'F') { - newProduction = newProduction + step; - } - } - } - - drawLength = drawLength * 0.5; - generations++; - return newProduction; - } - -} - diff --git a/java/examples/Topics/Fractals and L-Systems/PenroseTile/applet/PenroseTile.java b/java/examples/Topics/Fractals and L-Systems/PenroseTile/applet/PenroseTile.java deleted file mode 100644 index e52f3b6bc..000000000 --- a/java/examples/Topics/Fractals and L-Systems/PenroseTile/applet/PenroseTile.java +++ /dev/null @@ -1,250 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class PenroseTile extends PApplet { - -/** - * Penrose Tile L-System - * by Geraldine Sarmiento (NYU ITP). - * - * This code was based on Patrick Dwyer's L-System class. - */ - -PenroseLSystem ds; - -public void setup() -{ - size(640, 360); - smooth(); - ds = new PenroseLSystem(); - ds.simulate(4); -} - -public void draw() -{ - background(0); - ds.render(); -} - - - - - - -class LSystem -{ - int steps = 0; - - String axiom; - String rule; - String production; - - float startLength; - float drawLength; - float theta; - - int generations; - - LSystem() { - axiom = "F"; - rule = "F+F-F"; - startLength = 190.0f; - theta = radians(120.0f); - reset(); - } - - public void reset() { - production = axiom; - drawLength = startLength; - generations = 0; - } - - public int getAge() { - return generations; - } - - public void render() { - translate(width/2, height/2); - steps += 5; - if (steps > production.length()) { - steps = production.length(); - } - for (int i = 0; i < steps; i++) { - char step = production.charAt(i); - if (step == 'F') { - rect(0, 0, -drawLength, -drawLength); - noFill(); - translate(0, -drawLength); - } - else if (step == '+') { - rotate(theta); - } - else if (step == '-') { - rotate(-theta); - } - else if (step == '[') { - pushMatrix(); - } - else if (step == ']') { - popMatrix(); - } - } - } - - public void simulate(int gen) { - while (getAge() < gen) { - production = iterate(production, rule); - } - } - - public String iterate(String prod_, String rule_) { - drawLength = drawLength * 0.6f; - generations++; - String newProduction = prod_; - newProduction = newProduction.replaceAll("F", rule_); - return newProduction; - } -} -class PenroseLSystem extends LSystem { - - int steps = 0; - float somestep = 0.1f; - String ruleW; - String ruleX; - String ruleY; - String ruleZ; - - PenroseLSystem() { - axiom = "[X]++[X]++[X]++[X]++[X]"; - ruleW = "YF++ZF4-XF[-YF4-WF]++"; - ruleX = "+YF--ZF[3-WF--XF]+"; - ruleY = "-WF++XF[+++YF++ZF]-"; - ruleZ = "--YF++++WF[+ZF++++XF]--XF"; - startLength = 460.0f; - theta = radians(36); - reset(); - } - - public void useRule(String r_) { - rule = r_; - } - - public void useAxiom(String a_) { - axiom = a_; - } - - public void useLength(float l_) { - startLength = l_; - } - - public void useTheta(float t_) { - theta = radians(t_); - } - - public void reset() { - production = axiom; - drawLength = startLength; - generations = 0; - } - - public int getAge() { - return generations; - } - - public void render() { - translate(width/2, height/2); - int pushes = 0; - int repeats = 1; - steps += 12; - if (steps > production.length()) { - steps = production.length(); - } - - for (int i = 0; i < steps; i++) { - char step = production.charAt(i); - if (step == 'F') { - stroke(255, 60); - for (int j = 0; j < repeats; j++) { - line(0, 0, 0, -drawLength); - noFill(); - translate(0, -drawLength); - } - repeats = 1; - } - else if (step == '+') { - for (int j = 0; j < repeats; j++) { - rotate(theta); - } - repeats = 1; - } - else if (step == '-') { - for (int j =0; j < repeats; j++) { - rotate(-theta); - } - repeats = 1; - } - else if (step == '[') { - pushes++; - pushMatrix(); - } - else if (step == ']') { - popMatrix(); - pushes--; - } - else if ( (step >= 48) && (step <= 57) ) { - repeats = (int)step - 48; - } - } - - // Unpush if we need too - while (pushes > 0) { - popMatrix(); - pushes--; - } - } - - public String iterate(String prod_, String rule_) { - String newProduction = ""; - for (int i = 0; i < prod_.length(); i++) { - char step = production.charAt(i); - if (step == 'W') { - newProduction = newProduction + ruleW; - } - else if (step == 'X') { - newProduction = newProduction + ruleX; - } - else if (step == 'Y') { - newProduction = newProduction + ruleY; - } - else if (step == 'Z') { - newProduction = newProduction + ruleZ; - } - else { - if (step != 'F') { - newProduction = newProduction + step; - } - } - } - - drawLength = drawLength * 0.5f; - generations++; - return newProduction; - } - -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "PenroseTile" }); - } -} diff --git a/java/examples/Topics/Fractals and L-Systems/PenroseTile/applet/PenroseTile.pde b/java/examples/Topics/Fractals and L-Systems/PenroseTile/applet/PenroseTile.pde deleted file mode 100644 index 1cbeb439c..000000000 --- a/java/examples/Topics/Fractals and L-Systems/PenroseTile/applet/PenroseTile.pde +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Penrose Tile L-System - * by Geraldine Sarmiento (NYU ITP). - * - * This code was based on Patrick Dwyer's L-System class. - */ - -PenroseLSystem ds; - -void setup() -{ - size(640, 360); - smooth(); - ds = new PenroseLSystem(); - ds.simulate(4); -} - -void draw() -{ - background(0); - ds.render(); -} - - - - - - diff --git a/java/examples/Topics/Fractals and L-Systems/PenroseTile/applet/loading.gif b/java/examples/Topics/Fractals and L-Systems/PenroseTile/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000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14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Fractals and L-Systems/Pentigree/applet/LSystem.pde b/java/examples/Topics/Fractals and L-Systems/Pentigree/applet/LSystem.pde deleted file mode 100644 index 2adcabcd5..000000000 --- a/java/examples/Topics/Fractals and L-Systems/Pentigree/applet/LSystem.pde +++ /dev/null @@ -1,76 +0,0 @@ -class LSystem { - - int steps = 0; - - String axiom; - String rule; - String production; - - float startLength; - float drawLength; - float theta; - - int generations; - - LSystem() { - - axiom = "F"; - rule = "F+F-F"; - startLength = 90.0; - theta = radians(120.0); - reset(); - } - - void reset() { - production = axiom; - drawLength = startLength; - generations = 0; - } - - int getAge() { - return generations; - } - - void render() { - translate(width/2, height/2); - steps += 5; - if (steps > production.length()) { - steps = production.length(); - } - for (int i = 0; i < steps; i++) { - char step = production.charAt(i); - if (step == 'F') { - rect(0, 0, -drawLength, -drawLength); - noFill(); - translate(0, -drawLength); - } - else if (step == '+') { - rotate(theta); - } - else if (step == '-') { - rotate(-theta); - } - else if (step == '[') { - pushMatrix(); - } - else if (step == ']') { - popMatrix(); - } - } - } - - void simulate(int gen) { - while (getAge() < gen) { - production = iterate(production, rule); - } - } - - String iterate(String prod_, String rule_) { - drawLength = drawLength * 0.6; - generations++; - String newProduction = prod_; - newProduction = newProduction.replaceAll("F", rule_); - return newProduction; - } -} - diff --git a/java/examples/Topics/Fractals and L-Systems/Pentigree/applet/Pentigree.java b/java/examples/Topics/Fractals and L-Systems/Pentigree/applet/Pentigree.java deleted file mode 100644 index 7a61a05cf..000000000 --- a/java/examples/Topics/Fractals and L-Systems/Pentigree/applet/Pentigree.java +++ /dev/null @@ -1,190 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Pentigree extends PApplet { - -/** - * Pentigree L-System - * by Geraldine Sarmiento (NYU ITP). - * - * This code was based on Patrick Dwyer's L-System class. - */ - - -PentigreeLSystem ps; - -public void setup() { - size(640, 360); - smooth(); - ps = new PentigreeLSystem(); - ps.simulate(3); -} - -public void draw() { - background(0); - ps.render(); -} - - -class LSystem { - - int steps = 0; - - String axiom; - String rule; - String production; - - float startLength; - float drawLength; - float theta; - - int generations; - - LSystem() { - - axiom = "F"; - rule = "F+F-F"; - startLength = 90.0f; - theta = radians(120.0f); - reset(); - } - - public void reset() { - production = axiom; - drawLength = startLength; - generations = 0; - } - - public int getAge() { - return generations; - } - - public void render() { - translate(width/2, height/2); - steps += 5; - if (steps > production.length()) { - steps = production.length(); - } - for (int i = 0; i < steps; i++) { - char step = production.charAt(i); - if (step == 'F') { - rect(0, 0, -drawLength, -drawLength); - noFill(); - translate(0, -drawLength); - } - else if (step == '+') { - rotate(theta); - } - else if (step == '-') { - rotate(-theta); - } - else if (step == '[') { - pushMatrix(); - } - else if (step == ']') { - popMatrix(); - } - } - } - - public void simulate(int gen) { - while (getAge() < gen) { - production = iterate(production, rule); - } - } - - public String iterate(String prod_, String rule_) { - drawLength = drawLength * 0.6f; - generations++; - String newProduction = prod_; - newProduction = newProduction.replaceAll("F", rule_); - return newProduction; - } -} - -class PentigreeLSystem extends LSystem { - - int steps = 0; - float somestep = 0.1f; - float xoff = 0.01f; - - PentigreeLSystem() { - axiom = "F-F-F-F-F"; - rule = "F-F++F+F-F-F"; - startLength = 60.0f; - theta = radians(72); - reset(); - } - - public void useRule(String r_) { - rule = r_; - } - - public void useAxiom(String a_) { - axiom = a_; - } - - public void useLength(float l_) { - startLength = l_; - } - - public void useTheta(float t_) { - theta = radians(t_); - } - - public void reset() { - production = axiom; - drawLength = startLength; - generations = 0; - } - - public int getAge() { - return generations; - } - - public void render() { - translate(width/4, height/2); - steps += 3; - if (steps > production.length()) { - steps = production.length(); - } - - for (int i = 0; i < steps; i++) { - char step = production.charAt(i); - if (step == 'F') { - noFill(); - stroke(255); - line(0, 0, 0, -drawLength); - translate(0, -drawLength); - } - else if (step == '+') { - rotate(theta); - } - else if (step == '-') { - rotate(-theta); - } - else if (step == '[') { - pushMatrix(); - } - else if (step == ']') { - popMatrix(); - } - } - } - -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Pentigree" }); - } -} diff --git a/java/examples/Topics/Fractals and L-Systems/Pentigree/applet/Pentigree.pde b/java/examples/Topics/Fractals and L-Systems/Pentigree/applet/Pentigree.pde deleted file mode 100644 index be0d3fb77..000000000 --- a/java/examples/Topics/Fractals and L-Systems/Pentigree/applet/Pentigree.pde +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Pentigree L-System - * by Geraldine Sarmiento (NYU ITP). - * - * This code was based on Patrick Dwyer's L-System class. - */ - - -PentigreeLSystem ps; - -void setup() { - size(640, 360); - smooth(); - ps = new PentigreeLSystem(); - ps.simulate(3); -} - -void draw() { - background(0); - ps.render(); -} - - diff --git a/java/examples/Topics/Fractals and L-Systems/Pentigree/applet/PentigreeLSystem.pde b/java/examples/Topics/Fractals and L-Systems/Pentigree/applet/PentigreeLSystem.pde deleted file mode 100644 index a377c016d..000000000 --- a/java/examples/Topics/Fractals and L-Systems/Pentigree/applet/PentigreeLSystem.pde +++ /dev/null @@ -1,71 +0,0 @@ -class PentigreeLSystem extends LSystem { - - int steps = 0; - float somestep = 0.1; - float xoff = 0.01; - - PentigreeLSystem() { - axiom = "F-F-F-F-F"; - rule = "F-F++F+F-F-F"; - startLength = 60.0; - theta = radians(72); - reset(); - } - - void useRule(String r_) { - rule = r_; - } - - void useAxiom(String a_) { - axiom = a_; - } - - void useLength(float l_) { - startLength = l_; - } - - void useTheta(float t_) { - theta = radians(t_); - } - - void reset() { - production = axiom; - drawLength = startLength; - generations = 0; - } - - int getAge() { - return generations; - } - - void render() { - translate(width/4, height/2); - steps += 3; - if (steps > production.length()) { - steps = production.length(); - } - - for (int i = 0; i < steps; i++) { - char step = production.charAt(i); - if (step == 'F') { - noFill(); - stroke(255); - line(0, 0, 0, -drawLength); - translate(0, -drawLength); - } - else if (step == '+') { - rotate(theta); - } - else if (step == '-') { - rotate(-theta); - } - else if (step == '[') { - pushMatrix(); - } - else if (step == ']') { - popMatrix(); - } - } - } - -} diff --git a/java/examples/Topics/Fractals and L-Systems/Pentigree/applet/loading.gif b/java/examples/Topics/Fractals and L-Systems/Pentigree/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H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tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Fractals and L-Systems/Tree/applet/Tree.java b/java/examples/Topics/Fractals and L-Systems/Tree/applet/Tree.java deleted file mode 100644 index ce366e143..000000000 --- a/java/examples/Topics/Fractals and L-Systems/Tree/applet/Tree.java +++ /dev/null @@ -1,79 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Tree extends PApplet { - -/** - * Recursive Tree - * by Daniel Shiffman. - * - * Renders a simple tree-like structure via recursion - * Branching angle calculated as a function of horizontal mouse location - */ - -float theta; - -public void setup() { - size(640, 360); - smooth(); -} - -public void draw() { - background(0); - frameRate(30); - stroke(255); - // Let's pick an angle 0 to 90 degrees based on the mouse position - float a = (mouseX / (float) width) * 90f; - // Convert it to radians - theta = radians(a); - // Start the tree from the bottom of the screen - translate(width/2,height); - // Draw a line 120 pixels - line(0,0,0,-120); - // Move to the end of that line - translate(0,-120); - // Start the recursive branching! - branch(120); - -} - -public void branch(float h) { - // Each branch will be 2/3rds the size of the previous one - h *= 0.66f; - - // All recursive functions must have an exit condition!!!! - // Here, ours is when the length of the branch is 2 pixels or less - if (h > 2) { - pushMatrix(); // Save the current state of transformation (i.e. where are we now) - rotate(theta); // Rotate by theta - line(0, 0, 0, -h); // Draw the branch - translate(0, -h); // Move to the end of the branch - branch(h); // Ok, now call myself to draw two new branches!! - popMatrix(); // Whenever we get back here, we "pop" in order to restore the previous matrix state - - // Repeat the same thing, only branch off to the "left" this time! - pushMatrix(); - rotate(-theta); - line(0, 0, 0, -h); - translate(0, -h); - branch(h); - popMatrix(); - } -} - - - - static public void main(String args[]) { - PApplet.main(new String[] { "Tree" }); - } -} diff --git a/java/examples/Topics/Fractals and L-Systems/Tree/applet/Tree.pde b/java/examples/Topics/Fractals and L-Systems/Tree/applet/Tree.pde deleted file mode 100644 index 5ee6440f9..000000000 --- a/java/examples/Topics/Fractals and L-Systems/Tree/applet/Tree.pde +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Recursive Tree - * by Daniel Shiffman. - * - * Renders a simple tree-like structure via recursion - * Branching angle calculated as a function of horizontal mouse location - */ - -float theta; - -void setup() { - size(640, 360); - smooth(); -} - -void draw() { - background(0); - frameRate(30); - stroke(255); - // Let's pick an angle 0 to 90 degrees based on the mouse position - float a = (mouseX / (float) width) * 90f; - // Convert it to radians - theta = radians(a); - // Start the tree from the bottom of the screen - translate(width/2,height); - // Draw a line 120 pixels - line(0,0,0,-120); - // Move to the end of that line - translate(0,-120); - // Start the recursive branching! - branch(120); - -} - -void branch(float h) { - // Each branch will be 2/3rds the size of the previous one - h *= 0.66; - - // All recursive functions must have an exit condition!!!! - // Here, ours is when the length of the branch is 2 pixels or less - if (h > 2) { - pushMatrix(); // Save the current state of transformation (i.e. where are we now) - rotate(theta); // Rotate by theta - line(0, 0, 0, -h); // Draw the branch - translate(0, -h); // Move to the end of the branch - branch(h); // Ok, now call myself to draw two new branches!! - popMatrix(); // Whenever we get back here, we "pop" in order to restore the previous matrix state - - // Repeat the same thing, only branch off to the "left" this time! - pushMatrix(); - rotate(-theta); - line(0, 0, 0, -h); - translate(0, -h); - branch(h); - popMatrix(); - } -} - - diff --git a/java/examples/Topics/Fractals and L-Systems/Tree/applet/loading.gif b/java/examples/Topics/Fractals and L-Systems/Tree/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/GUI/Button/applet/Button.java b/java/examples/Topics/GUI/Button/applet/Button.java deleted file mode 100644 index 358745791..000000000 --- a/java/examples/Topics/GUI/Button/applet/Button.java +++ /dev/null @@ -1,120 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Button extends PApplet { - -/** - * Button. - * - * Click on one of the colored squares in the - * center of the image to change the color of - * the background. - */ - -int rectX, rectY; // Position of square button -int circleX, circleY; // Position of circle button -int rectSize = 50; // Diameter of rect -int circleSize = 53; // Diameter of circle -int rectColor, circleColor, baseColor; -int rectHighlight, circleHighlight; -int currentColor; -boolean rectOver = false; -boolean circleOver = false; - -public void setup() -{ - size(200, 200); - smooth(); - rectColor = color(0); - rectHighlight = color(51); - circleColor = color(255); - circleHighlight = color(204); - baseColor = color(102); - currentColor = baseColor; - circleX = width/2+circleSize/2+10; - circleY = height/2; - rectX = width/2-rectSize-10; - rectY = height/2-rectSize/2; - ellipseMode(CENTER); -} - -public void draw() -{ - update(mouseX, mouseY); - background(currentColor); - - if(rectOver) { - fill(rectHighlight); - } else { - fill(rectColor); - } - stroke(255); - rect(rectX, rectY, rectSize, rectSize); - - if(circleOver) { - fill(circleHighlight); - } else { - fill(circleColor); - } - stroke(0); - ellipse(circleX, circleY, circleSize, circleSize); -} - -public void update(int x, int y) -{ - if( overCircle(circleX, circleY, circleSize) ) { - circleOver = true; - rectOver = false; - } else if ( overRect(rectX, rectY, rectSize, rectSize) ) { - rectOver = true; - circleOver = false; - } else { - circleOver = rectOver = false; - } -} - -public void mousePressed() -{ - if(circleOver) { - currentColor = circleColor; - } - if(rectOver) { - currentColor = rectColor; - } -} - -public boolean overRect(int x, int y, int width, int height) -{ - if (mouseX >= x && mouseX <= x+width && - mouseY >= y && mouseY <= y+height) { - return true; - } else { - return false; - } -} - -public boolean overCircle(int x, int y, int diameter) -{ - float disX = x - mouseX; - float disY = y - mouseY; - if(sqrt(sq(disX) + sq(disY)) < diameter/2 ) { - return true; - } else { - return false; - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Button" }); - } -} diff --git a/java/examples/Topics/GUI/Button/applet/Button.pde b/java/examples/Topics/GUI/Button/applet/Button.pde deleted file mode 100644 index fe477b83f..000000000 --- a/java/examples/Topics/GUI/Button/applet/Button.pde +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Button. - * - * Click on one of the colored squares in the - * center of the image to change the color of - * the background. - */ - -int rectX, rectY; // Position of square button -int circleX, circleY; // Position of circle button -int rectSize = 50; // Diameter of rect -int circleSize = 53; // Diameter of circle -color rectColor, circleColor, baseColor; -color rectHighlight, circleHighlight; -color currentColor; -boolean rectOver = false; -boolean circleOver = false; - -void setup() -{ - size(200, 200); - smooth(); - rectColor = color(0); - rectHighlight = color(51); - circleColor = color(255); - circleHighlight = color(204); - baseColor = color(102); - currentColor = baseColor; - circleX = width/2+circleSize/2+10; - circleY = height/2; - rectX = width/2-rectSize-10; - rectY = height/2-rectSize/2; - ellipseMode(CENTER); -} - -void draw() -{ - update(mouseX, mouseY); - background(currentColor); - - if(rectOver) { - fill(rectHighlight); - } else { - fill(rectColor); - } - stroke(255); - rect(rectX, rectY, rectSize, rectSize); - - if(circleOver) { - fill(circleHighlight); - } else { - fill(circleColor); - } - stroke(0); - ellipse(circleX, circleY, circleSize, circleSize); -} - -void update(int x, int y) -{ - if( overCircle(circleX, circleY, circleSize) ) { - circleOver = true; - rectOver = false; - } else if ( overRect(rectX, rectY, rectSize, rectSize) ) { - rectOver = true; - circleOver = false; - } else { - circleOver = rectOver = false; - } -} - -void mousePressed() -{ - if(circleOver) { - currentColor = circleColor; - } - if(rectOver) { - currentColor = rectColor; - } -} - -boolean overRect(int x, int y, int width, int height) -{ - if (mouseX >= x && mouseX <= x+width && - mouseY >= y && mouseY <= y+height) { - return true; - } else { - return false; - } -} - -boolean overCircle(int x, int y, int diameter) -{ - float disX = x - mouseX; - float disY = y - mouseY; - if(sqrt(sq(disX) + sq(disY)) < diameter/2 ) { - return true; - } else { - return false; - } -} diff --git a/java/examples/Topics/GUI/Button/applet/loading.gif b/java/examples/Topics/GUI/Button/applet/loading.gif deleted file mode 100644 index 1ddae5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_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/GUI/Buttons/applet/Buttons.java b/java/examples/Topics/GUI/Buttons/applet/Buttons.java deleted file mode 100644 index 04532f11e..000000000 --- a/java/examples/Topics/GUI/Buttons/applet/Buttons.java +++ /dev/null @@ -1,240 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Buttons extends PApplet { - -/** - * Buttons. - * - * Click on one of the shapes to change - * the background color. This example - * demonstates a class for buttons. - */ - -int currentcolor; - -CircleButton circle1, circle2, circle3; -RectButton rect1, rect2; - -boolean locked = false; - -public void setup() -{ - size(200, 200); - smooth(); - - int baseColor = color(102); - currentcolor = baseColor; - - // Define and create circle button - int buttoncolor = color(204); - int highlight = color(153); - ellipseMode(CENTER); - circle1 = new CircleButton(30, 100, 100, buttoncolor, highlight); - - // Define and create circle button - buttoncolor = color(204); - highlight = color(153); - circle2 = new CircleButton(130, 110, 24, buttoncolor, highlight); - - // Define and create circle button - buttoncolor = color(153); - highlight = color(102); - circle3 = new CircleButton(130, 140, 24, buttoncolor, highlight); - - // Define and create rectangle button - buttoncolor = color(102); - highlight = color(51); - rect1 = new RectButton(150, 20, 100, buttoncolor, highlight); - - // Define and create rectangle button - buttoncolor = color(51); - highlight = color(0); - rect2 = new RectButton(90, 20, 50, buttoncolor, highlight); -} - -public void draw() -{ - background(currentcolor); - stroke(255); - update(mouseX, mouseY); - circle1.display(); - circle2.display(); - circle3.display(); - rect1.display(); - rect2.display(); -} - -public void update(int x, int y) -{ - if(locked == false) { - circle1.update(); - circle2.update(); - circle3.update(); - rect1.update(); - rect2.update(); - } - else { - locked = false; - } - - if(mousePressed) { - if(circle1.pressed()) { - currentcolor = circle1.basecolor; - } - else if(circle2.pressed()) { - currentcolor = circle2.basecolor; - } - else if(circle3.pressed()) { - currentcolor = circle3.basecolor; - } - else if(rect1.pressed()) { - currentcolor = rect1.basecolor; - } - else if(rect2.pressed()) { - currentcolor = rect2.basecolor; - } - } -} - - -class Button -{ - int x, y; - int size; - int basecolor, highlightcolor; - int currentcolor; - boolean over = false; - boolean pressed = false; - - public void update() - { - if(over()) { - currentcolor = highlightcolor; - } - else { - currentcolor = basecolor; - } - } - - public boolean pressed() - { - if(over) { - locked = true; - return true; - } - else { - locked = false; - return false; - } - } - - public boolean over() - { - return true; - } - - public boolean overRect(int x, int y, int width, int height) - { - if (mouseX >= x && mouseX <= x+width && - mouseY >= y && mouseY <= y+height) { - return true; - } - else { - return false; - } - } - - public boolean overCircle(int x, int y, int diameter) - { - float disX = x - mouseX; - float disY = y - mouseY; - if(sqrt(sq(disX) + sq(disY)) < diameter/2 ) { - return true; - } - else { - return false; - } - } - -} - -class CircleButton extends Button -{ - CircleButton(int ix, int iy, int isize, int icolor, int ihighlight) - { - x = ix; - y = iy; - size = isize; - basecolor = icolor; - highlightcolor = ihighlight; - currentcolor = basecolor; - } - - public boolean over() - { - if( overCircle(x, y, size) ) { - over = true; - return true; - } - else { - over = false; - return false; - } - } - - public void display() - { - stroke(255); - fill(currentcolor); - ellipse(x, y, size, size); - } -} - -class RectButton extends Button -{ - RectButton(int ix, int iy, int isize, int icolor, int ihighlight) - { - x = ix; - y = iy; - size = isize; - basecolor = icolor; - highlightcolor = ihighlight; - currentcolor = basecolor; - } - - public boolean over() - { - if( overRect(x, y, size, size) ) { - over = true; - return true; - } - else { - over = false; - return false; - } - } - - public void display() - { - stroke(255); - fill(currentcolor); - rect(x, y, size, size); - } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Buttons" }); - } -} diff --git a/java/examples/Topics/GUI/Buttons/applet/Buttons.pde b/java/examples/Topics/GUI/Buttons/applet/Buttons.pde deleted file mode 100644 index 11f8b0031..000000000 --- a/java/examples/Topics/GUI/Buttons/applet/Buttons.pde +++ /dev/null @@ -1,220 +0,0 @@ -/** - * Buttons. - * - * Click on one of the shapes to change - * the background color. This example - * demonstates a class for buttons. - */ - -color currentcolor; - -CircleButton circle1, circle2, circle3; -RectButton rect1, rect2; - -boolean locked = false; - -void setup() -{ - size(200, 200); - smooth(); - - color baseColor = color(102); - currentcolor = baseColor; - - // Define and create circle button - color buttoncolor = color(204); - color highlight = color(153); - ellipseMode(CENTER); - circle1 = new CircleButton(30, 100, 100, buttoncolor, highlight); - - // Define and create circle button - buttoncolor = color(204); - highlight = color(153); - circle2 = new CircleButton(130, 110, 24, buttoncolor, highlight); - - // Define and create circle button - buttoncolor = color(153); - highlight = color(102); - circle3 = new CircleButton(130, 140, 24, buttoncolor, highlight); - - // Define and create rectangle button - buttoncolor = color(102); - highlight = color(51); - rect1 = new RectButton(150, 20, 100, buttoncolor, highlight); - - // Define and create rectangle button - buttoncolor = color(51); - highlight = color(0); - rect2 = new RectButton(90, 20, 50, buttoncolor, highlight); -} - -void draw() -{ - background(currentcolor); - stroke(255); - update(mouseX, mouseY); - circle1.display(); - circle2.display(); - circle3.display(); - rect1.display(); - rect2.display(); -} - -void update(int x, int y) -{ - if(locked == false) { - circle1.update(); - circle2.update(); - circle3.update(); - rect1.update(); - rect2.update(); - } - else { - locked = false; - } - - if(mousePressed) { - if(circle1.pressed()) { - currentcolor = circle1.basecolor; - } - else if(circle2.pressed()) { - currentcolor = circle2.basecolor; - } - else if(circle3.pressed()) { - currentcolor = circle3.basecolor; - } - else if(rect1.pressed()) { - currentcolor = rect1.basecolor; - } - else if(rect2.pressed()) { - currentcolor = rect2.basecolor; - } - } -} - - -class Button -{ - int x, y; - int size; - color basecolor, highlightcolor; - color currentcolor; - boolean over = false; - boolean pressed = false; - - void update() - { - if(over()) { - currentcolor = highlightcolor; - } - else { - currentcolor = basecolor; - } - } - - boolean pressed() - { - if(over) { - locked = true; - return true; - } - else { - locked = false; - return false; - } - } - - boolean over() - { - return true; - } - - boolean overRect(int x, int y, int width, int height) - { - if (mouseX >= x && mouseX <= x+width && - mouseY >= y && mouseY <= y+height) { - return true; - } - else { - return false; - } - } - - boolean overCircle(int x, int y, int diameter) - { - float disX = x - mouseX; - float disY = y - mouseY; - if(sqrt(sq(disX) + sq(disY)) < diameter/2 ) { - return true; - } - else { - return false; - } - } - -} - -class CircleButton extends Button -{ - CircleButton(int ix, int iy, int isize, color icolor, color ihighlight) - { - x = ix; - y = iy; - size = isize; - basecolor = icolor; - highlightcolor = ihighlight; - currentcolor = basecolor; - } - - boolean over() - { - if( overCircle(x, y, size) ) { - over = true; - return true; - } - else { - over = false; - return false; - } - } - - void display() - { - stroke(255); - fill(currentcolor); - ellipse(x, y, size, size); - } -} - -class RectButton extends Button -{ - RectButton(int ix, int iy, int isize, color icolor, color ihighlight) - { - x = ix; - y = iy; - size = isize; - basecolor = icolor; - highlightcolor = ihighlight; - currentcolor = basecolor; - } - - boolean over() - { - if( overRect(x, y, size, size) ) { - over = true; - return true; - } - else { - over = false; - return false; - } - } - - void display() - { - stroke(255); - fill(currentcolor); - rect(x, y, size, size); - } -} - diff --git a/java/examples/Topics/GUI/Buttons/applet/loading.gif b/java/examples/Topics/GUI/Buttons/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsL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Handles/applet/Handles.java b/java/examples/Topics/GUI/Handles/applet/Handles.java deleted file mode 100644 index 5aec7ac6f..000000000 --- a/java/examples/Topics/GUI/Handles/applet/Handles.java +++ /dev/null @@ -1,159 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Handles extends PApplet { - -/** - * Handles. - * - * Click and drag the white boxes to change their position. - */ - -Handle[] handles; -int num; - -public void setup() -{ - size(200, 200); - num = height/15; - handles = new Handle[num]; - int hsize = 10; - for(int i=0; i= x && mouseX <= x+width && - mouseY >= y && mouseY <= y+height) { - return true; - } else { - return false; - } -} - -public int lock(int val, int minv, int maxv) -{ - return min(max(val, minv), maxv); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Handles" }); - } -} diff --git a/java/examples/Topics/GUI/Handles/applet/Handles.pde b/java/examples/Topics/GUI/Handles/applet/Handles.pde deleted file mode 100644 index 7036f362a..000000000 --- a/java/examples/Topics/GUI/Handles/applet/Handles.pde +++ /dev/null @@ -1,139 +0,0 @@ -/** - * Handles. - * - * Click and drag the white boxes to change their position. - */ - -Handle[] handles; -int num; - -void setup() -{ - size(200, 200); - num = height/15; - handles = new Handle[num]; - int hsize = 10; - for(int i=0; i= x && mouseX <= x+width && - mouseY >= y && mouseY <= y+height) { - return true; - } else { - return false; - } -} - -int lock(int val, int minv, int maxv) -{ - return min(max(val, minv), maxv); -} diff --git a/java/examples/Topics/GUI/Handles/applet/loading.gif b/java/examples/Topics/GUI/Handles/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)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iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/GUI/ImageButton/applet/ImageButton.java b/java/examples/Topics/GUI/ImageButton/applet/ImageButton.java deleted file mode 100644 index 70bbf4a35..000000000 --- a/java/examples/Topics/GUI/ImageButton/applet/ImageButton.java +++ /dev/null @@ -1,128 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class ImageButton extends PApplet { - -/** - * Image button. - * - * Loading images and using them to create a button. - */ - - -ImageButtons button; - -public void setup() -{ - size(200, 200); - background(102, 102, 102); - - // Define and create image button - PImage b = loadImage("base.gif"); - PImage r = loadImage("roll.gif"); - PImage d = loadImage("down.gif"); - int x = width/2 - b.width/2; - int y = height/2 - b.height/2; - int w = b.width; - int h = b.height; - button = new ImageButtons(x, y, w, h, b, r, d); -} - -public void draw() -{ - button.update(); - button.display(); -} - -class Button -{ - int x, y; - int w, h; - int basecolor, highlightcolor; - int currentcolor; - boolean over = false; - boolean pressed = false; - - public void pressed() { - if(over && mousePressed) { - pressed = true; - } else { - pressed = false; - } - } - - public boolean overRect(int x, int y, int width, int height) { - if (mouseX >= x && mouseX <= x+width && - mouseY >= y && mouseY <= y+height) { - return true; - } else { - return false; - } -} -} - -class ImageButtons extends Button -{ - PImage base; - PImage roll; - PImage down; - PImage currentimage; - - ImageButtons(int ix, int iy, int iw, int ih, PImage ibase, PImage iroll, PImage idown) - { - x = ix; - y = iy; - w = iw; - h = ih; - base = ibase; - roll = iroll; - down = idown; - currentimage = base; - } - - public void update() - { - over(); - pressed(); - if(pressed) { - currentimage = down; - } else if (over){ - currentimage = roll; - } else { - currentimage = base; - } - } - - public void over() - { - if( overRect(x, y, w, h) ) { - over = true; - } else { - over = false; - } - } - - public void display() - { - image(currentimage, x, y); - } -} - - - - - - static public void main(String args[]) { - PApplet.main(new String[] { "ImageButton" }); - } -} diff --git a/java/examples/Topics/GUI/ImageButton/applet/ImageButton.pde b/java/examples/Topics/GUI/ImageButton/applet/ImageButton.pde deleted file mode 100644 index 338cb3d1e..000000000 --- a/java/examples/Topics/GUI/ImageButton/applet/ImageButton.pde +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Image button. - * - * Loading images and using them to create a button. - */ - - -ImageButtons button; - -void setup() -{ - size(200, 200); - background(102, 102, 102); - - // Define and create image button - PImage b = loadImage("base.gif"); - PImage r = loadImage("roll.gif"); - PImage d = loadImage("down.gif"); - int x = width/2 - b.width/2; - int y = height/2 - b.height/2; - int w = b.width; - int h = b.height; - button = new ImageButtons(x, y, w, h, b, r, d); -} - -void draw() -{ - button.update(); - button.display(); -} - -class Button -{ - int x, y; - int w, h; - color basecolor, highlightcolor; - color currentcolor; - boolean over = false; - boolean pressed = false; - - void pressed() { - if(over && mousePressed) { - pressed = true; - } else { - pressed = false; - } - } - - boolean overRect(int x, int y, int width, int height) { - if (mouseX >= x && mouseX <= x+width && - mouseY >= y && mouseY <= y+height) { - return true; - } else { - return false; - } -} -} - -class ImageButtons extends Button -{ - PImage base; - PImage roll; - PImage down; - PImage currentimage; - - ImageButtons(int ix, int iy, int iw, int ih, PImage ibase, PImage iroll, PImage idown) - { - x = ix; - y = iy; - w = iw; - h = ih; - base = ibase; - roll = iroll; - down = idown; - currentimage = base; - } - - void update() - { - over(); - pressed(); - if(pressed) { - currentimage = down; - } else if (over){ - currentimage = roll; - } else { - currentimage = base; - } - } - - void over() - { - if( overRect(x, y, w, h) ) { - over = true; - } else { - over = false; - } - } - - void display() - { - image(currentimage, x, y); - } -} - - - - diff --git a/java/examples/Topics/GUI/ImageButton/applet/loading.gif b/java/examples/Topics/GUI/ImageButton/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?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zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/GUI/Rollover/applet/Rollover.java b/java/examples/Topics/GUI/Rollover/applet/Rollover.java deleted file mode 100644 index 0880b601e..000000000 --- a/java/examples/Topics/GUI/Rollover/applet/Rollover.java +++ /dev/null @@ -1,108 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Rollover extends PApplet { - -/** - * Rollover. - * - * Roll over the colored squares in the center of the image - * to change the color of the outside rectangle. - */ - - -int rectX, rectY; // Position of square button -int circleX, circleY; // Position of circle button -int rectSize = 50; // Diameter of rect -int circleSize = 53; // Diameter of circle - -int rectColor; -int circleColor; -int baseColor; - -boolean rectOver = false; -boolean circleOver = false; - -public void setup() -{ - size(200, 200); - smooth(); - rectColor = color(0); - circleColor = color(255); - baseColor = color(102); - circleX = width/2+circleSize/2+10; - circleY = height/2; - rectX = width/2-rectSize-10; - rectY = height/2-rectSize/2; - ellipseMode(CENTER); -} - -public void draw() -{ - update(mouseX, mouseY); - - noStroke(); - if (rectOver) { - background(rectColor); - } else if (circleOver) { - background(circleColor); - } else { - background(baseColor); - } - - stroke(255); - fill(rectColor); - rect(rectX, rectY, rectSize, rectSize); - stroke(0); - fill(circleColor); - ellipse(circleX, circleY, circleSize, circleSize); -} - -public void update(int x, int y) -{ - if( overCircle(circleX, circleY, circleSize) ) { - circleOver = true; - rectOver = false; - } else if ( overRect(rectX, rectY, rectSize, rectSize) ) { - rectOver = true; - circleOver = false; - } else { - circleOver = rectOver = false; - } -} - -public boolean overRect(int x, int y, int width, int height) -{ - if (mouseX >= x && mouseX <= x+width && - mouseY >= y && mouseY <= y+height) { - return true; - } else { - return false; - } -} - -public boolean overCircle(int x, int y, int diameter) -{ - float disX = x - mouseX; - float disY = y - mouseY; - if(sqrt(sq(disX) + sq(disY)) < diameter/2 ) { - return true; - } else { - return false; - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Rollover" }); - } -} diff --git a/java/examples/Topics/GUI/Rollover/applet/Rollover.pde b/java/examples/Topics/GUI/Rollover/applet/Rollover.pde deleted file mode 100644 index 4785ec9ac..000000000 --- a/java/examples/Topics/GUI/Rollover/applet/Rollover.pde +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Rollover. - * - * Roll over the colored squares in the center of the image - * to change the color of the outside rectangle. - */ - - -int rectX, rectY; // Position of square button -int circleX, circleY; // Position of circle button -int rectSize = 50; // Diameter of rect -int circleSize = 53; // Diameter of circle - -color rectColor; -color circleColor; -color baseColor; - -boolean rectOver = false; -boolean circleOver = false; - -void setup() -{ - size(200, 200); - smooth(); - rectColor = color(0); - circleColor = color(255); - baseColor = color(102); - circleX = width/2+circleSize/2+10; - circleY = height/2; - rectX = width/2-rectSize-10; - rectY = height/2-rectSize/2; - ellipseMode(CENTER); -} - -void draw() -{ - update(mouseX, mouseY); - - noStroke(); - if (rectOver) { - background(rectColor); - } else if (circleOver) { - background(circleColor); - } else { - background(baseColor); - } - - stroke(255); - fill(rectColor); - rect(rectX, rectY, rectSize, rectSize); - stroke(0); - fill(circleColor); - ellipse(circleX, circleY, circleSize, circleSize); -} - -void update(int x, int y) -{ - if( overCircle(circleX, circleY, circleSize) ) { - circleOver = true; - rectOver = false; - } else if ( overRect(rectX, rectY, rectSize, rectSize) ) { - rectOver = true; - circleOver = false; - } else { - circleOver = rectOver = false; - } -} - -boolean overRect(int x, int y, int width, int height) -{ - if (mouseX >= x && mouseX <= x+width && - mouseY >= y && mouseY <= y+height) { - return true; - } else { - return false; - } -} - -boolean overCircle(int x, int y, int diameter) -{ - float disX = x - mouseX; - float disY = y - mouseY; - if(sqrt(sq(disX) + sq(disY)) < diameter/2 ) { - return true; - } else { - return false; - } -} diff --git a/java/examples/Topics/GUI/Rollover/applet/loading.gif b/java/examples/Topics/GUI/Rollover/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/GUI/Scrollbar/applet/Scrollbar.java b/java/examples/Topics/GUI/Scrollbar/applet/Scrollbar.java deleted file mode 100644 index 31b7323c9..000000000 --- a/java/examples/Topics/GUI/Scrollbar/applet/Scrollbar.java +++ /dev/null @@ -1,142 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Scrollbar extends PApplet { - -/** - * Scrollbar. - * - * Move the scrollbars left and right to change the positions of the images. - */ - -HScrollbar hs1, hs2; - -PImage top, bottom; // Two image to load -int topWidth, bottomWidth; // The width of the top and bottom images - - -public void setup() -{ - size(200, 200); - noStroke(); - hs1 = new HScrollbar(0, 20, width, 10, 3*5+1); - hs2 = new HScrollbar(0, height-20, width, 10, 3*5+1); - top = loadImage("seedTop.jpg"); - topWidth = top.width; - bottom = loadImage("seedBottom.jpg"); - bottomWidth = bottom.width; -} - -public void draw() -{ - background(255); - - // Get the position of the top scrollbar - // and convert to a value to display the top image - float topPos = hs1.getPos()-width/2; - fill(255); - image(top, width/2-topWidth/2 + topPos*2, 0); - - // Get the position of the bottom scrollbar - // and convert to a value to display the bottom image - float bottomPos = hs2.getPos()-width/2; - fill(255); - image(bottom, width/2-bottomWidth/2 + bottomPos*2, height/2); - - hs1.update(); - hs2.update(); - hs1.display(); - hs2.display(); -} - - -class HScrollbar -{ - int swidth, sheight; // width and height of bar - int xpos, ypos; // x and y position of bar - float spos, newspos; // x position of slider - int sposMin, sposMax; // max and min values of slider - int loose; // how loose/heavy - boolean over; // is the mouse over the slider? - boolean locked; - float ratio; - - HScrollbar (int xp, int yp, int sw, int sh, int l) { - swidth = sw; - sheight = sh; - int widthtoheight = sw - sh; - ratio = (float)sw / (float)widthtoheight; - xpos = xp; - ypos = yp-sheight/2; - spos = xpos + swidth/2 - sheight/2; - newspos = spos; - sposMin = xpos; - sposMax = xpos + swidth - sheight; - loose = l; - } - - public void update() { - if(over()) { - over = true; - } else { - over = false; - } - if(mousePressed && over) { - locked = true; - } - if(!mousePressed) { - locked = false; - } - if(locked) { - newspos = constrain(mouseX-sheight/2, sposMin, sposMax); - } - if(abs(newspos - spos) > 1) { - spos = spos + (newspos-spos)/loose; - } - } - - public int constrain(int val, int minv, int maxv) { - return min(max(val, minv), maxv); - } - - public boolean over() { - if(mouseX > xpos && mouseX < xpos+swidth && - mouseY > ypos && mouseY < ypos+sheight) { - return true; - } else { - return false; - } - } - - public void display() { - fill(255); - rect(xpos, ypos, swidth, sheight); - if(over || locked) { - fill(153, 102, 0); - } else { - fill(102, 102, 102); - } - rect(spos, ypos, sheight, sheight); - } - - public float getPos() { - // Convert spos to be values between - // 0 and the total width of the scrollbar - return spos * ratio; - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Scrollbar" }); - } -} diff --git a/java/examples/Topics/GUI/Scrollbar/applet/Scrollbar.pde b/java/examples/Topics/GUI/Scrollbar/applet/Scrollbar.pde deleted file mode 100644 index 4647b6095..000000000 --- a/java/examples/Topics/GUI/Scrollbar/applet/Scrollbar.pde +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Scrollbar. - * - * Move the scrollbars left and right to change the positions of the images. - */ - -HScrollbar hs1, hs2; - -PImage top, bottom; // Two image to load -int topWidth, bottomWidth; // The width of the top and bottom images - - -void setup() -{ - size(200, 200); - noStroke(); - hs1 = new HScrollbar(0, 20, width, 10, 3*5+1); - hs2 = new HScrollbar(0, height-20, width, 10, 3*5+1); - top = loadImage("seedTop.jpg"); - topWidth = top.width; - bottom = loadImage("seedBottom.jpg"); - bottomWidth = bottom.width; -} - -void draw() -{ - background(255); - - // Get the position of the top scrollbar - // and convert to a value to display the top image - float topPos = hs1.getPos()-width/2; - fill(255); - image(top, width/2-topWidth/2 + topPos*2, 0); - - // Get the position of the bottom scrollbar - // and convert to a value to display the bottom image - float bottomPos = hs2.getPos()-width/2; - fill(255); - image(bottom, width/2-bottomWidth/2 + bottomPos*2, height/2); - - hs1.update(); - hs2.update(); - hs1.display(); - hs2.display(); -} - - -class HScrollbar -{ - int swidth, sheight; // width and height of bar - int xpos, ypos; // x and y position of bar - float spos, newspos; // x position of slider - int sposMin, sposMax; // max and min values of slider - int loose; // how loose/heavy - boolean over; // is the mouse over the slider? - boolean locked; - float ratio; - - HScrollbar (int xp, int yp, int sw, int sh, int l) { - swidth = sw; - sheight = sh; - int widthtoheight = sw - sh; - ratio = (float)sw / (float)widthtoheight; - xpos = xp; - ypos = yp-sheight/2; - spos = xpos + swidth/2 - sheight/2; - newspos = spos; - sposMin = xpos; - sposMax = xpos + swidth - sheight; - loose = l; - } - - void update() { - if(over()) { - over = true; - } else { - over = false; - } - if(mousePressed && over) { - locked = true; - } - if(!mousePressed) { - locked = false; - } - if(locked) { - newspos = constrain(mouseX-sheight/2, sposMin, sposMax); - } - if(abs(newspos - spos) > 1) { - spos = spos + (newspos-spos)/loose; - } - } - - int constrain(int val, int minv, int maxv) { - return min(max(val, minv), maxv); - } - - boolean over() { - if(mouseX > xpos && mouseX < xpos+swidth && - mouseY > ypos && mouseY < ypos+sheight) { - return true; - } else { - return false; - } - } - - void display() { - fill(255); - rect(xpos, ypos, swidth, sheight); - if(over || locked) { - fill(153, 102, 0); - } else { - fill(102, 102, 102); - } - rect(spos, ypos, sheight, sheight); - } - - float getPos() { - // Convert spos to be values between - // 0 and the total width of the scrollbar - return spos * ratio; - } -} diff --git a/java/examples/Topics/GUI/Scrollbar/applet/loading.gif b/java/examples/Topics/GUI/Scrollbar/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!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#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Image Processing/Blur/applet/Blur.java b/java/examples/Topics/Image Processing/Blur/applet/Blur.java deleted file mode 100644 index 3af44939b..000000000 --- a/java/examples/Topics/Image Processing/Blur/applet/Blur.java +++ /dev/null @@ -1,65 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Blur extends PApplet { - public void setup() {/** - * Blur. - * - * Bluring half of an image by processing it through a - * low-pass filter. - */ - -size(200, 200); -PImage a; // Declare variable "a" of type PImage -a = loadImage("trees.jpg"); // Load the images into the program - -float v = 1.0f/9.0f; -float[][] kernel = { { v, v, v }, - { v, v, v }, - { v, v, v } }; - -size(200, 200); -PImage img = loadImage("trees.jpg"); // Load the original image -image(a, 0, 0); // Displays the image from point (0,0) -img.loadPixels(); -// Create an opaque image of the same size as the original -PImage edgeImg = createImage(img.width, img.height, RGB); -// Loop through every pixel in the image. -for (int y = 1; y < img.height-1; y++) { // Skip top and bottom edges - for (int x = 1; x < img.width-1; x++) { // Skip left and right edges - float sum = 0; // Kernel sum for this pixel - for (int ky = -1; ky <= 1; ky++) { - for (int kx = -1; kx <= 1; kx++) { - // Calculate the adjacent pixel for this kernel point - int pos = (y + ky)*width + (x + kx); - // Image is grayscale, red/green/blue are identical - float val = red(img.pixels[pos]); - // Multiply adjacent pixels based on the kernel values - sum += kernel[ky+1][kx+1] * val; - } - } - // For this pixel in the new image, set the gray value - // based on the sum from the kernel - edgeImg.pixels[y*img.width + x] = color(sum); - } -} -// State that there are changes to edgeImg.pixels[] -edgeImg.updatePixels(); -image(edgeImg, 100, 0); // Draw the new image - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "Blur" }); - } -} diff --git a/java/examples/Topics/Image Processing/Blur/applet/Blur.pde b/java/examples/Topics/Image Processing/Blur/applet/Blur.pde deleted file mode 100644 index 0da1288a5..000000000 --- a/java/examples/Topics/Image Processing/Blur/applet/Blur.pde +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Blur. - * - * Bluring half of an image by processing it through a - * low-pass filter. - */ - -size(200, 200); -PImage a; // Declare variable "a" of type PImage -a = loadImage("trees.jpg"); // Load the images into the program - -float v = 1.0/9.0; -float[][] kernel = { { v, v, v }, - { v, v, v }, - { v, v, v } }; - -size(200, 200); -PImage img = loadImage("trees.jpg"); // Load the original image -image(a, 0, 0); // Displays the image from point (0,0) -img.loadPixels(); -// Create an opaque image of the same size as the original -PImage edgeImg = createImage(img.width, img.height, RGB); -// Loop through every pixel in the image. -for (int y = 1; y < img.height-1; y++) { // Skip top and bottom edges - for (int x = 1; x < img.width-1; x++) { // Skip left and right edges - float sum = 0; // Kernel sum for this pixel - for (int ky = -1; ky <= 1; ky++) { - for (int kx = -1; kx <= 1; kx++) { - // Calculate the adjacent pixel for this kernel point - int pos = (y + ky)*width + (x + kx); - // Image is grayscale, red/green/blue are identical - float val = red(img.pixels[pos]); - // Multiply adjacent pixels based on the kernel values - sum += kernel[ky+1][kx+1] * val; - } - } - // For this pixel in the new image, set the gray value - // based on the sum from the kernel - edgeImg.pixels[y*img.width + x] = color(sum); - } -} -// State that there are changes to edgeImg.pixels[] -edgeImg.updatePixels(); -image(edgeImg, 100, 0); // Draw the new image diff --git a/java/examples/Topics/Image Processing/Blur/applet/loading.gif b/java/examples/Topics/Image Processing/Blur/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Image Processing/Brightness/applet/Brightness.java b/java/examples/Topics/Image Processing/Brightness/applet/Brightness.java deleted file mode 100644 index 373746d0f..000000000 --- a/java/examples/Topics/Image Processing/Brightness/applet/Brightness.java +++ /dev/null @@ -1,66 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Brightness extends PApplet { - -/** - * Brightness - * by Daniel Shiffman. - * - * Adjusts the brightness of part of the image - * Pixels closer to the mouse will appear brighter. - */ - -PImage img; - -public void setup() { - size(200, 200); - frameRate(30); - img = loadImage("wires.jpg"); -} - -public void draw() { - loadPixels(); - for (int x = 0; x < img.width; x++) { - for (int y = 0; y < img.height; y++ ) { - // Calculate the 1D location from a 2D grid - int loc = x + y*img.width; - // Get the R,G,B values from image - float r,g,b; - r = red (img.pixels[loc]); - //g = green (img.pixels[loc]); - //b = blue (img.pixels[loc]); - // Calculate an amount to change brightness based on proximity to the mouse - float maxdist = 50;//dist(0,0,width,height); - float d = dist(x,y,mouseX,mouseY); - float adjustbrightness = 255*(maxdist-d)/maxdist; - r += adjustbrightness; - //g += adjustbrightness; - //b += adjustbrightness; - // Constrain RGB to make sure they are within 0-255 color range - r = constrain(r,0,255); - //g = constrain(g,0,255); - //b = constrain(b,0,255); - // Make a new color and set pixel in the window - //color c = color(r,g,b); - int c = color(r); - pixels[loc] = c; - } - } - updatePixels(); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Brightness" }); - } -} diff --git a/java/examples/Topics/Image Processing/Brightness/applet/Brightness.pde b/java/examples/Topics/Image Processing/Brightness/applet/Brightness.pde deleted file mode 100644 index a046b565d..000000000 --- a/java/examples/Topics/Image Processing/Brightness/applet/Brightness.pde +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Brightness - * by Daniel Shiffman. - * - * Adjusts the brightness of part of the image - * Pixels closer to the mouse will appear brighter. - */ - -PImage img; - -void setup() { - size(200, 200); - frameRate(30); - img = loadImage("wires.jpg"); -} - -void draw() { - loadPixels(); - for (int x = 0; x < img.width; x++) { - for (int y = 0; y < img.height; y++ ) { - // Calculate the 1D location from a 2D grid - int loc = x + y*img.width; - // Get the R,G,B values from image - float r,g,b; - r = red (img.pixels[loc]); - //g = green (img.pixels[loc]); - //b = blue (img.pixels[loc]); - // Calculate an amount to change brightness based on proximity to the mouse - float maxdist = 50;//dist(0,0,width,height); - float d = dist(x,y,mouseX,mouseY); - float adjustbrightness = 255*(maxdist-d)/maxdist; - r += adjustbrightness; - //g += adjustbrightness; - //b += adjustbrightness; - // Constrain RGB to make sure they are within 0-255 color range - r = constrain(r,0,255); - //g = constrain(g,0,255); - //b = constrain(b,0,255); - // Make a new color and set pixel in the window - //color c = color(r,g,b); - color c = color(r); - pixels[loc] = c; - } - } - updatePixels(); -} diff --git a/java/examples/Topics/Image Processing/Brightness/applet/loading.gif b/java/examples/Topics/Image Processing/Brightness/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@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!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Image Processing/Convolution/applet/Convolution.java b/java/examples/Topics/Image Processing/Convolution/applet/Convolution.java deleted file mode 100644 index 207fa8149..000000000 --- a/java/examples/Topics/Image Processing/Convolution/applet/Convolution.java +++ /dev/null @@ -1,94 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Convolution extends PApplet { - -/** - * Convolution - * by Daniel Shiffman. - * - * Applies a convolution matrix to a portion of the index. - * Move mouse to apply filter to different parts of the image. - */ - -PImage img; -int w = 80; - -// It's possible to convolve the image with -// many different matrices - - float[][] matrix = { { -1, -1, -1 }, - { -1, 9, -1 }, - { -1, -1, -1 } }; - -public void setup() { - size(200, 200); - frameRate(30); - img = loadImage("end.jpg"); -} - -public void draw() { - // We're only going to process a portion of the image - // so let's set the whole image as the background first - image(img,0,0); - // Where is the small rectangle we will process - int xstart = constrain(mouseX-w/2,0,img.width); - int ystart = constrain(mouseY-w/2,0,img.height); - int xend = constrain(mouseX+w/2,0,img.width); - int yend = constrain(mouseY+w/2,0,img.height); - int matrixsize = 3; - loadPixels(); - // Begin our loop for every pixel - for (int x = xstart; x < xend; x++) { - for (int y = ystart; y < yend; y++ ) { - int c = convolution(x,y,matrix,matrixsize,img); - int loc = x + y*img.width; - pixels[loc] = c; - } - } - updatePixels(); -} - -public int convolution(int x, int y, float[][] matrix,int matrixsize, PImage img) -{ - float rtotal = 0.0f; - float gtotal = 0.0f; - float btotal = 0.0f; - int offset = matrixsize / 2; - for (int i = 0; i < matrixsize; i++){ - for (int j= 0; j < matrixsize; j++){ - // What pixel are we testing - int xloc = x+i-offset; - int yloc = y+j-offset; - int loc = xloc + img.width*yloc; - // Make sure we haven't walked off our image, we could do better here - loc = constrain(loc,0,img.pixels.length-1); - // Calculate the convolution - rtotal += (red(img.pixels[loc]) * matrix[i][j]); - gtotal += (green(img.pixels[loc]) * matrix[i][j]); - btotal += (blue(img.pixels[loc]) * matrix[i][j]); - } - } - // Make sure RGB is within range - rtotal = constrain(rtotal,0,255); - gtotal = constrain(gtotal,0,255); - btotal = constrain(btotal,0,255); - // Return the resulting color - return color(rtotal,gtotal,btotal); -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Convolution" }); - } -} diff --git a/java/examples/Topics/Image Processing/Convolution/applet/Convolution.pde b/java/examples/Topics/Image Processing/Convolution/applet/Convolution.pde deleted file mode 100644 index bb3f7eda5..000000000 --- a/java/examples/Topics/Image Processing/Convolution/applet/Convolution.pde +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Convolution - * by Daniel Shiffman. - * - * Applies a convolution matrix to a portion of the index. - * Move mouse to apply filter to different parts of the image. - */ - -PImage img; -int w = 80; - -// It's possible to convolve the image with -// many different matrices - - float[][] matrix = { { -1, -1, -1 }, - { -1, 9, -1 }, - { -1, -1, -1 } }; - -void setup() { - size(200, 200); - frameRate(30); - img = loadImage("end.jpg"); -} - -void draw() { - // We're only going to process a portion of the image - // so let's set the whole image as the background first - image(img,0,0); - // Where is the small rectangle we will process - int xstart = constrain(mouseX-w/2,0,img.width); - int ystart = constrain(mouseY-w/2,0,img.height); - int xend = constrain(mouseX+w/2,0,img.width); - int yend = constrain(mouseY+w/2,0,img.height); - int matrixsize = 3; - loadPixels(); - // Begin our loop for every pixel - for (int x = xstart; x < xend; x++) { - for (int y = ystart; y < yend; y++ ) { - color c = convolution(x,y,matrix,matrixsize,img); - int loc = x + y*img.width; - pixels[loc] = c; - } - } - updatePixels(); -} - -color convolution(int x, int y, float[][] matrix,int matrixsize, PImage img) -{ - float rtotal = 0.0; - float gtotal = 0.0; - float btotal = 0.0; - int offset = matrixsize / 2; - for (int i = 0; i < matrixsize; i++){ - for (int j= 0; j < matrixsize; j++){ - // What pixel are we testing - int xloc = x+i-offset; - int yloc = y+j-offset; - int loc = xloc + img.width*yloc; - // Make sure we haven't walked off our image, we could do better here - loc = constrain(loc,0,img.pixels.length-1); - // Calculate the convolution - rtotal += (red(img.pixels[loc]) * matrix[i][j]); - gtotal += (green(img.pixels[loc]) * matrix[i][j]); - btotal += (blue(img.pixels[loc]) * matrix[i][j]); - } - } - // Make sure RGB is within range - rtotal = constrain(rtotal,0,255); - gtotal = constrain(gtotal,0,255); - btotal = constrain(btotal,0,255); - // Return the resulting color - return color(rtotal,gtotal,btotal); -} - diff --git a/java/examples/Topics/Image Processing/Convolution/applet/loading.gif b/java/examples/Topics/Image Processing/Convolution/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5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0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Image Processing/EdgeDetection/applet/EdgeDetection.java b/java/examples/Topics/Image Processing/EdgeDetection/applet/EdgeDetection.java deleted file mode 100644 index c0fb22967..000000000 --- a/java/examples/Topics/Image Processing/EdgeDetection/applet/EdgeDetection.java +++ /dev/null @@ -1,60 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class EdgeDetection extends PApplet { - public void setup() {/** - * Edge Detection. - * - * Exposing areas of contrast within an image - * by processing it through a high-pass filter. - */ - -float[][] kernel = { { -1, -1, -1 }, - { -1, 9, -1 }, - { -1, -1, -1 } }; - -size(200, 200); -PImage img = loadImage("house.jpg"); // Load the original image -image(img, 0, 0); // Displays the image from point (0,0) -img.loadPixels(); -// Create an opaque image of the same size as the original -PImage edgeImg = createImage(img.width, img.height, RGB); -// Loop through every pixel in the image. -for (int y = 1; y < img.height-1; y++) { // Skip top and bottom edges - for (int x = 1; x < img.width-1; x++) { // Skip left and right edges - float sum = 0; // Kernel sum for this pixel - for (int ky = -1; ky <= 1; ky++) { - for (int kx = -1; kx <= 1; kx++) { - // Calculate the adjacent pixel for this kernel point - int pos = (y + ky)*width + (x + kx); - // Image is grayscale, red/green/blue are identical - float val = red(img.pixels[pos]); - // Multiply adjacent pixels based on the kernel values - sum += kernel[ky+1][kx+1] * val; - } - } - // For this pixel in the new image, set the gray value - // based on the sum from the kernel - edgeImg.pixels[y*img.width + x] = color(sum); - } -} -// State that there are changes to edgeImg.pixels[] -edgeImg.updatePixels(); -image(edgeImg, 100, 0); // Draw the new image - - noLoop(); -} - static public void main(String args[]) { - PApplet.main(new String[] { "EdgeDetection" }); - } -} diff --git a/java/examples/Topics/Image Processing/EdgeDetection/applet/EdgeDetection.pde b/java/examples/Topics/Image Processing/EdgeDetection/applet/EdgeDetection.pde deleted file mode 100644 index 65f2aab3c..000000000 --- a/java/examples/Topics/Image Processing/EdgeDetection/applet/EdgeDetection.pde +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Edge Detection. - * - * Exposing areas of contrast within an image - * by processing it through a high-pass filter. - */ - -float[][] kernel = { { -1, -1, -1 }, - { -1, 9, -1 }, - { -1, -1, -1 } }; - -size(200, 200); -PImage img = loadImage("house.jpg"); // Load the original image -image(img, 0, 0); // Displays the image from point (0,0) -img.loadPixels(); -// Create an opaque image of the same size as the original -PImage edgeImg = createImage(img.width, img.height, RGB); -// Loop through every pixel in the image. -for (int y = 1; y < img.height-1; y++) { // Skip top and bottom edges - for (int x = 1; x < img.width-1; x++) { // Skip left and right edges - float sum = 0; // Kernel sum for this pixel - for (int ky = -1; ky <= 1; ky++) { - for (int kx = -1; kx <= 1; kx++) { - // Calculate the adjacent pixel for this kernel point - int pos = (y + ky)*width + (x + kx); - // Image is grayscale, red/green/blue are identical - float val = red(img.pixels[pos]); - // Multiply adjacent pixels based on the kernel values - sum += kernel[ky+1][kx+1] * val; - } - } - // For this pixel in the new image, set the gray value - // based on the sum from the kernel - edgeImg.pixels[y*img.width + x] = color(sum); - } -} -// State that there are changes to edgeImg.pixels[] -edgeImg.updatePixels(); -image(edgeImg, 100, 0); // Draw the new image diff --git a/java/examples/Topics/Image Processing/EdgeDetection/applet/loading.gif b/java/examples/Topics/Image Processing/EdgeDetection/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@T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HsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Image Processing/Histogram/applet/Histogram.java b/java/examples/Topics/Image Processing/Histogram/applet/Histogram.java deleted file mode 100644 index f82e93409..000000000 --- a/java/examples/Topics/Image Processing/Histogram/applet/Histogram.java +++ /dev/null @@ -1,67 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Histogram extends PApplet { - public void setup() {/** - * Histogram. - * - * Calculates the histogram of an image. - * A histogram is the frequency distribution - * of the gray levels with the number of pure black values - * displayed on the left and number of pure white values on the right. - */ - -size(200, 200); -colorMode(RGB, width); - -int[] hist = new int[width]; - -// Load an image from the data directory -// Load a different image by modifying the comments -PImage a; -a = loadImage("cdi01_g.jpg"); -image(a, 0, 0); - -// Calculate the histogram -for (int i=0; i maxval) { - maxval = hist[i]; - } -} - -// Normalize the histogram to values between 0 and "height" -for (int i=0; i maxval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fcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Image Processing/LinearImage/applet/LinearImage.java b/java/examples/Topics/Image Processing/LinearImage/applet/LinearImage.java deleted file mode 100644 index ec474ff64..000000000 --- a/java/examples/Topics/Image Processing/LinearImage/applet/LinearImage.java +++ /dev/null @@ -1,73 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class LinearImage extends PApplet { - -/** - * Linear Image. - * - * Click and drag mouse up and down to control the signal. - * Press and hold any key to watch the scanning. - */ - -PImage a; -boolean onetime = true; -int[] aPixels = new int[200*200]; -int direction = 1; - -float signal; - -public void setup() -{ - size(200, 200); - stroke(255); - a = loadImage("florence03.jpg"); - for(int i=0; i width-1 || signal < 0) { - direction = direction * -1; - } - - if(mousePressed) { - signal = abs(mouseY%height); - } else { - signal += (0.3f*direction); - } - - - if(keyPressed) { - loadPixels(); - for (int i=0; i width-1 || signal < 0) { - direction = direction * -1; - } - - if(mousePressed) { - signal = abs(mouseY%height); - } else { - signal += (0.3*direction); - } - - - if(keyPressed) { - loadPixels(); - for (int i=0; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Image Processing/PixelArray/applet/PixelArray.java b/java/examples/Topics/Image Processing/PixelArray/applet/PixelArray.java deleted file mode 100644 index d254f454a..000000000 --- a/java/examples/Topics/Image Processing/PixelArray/applet/PixelArray.java +++ /dev/null @@ -1,83 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class PixelArray extends PApplet { - -/** - * Pixel Array. - * - * Click and drag the mouse up and down to control the signal and - * press and hold any key to see the current pixel being read. - * This program sequentially reads the color of every pixel of an image - * and displays this color to fill the window. - */ - -PImage a; -int[] aPixels; -int direction = 1; -boolean onetime = true; -float signal; - -public void setup() -{ - size(200, 200); - aPixels = new int[width*height]; - noFill(); - stroke(255); - frameRate(30); - a = loadImage("ystone08.jpg"); - for(int i=0; i width*height-1 || signal < 0) { - direction = direction * -1; - } - - if(mousePressed) { - if(mouseY > height-1) { mouseY = height-1; } - if(mouseY < 0) { mouseY = 0; } - signal = mouseY*width+mouseX; - } else { - signal += (0.33f*direction); - } - - if(keyPressed) { - loadPixels(); - for (int i=0; i width*height-1 || signal < 0) { - direction = direction * -1; - } - - if(mousePressed) { - if(mouseY > height-1) { mouseY = height-1; } - if(mouseY < 0) { mouseY = 0; } - signal = mouseY*width+mouseX; - } else { - signal += (0.33*direction); - } - - if(keyPressed) { - loadPixels(); - for (int i=0; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k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mV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Interaction/Follow1/applet/Follow1.java b/java/examples/Topics/Interaction/Follow1/applet/Follow1.java deleted file mode 100644 index c8ba66f37..000000000 --- a/java/examples/Topics/Interaction/Follow1/applet/Follow1.java +++ /dev/null @@ -1,59 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Follow1 extends PApplet { - -/** - * Follow 1. - * Based on code from Keith Peters (www.bit-101.com). - * - * A line segment is pushed and pulled by the cursor. - */ - -float x = 100; -float y = 100; -float angle1 = 0.0f; -float segLength = 50; - -public void setup() { - size(200, 200); - smooth(); - strokeWeight(20.0f); - stroke(0, 100); -} - -public void draw() { - background(226); - - float dx = mouseX - x; - float dy = mouseY - y; - angle1 = atan2(dy, dx); - x = mouseX - (cos(angle1) * segLength); - y = mouseY - (sin(angle1) * segLength); - - segment(x, y, angle1); - ellipse(x, y, 20, 20); -} - -public void segment(float x, float y, float a) { - pushMatrix(); - translate(x, y); - rotate(a); - line(0, 0, segLength, 0); - popMatrix(); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Follow1" }); - } -} diff --git a/java/examples/Topics/Interaction/Follow1/applet/Follow1.pde b/java/examples/Topics/Interaction/Follow1/applet/Follow1.pde deleted file mode 100644 index f817d0f64..000000000 --- a/java/examples/Topics/Interaction/Follow1/applet/Follow1.pde +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Follow 1. - * Based on code from Keith Peters (www.bit-101.com). - * - * A line segment is pushed and pulled by the cursor. - */ - -float x = 100; -float y = 100; -float angle1 = 0.0; -float segLength = 50; - -void setup() { - size(200, 200); - smooth(); - strokeWeight(20.0); - stroke(0, 100); -} - -void draw() { - background(226); - - float dx = mouseX - x; - float dy = mouseY - y; - angle1 = atan2(dy, dx); - x = mouseX - (cos(angle1) * segLength); - y = mouseY - (sin(angle1) * segLength); - - segment(x, y, angle1); - ellipse(x, y, 20, 20); -} - -void segment(float x, float y, float a) { - pushMatrix(); - translate(x, y); - rotate(a); - line(0, 0, segLength, 0); - popMatrix(); -} diff --git a/java/examples/Topics/Interaction/Follow1/applet/loading.gif b/java/examples/Topics/Interaction/Follow1/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*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Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Interaction/Follow2/applet/Follow2.java b/java/examples/Topics/Interaction/Follow2/applet/Follow2.java deleted file mode 100644 index 6fe8b9929..000000000 --- a/java/examples/Topics/Interaction/Follow2/applet/Follow2.java +++ /dev/null @@ -1,62 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Follow2 extends PApplet { - -/** - * Follow 2. - * Based on code from Keith Peters (www.bit-101.com). - * - * A two-segmented arm follows the cursor position. The relative - * angle between the segments is calculated with atan2() and the - * position calculated with sin() and cos(). - */ - -float[] x = new float[2]; -float[] y = new float[2]; -float segLength = 50; - -public void setup() { - size(200, 200); - smooth(); - strokeWeight(20.0f); - stroke(0, 100); -} - -public void draw() { - background(226); - dragSegment(0, mouseX, mouseY); - dragSegment(1, x[0], y[0]); -} - -public void dragSegment(int i, float xin, float yin) { - float dx = xin - x[i]; - float dy = yin - y[i]; - float angle = atan2(dy, dx); - x[i] = xin - cos(angle) * segLength; - y[i] = yin - sin(angle) * segLength; - segment(x[i], y[i], angle); -} - -public void segment(float x, float y, float a) { - pushMatrix(); - translate(x, y); - rotate(a); - line(0, 0, segLength, 0); - popMatrix(); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Follow2" }); - } -} diff --git a/java/examples/Topics/Interaction/Follow2/applet/Follow2.pde b/java/examples/Topics/Interaction/Follow2/applet/Follow2.pde deleted file mode 100644 index a0a6f8516..000000000 --- a/java/examples/Topics/Interaction/Follow2/applet/Follow2.pde +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Follow 2. - * Based on code from Keith Peters (www.bit-101.com). - * - * A two-segmented arm follows the cursor position. The relative - * angle between the segments is calculated with atan2() and the - * position calculated with sin() and cos(). - */ - -float[] x = new float[2]; -float[] y = new float[2]; -float segLength = 50; - -void setup() { - size(200, 200); - smooth(); - strokeWeight(20.0); - stroke(0, 100); -} - -void draw() { - background(226); - dragSegment(0, mouseX, mouseY); - dragSegment(1, x[0], y[0]); -} - -void dragSegment(int i, float xin, float yin) { - float dx = xin - x[i]; - float dy = yin - y[i]; - float angle = atan2(dy, dx); - x[i] = xin - cos(angle) * segLength; - y[i] = yin - sin(angle) * segLength; - segment(x[i], y[i], angle); -} - -void segment(float x, float y, float a) { - pushMatrix(); - translate(x, y); - rotate(a); - line(0, 0, segLength, 0); - popMatrix(); -} diff --git a/java/examples/Topics/Interaction/Follow2/applet/loading.gif b/java/examples/Topics/Interaction/Follow2/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{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;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Interaction/Follow3/applet/Follow3.java b/java/examples/Topics/Interaction/Follow3/applet/Follow3.java deleted file mode 100644 index 4b634d885..000000000 --- a/java/examples/Topics/Interaction/Follow3/applet/Follow3.java +++ /dev/null @@ -1,64 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Follow3 extends PApplet { - -/** - * Follow 3. - * Based on code from Keith Peters (www.bit-101.com). - * - * A segmented line follows the mouse. The relative angle from - * each segment to the next is calculated with atan2() and the - * position of the next is calculated with sin() and cos(). - */ - -float[] x = new float[20]; -float[] y = new float[20]; -float segLength = 9; - -public void setup() { - size(200, 200); - smooth(); - strokeWeight(5); - stroke(0, 100); -} - -public void draw() { - background(226); - dragSegment(0, mouseX, mouseY); - for(int i=0; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k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mV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Interaction/Reach1/applet/Reach1.java b/java/examples/Topics/Interaction/Reach1/applet/Reach1.java deleted file mode 100644 index 8fc082c31..000000000 --- a/java/examples/Topics/Interaction/Reach1/applet/Reach1.java +++ /dev/null @@ -1,69 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Reach1 extends PApplet { - -/** - * Reach 1. - * Based on code from Keith Peters (www.bit-101.com) - * - * The arm follows the position of the mouse by - * calculating the angles with atan2(). - */ - - -float x = 100; -float y = 100; -float x2 = 100; -float y2 = 100; -float segLength = 30; - -public void setup() { - size(200, 200); - smooth(); - strokeWeight(20.0f); - stroke(0, 100); -} - -public void draw() { - background(226); - - float dx = mouseX - x; - float dy = mouseY - y; - float angle1 = atan2(dy, dx); - - float tx = mouseX - cos(angle1) * segLength; - float ty = mouseY - sin(angle1) * segLength; - dx = tx - x2; - dy = ty - y2; - float angle2 = atan2(dy, dx); - x = x2 + cos(angle2) * segLength; - y = y2 + sin(angle2) * segLength; - - segment(x, y, angle1); - segment(x2, y2, angle2); -} - -public void segment(float x, float y, float a) { - pushMatrix(); - translate(x, y); - rotate(a); - line(0, 0, segLength, 0); - popMatrix(); -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Reach1" }); - } -} diff --git a/java/examples/Topics/Interaction/Reach1/applet/Reach1.pde b/java/examples/Topics/Interaction/Reach1/applet/Reach1.pde deleted file mode 100644 index 42a2fc203..000000000 --- a/java/examples/Topics/Interaction/Reach1/applet/Reach1.pde +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Reach 1. - * Based on code from Keith Peters (www.bit-101.com) - * - * The arm follows the position of the mouse by - * calculating the angles with atan2(). - */ - - -float x = 100; -float y = 100; -float x2 = 100; -float y2 = 100; -float segLength = 30; - -void setup() { - size(200, 200); - smooth(); - strokeWeight(20.0); - stroke(0, 100); -} - -void draw() { - background(226); - - float dx = mouseX - x; - float dy = mouseY - y; - float angle1 = atan2(dy, dx); - - float tx = mouseX - cos(angle1) * segLength; - float ty = mouseY - sin(angle1) * segLength; - dx = tx - x2; - dy = ty - y2; - float angle2 = atan2(dy, dx); - x = x2 + cos(angle2) * segLength; - y = y2 + sin(angle2) * segLength; - - segment(x, y, angle1); - segment(x2, y2, angle2); -} - -void segment(float x, float y, float a) { - pushMatrix(); - translate(x, y); - rotate(a); - line(0, 0, segLength, 0); - popMatrix(); -} - diff --git a/java/examples/Topics/Interaction/Reach1/applet/loading.gif b/java/examples/Topics/Interaction/Reach1/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba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+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Interaction/Reach2/applet/Reach2.java b/java/examples/Topics/Interaction/Reach2/applet/Reach2.java deleted file mode 100644 index c8898874d..000000000 --- a/java/examples/Topics/Interaction/Reach2/applet/Reach2.java +++ /dev/null @@ -1,80 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Reach2 extends PApplet { - -/** - * Reach 2. - * Based on code from Keith Peters (www.bit-101.com) - * - * The arm follows the position of the mouse by - * calculating the angles with atan2(). - */ - -int numSegments = 10; -float[] x = new float[numSegments]; -float[] y = new float[numSegments]; -float[] angle = new float[numSegments]; -float segLength = 20; -float targetX, targetY; - -public void setup() { - size(200, 200); - smooth(); - strokeWeight(20.0f); - stroke(0, 100); - x[x.length-1] = 0; // Set base x-coordinate - y[x.length-1] = height; // Set base y-coordinate -} - -public void draw() { - background(226); - - reachSegment(0, mouseX, mouseY); - for(int i=1; i=1; i--) { - positionSegment(i, i-1); - } - for(int i=0; i=1; i--) { - positionSegment(i, i-1); - } - for(int i=0; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00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j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Interaction/Reach3/applet/Reach3.java b/java/examples/Topics/Interaction/Reach3/applet/Reach3.java deleted file mode 100644 index 0aa725a61..000000000 --- a/java/examples/Topics/Interaction/Reach3/applet/Reach3.java +++ /dev/null @@ -1,97 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Reach3 extends PApplet { - -/** - * Reach 3. - * Based on code from Keith Peters (www.bit-101.com) - * - * The arm follows the position of the ball by - * calculating the angles with atan2(). - */ - -int numSegments = 6; -float[] x = new float[numSegments]; -float[] y = new float[numSegments]; -float[] angle = new float[numSegments]; -float segLength = 15; -float targetX, targetY; - -float ballX = 50; -float ballY = 50; -int ballXDirection = 1; -int ballYDirection = -1; - -public void setup() { - size(200, 200); - smooth(); - strokeWeight(20.0f); - stroke(0, 100); - noFill(); - x[x.length-1] = width/2; // Set base x-coordinate - y[x.length-1] = height; // Set base y-coordinate -} - -public void draw() { - background(226); - - strokeWeight(20); - ballX = ballX + 1.0f * ballXDirection; - ballY = ballY + 0.8f * ballYDirection; - if(ballX > width-25 || ballX < 25) { - ballXDirection *= -1; - } - if(ballY > height-25 || ballY < 25) { - ballYDirection *= -1; - } - ellipse(ballX, ballY, 30, 30); - - reachSegment(0, ballX, ballY); - for(int i=1; i=1; i--) { - positionSegment(i, i-1); - } - for(int i=0; i width-25 || ballX < 25) { - ballXDirection *= -1; - } - if(ballY > height-25 || ballY < 25) { - ballYDirection *= -1; - } - ellipse(ballX, ballY, 30, 30); - - reachSegment(0, ballX, ballY); - for(int i=1; i=1; i--) { - positionSegment(i, i-1); - } - for(int i=0; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axf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bvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Interaction/Tickle/applet/Tickle.java b/java/examples/Topics/Interaction/Tickle/applet/Tickle.java deleted file mode 100644 index a6ff2f8a3..000000000 --- a/java/examples/Topics/Interaction/Tickle/applet/Tickle.java +++ /dev/null @@ -1,52 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Tickle extends PApplet { - -/** - * Tickle. - * - * The word "tickle" jitters when the cursor hovers over. - * Sometimes, it can be tickled off the screen. - */ - -PFont font; -float x = 33; // X-coordinate of text -float y = 60; // Y-coordinate of text - -public void setup() -{ - size(200, 200); - font = loadFont("AmericanTypewriter-24.vlw"); - textFont(font); - noStroke(); -} - -public void draw() -{ - fill(204, 120); - rect(0, 0, width, height); - fill(0); - // If the cursor is over the text, change the position - if ((mouseX >= x) && (mouseX <= x+55) && - (mouseY >= y-24) && (mouseY <= y)) { - x += random(-5, 5); - y += random(-5, 5); - } - text("tickle", x, y); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Tickle" }); - } -} diff --git a/java/examples/Topics/Interaction/Tickle/applet/Tickle.pde b/java/examples/Topics/Interaction/Tickle/applet/Tickle.pde deleted file mode 100644 index 27a33c1e7..000000000 --- a/java/examples/Topics/Interaction/Tickle/applet/Tickle.pde +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Tickle. - * - * The word "tickle" jitters when the cursor hovers over. - * Sometimes, it can be tickled off the screen. - */ - -PFont font; -float x = 33; // X-coordinate of text -float y = 60; // Y-coordinate of text - -void setup() -{ - size(200, 200); - font = loadFont("AmericanTypewriter-24.vlw"); - textFont(font); - noStroke(); -} - -void draw() -{ - fill(204, 120); - rect(0, 0, width, height); - fill(0); - // If the cursor is over the text, change the position - if ((mouseX >= x) && (mouseX <= x+55) && - (mouseY >= y-24) && (mouseY <= y)) { - x += random(-5, 5); - y += random(-5, 5); - } - text("tickle", x, y); -} diff --git a/java/examples/Topics/Interaction/Tickle/applet/loading.gif b/java/examples/Topics/Interaction/Tickle/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Motion/Bounce/applet/Bounce.java b/java/examples/Topics/Motion/Bounce/applet/Bounce.java deleted file mode 100644 index 52f6f156c..000000000 --- a/java/examples/Topics/Motion/Bounce/applet/Bounce.java +++ /dev/null @@ -1,67 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Bounce extends PApplet { - -/** - * Bounce. - * - * When the shape hits the edge of the window, it reverses its direction. - */ - -int size = 60; // Width of the shape -float xpos, ypos; // Starting position of shape - -float xspeed = 2.8f; // Speed of the shape -float yspeed = 2.2f; // Speed of the shape - -int xdirection = 1; // Left or Right -int ydirection = 1; // Top to Bottom - - -public void setup() -{ - size(640, 200); - noStroke(); - frameRate(30); - smooth(); - // Set the starting position of the shape - xpos = width/2; - ypos = height/2; -} - -public void draw() -{ - background(102); - - // Update the position of the shape - xpos = xpos + ( xspeed * xdirection ); - ypos = ypos + ( yspeed * ydirection ); - - // Test to see if the shape exceeds the boundaries of the screen - // If it does, reverse its direction by multiplying by -1 - if (xpos > width-size || xpos < 0) { - xdirection *= -1; - } - if (ypos > height-size || ypos < 0) { - ydirection *= -1; - } - - // Draw the shape - ellipse(xpos+size/2, ypos+size/2, size, size); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Bounce" }); - } -} diff --git a/java/examples/Topics/Motion/Bounce/applet/Bounce.pde b/java/examples/Topics/Motion/Bounce/applet/Bounce.pde deleted file mode 100644 index b6b7df531..000000000 --- a/java/examples/Topics/Motion/Bounce/applet/Bounce.pde +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Bounce. - * - * When the shape hits the edge of the window, it reverses its direction. - */ - -int size = 60; // Width of the shape -float xpos, ypos; // Starting position of shape - -float xspeed = 2.8; // Speed of the shape -float yspeed = 2.2; // Speed of the shape - -int xdirection = 1; // Left or Right -int ydirection = 1; // Top to Bottom - - -void setup() -{ - size(640, 200); - noStroke(); - frameRate(30); - smooth(); - // Set the starting position of the shape - xpos = width/2; - ypos = height/2; -} - -void draw() -{ - background(102); - - // Update the position of the shape - xpos = xpos + ( xspeed * xdirection ); - ypos = ypos + ( yspeed * ydirection ); - - // Test to see if the shape exceeds the boundaries of the screen - // If it does, reverse its direction by multiplying by -1 - if (xpos > width-size || xpos < 0) { - xdirection *= -1; - } - if (ypos > height-size || ypos < 0) { - ydirection *= -1; - } - - // Draw the shape - ellipse(xpos+size/2, ypos+size/2, size, size); -} diff --git a/java/examples/Topics/Motion/Bounce/applet/loading.gif b/java/examples/Topics/Motion/Bounce/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Motion/BouncyBubbles/applet/BouncyBubbles.java b/java/examples/Topics/Motion/BouncyBubbles/applet/BouncyBubbles.java deleted file mode 100644 index 857368dd2..000000000 --- a/java/examples/Topics/Motion/BouncyBubbles/applet/BouncyBubbles.java +++ /dev/null @@ -1,118 +0,0 @@ -import processing.core.*; -import processing.xml.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class BouncyBubbles extends PApplet { - -/** - * Bouncy Bubbles. - * Based on code from Keith Peters (www.bit-101.com). - * - * Multiple-object collision. - */ - - -int numBalls = 12; -float spring = 0.05f; -float gravity = 0.03f; -float friction = -0.9f; -Ball[] balls = new Ball[numBalls]; - -public void setup() -{ - size(640, 200); - noStroke(); - smooth(); - for (int i = 0; i < numBalls; i++) { - balls[i] = new Ball(random(width), random(height), random(20, 40), i, balls); - } -} - -public void draw() -{ - background(0); - for (int i = 0; i < numBalls; i++) { - balls[i].collide(); - balls[i].move(); - balls[i].display(); - } -} - -class Ball { - float x, y; - float diameter; - float vx = 0; - float vy = 0; - int id; - Ball[] others; - - Ball(float xin, float yin, float din, int idin, Ball[] oin) { - x = xin; - y = yin; - diameter = din; - id = idin; - others = oin; - } - - public void collide() { - for (int i = id + 1; i < numBalls; i++) { - float dx = others[i].x - x; - float dy = others[i].y - y; - float distance = sqrt(dx*dx + dy*dy); - float minDist = others[i].diameter/2 + diameter/2; - if (distance < minDist) { - float angle = atan2(dy, dx); - float targetX = x + cos(angle) * minDist; - float targetY = y + sin(angle) * minDist; - float ax = (targetX - others[i].x) * spring; - float ay = (targetY - others[i].y) * spring; - vx -= ax; - vy -= ay; - others[i].vx += ax; - others[i].vy += ay; - } - } - } - - public void move() { - vy += gravity; - x += vx; - y += vy; - if (x + diameter/2 > width) { - x = width - diameter/2; - vx *= friction; - } - else if (x - diameter/2 < 0) { - x = diameter/2; - vx *= friction; - } - if (y + diameter/2 > height) { - y = height - diameter/2; - vy *= friction; - } - else if (y - diameter/2 < 0) { - y = diameter/2; - vy *= friction; - } - } - - public void display() { - fill(255, 204); - ellipse(x, y, diameter, diameter); - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "BouncyBubbles" }); - } -} diff --git a/java/examples/Topics/Motion/BouncyBubbles/applet/BouncyBubbles.pde b/java/examples/Topics/Motion/BouncyBubbles/applet/BouncyBubbles.pde deleted file mode 100644 index e9dc24f28..000000000 --- a/java/examples/Topics/Motion/BouncyBubbles/applet/BouncyBubbles.pde +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Bouncy Bubbles. - * Based on code from Keith Peters (www.bit-101.com). - * - * Multiple-object collision. - */ - - -int numBalls = 12; -float spring = 0.05; -float gravity = 0.03; -float friction = -0.9; -Ball[] balls = new Ball[numBalls]; - -void setup() -{ - size(640, 200); - noStroke(); - smooth(); - for (int i = 0; i < numBalls; i++) { - balls[i] = new Ball(random(width), random(height), random(20, 40), i, balls); - } -} - -void draw() -{ - background(0); - for (int i = 0; i < numBalls; i++) { - balls[i].collide(); - balls[i].move(); - balls[i].display(); - } -} - -class Ball { - float x, y; - float diameter; - float vx = 0; - float vy = 0; - int id; - Ball[] others; - - Ball(float xin, float yin, float din, int idin, Ball[] oin) { - x = xin; - y = yin; - diameter = din; - id = idin; - others = oin; - } - - void collide() { - for (int i = id + 1; i < numBalls; i++) { - float dx = others[i].x - x; - float dy = others[i].y - y; - float distance = sqrt(dx*dx + dy*dy); - float minDist = others[i].diameter/2 + diameter/2; - if (distance < minDist) { - float angle = atan2(dy, dx); - float targetX = x + cos(angle) * minDist; - float targetY = y + sin(angle) * minDist; - float ax = (targetX - others[i].x) * spring; - float ay = (targetY - others[i].y) * spring; - vx -= ax; - vy -= ay; - others[i].vx += ax; - others[i].vy += ay; - } - } - } - - void move() { - vy += gravity; - x += vx; - y += vy; - if (x + diameter/2 > width) { - x = width - diameter/2; - vx *= friction; - } - else if (x - diameter/2 < 0) { - x = diameter/2; - vx *= friction; - } - if (y + diameter/2 > height) { - y = height - diameter/2; - vy *= friction; - } - else if (y - diameter/2 < 0) { - y = diameter/2; - vy *= friction; - } - } - - void display() { - fill(255, 204); - ellipse(x, y, diameter, diameter); - } -} diff --git a/java/examples/Topics/Motion/BouncyBubbles/applet/loading.gif b/java/examples/Topics/Motion/BouncyBubbles/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Motion/Brownian/applet/Brownian.java b/java/examples/Topics/Motion/Brownian/applet/Brownian.java deleted file mode 100644 index b26e75d22..000000000 --- a/java/examples/Topics/Motion/Brownian/applet/Brownian.java +++ /dev/null @@ -1,68 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Brownian extends PApplet { - -/** - * Brownian motion. - * - * Recording random movement as a continuous line. - */ - -int num = 2000; -int range = 6; - -float[] ax = new float[num]; -float[] ay = new float[num]; - - -public void setup() -{ - size(640, 360); - for(int i = 0; i < num; i++) { - ax[i] = width/2; - ay[i] = height/2; - } - frameRate(30); -} - -public void draw() -{ - background(51); - - // Shift all elements 1 place to the left - for(int i = 1; i < num; i++) { - ax[i-1] = ax[i]; - ay[i-1] = ay[i]; - } - - // Put a new value at the end of the array - ax[num-1] += random(-range, range); - ay[num-1] += random(-range, range); - - // Constrain all points to the screen - ax[num-1] = constrain(ax[num-1], 0, width); - ay[num-1] = constrain(ay[num-1], 0, height); - - // Draw a line connecting the points - for(int i=1; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!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0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Motion/CircleCollision/applet/Ball.pde b/java/examples/Topics/Motion/CircleCollision/applet/Ball.pde deleted file mode 100644 index 93548b96d..000000000 --- a/java/examples/Topics/Motion/CircleCollision/applet/Ball.pde +++ /dev/null @@ -1,16 +0,0 @@ -class Ball{ - float x, y, r, m; - - // default constructor - Ball() { - } - - Ball(float x, float y, float r) { - this.x = x; - this.y = y; - this.r = r; - m = r*.1; - } -} - - diff --git a/java/examples/Topics/Motion/CircleCollision/applet/CircleCollision.java b/java/examples/Topics/Motion/CircleCollision/applet/CircleCollision.java deleted file mode 100644 index 55ee1a163..000000000 --- a/java/examples/Topics/Motion/CircleCollision/applet/CircleCollision.java +++ /dev/null @@ -1,173 +0,0 @@ -import processing.core.*; -import processing.xml.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class CircleCollision extends PApplet { - -/** - * Circle Collision with Swapping Velocities - * by Ira Greenberg. - * - * Based on Keith Peter's Solution in - * Foundation Actionscript Animation: Making Things Move! - */ - -Ball[] balls = { - new Ball(100, 400, 20), - new Ball(700, 400, 80) -}; - -PVector[] vels = { - new PVector(2.15f, -1.35f), - new PVector(-1.65f, .42f) -}; - -public void setup() { - size(640, 360); - smooth(); - noStroke(); -} - -public void draw() { - background(51); - fill(204); - for (int i=0; i< 2; i++){ - balls[i].x += vels[i].x; - balls[i].y += vels[i].y; - ellipse(balls[i].x, balls[i].y, balls[i].r*2, balls[i].r*2); - checkBoundaryCollision(balls[i], vels[i]); - } - checkObjectCollision(balls, vels); -} - -public void checkObjectCollision(Ball[] b, PVector[] v){ - - // get distances between the balls components - PVector bVect = new PVector(); - bVect.x = b[1].x - b[0].x; - bVect.y = b[1].y - b[0].y; - - // calculate magnitude of the vector separating the balls - float bVectMag = sqrt(bVect.x * bVect.x + bVect.y * bVect.y); - if (bVectMag < b[0].r + b[1].r){ - // get angle of bVect - float theta = atan2(bVect.y, bVect.x); - // precalculate trig values - float sine = sin(theta); - float cosine = cos(theta); - - /* bTemp will hold rotated ball positions. You - just need to worry about bTemp[1] position*/ - Ball[] bTemp = { - new Ball(), new Ball() }; - - /* b[1]'s position is relative to b[0]'s - so you can use the vector between them (bVect) as the - reference point in the rotation expressions. - bTemp[0].x and bTemp[0].y will initialize - automatically to 0.0, which is what you want - since b[1] will rotate around b[0] */ - bTemp[1].x = cosine * bVect.x + sine * bVect.y; - bTemp[1].y = cosine * bVect.y - sine * bVect.x; - - // rotate Temporary velocities - PVector[] vTemp = { - new PVector(), new PVector() }; - vTemp[0].x = cosine * v[0].x + sine * v[0].y; - vTemp[0].y = cosine * v[0].y - sine * v[0].x; - vTemp[1].x = cosine * v[1].x + sine * v[1].y; - vTemp[1].y = cosine * v[1].y - sine * v[1].x; - - /* Now that velocities are rotated, you can use 1D - conservation of momentum equations to calculate - the final velocity along the x-axis. */ - PVector[] vFinal = { - new PVector(), new PVector() }; - // final rotated velocity for b[0] - vFinal[0].x = ((b[0].m - b[1].m) * vTemp[0].x + 2 * b[1].m * - vTemp[1].x) / (b[0].m + b[1].m); - vFinal[0].y = vTemp[0].y; - // final rotated velocity for b[0] - vFinal[1].x = ((b[1].m - b[0].m) * vTemp[1].x + 2 * b[0].m * - vTemp[0].x) / (b[0].m + b[1].m); - vFinal[1].y = vTemp[1].y; - - // hack to avoid clumping - bTemp[0].x += vFinal[0].x; - bTemp[1].x += vFinal[1].x; - - /* Rotate ball positions and velocities back - Reverse signs in trig expressions to rotate - in the opposite direction */ - // rotate balls - Ball[] bFinal = { - new Ball(), new Ball() }; - bFinal[0].x = cosine * bTemp[0].x - sine * bTemp[0].y; - bFinal[0].y = cosine * bTemp[0].y + sine * bTemp[0].x; - bFinal[1].x = cosine * bTemp[1].x - sine * bTemp[1].y; - bFinal[1].y = cosine * bTemp[1].y + sine * bTemp[1].x; - - // update balls to screen position - b[1].x = b[0].x + bFinal[1].x; - b[1].y = b[0].y + bFinal[1].y; - b[0].x = b[0].x + bFinal[0].x; - b[0].y = b[0].y + bFinal[0].y; - - // update velocities - v[0].x = cosine * vFinal[0].x - sine * vFinal[0].y; - v[0].y = cosine * vFinal[0].y + sine * vFinal[0].x; - v[1].x = cosine * vFinal[1].x - sine * vFinal[1].y; - v[1].y = cosine * vFinal[1].y + sine * vFinal[1].x; - } -} - -public void checkBoundaryCollision(Ball ball, PVector vel) { - if (ball.x > width-ball.r) { - ball.x = width-ball.r; - vel.x *= -1; - } - else if (ball.x < ball.r) { - ball.x = ball.r; - vel.x *= -1; - } - else if (ball.y > height-ball.r) { - ball.y = height-ball.r; - vel.y *= -1; - } - else if (ball.y < ball.r) { - ball.y = ball.r; - vel.y *= -1; - } -} - -class Ball{ - float x, y, r, m; - - // default constructor - Ball() { - } - - Ball(float x, float y, float r) { - this.x = x; - this.y = y; - this.r = r; - m = r*.1f; - } -} - - - - static public void main(String args[]) { - PApplet.main(new String[] { "CircleCollision" }); - } -} diff --git a/java/examples/Topics/Motion/CircleCollision/applet/CircleCollision.pde b/java/examples/Topics/Motion/CircleCollision/applet/CircleCollision.pde deleted file mode 100644 index f739dc64a..000000000 --- a/java/examples/Topics/Motion/CircleCollision/applet/CircleCollision.pde +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Circle Collision with Swapping Velocities - * by Ira Greenberg. - * - * Based on Keith Peter's Solution in - * Foundation Actionscript Animation: Making Things Move! - */ - -Ball[] balls = { - new Ball(100, 400, 20), - new Ball(700, 400, 80) -}; - -PVector[] vels = { - new PVector(2.15, -1.35), - new PVector(-1.65, .42) -}; - -void setup() { - size(640, 360); - smooth(); - noStroke(); -} - -void draw() { - background(51); - fill(204); - for (int i=0; i< 2; i++){ - balls[i].x += vels[i].x; - balls[i].y += vels[i].y; - ellipse(balls[i].x, balls[i].y, balls[i].r*2, balls[i].r*2); - checkBoundaryCollision(balls[i], vels[i]); - } - checkObjectCollision(balls, vels); -} - -void checkObjectCollision(Ball[] b, PVector[] v){ - - // get distances between the balls components - PVector bVect = new PVector(); - bVect.x = b[1].x - b[0].x; - bVect.y = b[1].y - b[0].y; - - // calculate magnitude of the vector separating the balls - float bVectMag = sqrt(bVect.x * bVect.x + bVect.y * bVect.y); - if (bVectMag < b[0].r + b[1].r){ - // get angle of bVect - float theta = atan2(bVect.y, bVect.x); - // precalculate trig values - float sine = sin(theta); - float cosine = cos(theta); - - /* bTemp will hold rotated ball positions. You - just need to worry about bTemp[1] position*/ - Ball[] bTemp = { - new Ball(), new Ball() }; - - /* b[1]'s position is relative to b[0]'s - so you can use the vector between them (bVect) as the - reference point in the rotation expressions. - bTemp[0].x and bTemp[0].y will initialize - automatically to 0.0, which is what you want - since b[1] will rotate around b[0] */ - bTemp[1].x = cosine * bVect.x + sine * bVect.y; - bTemp[1].y = cosine * bVect.y - sine * bVect.x; - - // rotate Temporary velocities - PVector[] vTemp = { - new PVector(), new PVector() }; - vTemp[0].x = cosine * v[0].x + sine * v[0].y; - vTemp[0].y = cosine * v[0].y - sine * v[0].x; - vTemp[1].x = cosine * v[1].x + sine * v[1].y; - vTemp[1].y = cosine * v[1].y - sine * v[1].x; - - /* Now that velocities are rotated, you can use 1D - conservation of momentum equations to calculate - the final velocity along the x-axis. */ - PVector[] vFinal = { - new PVector(), new PVector() }; - // final rotated velocity for b[0] - vFinal[0].x = ((b[0].m - b[1].m) * vTemp[0].x + 2 * b[1].m * - vTemp[1].x) / (b[0].m + b[1].m); - vFinal[0].y = vTemp[0].y; - // final rotated velocity for b[0] - vFinal[1].x = ((b[1].m - b[0].m) * vTemp[1].x + 2 * b[0].m * - vTemp[0].x) / (b[0].m + b[1].m); - vFinal[1].y = vTemp[1].y; - - // hack to avoid clumping - bTemp[0].x += vFinal[0].x; - bTemp[1].x += vFinal[1].x; - - /* Rotate ball positions and velocities back - Reverse signs in trig expressions to rotate - in the opposite direction */ - // rotate balls - Ball[] bFinal = { - new Ball(), new Ball() }; - bFinal[0].x = cosine * bTemp[0].x - sine * bTemp[0].y; - bFinal[0].y = cosine * bTemp[0].y + sine * bTemp[0].x; - bFinal[1].x = cosine * bTemp[1].x - sine * bTemp[1].y; - bFinal[1].y = cosine * bTemp[1].y + sine * bTemp[1].x; - - // update balls to screen position - b[1].x = b[0].x + bFinal[1].x; - b[1].y = b[0].y + bFinal[1].y; - b[0].x = b[0].x + bFinal[0].x; - b[0].y = b[0].y + bFinal[0].y; - - // update velocities - v[0].x = cosine * vFinal[0].x - sine * vFinal[0].y; - v[0].y = cosine * vFinal[0].y + sine * vFinal[0].x; - v[1].x = cosine * vFinal[1].x - sine * vFinal[1].y; - v[1].y = cosine * vFinal[1].y + sine * vFinal[1].x; - } -} - -void checkBoundaryCollision(Ball ball, PVector vel) { - if (ball.x > width-ball.r) { - ball.x = width-ball.r; - vel.x *= -1; - } - else if (ball.x < ball.r) { - ball.x = ball.r; - vel.x *= -1; - } - else if (ball.y > height-ball.r) { - ball.y = height-ball.r; - vel.y *= -1; - } - else if (ball.y < ball.r) { - ball.y = ball.r; - vel.y *= -1; - } -} - diff --git a/java/examples/Topics/Motion/CircleCollision/applet/loading.gif b/java/examples/Topics/Motion/CircleCollision/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kR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`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Motion/Collision/applet/Collision.java b/java/examples/Topics/Motion/Collision/applet/Collision.java deleted file mode 100644 index 0ccaf12cf..000000000 --- a/java/examples/Topics/Motion/Collision/applet/Collision.java +++ /dev/null @@ -1,105 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Collision extends PApplet { - -/** - * Collision (Pong). - * - * Move the mouse up and down to move the paddle. - */ - -// Global variables for the ball -float ball_x; -float ball_y; -float ball_dir = 1; -float ball_size = 15; // Radius -float dy = 0; // Direction - -// Global variables for the paddle -int paddle_width = 10; -int paddle_height = 60; - -int dist_wall = 15; - -public void setup() -{ - size(640, 360); - rectMode(RADIUS); - ellipseMode(RADIUS); - noStroke(); - smooth(); - ball_y = height/2; - ball_x = 1; -} - -public void draw() -{ - background(51); - - ball_x += ball_dir * 1.0f; - ball_y += dy; - if(ball_x > width+ball_size) { - ball_x = -width/2 - ball_size; - ball_y = random(0, height); - dy = 0; - } - - // Constrain paddle to screen - float paddle_y = constrain(mouseY, paddle_height, height-paddle_height); - - // Test to see if the ball is touching the paddle - float py = width-dist_wall-paddle_width-ball_size; - if(ball_x == py - && ball_y > paddle_y - paddle_height - ball_size - && ball_y < paddle_y + paddle_height + ball_size) { - ball_dir *= -1; - if(mouseY != pmouseY) { - dy = (mouseY-pmouseY)/2.0f; - if(dy > 5) { dy = 5; } - if(dy < -5) { dy = -5; } - } - } - - // If ball hits paddle or back wall, reverse direction - if(ball_x < ball_size && ball_dir == -1) { - ball_dir *= -1; - } - - // If the ball is touching top or bottom edge, reverse direction - if(ball_y > height-ball_size) { - dy = dy * -1; - } - if(ball_y < ball_size) { - dy = dy * -1; - } - - // Draw ball - fill(255); - ellipse(ball_x, ball_y, ball_size, ball_size); - - // Draw the paddle - fill(153); - rect(width-dist_wall, paddle_y, paddle_width, paddle_height); -} - - - - - - - - static public void main(String args[]) { - PApplet.main(new String[] { "Collision" }); - } -} diff --git a/java/examples/Topics/Motion/Collision/applet/Collision.pde b/java/examples/Topics/Motion/Collision/applet/Collision.pde deleted file mode 100644 index 7d5b88c2b..000000000 --- a/java/examples/Topics/Motion/Collision/applet/Collision.pde +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Collision (Pong). - * - * Move the mouse up and down to move the paddle. - */ - -// Global variables for the ball -float ball_x; -float ball_y; -float ball_dir = 1; -float ball_size = 15; // Radius -float dy = 0; // Direction - -// Global variables for the paddle -int paddle_width = 10; -int paddle_height = 60; - -int dist_wall = 15; - -void setup() -{ - size(640, 360); - rectMode(RADIUS); - ellipseMode(RADIUS); - noStroke(); - smooth(); - ball_y = height/2; - ball_x = 1; -} - -void draw() -{ - background(51); - - ball_x += ball_dir * 1.0; - ball_y += dy; - if(ball_x > width+ball_size) { - ball_x = -width/2 - ball_size; - ball_y = random(0, height); - dy = 0; - } - - // Constrain paddle to screen - float paddle_y = constrain(mouseY, paddle_height, height-paddle_height); - - // Test to see if the ball is touching the paddle - float py = width-dist_wall-paddle_width-ball_size; - if(ball_x == py - && ball_y > paddle_y - paddle_height - ball_size - && ball_y < paddle_y + paddle_height + ball_size) { - ball_dir *= -1; - if(mouseY != pmouseY) { - dy = (mouseY-pmouseY)/2.0; - if(dy > 5) { dy = 5; } - if(dy < -5) { dy = -5; } - } - } - - // If ball hits paddle or back wall, reverse direction - if(ball_x < ball_size && ball_dir == -1) { - ball_dir *= -1; - } - - // If the ball is touching top or bottom edge, reverse direction - if(ball_y > height-ball_size) { - dy = dy * -1; - } - if(ball_y < ball_size) { - dy = dy * -1; - } - - // Draw ball - fill(255); - ellipse(ball_x, ball_y, ball_size, ball_size); - - // Draw the paddle - fill(153); - rect(width-dist_wall, paddle_y, paddle_width, paddle_height); -} - - - - - - diff --git a/java/examples/Topics/Motion/Collision/applet/loading.gif b/java/examples/Topics/Motion/Collision/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33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^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Motion/Linear/applet/Linear.java b/java/examples/Topics/Motion/Linear/applet/Linear.java deleted file mode 100644 index 04208972f..000000000 --- a/java/examples/Topics/Motion/Linear/applet/Linear.java +++ /dev/null @@ -1,46 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Linear extends PApplet { - -/** - * Linear Motion. - * - * Changing a variable to create a moving line. - * When the line moves off the edge of the window, - * the variable is set to 0, which places the line - * back at the bottom of the screen. - */ - -float a = 100; - -public void setup() -{ - size(640, 200); - stroke(255); -} - -public void draw() -{ - background(51); - a = a - 0.5f; - if (a < 0) { - a = height; - } - line(0, a, width, a); -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Linear" }); - } -} diff --git a/java/examples/Topics/Motion/Linear/applet/Linear.pde b/java/examples/Topics/Motion/Linear/applet/Linear.pde deleted file mode 100644 index 246b9b05e..000000000 --- a/java/examples/Topics/Motion/Linear/applet/Linear.pde +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Linear Motion. - * - * Changing a variable to create a moving line. - * When the line moves off the edge of the window, - * the variable is set to 0, which places the line - * back at the bottom of the screen. - */ - -float a = 100; - -void setup() -{ - size(640, 200); - stroke(255); -} - -void draw() -{ - background(51); - a = a - 0.5; - if (a < 0) { - a = height; - } - line(0, a, width, a); -} diff --git a/java/examples/Topics/Motion/Linear/applet/loading.gif b/java/examples/Topics/Motion/Linear/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@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_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Motion/MovingOnCurves/applet/MovingOnCurves.java b/java/examples/Topics/Motion/MovingOnCurves/applet/MovingOnCurves.java deleted file mode 100644 index 62ce132fe..000000000 --- a/java/examples/Topics/Motion/MovingOnCurves/applet/MovingOnCurves.java +++ /dev/null @@ -1,70 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class MovingOnCurves extends PApplet { - -/** - * Moving On Curves. - * - * In this example, the circles moves along the curve y = x^4. - * Click the mouse to have it move to a new position. - */ - -float beginX = 20.0f; // Initial x-coordinate -float beginY = 10.0f; // Initial y-coordinate -float endX = 570.0f; // Final x-coordinate -float endY = 320.0f; // Final y-coordinate -float distX; // X-axis distance to move -float distY; // Y-axis distance to move -float exponent = 4; // Determines the curve -float x = 0.0f; // Current x-coordinate -float y = 0.0f; // Current y-coordinate -float step = 0.01f; // Size of each step along the path -float pct = 0.0f; // Percentage traveled (0.0 to 1.0) - -public void setup() -{ - size(640, 360); - noStroke(); - smooth(); - distX = endX - beginX; - distY = endY - beginY; -} - -public void draw() -{ - fill(0, 2); - rect(0, 0, width, height); - pct += step; - if (pct < 1.0f) { - x = beginX + (pct * distX); - y = beginY + (pow(pct, exponent) * distY); - } - fill(255); - ellipse(x, y, 20, 20); -} - -public void mousePressed() { - pct = 0.0f; - beginX = x; - beginY = y; - endX = mouseX; - endY = mouseY; - distX = endX - beginX; - distY = endY - beginY; -} - - static public void main(String args[]) { - PApplet.main(new String[] { "MovingOnCurves" }); - } -} diff --git a/java/examples/Topics/Motion/MovingOnCurves/applet/MovingOnCurves.pde b/java/examples/Topics/Motion/MovingOnCurves/applet/MovingOnCurves.pde deleted file mode 100644 index 051d6ba48..000000000 --- a/java/examples/Topics/Motion/MovingOnCurves/applet/MovingOnCurves.pde +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Moving On Curves. - * - * In this example, the circles moves along the curve y = x^4. - * Click the mouse to have it move to a new position. - */ - -float beginX = 20.0; // Initial x-coordinate -float beginY = 10.0; // Initial y-coordinate -float endX = 570.0; // Final x-coordinate -float endY = 320.0; // Final y-coordinate -float distX; // X-axis distance to move -float distY; // Y-axis distance to move -float exponent = 4; // Determines the curve -float x = 0.0; // Current x-coordinate -float y = 0.0; // Current y-coordinate -float step = 0.01; // Size of each step along the path -float pct = 0.0; // Percentage traveled (0.0 to 1.0) - -void setup() -{ - size(640, 360); - noStroke(); - smooth(); - distX = endX - beginX; - distY = endY - beginY; -} - -void draw() -{ - fill(0, 2); - rect(0, 0, width, height); - pct += step; - if (pct < 1.0) { - x = beginX + (pct * distX); - y = beginY + (pow(pct, exponent) * distY); - } - fill(255); - ellipse(x, y, 20, 20); -} - -void mousePressed() { - pct = 0.0; - beginX = x; - beginY = y; - endX = mouseX; - endY = mouseY; - distX = endX - beginX; - distY = endY - beginY; -} diff --git a/java/examples/Topics/Motion/MovingOnCurves/applet/loading.gif b/java/examples/Topics/Motion/MovingOnCurves/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Motion/Puff/applet/Puff.java b/java/examples/Topics/Motion/Puff/applet/Puff.java deleted file mode 100644 index 767b368a1..000000000 --- a/java/examples/Topics/Motion/Puff/applet/Puff.java +++ /dev/null @@ -1,111 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Puff extends PApplet { - -/** - * Puff - * by Ira Greenberg. - * - * Series of ellipses simulating a multi-segmented - * organism, utilizing a follow the leader algorithm. - * Collision detection occurs on the organism's head, - * controlling overall direction, and on the individual - * body segments, controlling body shape and jitter. - */ - -// for puff head -float headX; -float headY; -float speedX = .7f; -float speedY = .9f; - -// for puff body -int cells = 1000; -float[]px= new float[cells]; -float[]py= new float[cells]; -float[]radiiX = new float[cells]; -float[]radiiY = new float[cells]; -float[]angle = new float[cells]; -float[]frequency = new float[cells]; -float[]cellRadius = new float[cells]; - -public void setup(){ - - size(640, 360); - - // begin in the center - headX = width/2; - headY = height/2; - - //fill body arrays - for (int i=0; i< cells; i++){ - radiiX[i] = random(-7, 7); - radiiY[i] = random(-4, 4); - frequency[i]= random(-9, 9); - cellRadius[i] = random(16, 30); - } - frameRate(30); -} - -public void draw(){ - background(0); - noStroke(); - fill(255, 255, 255, 5); - - //follow the leader - for (int i =0; i< cells; i++){ - if (i==0){ - px[i] = headX+sin(radians(angle[i]))*radiiX[i]; - py[i] = headY+cos(radians(angle[i]))*radiiY[i]; - } - else{ - px[i] = px[i-1]+cos(radians(angle[i]))*radiiX[i]; - py[i] = py[i-1]+sin(radians(angle[i]))*radiiY[i]; - - //check collision of body - if (px[i] >= width-cellRadius[i]/2 || px[i] <= cellRadius[i]/2){ - radiiX[i]*=-1; - cellRadius[i] = random(1, 40); - frequency[i]= random(-13, 13); - } - if (py[i] >= height-cellRadius[i]/2 || py[i] <= cellRadius[i]/2){ - radiiY[i]*=-1; - cellRadius[i] = random(1, 40); - frequency[i]= random(-9, 9); - } - } - // draw puff - ellipse(px[i], py[i], cellRadius[i], cellRadius[i]); - // set speed of body - angle[i]+=frequency[i]; - } - - // set velocity of head - headX+=speedX; - headY+=speedY; - - //check boundary collision of head - if (headX >= width-cellRadius[0]/2 || headX <=cellRadius[0]/2){ - speedX*=-1; - } - if (headY >= height-cellRadius[0]/2 || headY <= cellRadius[0]/2){ - speedY*=-1; - } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Puff" }); - } -} diff --git a/java/examples/Topics/Motion/Puff/applet/Puff.pde b/java/examples/Topics/Motion/Puff/applet/Puff.pde deleted file mode 100644 index ad2508587..000000000 --- a/java/examples/Topics/Motion/Puff/applet/Puff.pde +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Puff - * by Ira Greenberg. - * - * Series of ellipses simulating a multi-segmented - * organism, utilizing a follow the leader algorithm. - * Collision detection occurs on the organism's head, - * controlling overall direction, and on the individual - * body segments, controlling body shape and jitter. - */ - -// for puff head -float headX; -float headY; -float speedX = .7; -float speedY = .9; - -// for puff body -int cells = 1000; -float[]px= new float[cells]; -float[]py= new float[cells]; -float[]radiiX = new float[cells]; -float[]radiiY = new float[cells]; -float[]angle = new float[cells]; -float[]frequency = new float[cells]; -float[]cellRadius = new float[cells]; - -void setup(){ - - size(640, 360); - - // begin in the center - headX = width/2; - headY = height/2; - - //fill body arrays - for (int i=0; i< cells; i++){ - radiiX[i] = random(-7, 7); - radiiY[i] = random(-4, 4); - frequency[i]= random(-9, 9); - cellRadius[i] = random(16, 30); - } - frameRate(30); -} - -void draw(){ - background(0); - noStroke(); - fill(255, 255, 255, 5); - - //follow the leader - for (int i =0; i< cells; i++){ - if (i==0){ - px[i] = headX+sin(radians(angle[i]))*radiiX[i]; - py[i] = headY+cos(radians(angle[i]))*radiiY[i]; - } - else{ - px[i] = px[i-1]+cos(radians(angle[i]))*radiiX[i]; - py[i] = py[i-1]+sin(radians(angle[i]))*radiiY[i]; - - //check collision of body - if (px[i] >= width-cellRadius[i]/2 || px[i] <= cellRadius[i]/2){ - radiiX[i]*=-1; - cellRadius[i] = random(1, 40); - frequency[i]= random(-13, 13); - } - if (py[i] >= height-cellRadius[i]/2 || py[i] <= cellRadius[i]/2){ - radiiY[i]*=-1; - cellRadius[i] = random(1, 40); - frequency[i]= random(-9, 9); - } - } - // draw puff - ellipse(px[i], py[i], cellRadius[i], cellRadius[i]); - // set speed of body - angle[i]+=frequency[i]; - } - - // set velocity of head - headX+=speedX; - headY+=speedY; - - //check boundary collision of head - if (headX >= width-cellRadius[0]/2 || headX <=cellRadius[0]/2){ - speedX*=-1; - } - if (headY >= height-cellRadius[0]/2 || headY <= cellRadius[0]/2){ - speedY*=-1; - } -} - diff --git a/java/examples/Topics/Motion/Puff/applet/loading.gif b/java/examples/Topics/Motion/Puff/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+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TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Motion/Reflection1/applet/Reflection1.java b/java/examples/Topics/Motion/Reflection1/applet/Reflection1.java deleted file mode 100644 index db453b558..000000000 --- a/java/examples/Topics/Motion/Reflection1/applet/Reflection1.java +++ /dev/null @@ -1,149 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Reflection1 extends PApplet { - - /** - * Non-orthogonal Reflection - * by Ira Greenberg. - * - * Based on the equation (R = 2N(N*L)-L) where R is the - * reflection vector, N is the normal, and L is the incident - * vector. - */ - -float baseX1, baseY1, baseX2, baseY2; -float baseLength; -float[] xCoords, yCoords; -float ellipseX, ellipseY, ellipseRadius = 6; -float directionX, directionY; -float ellipseSpeed = 3.5f; -float velocityX, velocityY; - -public void setup(){ - size(640, 240); - frameRate(30); - fill(128); - smooth(); - baseX1 = 0; - baseY1 = height-150; - baseX2 = width; - baseY2 = height; - - // start ellipse at middle top of screen - ellipseX = width/2; - - // calculate initial random direction - directionX = random(0.1f, 0.99f); - directionY = random(0.1f, 0.99f); - - // normalize direction vector - float directionVectLength = sqrt(directionX*directionX + - directionY*directionY); - directionX /= directionVectLength; - directionY /= directionVectLength; -} - -public void draw(){ - // draw background - fill(0, 12); - noStroke(); - rect(0, 0, width, height); - - // calculate length of base top - baseLength = dist(baseX1, baseY1, baseX2, baseY2); - xCoords = new float[ceil(baseLength)]; - yCoords = new float[ceil(baseLength)]; - - // fill base top coordinate array - for (int i=0; i width-ellipseRadius){ - ellipseX = width-ellipseRadius; - directionX *= -1; - } - // left - if (ellipseX < ellipseRadius){ - ellipseX = ellipseRadius; - directionX *= -1; - } - // top - if (ellipseY < ellipseRadius){ - ellipseY = ellipseRadius; - directionY *= -1; - // randomize base top - baseY1 = random(height-100, height); - baseY2 = random(height-100, height); - } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Reflection1" }); - } -} diff --git a/java/examples/Topics/Motion/Reflection1/applet/Reflection1.pde b/java/examples/Topics/Motion/Reflection1/applet/Reflection1.pde deleted file mode 100644 index 9f8434c93..000000000 --- a/java/examples/Topics/Motion/Reflection1/applet/Reflection1.pde +++ /dev/null @@ -1,129 +0,0 @@ - /** - * Non-orthogonal Reflection - * by Ira Greenberg. - * - * Based on the equation (R = 2N(N*L)-L) where R is the - * reflection vector, N is the normal, and L is the incident - * vector. - */ - -float baseX1, baseY1, baseX2, baseY2; -float baseLength; -float[] xCoords, yCoords; -float ellipseX, ellipseY, ellipseRadius = 6; -float directionX, directionY; -float ellipseSpeed = 3.5; -float velocityX, velocityY; - -void setup(){ - size(640, 240); - frameRate(30); - fill(128); - smooth(); - baseX1 = 0; - baseY1 = height-150; - baseX2 = width; - baseY2 = height; - - // start ellipse at middle top of screen - ellipseX = width/2; - - // calculate initial random direction - directionX = random(0.1, 0.99); - directionY = random(0.1, 0.99); - - // normalize direction vector - float directionVectLength = sqrt(directionX*directionX + - directionY*directionY); - directionX /= directionVectLength; - directionY /= directionVectLength; -} - -void draw(){ - // draw background - fill(0, 12); - noStroke(); - rect(0, 0, width, height); - - // calculate length of base top - baseLength = dist(baseX1, baseY1, baseX2, baseY2); - xCoords = new float[ceil(baseLength)]; - yCoords = new float[ceil(baseLength)]; - - // fill base top coordinate array - for (int i=0; i width-ellipseRadius){ - ellipseX = width-ellipseRadius; - directionX *= -1; - } - // left - if (ellipseX < ellipseRadius){ - ellipseX = ellipseRadius; - directionX *= -1; - } - // top - if (ellipseY < ellipseRadius){ - ellipseY = ellipseRadius; - directionY *= -1; - // randomize base top - baseY1 = random(height-100, height); - baseY2 = random(height-100, height); - } -} - diff --git a/java/examples/Topics/Motion/Reflection1/applet/loading.gif b/java/examples/Topics/Motion/Reflection1/applet/loading.gif deleted file mode 100644 index 1ddae5089f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Opa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Motion/Reflection2/applet/Ground.pde b/java/examples/Topics/Motion/Reflection2/applet/Ground.pde deleted file mode 100644 index 55d8497e2..000000000 --- a/java/examples/Topics/Motion/Reflection2/applet/Ground.pde +++ /dev/null @@ -1,20 +0,0 @@ -class Ground { - float x1, y1, x2, y2; - float x, y, len, rot; - - // Default constructor - Ground(){ - } - - // Constructor - Ground(float x1, float y1, float x2, float y2) { - this.x1 = x1; - this.y1 = y1; - this.x2 = x2; - this.y2 = y2; - x = (x1+x2)/2; - y = (y1+y2)/2; - len = dist(x1, y1, x2, y2); - rot = atan2((y2-y1), (x2-x1)); - } -} diff --git a/java/examples/Topics/Motion/Reflection2/applet/Orb.pde b/java/examples/Topics/Motion/Reflection2/applet/Orb.pde deleted file mode 100644 index 7af7ed91b..000000000 --- a/java/examples/Topics/Motion/Reflection2/applet/Orb.pde +++ /dev/null @@ -1,14 +0,0 @@ -class Orb{ - float x, y, r; - - // Default constructor - Orb() { - } - - Orb(float x, float y, float r) { - this.x = x; - this.y = y; - this.r = r; - } -} - diff --git a/java/examples/Topics/Motion/Reflection2/applet/Reflection2.java b/java/examples/Topics/Motion/Reflection2/applet/Reflection2.java deleted file mode 100644 index 46360590b..000000000 --- a/java/examples/Topics/Motion/Reflection2/applet/Reflection2.java +++ /dev/null @@ -1,183 +0,0 @@ -import processing.core.*; -import processing.xml.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Reflection2 extends PApplet { - -/** - * Non-orthogonal Collision with Multiple Ground Segments - * by Ira Greenberg. - * - * Based on Keith Peter's Solution in - * Foundation Actionscript Animation: Making Things Move! - */ - -Orb orb; -PVector velocity; -float gravity = .05f, damping = 0.8f; -int segments = 40; -Ground[] ground = new Ground[segments]; -float[] peakHeights = new float[segments+1]; - -public void setup(){ - size(640, 200); - smooth(); - orb = new Orb(50, 50, 3); - velocity = new PVector(.5f, 0); - - // Calculate ground peak heights - for (int i=0; i width-orb.r){ - orb.x = width-orb.r; - velocity.x *= -1; - velocity.x *= damping; - } - else if (orb.x < orb.r){ - orb.x = orb.r; - velocity.x *= -1; - velocity.x *= damping; - } -} - - -public void checkGroundCollision(Ground groundSegment) { - - // Get difference between orb and ground - float deltaX = orb.x - groundSegment.x; - float deltaY = orb.y - groundSegment.y; - - // Precalculate trig values - float cosine = cos(groundSegment.rot); - float sine = sin(groundSegment.rot); - - /* Rotate ground and velocity to allow - orthogonal collision calculations */ - float groundXTemp = cosine * deltaX + sine * deltaY; - float groundYTemp = cosine * deltaY - sine * deltaX; - float velocityXTemp = cosine * velocity.x + sine * velocity.y; - float velocityYTemp = cosine * velocity.y - sine * velocity.x; - - /* Ground collision - check for surface - collision and also that orb is within - left/rights bounds of ground segment */ - if (groundYTemp > -orb.r && - orb.x > groundSegment.x1 && - orb.x < groundSegment.x2 ){ - // keep orb from going into ground - groundYTemp = -orb.r; - // bounce and slow down orb - velocityYTemp *= -1.0f; - velocityYTemp *= damping; - } - - // Reset ground, velocity and orb - deltaX = cosine * groundXTemp - sine * groundYTemp; - deltaY = cosine * groundYTemp + sine * groundXTemp; - velocity.x = cosine * velocityXTemp - sine * velocityYTemp; - velocity.y = cosine * velocityYTemp + sine * velocityXTemp; - orb.x = groundSegment.x + deltaX; - orb.y = groundSegment.y + deltaY; -} - - - - -class Ground { - float x1, y1, x2, y2; - float x, y, len, rot; - - // Default constructor - Ground(){ - } - - // Constructor - Ground(float x1, float y1, float x2, float y2) { - this.x1 = x1; - this.y1 = y1; - this.x2 = x2; - this.y2 = y2; - x = (x1+x2)/2; - y = (y1+y2)/2; - len = dist(x1, y1, x2, y2); - rot = atan2((y2-y1), (x2-x1)); - } -} -class Orb{ - float x, y, r; - - // Default constructor - Orb() { - } - - Orb(float x, float y, float r) { - this.x = x; - this.y = y; - this.r = r; - } -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "Reflection2" }); - } -} diff --git a/java/examples/Topics/Motion/Reflection2/applet/Reflection2.pde b/java/examples/Topics/Motion/Reflection2/applet/Reflection2.pde deleted file mode 100644 index 05f135b7f..000000000 --- a/java/examples/Topics/Motion/Reflection2/applet/Reflection2.pde +++ /dev/null @@ -1,128 +0,0 @@ -/** - * Non-orthogonal Collision with Multiple Ground Segments - * by Ira Greenberg. - * - * Based on Keith Peter's Solution in - * Foundation Actionscript Animation: Making Things Move! - */ - -Orb orb; -PVector velocity; -float gravity = .05, damping = 0.8; -int segments = 40; -Ground[] ground = new Ground[segments]; -float[] peakHeights = new float[segments+1]; - -void setup(){ - size(640, 200); - smooth(); - orb = new Orb(50, 50, 3); - velocity = new PVector(.5, 0); - - // Calculate ground peak heights - for (int i=0; i width-orb.r){ - orb.x = width-orb.r; - velocity.x *= -1; - velocity.x *= damping; - } - else if (orb.x < orb.r){ - orb.x = orb.r; - velocity.x *= -1; - velocity.x *= damping; - } -} - - -void checkGroundCollision(Ground groundSegment) { - - // Get difference between orb and ground - float deltaX = orb.x - groundSegment.x; - float deltaY = orb.y - groundSegment.y; - - // Precalculate trig values - float cosine = cos(groundSegment.rot); - float sine = sin(groundSegment.rot); - - /* Rotate ground and velocity to allow - orthogonal collision calculations */ - float groundXTemp = cosine * deltaX + sine * deltaY; - float groundYTemp = cosine * deltaY - sine * deltaX; - float velocityXTemp = cosine * velocity.x + sine * velocity.y; - float velocityYTemp = cosine * velocity.y - sine * velocity.x; - - /* Ground collision - check for surface - collision and also that orb is within - left/rights bounds of ground segment */ - if (groundYTemp > -orb.r && - orb.x > groundSegment.x1 && - orb.x < groundSegment.x2 ){ - // keep orb from going into ground - groundYTemp = -orb.r; - // bounce and slow down orb - velocityYTemp *= -1.0; - velocityYTemp *= damping; - } - - // Reset ground, velocity and orb - deltaX = cosine * groundXTemp - sine * groundYTemp; - deltaY = cosine * groundYTemp + sine * groundXTemp; - velocity.x = cosine * velocityXTemp - sine * velocityYTemp; - velocity.y = cosine * velocityYTemp + sine * velocityXTemp; - orb.x = groundSegment.x + deltaX; - orb.y = groundSegment.y + deltaY; -} - - - - diff --git a/java/examples/Topics/Motion/Reflection2/applet/loading.gif b/java/examples/Topics/Motion/Reflection2/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ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M`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Simulate/Chain/applet/Chain.java b/java/examples/Topics/Simulate/Chain/applet/Chain.java deleted file mode 100644 index 33eb6ea59..000000000 --- a/java/examples/Topics/Simulate/Chain/applet/Chain.java +++ /dev/null @@ -1,88 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Chain extends PApplet { - -/** - * Chain. - * - * One mass is attached to the mouse position and the other - * is attached the position of the other mass. The gravity - * in the environment pulls down on both. - */ - - -Spring2D s1, s2; - -float gravity = 6.0f; -float mass = 2.0f; - -public void setup() -{ - size(200, 200); - smooth(); - fill(0); - // Inputs: x, y, mass, gravity - s1 = new Spring2D(0.0f, width/2, mass, gravity); - s2 = new Spring2D(0.0f, width/2, mass, gravity); -} - -public void draw() -{ - background(204); - s1.update(mouseX, mouseY); - s1.display(mouseX, mouseY); - s2.update(s1.x, s1.y); - s2.display(s1.x, s1.y); -} - -class Spring2D { - float vx, vy; // The x- and y-axis velocities - float x, y; // The x- and y-coordinates - float gravity; - float mass; - float radius = 20; - float stiffness = 0.2f; - float damping = 0.7f; - - Spring2D(float xpos, float ypos, float m, float g) { - x = xpos; - y = ypos; - mass = m; - gravity = g; - } - - public void update(float targetX, float targetY) { - float forceX = (targetX - x) * stiffness; - float ax = forceX / mass; - vx = damping * (vx + ax); - x += vx; - float forceY = (targetY - y) * stiffness; - forceY += gravity; - float ay = forceY / mass; - vy = damping * (vy + ay); - y += vy; - } - - public void display(float nx, float ny) { - noStroke(); - ellipse(x, y, radius*2, radius*2); - stroke(255); - line(x, y, nx, ny); - } -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Chain" }); - } -} diff --git a/java/examples/Topics/Simulate/Chain/applet/Chain.pde b/java/examples/Topics/Simulate/Chain/applet/Chain.pde deleted file mode 100644 index f2a53006f..000000000 --- a/java/examples/Topics/Simulate/Chain/applet/Chain.pde +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Chain. - * - * One mass is attached to the mouse position and the other - * is attached the position of the other mass. The gravity - * in the environment pulls down on both. - */ - - -Spring2D s1, s2; - -float gravity = 6.0; -float mass = 2.0; - -void setup() -{ - size(200, 200); - smooth(); - fill(0); - // Inputs: x, y, mass, gravity - s1 = new Spring2D(0.0, width/2, mass, gravity); - s2 = new Spring2D(0.0, width/2, mass, gravity); -} - -void draw() -{ - background(204); - s1.update(mouseX, mouseY); - s1.display(mouseX, mouseY); - s2.update(s1.x, s1.y); - s2.display(s1.x, s1.y); -} - -class Spring2D { - float vx, vy; // The x- and y-axis velocities - float x, y; // The x- and y-coordinates - float gravity; - float mass; - float radius = 20; - float stiffness = 0.2; - float damping = 0.7; - - Spring2D(float xpos, float ypos, float m, float g) { - x = xpos; - y = ypos; - mass = m; - gravity = g; - } - - void update(float targetX, float targetY) { - float forceX = (targetX - x) * stiffness; - float ax = forceX / mass; - vx = damping * (vx + ax); - x += vx; - float forceY = (targetY - y) * stiffness; - forceY += gravity; - float ay = forceY / mass; - vy = damping * (vy + ay); - y += vy; - } - - void display(float nx, float ny) { - noStroke(); - ellipse(x, y, radius*2, radius*2); - stroke(255); - line(x, y, nx, ny); - } -} diff --git a/java/examples/Topics/Simulate/Chain/applet/loading.gif b/java/examples/Topics/Simulate/Chain/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz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Boid.pde b/java/examples/Topics/Simulate/Flocking/applet/Boid.pde deleted file mode 100644 index dcd1a994a..000000000 --- a/java/examples/Topics/Simulate/Flocking/applet/Boid.pde +++ /dev/null @@ -1,196 +0,0 @@ -// The Boid class - -class Boid { - - PVector loc; - PVector vel; - PVector acc; - float r; - float maxforce; // Maximum steering force - float maxspeed; // Maximum speed - - Boid(PVector l, float ms, float mf) { - acc = new PVector(0,0); - vel = new PVector(random(-1,1),random(-1,1)); - loc = l.get(); - r = 2.0; - maxspeed = ms; - maxforce = mf; - } - - void run(ArrayList boids) { - flock(boids); - update(); - borders(); - render(); - } - - // We accumulate a new acceleration each time based on three rules - void flock(ArrayList boids) { - PVector sep = separate(boids); // Separation - PVector ali = align(boids); // Alignment - PVector coh = cohesion(boids); // Cohesion - // Arbitrarily weight these forces - sep.mult(1.5); - ali.mult(1.0); - coh.mult(1.0); - // Add the force vectors to acceleration - acc.add(sep); - acc.add(ali); - acc.add(coh); - } - - // Method to update location - void update() { - // Update velocity - vel.add(acc); - // Limit speed - vel.limit(maxspeed); - loc.add(vel); - // Reset accelertion to 0 each cycle - acc.mult(0); - } - - void seek(PVector target) { - acc.add(steer(target,false)); - } - - void arrive(PVector target) { - acc.add(steer(target,true)); - } - - // A method that calculates a steering vector towards a target - // Takes a second argument, if true, it slows down as it approaches the target - PVector steer(PVector target, boolean slowdown) { - PVector steer; // The steering vector - PVector desired = target.sub(target,loc); // A vector pointing from the location to the target - float d = desired.mag(); // Distance from the target is the magnitude of the vector - // If the distance is greater than 0, calc steering (otherwise return zero vector) - if (d > 0) { - // Normalize desired - desired.normalize(); - // Two options for desired vector magnitude (1 -- based on distance, 2 -- maxspeed) - if ((slowdown) && (d < 100.0)) desired.mult(maxspeed*(d/100.0)); // This damping is somewhat arbitrary - else desired.mult(maxspeed); - // Steering = Desired minus Velocity - steer = target.sub(desired,vel); - steer.limit(maxforce); // Limit to maximum steering force - } - else { - steer = new PVector(0,0); - } - return steer; - } - - void render() { - // Draw a triangle rotated in the direction of velocity - float theta = vel.heading2D() + PI/2; - fill(200,100); - stroke(255); - pushMatrix(); - translate(loc.x,loc.y); - rotate(theta); - beginShape(TRIANGLES); - vertex(0, -r*2); - vertex(-r, r*2); - vertex(r, r*2); - endShape(); - popMatrix(); - } - - // Wraparound - void borders() { - if (loc.x < -r) loc.x = width+r; - if (loc.y < -r) loc.y = height+r; - if (loc.x > width+r) loc.x = -r; - if (loc.y > height+r) loc.y = -r; - } - - // Separation - // Method checks for nearby boids and steers away - PVector separate (ArrayList boids) { - float desiredseparation = 20.0; - PVector steer = new PVector(0,0,0); - int count = 0; - // For every boid in the system, check if it's too close - for (int i = 0 ; i < boids.size(); i++) { - Boid other = (Boid) boids.get(i); - float d = PVector.dist(loc,other.loc); - // If the distance is greater than 0 and less than an arbitrary amount (0 when you are yourself) - if ((d > 0) && (d < desiredseparation)) { - // Calculate vector pointing away from neighbor - PVector diff = PVector.sub(loc,other.loc); - diff.normalize(); - diff.div(d); // Weight by distance - steer.add(diff); - count++; // Keep track of how many - } - } - // Average -- divide by how many - if (count > 0) { - steer.div((float)count); - } - - // As long as the vector is greater than 0 - if (steer.mag() > 0) { - // Implement Reynolds: Steering = Desired - Velocity - steer.normalize(); - steer.mult(maxspeed); - steer.sub(vel); - steer.limit(maxforce); - } - return steer; - } - - // Alignment - // For every nearby boid in the system, calculate the average velocity - PVector align (ArrayList boids) { - float neighbordist = 25.0; - PVector steer = new PVector(0,0,0); - int count = 0; - for (int i = 0 ; i < boids.size(); i++) { - Boid other = (Boid) boids.get(i); - float d = PVector.dist(loc,other.loc); - if ((d > 0) && (d < neighbordist)) { - steer.add(other.vel); - count++; - } - } - if (count > 0) { - steer.div((float)count); - } - - // As long as the vector is greater than 0 - if (steer.mag() > 0) { - // Implement Reynolds: Steering = Desired - Velocity - steer.normalize(); - steer.mult(maxspeed); - steer.sub(vel); - steer.limit(maxforce); - } - return steer; - } - - // Cohesion - // For the average location (i.e. center) of all nearby boids, calculate steering vector towards that location - PVector cohesion (ArrayList boids) { - float neighbordist = 25.0; - PVector sum = new PVector(0,0); // Start with empty vector to accumulate all locations - int count = 0; - for (int i = 0 ; i < boids.size(); i++) { - Boid other = (Boid) boids.get(i); - float d = loc.dist(other.loc); - if ((d > 0) && (d < neighbordist)) { - sum.add(other.loc); // Add location - count++; - } - } - if (count > 0) { - sum.div((float)count); - return steer(sum,false); // Steer towards the location - } - return sum; - } -} - - diff --git a/java/examples/Topics/Simulate/Flocking/applet/Flock.pde b/java/examples/Topics/Simulate/Flocking/applet/Flock.pde deleted file mode 100644 index 9ec1001c7..000000000 --- a/java/examples/Topics/Simulate/Flocking/applet/Flock.pde +++ /dev/null @@ -1,22 +0,0 @@ -// The Flock (a list of Boid objects) - -class Flock { - ArrayList boids; // An arraylist for all the boids - - Flock() { - boids = new ArrayList(); // Initialize the arraylist - } - - void run() { - for (int i = 0; i < boids.size(); i++) { - Boid b = (Boid) boids.get(i); - b.run(boids); // Passing the entire list of boids to each boid individually - } - } - - void addBoid(Boid b) { - boids.add(b); - } - -} - diff --git a/java/examples/Topics/Simulate/Flocking/applet/Flocking.java b/java/examples/Topics/Simulate/Flocking/applet/Flocking.java deleted file mode 100644 index a9b700859..000000000 --- a/java/examples/Topics/Simulate/Flocking/applet/Flocking.java +++ /dev/null @@ -1,271 +0,0 @@ -import processing.core.*; -import processing.xml.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Flocking extends PApplet { - -/** - * Flocking - * by Daniel Shiffman. - * - * An implementation of Craig Reynold's Boids program to simulate - * the flocking behavior of birds. Each boid steers itself based on - * rules of avoidance, alignment, and coherence. - * - * Click the mouse to add a new boid. - */ - -Flock flock; - -public void setup() { - size(640, 360); - flock = new Flock(); - // Add an initial set of boids into the system - for (int i = 0; i < 150; i++) { - flock.addBoid(new Boid(new PVector(width/2,height/2), 3.0f, 0.05f)); - } - smooth(); -} - -public void draw() { - background(50); - flock.run(); -} - -// Add a new boid into the System -public void mousePressed() { - flock.addBoid(new Boid(new PVector(mouseX,mouseY),2.0f,0.05f)); -} -// The Boid class - -class Boid { - - PVector loc; - PVector vel; - PVector acc; - float r; - float maxforce; // Maximum steering force - float maxspeed; // Maximum speed - - Boid(PVector l, float ms, float mf) { - acc = new PVector(0,0); - vel = new PVector(random(-1,1),random(-1,1)); - loc = l.get(); - r = 2.0f; - maxspeed = ms; - maxforce = mf; - } - - public void run(ArrayList boids) { - flock(boids); - update(); - borders(); - render(); - } - - // We accumulate a new acceleration each time based on three rules - public void flock(ArrayList boids) { - PVector sep = separate(boids); // Separation - PVector ali = align(boids); // Alignment - PVector coh = cohesion(boids); // Cohesion - // Arbitrarily weight these forces - sep.mult(1.5f); - ali.mult(1.0f); - coh.mult(1.0f); - // Add the force vectors to acceleration - acc.add(sep); - acc.add(ali); - acc.add(coh); - } - - // Method to update location - public void update() { - // Update velocity - vel.add(acc); - // Limit speed - vel.limit(maxspeed); - loc.add(vel); - // Reset accelertion to 0 each cycle - acc.mult(0); - } - - public void seek(PVector target) { - acc.add(steer(target,false)); - } - - public void arrive(PVector target) { - acc.add(steer(target,true)); - } - - // A method that calculates a steering vector towards a target - // Takes a second argument, if true, it slows down as it approaches the target - public PVector steer(PVector target, boolean slowdown) { - PVector steer; // The steering vector - PVector desired = target.sub(target,loc); // A vector pointing from the location to the target - float d = desired.mag(); // Distance from the target is the magnitude of the vector - // If the distance is greater than 0, calc steering (otherwise return zero vector) - if (d > 0) { - // Normalize desired - desired.normalize(); - // Two options for desired vector magnitude (1 -- based on distance, 2 -- maxspeed) - if ((slowdown) && (d < 100.0f)) desired.mult(maxspeed*(d/100.0f)); // This damping is somewhat arbitrary - else desired.mult(maxspeed); - // Steering = Desired minus Velocity - steer = target.sub(desired,vel); - steer.limit(maxforce); // Limit to maximum steering force - } - else { - steer = new PVector(0,0); - } - return steer; - } - - public void render() { - // Draw a triangle rotated in the direction of velocity - float theta = vel.heading2D() + PI/2; - fill(200,100); - stroke(255); - pushMatrix(); - translate(loc.x,loc.y); - rotate(theta); - beginShape(TRIANGLES); - vertex(0, -r*2); - vertex(-r, r*2); - vertex(r, r*2); - endShape(); - popMatrix(); - } - - // Wraparound - public void borders() { - if (loc.x < -r) loc.x = width+r; - if (loc.y < -r) loc.y = height+r; - if (loc.x > width+r) loc.x = -r; - if (loc.y > height+r) loc.y = -r; - } - - // Separation - // Method checks for nearby boids and steers away - public PVector separate (ArrayList boids) { - float desiredseparation = 20.0f; - PVector steer = new PVector(0,0,0); - int count = 0; - // For every boid in the system, check if it's too close - for (int i = 0 ; i < boids.size(); i++) { - Boid other = (Boid) boids.get(i); - float d = PVector.dist(loc,other.loc); - // If the distance is greater than 0 and less than an arbitrary amount (0 when you are yourself) - if ((d > 0) && (d < desiredseparation)) { - // Calculate vector pointing away from neighbor - PVector diff = PVector.sub(loc,other.loc); - diff.normalize(); - diff.div(d); // Weight by distance - steer.add(diff); - count++; // Keep track of how many - } - } - // Average -- divide by how many - if (count > 0) { - steer.div((float)count); - } - - // As long as the vector is greater than 0 - if (steer.mag() > 0) { - // Implement Reynolds: Steering = Desired - Velocity - steer.normalize(); - steer.mult(maxspeed); - steer.sub(vel); - steer.limit(maxforce); - } - return steer; - } - - // Alignment - // For every nearby boid in the system, calculate the average velocity - public PVector align (ArrayList boids) { - float neighbordist = 25.0f; - PVector steer = new PVector(0,0,0); - int count = 0; - for (int i = 0 ; i < boids.size(); i++) { - Boid other = (Boid) boids.get(i); - float d = PVector.dist(loc,other.loc); - if ((d > 0) && (d < neighbordist)) { - steer.add(other.vel); - count++; - } - } - if (count > 0) { - steer.div((float)count); - } - - // As long as the vector is greater than 0 - if (steer.mag() > 0) { - // Implement Reynolds: Steering = Desired - Velocity - steer.normalize(); - steer.mult(maxspeed); - steer.sub(vel); - steer.limit(maxforce); - } - return steer; - } - - // Cohesion - // For the average location (i.e. center) of all nearby boids, calculate steering vector towards that location - public PVector cohesion (ArrayList boids) { - float neighbordist = 25.0f; - PVector sum = new PVector(0,0); // Start with empty vector to accumulate all locations - int count = 0; - for (int i = 0 ; i < boids.size(); i++) { - Boid other = (Boid) boids.get(i); - float d = loc.dist(other.loc); - if ((d > 0) && (d < neighbordist)) { - sum.add(other.loc); // Add location - count++; - } - } - if (count > 0) { - sum.div((float)count); - return steer(sum,false); // Steer towards the location - } - return sum; - } -} - - -// The Flock (a list of Boid objects) - -class Flock { - ArrayList boids; // An arraylist for all the boids - - Flock() { - boids = new ArrayList(); // Initialize the arraylist - } - - public void run() { - for (int i = 0; i < boids.size(); i++) { - Boid b = (Boid) boids.get(i); - b.run(boids); // Passing the entire list of boids to each boid individually - } - } - - public void addBoid(Boid b) { - boids.add(b); - } - -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "--present", "--bgcolor=#666666", "--hide-stop", "Flocking" }); - } -} diff --git a/java/examples/Topics/Simulate/Flocking/applet/Flocking.pde b/java/examples/Topics/Simulate/Flocking/applet/Flocking.pde deleted file mode 100644 index ed0e7e60c..000000000 --- a/java/examples/Topics/Simulate/Flocking/applet/Flocking.pde +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Flocking - * by Daniel Shiffman. - * - * An implementation of Craig Reynold's Boids program to simulate - * the flocking behavior of birds. Each boid steers itself based on - * rules of avoidance, alignment, and coherence. - * - * Click the mouse to add a new boid. - */ - -Flock flock; - -void setup() { - size(640, 360); - flock = new Flock(); - // Add an initial set of boids into the system - for (int i = 0; i < 150; i++) { - flock.addBoid(new Boid(new PVector(width/2,height/2), 3.0, 0.05)); - } - smooth(); -} - -void draw() { - background(50); - flock.run(); -} - -// Add a new boid into the System -void mousePressed() { - flock.addBoid(new Boid(new PVector(mouseX,mouseY),2.0f,0.05f)); -} diff --git a/java/examples/Topics/Simulate/Flocking/applet/loading.gif b/java/examples/Topics/Simulate/Flocking/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000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sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Simulate/Fluid/applet/Fluid.java b/java/examples/Topics/Simulate/Fluid/applet/Fluid.java deleted file mode 100644 index ebf6d8e2d..000000000 --- a/java/examples/Topics/Simulate/Fluid/applet/Fluid.java +++ /dev/null @@ -1,228 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Fluid extends PApplet { - -/** - * Fluid - * by Glen Murphy. - * - * Click and drag the mouse to move the simulated fluid. - * Adjust the "res" variable below to change resolution. - * Code has not been optimised, and will run fairly slowly. - */ - -int res = 2; -int penSize = 30; -int lwidth; -int lheight; -int pnum = 30000; -vsquare[][] v; -vbuffer[][] vbuf; -particle[] p = new particle[pnum]; -int pcount = 0; -int mouseXvel = 0; -int mouseYvel = 0; - -public void setup() -{ - size(200, 200); - noStroke(); - frameRate(30); - lwidth = width/res; - lheight = height/res; - v = new vsquare[lwidth+1][lheight+1]; - vbuf = new vbuffer[lwidth+1][lheight+1]; - for (int i = 0; i < pnum; i++) { - p[i] = new particle(random(res,width-res),random(res,height-res)); - } - for (int i = 0; i <= lwidth; i++) { - for (int u = 0; u <= lheight; u++) { - v[i][u] = new vsquare(i*res,u*res); - vbuf[i][u] = new vbuffer(i*res,u*res); - } - } -} - -public void draw() -{ - background(0xff666666); - - int axvel = mouseX-pmouseX; - int ayvel = mouseY-pmouseY; - - mouseXvel = (axvel != mouseXvel) ? axvel : 0; - mouseYvel = (ayvel != mouseYvel) ? ayvel : 0; - - for (int i = 0; i < lwidth; i++) { - for (int u = 0; u < lheight; u++) { - vbuf[i][u].updatebuf(i,u); - v[i][u].col = 32; - } - } - for (int i = 0; i < pnum-1; i++) { - p[i].updatepos(); - } - for (int i = 0; i < lwidth; i++) { - for (int u = 0; u < lheight; u++) { - v[i][u].addbuffer(i, u); - v[i][u].updatevels(mouseXvel, mouseYvel); - v[i][u].display(i, u); - } - } -} - -class particle { - float x; - float y; - float xvel; - float yvel; - int pos; - particle(float xIn, float yIn) { - x = xIn; - y = yIn; - } - - public void updatepos() { - float col1; - if (x > 0 && x < width && y > 0 && y < height) { - int vi = (int)(x/res); - int vu = (int)(y/res); - vsquare o = v[vi][vu]; - - float ax = (x%res)/res; - float ay = (y%res)/res; - - xvel += (1-ax)*v[vi][vu].xvel*0.05f; - yvel += (1-ay)*v[vi][vu].yvel*0.05f; - - xvel += ax*v[vi+1][vu].xvel*0.05f; - yvel += ax*v[vi+1][vu].yvel*0.05f; - - xvel += ay*v[vi][vu+1].xvel*0.05f; - yvel += ay*v[vi][vu+1].yvel*0.05f; - - o.col += 4; - - x += xvel; - y += yvel; - } - else { - x = random(0,width); - y = random(0,height); - xvel = 0; - yvel = 0; - } - - xvel *= 0.5f; - yvel *= 0.5f; - } -} - -class vbuffer { - int x; - int y; - float xvel; - float yvel; - float pressurex = 0; - float pressurey = 0; - float pressure = 0; - - vbuffer(int xIn,int yIn) { - x = xIn; - y = yIn; - pressurex = 0; - pressurey = 0; - } - - public void updatebuf(int i, int u) { - if (i>0 && i0 && u0 && i0 && u 255) col = 255; - if (i>0 && i0 && u 0 && x < width && y > 0 && y < height) { - int vi = (int)(x/res); - int vu = (int)(y/res); - vsquare o = v[vi][vu]; - - float ax = (x%res)/res; - float ay = (y%res)/res; - - xvel += (1-ax)*v[vi][vu].xvel*0.05; - yvel += (1-ay)*v[vi][vu].yvel*0.05; - - xvel += ax*v[vi+1][vu].xvel*0.05; - yvel += ax*v[vi+1][vu].yvel*0.05; - - xvel += ay*v[vi][vu+1].xvel*0.05; - yvel += ay*v[vi][vu+1].yvel*0.05; - - o.col += 4; - - x += xvel; - y += yvel; - } - else { - x = random(0,width); - y = random(0,height); - xvel = 0; - yvel = 0; - } - - xvel *= 0.5; - yvel *= 0.5; - } -} - -class vbuffer { - int x; - int y; - float xvel; - float yvel; - float pressurex = 0; - float pressurey = 0; - float pressure = 0; - - vbuffer(int xIn,int yIn) { - x = xIn; - y = yIn; - pressurex = 0; - pressurey = 0; - } - - void updatebuf(int i, int u) { - if (i>0 && i0 && u0 && i0 && u 255) col = 255; - if (i>0 && i0 && u}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~g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xL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Simulate/MultipleParticleSystems/applet/CrazyParticle.pde b/java/examples/Topics/Simulate/MultipleParticleSystems/applet/CrazyParticle.pde deleted file mode 100644 index 8d3d53a06..000000000 --- a/java/examples/Topics/Simulate/MultipleParticleSystems/applet/CrazyParticle.pde +++ /dev/null @@ -1,47 +0,0 @@ -// A subclass of Particle - -class CrazyParticle extends Particle { - - // Just adding one new variable to a CrazyParticle - // It inherits all other fields from "Particle", and we don't have to retype them! - float theta; - - // The CrazyParticle constructor can call the parent class (super class) constructor - CrazyParticle(Vector3D l) { - // "super" means do everything from the constructor in Particle - super(l); - // One more line of code to deal with the new variable, theta - theta = 0.0; - - } - - // Notice we don't have the method run() here; it is inherited from Particle - - // This update() method overrides the parent class update() method - void update() { - super.update(); - // Increment rotation based on horizontal velocity - float theta_vel = (vel.x * vel.magnitude()) / 10.0f; - theta += theta_vel; - } - - // Override timer - void timer() { - timer -= 0.5; - } - - // Method to display - void render() { - // Render the ellipse just like in a regular particle - super.render(); - - // Then add a rotating line - pushMatrix(); - translate(loc.x,loc.y); - rotate(theta); - stroke(255,timer); - line(0,0,25,0); - popMatrix(); - } -} - diff --git a/java/examples/Topics/Simulate/MultipleParticleSystems/applet/MultipleParticleSystems.java b/java/examples/Topics/Simulate/MultipleParticleSystems/applet/MultipleParticleSystems.java deleted file mode 100644 index 8c77d4861..000000000 --- a/java/examples/Topics/Simulate/MultipleParticleSystems/applet/MultipleParticleSystems.java +++ /dev/null @@ -1,387 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class MultipleParticleSystems extends PApplet { - -/** - * Multiple Particle Systems - * by Daniel Shiffman. - * - * Click the mouse to generate a burst of particles - * at mouse location. - * - * Each burst is one instance of a particle system - * with Particles and CrazyParticles (a subclass of Particle) - * Note use of Inheritance and Polymorphism here. - */ - -ArrayList psystems; - -public void setup() { - size(640, 360); - colorMode(RGB, 255, 255, 255, 100); - psystems = new ArrayList(); - smooth(); -} - -public void draw() { - background(0); - - // Cycle through all particle systems, run them and delete old ones - for (int i = psystems.size()-1; i >= 0; i--) { - ParticleSystem psys = (ParticleSystem) psystems.get(i); - psys.run(); - if (psys.dead()) { - psystems.remove(i); - } - } - -} - -// When the mouse is pressed, add a new particle system -public void mousePressed() { - psystems.add(new ParticleSystem(PApplet.parseInt(random(5,25)),new Vector3D(mouseX,mouseY))); -} - - - - - - - - - - - -// A subclass of Particle - -class CrazyParticle extends Particle { - - // Just adding one new variable to a CrazyParticle - // It inherits all other fields from "Particle", and we don't have to retype them! - float theta; - - // The CrazyParticle constructor can call the parent class (super class) constructor - CrazyParticle(Vector3D l) { - // "super" means do everything from the constructor in Particle - super(l); - // One more line of code to deal with the new variable, theta - theta = 0.0f; - - } - - // Notice we don't have the method run() here; it is inherited from Particle - - // This update() method overrides the parent class update() method - public void update() { - super.update(); - // Increment rotation based on horizontal velocity - float theta_vel = (vel.x * vel.magnitude()) / 10.0f; - theta += theta_vel; - } - - // Override timer - public void timer() { - timer -= 0.5f; - } - - // Method to display - public void render() { - // Render the ellipse just like in a regular particle - super.render(); - - // Then add a rotating line - pushMatrix(); - translate(loc.x,loc.y); - rotate(theta); - stroke(255,timer); - line(0,0,25,0); - popMatrix(); - } -} - -// A simple Particle class - -class Particle { - Vector3D loc; - Vector3D vel; - Vector3D acc; - float r; - float timer; - - // One constructor - Particle(Vector3D a, Vector3D v, Vector3D l, float r_) { - acc = a.copy(); - vel = v.copy(); - loc = l.copy(); - r = r_; - timer = 100.0f; - } - - // Another constructor (the one we are using here) - Particle(Vector3D l) { - acc = new Vector3D(0,0.05f,0); - vel = new Vector3D(random(-1,1),random(-2,0),0); - loc = l.copy(); - r = 10.0f; - timer = 100.0f; - } - - - public void run() { - update(); - render(); - } - - // Method to update location - public void update() { - vel.add(acc); - loc.add(vel); - timer -= 1.0f; - } - - // Method to display - public void render() { - ellipseMode(CENTER); - stroke(255,timer); - fill(100,timer); - ellipse(loc.x,loc.y,r,r); - } - - // Is the particle still useful? - public boolean dead() { - if (timer <= 0.0f) { - return true; - } else { - return false; - } - } -} -// An ArrayList is used to manage the list of Particles - -class ParticleSystem { - - ArrayList particles; // An arraylist for all the particles - Vector3D origin; // An origin point for where particles are birthed - - ParticleSystem(int num, Vector3D v) { - particles = new ArrayList(); // Initialize the arraylist - origin = v.copy(); // Store the origin point - for (int i = 0; i < num; i++) { - // We have a 50% chance of adding each kind of particle - if (random(1) < 0.5f) { - particles.add(new CrazyParticle(origin)); - } else { - particles.add(new Particle(origin)); - } - } - } - - public void run() { - // Cycle through the ArrayList backwards b/c we are deleting - for (int i = particles.size()-1; i >= 0; i--) { - Particle p = (Particle) particles.get(i); - p.run(); - if (p.dead()) { - particles.remove(i); - } - } - } - - public void addParticle() { - particles.add(new Particle(origin)); - } - - public void addParticle(Particle p) { - particles.add(p); - } - - // A method to test if the particle system still has particles - public boolean dead() { - if (particles.isEmpty()) { - return true; - } - else { - return false; - } - } - -} - -// Simple Vector class - -class Vector3D { - float x; - float y; - float z; - - Vector3D(float x_, float y_, float z_) { - x = x_; - y = y_; - z = z_; - } - - Vector3D(float x_, float y_) { - x = x_; - y = y_; - z = 0f; - } - - Vector3D() { - x = 0f; - y = 0f; - z = 0f; - } - - public void setX(float x_) { - x = x_; - } - - public void setY(float y_) { - y = y_; - } - - public void setZ(float z_) { - z = z_; - } - - public void setXY(float x_, float y_) { - x = x_; - y = y_; - } - - public void setXYZ(float x_, float y_, float z_) { - x = x_; - y = y_; - z = z_; - } - - public void setXYZ(Vector3D v) { - x = v.x; - y = v.y; - z = v.z; - } - public float magnitude() { - return (float) Math.sqrt(x*x + y*y + z*z); - } - - public Vector3D copy() { - return new Vector3D(x,y,z); - } - - public Vector3D copy(Vector3D v) { - return new Vector3D(v.x, v.y,v.z); - } - - public void add(Vector3D v) { - x += v.x; - y += v.y; - z += v.z; - } - - public void sub(Vector3D v) { - x -= v.x; - y -= v.y; - z -= v.z; - } - - public void mult(float n) { - x *= n; - y *= n; - z *= n; - } - - public void div(float n) { - x /= n; - y /= n; - z /= n; - } - - /* float dot(Vector3D v) { - //implement DOT product - }*/ - - /* Vector3D cross(Vector3D v) { - //implement CROSS product - }*/ - - public void normalize() { - float m = magnitude(); - if (m > 0) { - div(m); - } - } - - public void limit(float max) { - if (magnitude() > max) { - normalize(); - mult(max); - } - } - - public float heading2D() { - float angle = (float) Math.atan2(-y, x); - return -1*angle; - } - - public Vector3D add(Vector3D v1, Vector3D v2) { - Vector3D v = new Vector3D(v1.x + v2.x,v1.y + v2.y, v1.z + v2.z); - return v; - } - - public Vector3D sub(Vector3D v1, Vector3D v2) { - Vector3D v = new Vector3D(v1.x - v2.x,v1.y - v2.y,v1.z - v2.z); - return v; - } - - public Vector3D div(Vector3D v1, float n) { - Vector3D v = new Vector3D(v1.x/n,v1.y/n,v1.z/n); - return v; - } - - public Vector3D mult(Vector3D v1, float n) { - Vector3D v = new Vector3D(v1.x*n,v1.y*n,v1.z*n); - return v; - } - - public float distance (Vector3D v1, Vector3D v2) { - float dx = v1.x - v2.x; - float dy = v1.y - v2.y; - float dz = v1.z - v2.z; - return (float) Math.sqrt(dx*dx + dy*dy + dz*dz); - } - - public void display(float x, float y, float scayl) { - pushMatrix(); - float arrowsize = 4; - // Translate to location to render vector - translate(x,y); - stroke(255); - // Call vector heading function to get direction (note that pointing up is a heading of 0) and rotate - rotate(heading2D()); - // Calculate length of vector & scale it to be bigger or smaller if necessary - float len = magnitude()*scayl; - // Draw three lines to make an arrow (draw pointing up since we've rotate to the proper direction) - line(0,0,len,0); - line(len,0,len-arrowsize,+arrowsize/2); - line(len,0,len-arrowsize,-arrowsize/2); - popMatrix(); - } - -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "MultipleParticleSystems" }); - } -} diff --git a/java/examples/Topics/Simulate/MultipleParticleSystems/applet/MultipleParticleSystems.pde b/java/examples/Topics/Simulate/MultipleParticleSystems/applet/MultipleParticleSystems.pde deleted file mode 100644 index 487cf2f21..000000000 --- a/java/examples/Topics/Simulate/MultipleParticleSystems/applet/MultipleParticleSystems.pde +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Multiple Particle Systems - * by Daniel Shiffman. - * - * Click the mouse to generate a burst of particles - * at mouse location. - * - * Each burst is one instance of a particle system - * with Particles and CrazyParticles (a subclass of Particle) - * Note use of Inheritance and Polymorphism here. - */ - -ArrayList psystems; - -void setup() { - size(640, 360); - colorMode(RGB, 255, 255, 255, 100); - psystems = new ArrayList(); - smooth(); -} - -void draw() { - background(0); - - // Cycle through all particle systems, run them and delete old ones - for (int i = psystems.size()-1; i >= 0; i--) { - ParticleSystem psys = (ParticleSystem) psystems.get(i); - psys.run(); - if (psys.dead()) { - psystems.remove(i); - } - } - -} - -// When the mouse is pressed, add a new particle system -void mousePressed() { - psystems.add(new ParticleSystem(int(random(5,25)),new Vector3D(mouseX,mouseY))); -} - - - - - - - - - - - diff --git a/java/examples/Topics/Simulate/MultipleParticleSystems/applet/Particle.pde b/java/examples/Topics/Simulate/MultipleParticleSystems/applet/Particle.pde deleted file mode 100644 index c91d1a547..000000000 --- a/java/examples/Topics/Simulate/MultipleParticleSystems/applet/Particle.pde +++ /dev/null @@ -1,57 +0,0 @@ -// A simple Particle class - -class Particle { - Vector3D loc; - Vector3D vel; - Vector3D acc; - float r; - float timer; - - // One constructor - Particle(Vector3D a, Vector3D v, Vector3D l, float r_) { - acc = a.copy(); - vel = v.copy(); - loc = l.copy(); - r = r_; - timer = 100.0; - } - - // Another constructor (the one we are using here) - Particle(Vector3D l) { - acc = new Vector3D(0,0.05,0); - vel = new Vector3D(random(-1,1),random(-2,0),0); - loc = l.copy(); - r = 10.0; - timer = 100.0; - } - - - void run() { - update(); - render(); - } - - // Method to update location - void update() { - vel.add(acc); - loc.add(vel); - timer -= 1.0; - } - - // Method to display - void render() { - ellipseMode(CENTER); - stroke(255,timer); - fill(100,timer); - ellipse(loc.x,loc.y,r,r); - } - - // Is the particle still useful? - boolean dead() { - if (timer <= 0.0) { - return true; - } else { - return false; - } - } -} diff --git a/java/examples/Topics/Simulate/MultipleParticleSystems/applet/ParticleSystem.pde b/java/examples/Topics/Simulate/MultipleParticleSystems/applet/ParticleSystem.pde deleted file mode 100644 index f4615c81c..000000000 --- a/java/examples/Topics/Simulate/MultipleParticleSystems/applet/ParticleSystem.pde +++ /dev/null @@ -1,51 +0,0 @@ -// An ArrayList is used to manage the list of Particles - -class ParticleSystem { - - ArrayList particles; // An arraylist for all the particles - Vector3D origin; // An origin point for where particles are birthed - - ParticleSystem(int num, Vector3D v) { - particles = new ArrayList(); // Initialize the arraylist - origin = v.copy(); // Store the origin point - for (int i = 0; i < num; i++) { - // We have a 50% chance of adding each kind of particle - if (random(1) < 0.5) { - particles.add(new CrazyParticle(origin)); - } else { - particles.add(new Particle(origin)); - } - } - } - - void run() { - // Cycle through the ArrayList backwards b/c we are deleting - for (int i = particles.size()-1; i >= 0; i--) { - Particle p = (Particle) particles.get(i); - p.run(); - if (p.dead()) { - particles.remove(i); - } - } - } - - void addParticle() { - particles.add(new Particle(origin)); - } - - void addParticle(Particle p) { - particles.add(p); - } - - // A method to test if the particle system still has particles - boolean dead() { - if (particles.isEmpty()) { - return true; - } - else { - return false; - } - } - -} - diff --git a/java/examples/Topics/Simulate/MultipleParticleSystems/applet/loading.gif b/java/examples/Topics/Simulate/MultipleParticleSystems/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Simulate/SimpleParticleSystem/applet/Particle.pde b/java/examples/Topics/Simulate/SimpleParticleSystem/applet/Particle.pde deleted file mode 100644 index baba584c8..000000000 --- a/java/examples/Topics/Simulate/SimpleParticleSystem/applet/Particle.pde +++ /dev/null @@ -1,49 +0,0 @@ -// A simple Particle class - -class Particle { - Vector3D loc; - Vector3D vel; - Vector3D acc; - float r; - float timer; - - // Another constructor (the one we are using here) - Particle(Vector3D l) { - acc = new Vector3D(0,0.05,0); - vel = new Vector3D(random(-1,1),random(-2,0),0); - loc = l.copy(); - r = 10.0; - timer = 100.0; - } - - void run() { - update(); - render(); - } - - // Method to update location - void update() { - vel.add(acc); - loc.add(vel); - timer -= 1.0; - } - - // Method to display - void render() { - ellipseMode(CENTER); - stroke(255,timer); - fill(100,timer); - ellipse(loc.x,loc.y,r,r); - vel.display(loc.x,loc.y,10); - } - - // Is the particle still useful? - boolean dead() { - if (timer <= 0.0) { - return true; - } else { - return false; - } - } -} - diff --git a/java/examples/Topics/Simulate/SimpleParticleSystem/applet/ParticleSystem.pde b/java/examples/Topics/Simulate/SimpleParticleSystem/applet/ParticleSystem.pde deleted file mode 100644 index 29250c55d..000000000 --- a/java/examples/Topics/Simulate/SimpleParticleSystem/applet/ParticleSystem.pde +++ /dev/null @@ -1,50 +0,0 @@ -// A class to describe a group of Particles -// An ArrayList is used to manage the list of Particles - -class ParticleSystem { - - ArrayList particles; // An arraylist for all the particles - Vector3D origin; // An origin point for where particles are born - - ParticleSystem(int num, Vector3D v) { - particles = new ArrayList(); // Initialize the arraylist - origin = v.copy(); // Store the origin point - for (int i = 0; i < num; i++) { - particles.add(new Particle(origin)); // Add "num" amount of particles to the arraylist - } - } - - void run() { - // Cycle through the ArrayList backwards b/c we are deleting - for (int i = particles.size()-1; i >= 0; i--) { - Particle p = (Particle) particles.get(i); - p.run(); - if (p.dead()) { - particles.remove(i); - } - } - } - - void addParticle() { - particles.add(new Particle(origin)); - } - - void addParticle(float x, float y) { - particles.add(new Particle(new Vector3D(x,y))); - } - - void addParticle(Particle p) { - particles.add(p); - } - - // A method to test if the particle system still has particles - boolean dead() { - if (particles.isEmpty()) { - return true; - } else { - return false; - } - } - -} - diff --git a/java/examples/Topics/Simulate/SimpleParticleSystem/applet/SimpleParticleSystem.java b/java/examples/Topics/Simulate/SimpleParticleSystem/applet/SimpleParticleSystem.java deleted file mode 100644 index f1524a730..000000000 --- a/java/examples/Topics/Simulate/SimpleParticleSystem/applet/SimpleParticleSystem.java +++ /dev/null @@ -1,308 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class SimpleParticleSystem extends PApplet { - -/** - * Simple Particle System - * by Daniel Shiffman. - * - * Particles are generated each cycle through draw(), - * fall with gravity and fade out over time - * A ParticleSystem object manages a variable size (ArrayList) - * list of particles. - */ - -ParticleSystem ps; - -public void setup() { - size(640, 360); - colorMode(RGB, 255, 255, 255, 100); - ps = new ParticleSystem(1,new Vector3D(width/2,height/2,0)); - smooth(); -} - -public void draw() { - background(0); - ps.run(); - ps.addParticle(mouseX,mouseY); -} - - - -// A simple Particle class - -class Particle { - Vector3D loc; - Vector3D vel; - Vector3D acc; - float r; - float timer; - - // Another constructor (the one we are using here) - Particle(Vector3D l) { - acc = new Vector3D(0,0.05f,0); - vel = new Vector3D(random(-1,1),random(-2,0),0); - loc = l.copy(); - r = 10.0f; - timer = 100.0f; - } - - public void run() { - update(); - render(); - } - - // Method to update location - public void update() { - vel.add(acc); - loc.add(vel); - timer -= 1.0f; - } - - // Method to display - public void render() { - ellipseMode(CENTER); - stroke(255,timer); - fill(100,timer); - ellipse(loc.x,loc.y,r,r); - vel.display(loc.x,loc.y,10); - } - - // Is the particle still useful? - public boolean dead() { - if (timer <= 0.0f) { - return true; - } else { - return false; - } - } -} - -// A class to describe a group of Particles -// An ArrayList is used to manage the list of Particles - -class ParticleSystem { - - ArrayList particles; // An arraylist for all the particles - Vector3D origin; // An origin point for where particles are born - - ParticleSystem(int num, Vector3D v) { - particles = new ArrayList(); // Initialize the arraylist - origin = v.copy(); // Store the origin point - for (int i = 0; i < num; i++) { - particles.add(new Particle(origin)); // Add "num" amount of particles to the arraylist - } - } - - public void run() { - // Cycle through the ArrayList backwards b/c we are deleting - for (int i = particles.size()-1; i >= 0; i--) { - Particle p = (Particle) particles.get(i); - p.run(); - if (p.dead()) { - particles.remove(i); - } - } - } - - public void addParticle() { - particles.add(new Particle(origin)); - } - - public void addParticle(float x, float y) { - particles.add(new Particle(new Vector3D(x,y))); - } - - public void addParticle(Particle p) { - particles.add(p); - } - - // A method to test if the particle system still has particles - public boolean dead() { - if (particles.isEmpty()) { - return true; - } else { - return false; - } - } - -} - -// Simple Vector class - -class Vector3D { - float x; - float y; - float z; - - Vector3D(float x_, float y_, float z_) { - x = x_; - y = y_; - z = z_; - } - - Vector3D(float x_, float y_) { - x = x_; - y = y_; - z = 0f; - } - - Vector3D() { - x = 0f; - y = 0f; - z = 0f; - } - - public void setX(float x_) { - x = x_; - } - - public void setY(float y_) { - y = y_; - } - - public void setZ(float z_) { - z = z_; - } - - public void setXY(float x_, float y_) { - x = x_; - y = y_; - } - - public void setXYZ(float x_, float y_, float z_) { - x = x_; - y = y_; - z = z_; - } - - public void setXYZ(Vector3D v) { - x = v.x; - y = v.y; - z = v.z; - } - public float magnitude() { - return (float) Math.sqrt(x*x + y*y + z*z); - } - - public Vector3D copy() { - return new Vector3D(x,y,z); - } - - public Vector3D copy(Vector3D v) { - return new Vector3D(v.x, v.y,v.z); - } - - public void add(Vector3D v) { - x += v.x; - y += v.y; - z += v.z; - } - - public void sub(Vector3D v) { - x -= v.x; - y -= v.y; - z -= v.z; - } - - public void mult(float n) { - x *= n; - y *= n; - z *= n; - } - - public void div(float n) { - x /= n; - y /= n; - z /= n; - } - - /* float dot(Vector3D v) { - //implement DOT product - }*/ - - /* Vector3D cross(Vector3D v) { - //implement CROSS product - }*/ - - public void normalize() { - float m = magnitude(); - if (m > 0) { - div(m); - } - } - - public void limit(float max) { - if (magnitude() > max) { - normalize(); - mult(max); - } - } - - public float heading2D() { - float angle = (float) Math.atan2(-y, x); - return -1*angle; - } - - public Vector3D add(Vector3D v1, Vector3D v2) { - Vector3D v = new Vector3D(v1.x + v2.x,v1.y + v2.y, v1.z + v2.z); - return v; - } - - public Vector3D sub(Vector3D v1, Vector3D v2) { - Vector3D v = new Vector3D(v1.x - v2.x,v1.y - v2.y,v1.z - v2.z); - return v; - } - - public Vector3D div(Vector3D v1, float n) { - Vector3D v = new Vector3D(v1.x/n,v1.y/n,v1.z/n); - return v; - } - - public Vector3D mult(Vector3D v1, float n) { - Vector3D v = new Vector3D(v1.x*n,v1.y*n,v1.z*n); - return v; - } - - public float distance (Vector3D v1, Vector3D v2) { - float dx = v1.x - v2.x; - float dy = v1.y - v2.y; - float dz = v1.z - v2.z; - return (float) Math.sqrt(dx*dx + dy*dy + dz*dz); - } - - public void display(float x, float y, float scayl) { - pushMatrix(); - float arrowsize = 4; - // Translate to location to render vector - translate(x,y); - // stroke(255); - // Call vector heading function to get direction (note that pointing up is a heading of 0) and rotate - rotate(heading2D()); - // Calculate length of vector & scale it to be bigger or smaller if necessary - float len = magnitude()*scayl; - // Draw three lines to make an arrow (draw pointing up since we've rotate to the proper direction) - line(0,0,len,0); - line(len,0,len-arrowsize,+arrowsize/2); - line(len,0,len-arrowsize,-arrowsize/2); - popMatrix(); - } - -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "SimpleParticleSystem" }); - } -} diff --git a/java/examples/Topics/Simulate/SimpleParticleSystem/applet/SimpleParticleSystem.pde b/java/examples/Topics/Simulate/SimpleParticleSystem/applet/SimpleParticleSystem.pde deleted file mode 100644 index 148b53c0c..000000000 --- a/java/examples/Topics/Simulate/SimpleParticleSystem/applet/SimpleParticleSystem.pde +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Simple Particle System - * by Daniel Shiffman. - * - * Particles are generated each cycle through draw(), - * fall with gravity and fade out over time - * A ParticleSystem object manages a variable size (ArrayList) - * list of particles. - */ - -ParticleSystem ps; - -void setup() { - size(640, 360); - colorMode(RGB, 255, 255, 255, 100); - ps = new ParticleSystem(1,new Vector3D(width/2,height/2,0)); - smooth(); -} - -void draw() { - background(0); - ps.run(); - ps.addParticle(mouseX,mouseY); -} - - - diff --git a/java/examples/Topics/Simulate/SimpleParticleSystem/applet/loading.gif b/java/examples/Topics/Simulate/SimpleParticleSystem/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Simulate/Smoke/applet/Smoke.java b/java/examples/Topics/Simulate/Smoke/applet/Smoke.java deleted file mode 100644 index 80bc64ba4..000000000 --- a/java/examples/Topics/Simulate/Smoke/applet/Smoke.java +++ /dev/null @@ -1,284 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Smoke extends PApplet { - -/** - * Smoke - * by Glen Murphy. - * - * Drag the mouse across the image to move the particles. - * Code has not been optimised and will run fairly slowly. - */ - -int res = 2; -int penSize = 30; -int lwidth; -int lheight; -int pnum = 30000; -vsquare[][] v; -vbuffer[][] vbuf; -particle[] p; -int pcount = 0; -int mouseXvel = 0; -int mouseYvel = 0; - -int randomGust = 0; -int randomGustMax; -float randomGustX; -float randomGustY; -float randomGustSize; -float randomGustXvel; -float randomGustYvel; - -public void setup() -{ - size(200, 200); - lwidth = width/res; - lheight = height/res; - v = new vsquare[lwidth+1][lheight+1]; - vbuf = new vbuffer[lwidth+1][lheight+1]; - p = new particle[pnum]; - noStroke(); - for(int i = 0; i < pnum; i++) { - p[i] = new particle(random(width/2-20,width/2+20),random(height-20,height)); - } - for(int i = 0; i <= lwidth; i++) { - for(int u = 0; u <= lheight; u++) { - v[i][u] = new vsquare(i*res,u*res); - vbuf[i][u] = new vbuffer(i*res,u*res); - } - } -} - -public void draw() -{ - background(0xffcccccc); - - int axvel = mouseX-pmouseX; - int ayvel = mouseY-pmouseY; - - mouseXvel = (axvel != mouseXvel) ? axvel : 0; - mouseYvel = (ayvel != mouseYvel) ? ayvel : 0; - - if(randomGust <= 0) { - if(random(0,10)<1) { - randomGustMax = (int)random(5,12); - randomGust = randomGustMax; - randomGustX = random(0,width); - randomGustY = random(0,height-10); - randomGustSize = random(0,50); - if(randomGustX > width/2) { - randomGustXvel = random(-8,0); - } else { - randomGustXvel = random(0,8); - } - randomGustYvel = random(-2,1); - } - randomGust--; - } - - for(int i = 0; i < lwidth; i++) { - for(int u = 0; u < lheight; u++) { - vbuf[i][u].updatebuf(i,u); - v[i][u].col = 0; - } - } - for(int i = 0; i < pnum-1; i++) { - p[i].updatepos(); - } - for(int i = 0; i < lwidth; i++) { - for(int u = 0; u < lheight; u++) { - v[i][u].addbuffer(i, u); - v[i][u].updatevels(mouseXvel, mouseYvel); - v[i][u].display(i, u); - } - } - randomGust = 0; -} - -class particle -{ - float x; - float y; - float xvel; - float yvel; - float temp; - int pos; - - particle(float xIn, float yIn) { - x = xIn; - y = yIn; - } - - public void reposition() { - x = width/2+random(-20,20); - y = random(height-10,height); - - xvel = random(-1,1); - yvel = random(-1,1); - } - - public void updatepos() { - int vi = (int)(x/res); - int vu = (int)(y/res); - - if(vi > 0 && vi < lwidth && vu > 0 && vu < lheight) { - v[vi][vu].addcolour(2); - - float ax = (x%res)/res; - float ay = (y%res)/res; - - xvel += (1-ax)*v[vi][vu].xvel*0.05f; - yvel += (1-ay)*v[vi][vu].yvel*0.05f; - - xvel += ax*v[vi+1][vu].xvel*0.05f; - yvel += ax*v[vi+1][vu].yvel*0.05f; - - xvel += ay*v[vi][vu+1].xvel*0.05f; - yvel += ay*v[vi][vu+1].yvel*0.05f; - - v[vi][vu].yvel -= (1-ay)*0.003f; - v[vi+1][vu].yvel -= ax*0.003f; - - if(v[vi][vu].yvel < 0) v[vi][vu].yvel *= 1.00025f; - - x += xvel; - y += yvel; - } - else { - reposition(); - } - if(random(0,400) < 1) { - reposition(); - } - xvel *= 0.6f; - yvel *= 0.6f; - } -} - -class vbuffer -{ - int x; - int y; - float xvel; - float yvel; - float pressurex = 0; - float pressurey = 0; - float pressure = 0; - - vbuffer(int xIn,int yIn) { - x = xIn; - y = yIn; - pressurex = 0; - pressurey = 0; - } - - public void updatebuf(int i, int u) { - if(i>0 && i0 && u0 && i0 && u 0) { - adj = x - randomGustX; - opp = y - randomGustY; - dist = sqrt(opp*opp + adj*adj); - if(dist < randomGustSize) { - if(dist < res*2) dist = randomGustSize; - mod = randomGustSize/dist; - xvel += (randomGustMax-randomGust)*randomGustXvel*mod; - yvel += (randomGustMax-randomGust)*randomGustYvel*mod; - } - } - xvel *= 0.99f; - yvel *= 0.98f; - } - - public void addcolour(int amt) { - col += amt; - if(col > 196) col = 196; - } - - public void display(int i, int u) { - float tcol = 0; - if(i>0 && i0 && u width/2) { - randomGustXvel = random(-8,0); - } else { - randomGustXvel = random(0,8); - } - randomGustYvel = random(-2,1); - } - randomGust--; - } - - for(int i = 0; i < lwidth; i++) { - for(int u = 0; u < lheight; u++) { - vbuf[i][u].updatebuf(i,u); - v[i][u].col = 0; - } - } - for(int i = 0; i < pnum-1; i++) { - p[i].updatepos(); - } - for(int i = 0; i < lwidth; i++) { - for(int u = 0; u < lheight; u++) { - v[i][u].addbuffer(i, u); - v[i][u].updatevels(mouseXvel, mouseYvel); - v[i][u].display(i, u); - } - } - randomGust = 0; -} - -class particle -{ - float x; - float y; - float xvel; - float yvel; - float temp; - int pos; - - particle(float xIn, float yIn) { - x = xIn; - y = yIn; - } - - void reposition() { - x = width/2+random(-20,20); - y = random(height-10,height); - - xvel = random(-1,1); - yvel = random(-1,1); - } - - void updatepos() { - int vi = (int)(x/res); - int vu = (int)(y/res); - - if(vi > 0 && vi < lwidth && vu > 0 && vu < lheight) { - v[vi][vu].addcolour(2); - - float ax = (x%res)/res; - float ay = (y%res)/res; - - xvel += (1-ax)*v[vi][vu].xvel*0.05; - yvel += (1-ay)*v[vi][vu].yvel*0.05; - - xvel += ax*v[vi+1][vu].xvel*0.05; - yvel += ax*v[vi+1][vu].yvel*0.05; - - xvel += ay*v[vi][vu+1].xvel*0.05; - yvel += ay*v[vi][vu+1].yvel*0.05; - - v[vi][vu].yvel -= (1-ay)*0.003; - v[vi+1][vu].yvel -= ax*0.003; - - if(v[vi][vu].yvel < 0) v[vi][vu].yvel *= 1.00025; - - x += xvel; - y += yvel; - } - else { - reposition(); - } - if(random(0,400) < 1) { - reposition(); - } - xvel *= 0.6; - yvel *= 0.6; - } -} - -class vbuffer -{ - int x; - int y; - float xvel; - float yvel; - float pressurex = 0; - float pressurey = 0; - float pressure = 0; - - vbuffer(int xIn,int yIn) { - x = xIn; - y = yIn; - pressurex = 0; - pressurey = 0; - } - - void updatebuf(int i, int u) { - if(i>0 && i0 && u0 && i0 && u 0) { - adj = x - randomGustX; - opp = y - randomGustY; - dist = sqrt(opp*opp + adj*adj); - if(dist < randomGustSize) { - if(dist < res*2) dist = randomGustSize; - mod = randomGustSize/dist; - xvel += (randomGustMax-randomGust)*randomGustXvel*mod; - yvel += (randomGustMax-randomGust)*randomGustYvel*mod; - } - } - xvel *= 0.99; - yvel *= 0.98; - } - - void addcolour(int amt) { - col += amt; - if(col > 196) col = 196; - } - - void display(int i, int u) { - float tcol = 0; - if(i>0 && i0 && u}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Simulate/SmokeParticleSystem/applet/Particle.pde b/java/examples/Topics/Simulate/SmokeParticleSystem/applet/Particle.pde deleted file mode 100644 index 0b6b5939a..000000000 --- a/java/examples/Topics/Simulate/SmokeParticleSystem/applet/Particle.pde +++ /dev/null @@ -1,69 +0,0 @@ - -// A simple Particle class, renders the particle as an image - -class Particle { - Vector3D loc; - Vector3D vel; - Vector3D acc; - float timer; - PImage img; - - // One constructor - Particle(Vector3D a, Vector3D v, Vector3D l, PImage img_) { - acc = a.copy(); - vel = v.copy(); - loc = l.copy(); - timer = 100.0; - img = img_; - } - - // Another constructor (the one we are using here) - Particle(Vector3D l,PImage img_) { - acc = new Vector3D(0.0,0.0,0.0); - float x = (float) generator.nextGaussian()*0.3f; - float y = (float) generator.nextGaussian()*0.3f - 1.0f; - vel = new Vector3D(x,y,0); - loc = l.copy(); - timer = 100.0; - img = img_; - } - - void run() { - update(); - render(); - } - - // Method to apply a force vector to the Particle object - // Note we are ignoring "mass" here - void add_force(Vector3D f) { - acc.add(f); - } - - // Method to update location - void update() { - vel.add(acc); - loc.add(vel); - timer -= 2.5; - acc.setXY(0,0); - } - - // Method to display - void render() { - imageMode(CORNER); - tint(255,timer); - image(img,loc.x-img.width/2,loc.y-img.height/2); - } - - // Is the particle still useful? - boolean dead() { - if (timer <= 0.0) { - return true; - } else { - return false; - } - } -} - - - - diff --git a/java/examples/Topics/Simulate/SmokeParticleSystem/applet/ParticleSystem.pde b/java/examples/Topics/Simulate/SmokeParticleSystem/applet/ParticleSystem.pde deleted file mode 100644 index 098c1125f..000000000 --- a/java/examples/Topics/Simulate/SmokeParticleSystem/applet/ParticleSystem.pde +++ /dev/null @@ -1,57 +0,0 @@ -// A class to describe a group of Particles -// An ArrayList is used to manage the list of Particles - -class ParticleSystem { - - ArrayList particles; // An arraylist for all the particles - Vector3D origin; // An origin point for where particles are birthed - PImage img; - - ParticleSystem(int num, Vector3D v, PImage img_) { - particles = new ArrayList(); // Initialize the arraylist - origin = v.copy(); // Store the origin point - img = img_; - for (int i = 0; i < num; i++) { - particles.add(new Particle(origin, img)); // Add "num" amount of particles to the arraylist - } - } - - void run() { - // Cycle through the ArrayList backwards b/c we are deleting - for (int i = particles.size()-1; i >= 0; i--) { - Particle p = (Particle) particles.get(i); - p.run(); - if (p.dead()) { - particles.remove(i); - } - } - } - - // Method to add a force vector to all particles currently in the system - void add_force(Vector3D dir) { - for (int i = particles.size()-1; i >= 0; i--) { - Particle p = (Particle) particles.get(i); - p.add_force(dir); - } - - } - - void addParticle() { - particles.add(new Particle(origin,img)); - } - - void addParticle(Particle p) { - particles.add(p); - } - - // A method to test if the particle system still has particles - boolean dead() { - if (particles.isEmpty()) { - return true; - } else { - return false; - } - } - -} - diff --git a/java/examples/Topics/Simulate/SmokeParticleSystem/applet/SmokeParticleSystem.java b/java/examples/Topics/Simulate/SmokeParticleSystem/applet/SmokeParticleSystem.java deleted file mode 100644 index b53b27fc2..000000000 --- a/java/examples/Topics/Simulate/SmokeParticleSystem/applet/SmokeParticleSystem.java +++ /dev/null @@ -1,360 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class SmokeParticleSystem extends PApplet { - -/** - * Smoke Particle System - * by Daniel Shiffman. - * - * A basic smoke effect using a particle system. - * Each particle is rendered as an alpha masked image. - */ - -ParticleSystem ps; -Random generator; - -public void setup() { - - size(640, 200); - colorMode(RGB, 255, 255, 255, 100); - - // Using a Java random number generator for Gaussian random numbers - generator = new Random(); - - // Create an alpha masked image to be applied as the particle's texture - PImage msk = loadImage("texture.gif"); - PImage img = new PImage(msk.width,msk.height); - for (int i = 0; i < img.pixels.length; i++) img.pixels[i] = color(255); - img.mask(msk); - ps = new ParticleSystem(0,new Vector3D(width/2,height-20),img); - - smooth(); -} - -public void draw() { - background(75); - - // Calculate a "wind" force based on mouse horizontal position - float dx = (mouseX - width/2) / 1000.0f; - Vector3D wind = new Vector3D(dx,0,0); - wind.display(width/2,50,500); - ps.add_force(wind); - ps.run(); - for (int i = 0; i < 2; i++) { - ps.addParticle(); - } -} - - - - - - - - - - - -// A simple Particle class, renders the particle as an image - -class Particle { - Vector3D loc; - Vector3D vel; - Vector3D acc; - float timer; - PImage img; - - // One constructor - Particle(Vector3D a, Vector3D v, Vector3D l, PImage img_) { - acc = a.copy(); - vel = v.copy(); - loc = l.copy(); - timer = 100.0f; - img = img_; - } - - // Another constructor (the one we are using here) - Particle(Vector3D l,PImage img_) { - acc = new Vector3D(0.0f,0.0f,0.0f); - float x = (float) generator.nextGaussian()*0.3f; - float y = (float) generator.nextGaussian()*0.3f - 1.0f; - vel = new Vector3D(x,y,0); - loc = l.copy(); - timer = 100.0f; - img = img_; - } - - public void run() { - update(); - render(); - } - - // Method to apply a force vector to the Particle object - // Note we are ignoring "mass" here - public void add_force(Vector3D f) { - acc.add(f); - } - - // Method to update location - public void update() { - vel.add(acc); - loc.add(vel); - timer -= 2.5f; - acc.setXY(0,0); - } - - // Method to display - public void render() { - imageMode(CORNER); - tint(255,timer); - image(img,loc.x-img.width/2,loc.y-img.height/2); - } - - // Is the particle still useful? - public boolean dead() { - if (timer <= 0.0f) { - return true; - } else { - return false; - } - } -} - - - - -// A class to describe a group of Particles -// An ArrayList is used to manage the list of Particles - -class ParticleSystem { - - ArrayList particles; // An arraylist for all the particles - Vector3D origin; // An origin point for where particles are birthed - PImage img; - - ParticleSystem(int num, Vector3D v, PImage img_) { - particles = new ArrayList(); // Initialize the arraylist - origin = v.copy(); // Store the origin point - img = img_; - for (int i = 0; i < num; i++) { - particles.add(new Particle(origin, img)); // Add "num" amount of particles to the arraylist - } - } - - public void run() { - // Cycle through the ArrayList backwards b/c we are deleting - for (int i = particles.size()-1; i >= 0; i--) { - Particle p = (Particle) particles.get(i); - p.run(); - if (p.dead()) { - particles.remove(i); - } - } - } - - // Method to add a force vector to all particles currently in the system - public void add_force(Vector3D dir) { - for (int i = particles.size()-1; i >= 0; i--) { - Particle p = (Particle) particles.get(i); - p.add_force(dir); - } - - } - - public void addParticle() { - particles.add(new Particle(origin,img)); - } - - public void addParticle(Particle p) { - particles.add(p); - } - - // A method to test if the particle system still has particles - public boolean dead() { - if (particles.isEmpty()) { - return true; - } else { - return false; - } - } - -} - -// Simple Vector class - -class Vector3D { - float x; - float y; - float z; - - Vector3D(float x_, float y_, float z_) { - x = x_; - y = y_; - z = z_; - } - - Vector3D(float x_, float y_) { - x = x_; - y = y_; - z = 0f; - } - - Vector3D() { - x = 0f; - y = 0f; - z = 0f; - } - - public void setX(float x_) { - x = x_; - } - - public void setY(float y_) { - y = y_; - } - - public void setZ(float z_) { - z = z_; - } - - public void setXY(float x_, float y_) { - x = x_; - y = y_; - } - - public void setXYZ(float x_, float y_, float z_) { - x = x_; - y = y_; - z = z_; - } - - public void setXYZ(Vector3D v) { - x = v.x; - y = v.y; - z = v.z; - } - public float magnitude() { - return (float) Math.sqrt(x*x + y*y + z*z); - } - - public Vector3D copy() { - return new Vector3D(x,y,z); - } - - public Vector3D copy(Vector3D v) { - return new Vector3D(v.x, v.y,v.z); - } - - public void add(Vector3D v) { - x += v.x; - y += v.y; - z += v.z; - } - - public void sub(Vector3D v) { - x -= v.x; - y -= v.y; - z -= v.z; - } - - public void mult(float n) { - x *= n; - y *= n; - z *= n; - } - - public void div(float n) { - x /= n; - y /= n; - z /= n; - } - - /* float dot(Vector3D v) { - //implement DOT product - }*/ - - /* Vector3D cross(Vector3D v) { - //implement CROSS product - }*/ - - public void normalize() { - float m = magnitude(); - if (m > 0) { - div(m); - } - } - - public void limit(float max) { - if (magnitude() > max) { - normalize(); - mult(max); - } - } - - public float heading2D() { - float angle = (float) Math.atan2(-y, x); - return -1*angle; - } - - public Vector3D add(Vector3D v1, Vector3D v2) { - Vector3D v = new Vector3D(v1.x + v2.x,v1.y + v2.y, v1.z + v2.z); - return v; - } - - public Vector3D sub(Vector3D v1, Vector3D v2) { - Vector3D v = new Vector3D(v1.x - v2.x,v1.y - v2.y,v1.z - v2.z); - return v; - } - - public Vector3D div(Vector3D v1, float n) { - Vector3D v = new Vector3D(v1.x/n,v1.y/n,v1.z/n); - return v; - } - - public Vector3D mult(Vector3D v1, float n) { - Vector3D v = new Vector3D(v1.x*n,v1.y*n,v1.z*n); - return v; - } - - public float distance (Vector3D v1, Vector3D v2) { - float dx = v1.x - v2.x; - float dy = v1.y - v2.y; - float dz = v1.z - v2.z; - return (float) Math.sqrt(dx*dx + dy*dy + dz*dz); - } - - public void display(float x, float y, float scayl) { - pushMatrix(); - float arrowsize = 4; - // Translate to location to render vector - translate(x,y); - stroke(255); - // Call vector heading function to get direction (note that pointing up is a heading of 0) and rotate - rotate(heading2D()); - // Calculate length of vector & scale it to be bigger or smaller if necessary - float len = magnitude()*scayl; - // Draw three lines to make an arrow (draw pointing up since we've rotate to the proper direction) - line(0,0,len,0); - line(len,0,len-arrowsize,+arrowsize/2); - line(len,0,len-arrowsize,-arrowsize/2); - popMatrix(); - } - -} - - - static public void main(String args[]) { - PApplet.main(new String[] { "SmokeParticleSystem" }); - } -} diff --git a/java/examples/Topics/Simulate/SmokeParticleSystem/applet/SmokeParticleSystem.pde b/java/examples/Topics/Simulate/SmokeParticleSystem/applet/SmokeParticleSystem.pde deleted file mode 100644 index 4a30fc970..000000000 --- a/java/examples/Topics/Simulate/SmokeParticleSystem/applet/SmokeParticleSystem.pde +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Smoke Particle System - * by Daniel Shiffman. - * - * A basic smoke effect using a particle system. - * Each particle is rendered as an alpha masked image. - */ - -ParticleSystem ps; -Random generator; - -void setup() { - - size(640, 200); - colorMode(RGB, 255, 255, 255, 100); - - // Using a Java random number generator for Gaussian random numbers - generator = new Random(); - - // Create an alpha masked image to be applied as the particle's texture - PImage msk = loadImage("texture.gif"); - PImage img = new PImage(msk.width,msk.height); - for (int i = 0; i < img.pixels.length; i++) img.pixels[i] = color(255); - img.mask(msk); - ps = new ParticleSystem(0,new Vector3D(width/2,height-20),img); - - smooth(); -} - -void draw() { - background(75); - - // Calculate a "wind" force based on mouse horizontal position - float dx = (mouseX - width/2) / 1000.0; - Vector3D wind = new Vector3D(dx,0,0); - wind.display(width/2,50,500); - ps.add_force(wind); - ps.run(); - for (int i = 0; i < 2; i++) { - ps.addParticle(); - } -} - - - - - - - - - - diff --git a/java/examples/Topics/Simulate/SmokeParticleSystem/applet/loading.gif b/java/examples/Topics/Simulate/SmokeParticleSystem/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgX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ody.java deleted file mode 100644 index de3f7e74f..000000000 --- a/java/examples/Topics/Simulate/SoftBody/applet/SoftBody.java +++ /dev/null @@ -1,119 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class SoftBody extends PApplet { - -/** - * Soft Body - * by Ira Greenberg. - * - * Softbody dynamics simulation using curveVertex() and curveTightness(). - */ - -// center point -float centerX = 0, centerY = 0; - -float radius = 45, rotAngle = -90; -float accelX, accelY; -float springing = .0009f, damping = .98f; - -//corner nodes -int nodes = 5; -float nodeStartX[] = new float[nodes]; -float nodeStartY[] = new float[nodes]; -float[]nodeX = new float[nodes]; -float[]nodeY = new float[nodes]; -float[]angle = new float[nodes]; -float[]frequency = new float[nodes]; - -// soft-body dynamics -float organicConstant = 1; - -public void setup() { - size(640, 360); - //center shape in window - centerX = width/2; - centerY = height/2; - // iniitalize frequencies for corner nodes - for (int i=0; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&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?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Simulate/Spring/applet/Spring.java b/java/examples/Topics/Simulate/Spring/applet/Spring.java deleted file mode 100644 index 2eae8b3fa..000000000 --- a/java/examples/Topics/Simulate/Spring/applet/Spring.java +++ /dev/null @@ -1,117 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Spring extends PApplet { - -/** - * Spring. - * - * Click, drag, and release the horizontal bar to start the spring. - */ - -// Spring drawing constants for top bar -int s_height = 16; // Height -int left = 50; // Left position -int right = 150; // Right position -int max = 100; // Maximum Y value -int min = 20; // Minimum Y value -boolean over = false; // If mouse over -boolean move = false; // If mouse down and over - -// Spring simulation constants -float M = 0.8f; // Mass -float K = 0.2f; // Spring constant -float D = 0.92f; // Damping -float R = 60; // Rest position - -// Spring simulation variables -float ps = 60.0f; // Position -float vs = 0.0f; // Velocity -float as = 0; // Acceleration -float f = 0; // Force - - -public void setup() -{ - size(200, 200); - rectMode(CORNERS); - noStroke(); -} - -public void draw() -{ - background(102); - updateSpring(); - drawSpring(); -} - -public void drawSpring() -{ - // Draw base - fill(0.2f); - float b_width = 0.5f * ps + -8; - rect(width/2 - b_width, ps + s_height, width/2 + b_width, 150); - - // Set color and draw top bar - if(over || move) { - fill(255); - } else { - fill(204); - } - rect(left, ps, right, ps + s_height); -} - - -public void updateSpring() -{ - // Update the spring position - if(!move) { - f = -K * (ps - R); // f=-ky - as = f / M; // Set the acceleration, f=ma == a=f/m - vs = D * (vs + as); // Set the velocity - ps = ps + vs; // Updated position - } - if(abs(vs) < 0.1f) { - vs = 0.0f; - } - - // Test if mouse is over the top bar - if(mouseX > left && mouseX < right && mouseY > ps && mouseY < ps + s_height) { - over = true; - } else { - over = false; - } - - // Set and constrain the position of top bar - if(move) { - ps = mouseY - s_height/2; - if (ps < min) { ps = min; } - if (ps > max) { ps = max; } - } -} - -public void mousePressed() { - if(over) { - move = true; - } -} - -public void mouseReleased() -{ - move = false; -} - - static public void main(String args[]) { - PApplet.main(new String[] { "Spring" }); - } -} diff --git a/java/examples/Topics/Simulate/Spring/applet/Spring.pde b/java/examples/Topics/Simulate/Spring/applet/Spring.pde deleted file mode 100644 index e36286bd9..000000000 --- a/java/examples/Topics/Simulate/Spring/applet/Spring.pde +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Spring. - * - * Click, drag, and release the horizontal bar to start the spring. - */ - -// Spring drawing constants for top bar -int s_height = 16; // Height -int left = 50; // Left position -int right = 150; // Right position -int max = 100; // Maximum Y value -int min = 20; // Minimum Y value -boolean over = false; // If mouse over -boolean move = false; // If mouse down and over - -// Spring simulation constants -float M = 0.8; // Mass -float K = 0.2; // Spring constant -float D = 0.92; // Damping -float R = 60; // Rest position - -// Spring simulation variables -float ps = 60.0; // Position -float vs = 0.0; // Velocity -float as = 0; // Acceleration -float f = 0; // Force - - -void setup() -{ - size(200, 200); - rectMode(CORNERS); - noStroke(); -} - -void draw() -{ - background(102); - updateSpring(); - drawSpring(); -} - -void drawSpring() -{ - // Draw base - fill(0.2); - float b_width = 0.5 * ps + -8; - rect(width/2 - b_width, ps + s_height, width/2 + b_width, 150); - - // Set color and draw top bar - if(over || move) { - fill(255); - } else { - fill(204); - } - rect(left, ps, right, ps + s_height); -} - - -void updateSpring() -{ - // Update the spring position - if(!move) { - f = -K * (ps - R); // f=-ky - as = f / M; // Set the acceleration, f=ma == a=f/m - vs = D * (vs + as); // Set the velocity - ps = ps + vs; // Updated position - } - if(abs(vs) < 0.1) { - vs = 0.0; - } - - // Test if mouse is over the top bar - if(mouseX > left && mouseX < right && mouseY > ps && mouseY < ps + s_height) { - over = true; - } else { - over = false; - } - - // Set and constrain the position of top bar - if(move) { - ps = mouseY - s_height/2; - if (ps < min) { ps = min; } - if (ps > max) { ps = max; } - } -} - -void mousePressed() { - if(over) { - move = true; - } -} - -void mouseReleased() -{ - move = false; -} diff --git a/java/examples/Topics/Simulate/Spring/applet/loading.gif b/java/examples/Topics/Simulate/Spring/applet/loading.gif deleted file mode 100644 index 1ddae5089f0dbca27d59c7d8b8ae0568a569dc58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6h{kq9J$3}O&A^*z!Z51TLvm;o7W)X_&F*(i#0?cwp(Ebh2sA_E#2l0XFY zCA7$vJN)$`NND*33Ug-?2x4T`tT_)mM)S&4tIU&#vz$R^P)C8aZB&!5+3oE$@K-8!dcJh@18FY|Axfv+1fUD>kdlZZGLCy+D$oraKef#Wp%1>*t*po^}$V~q`tYzi$1hs2j*gK^FWO~r@- zsLxO=Pspkxz_QIQIeRQqeF$eQfIRRk+>M|GOYky44hjbbpsFgXWGa~+*^6bR*|Zlt zP|PEuBV7As$6z0WshyDL3ImhAH*GMD=*ru z2^?}{3Ug>DX9~HBs1#5D1;`Hu^n0MoA{ZT&_znTi5ZwWaA&mj(O##6A;0r=1!sX%S z0x{E#2gu=o2n1k-1~>o!CLjR{1mK7=bO8-(s5C~6NMgn_hz}#+fYh*xGr4#`5?ioD zCW>Ndonne0as>$ggB?IE7AU}p0>P#&vY?Az6a`)$!9Esg1}_LOpa3?YfG86DK0LMW_BP|IyKm=|D6%1(7WSv=sAktxoNvfcd zmVCq1fap0`Fy#ORK$b!tVaQ?tPmq=j#|0`7fda6x8!}_S0e+Yera*!->T6L>a;Y>` z@(WQjlNvS@0K*8FD1&f;ixzR2$~(Z~GTSlHoH(q@Lp#V|FA4oM`iD(&Q^7v(7j14KZIZ=0SqwR6M+@C!@mU<$@~woGOMkX9b} z)CFO9rCT8XprHsO#5vR_2ot#z1@Ht1BGhyNh9(qa)?DZV7&fPHT63f<62M7MkkY^r z1T6?CKmZC5EV%uuUnYtG0Mw|-J`m!l2+-tCP0-U{KxL)EYydUS=n#x)>i`pgp(fcz z3=<)&08=eNRowzWMhGK_3=_Zr;#9g?;G%~U7=ZMwS)V~@;8%J}D+$)>7RY?UU_;g9 zIj%CNRfser3XmQlU|B$+noL*%by<5FQHR8J5N;i#Q`$7c*Z@pmV;h6v01DUu2{5by zf*k>2)5IQ1tTvq|>O(F5XxkyCHfNbs8~`@f0N7@>Y}H~UdZR!CCO||00Km8vec&k%oSM(t2w0u}(kYL805;hL-g6o{<| zv{ysMStC2*+zvK=RREKj?1Cgc*zycG%FE#Uf+_J%CGps=B+g#XM?^<936QBS!g?dEax^Q6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ diff --git a/java/examples/Topics/Simulate/Springs/applet/Springs.java b/java/examples/Topics/Simulate/Springs/applet/Springs.java deleted file mode 100644 index 6b96d128f..000000000 --- a/java/examples/Topics/Simulate/Springs/applet/Springs.java +++ /dev/null @@ -1,182 +0,0 @@ -import processing.core.*; - -import java.applet.*; -import java.awt.*; -import java.awt.image.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import java.util.zip.*; -import java.util.regex.*; - -public class Springs extends PApplet { - -/** - * Springs. - * - * Move the mouse over one of the circles and click to re-position. - * When you release the mouse, it will snap back into position. - * Each circle has a slightly different behavior. - */ - - -int num = 3; -Spring[] springs = new Spring[num]; - -public void setup() -{ - size(200, 200); - noStroke(); - smooth(); - springs[0] = new Spring( 70, 160, 20, 0.98f, 8.0f, 0.1f, springs, 0); - springs[1] = new Spring(150, 110, 60, 0.95f, 9.0f, 0.1f, springs, 1); - springs[2] = new Spring( 40, 70, 120, 0.90f, 9.9f, 0.1f, springs, 2); -} - -public void draw() -{ - background(51); - - for (int i = 0; i < num; i++) { - springs[i].update(); - springs[i].display(); - } -} - -public void mousePressed() -{ - for (int i = 0; i < num; i++) { - springs[i].pressed(); - } -} - -public void mouseReleased() -{ - for (int i=0; i}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4gSsZQppV z?|kq7z@TtQEEf=?KRo+cI;@FdcZSwj~zWSmv( z(*+E0uOVQX%2YZ7tgIcvuoXyG4;(~}3;>`+0gxg)iDFQIz$|rijuE@&>H&jEeJ~gh z@Bo^kzCZq6kRXCU0uKW$jF9jq@vp{@#pS7^Y?tO;mvde2!x^-XuEREr5Rlu4g?&q?7IhW48lba=fD`ba-ko9IiK}bPn|=9Cc(3-VP3*) zz1)%(k>En=)vcxXnq$vZa0ndHT~&+!0k=3KKsD5D_C9_4s`C^ zG1X;w2_S$2?ie&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zKcTD#jU6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