From 4f2985a30a2365a4bf7a6c573a768cf6f7900f6e Mon Sep 17 00:00:00 2001 From: benfry Date: Mon, 7 Mar 2011 00:13:51 +0000 Subject: [PATCH] adding basics folder to the android dist --- .../examples/Basics/Arrays/Array/Array.pde | 35 ++ .../Basics/Arrays/Array/applet/Array.java | 56 +++ .../Basics/Arrays/Array/applet/Array.pde | 35 ++ .../Basics/Arrays/Array/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Arrays/Array2D/Array2D.pde | 32 ++ .../Basics/Arrays/Array2D/applet/Array2D.java | 53 ++ .../Basics/Arrays/Array2D/applet/Array2D.pde | 32 ++ .../Basics/Arrays/Array2D/applet/loading.gif | Bin 0 -> 2232 bytes .../Arrays/ArrayObjects/ArrayObjects.pde | 39 ++ .../Basics/Arrays/ArrayObjects/Module.pde | 38 ++ .../ArrayObjects/applet/ArrayObjects.java | 94 ++++ .../ArrayObjects/applet/ArrayObjects.pde | 74 +++ .../Arrays/ArrayObjects/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Color/Brightness/Brightness.pde | 29 ++ .../Color/Brightness/applet/Brightness.java | 51 ++ .../Color/Brightness/applet/Brightness.pde | 31 ++ .../Color/Brightness/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Color/ColorWheel/ColorWheel.pde | 88 ++++ .../Color/ColorWheel/applet/ColorWheel.java | 99 ++++ .../Color/ColorWheel/applet/ColorWheel.pde | 79 +++ .../Color/ColorWheel/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Color/Creating/Creating.pde | 26 + .../Color/Creating/applet/Creating.java | 47 ++ .../Basics/Color/Creating/applet/Creating.pde | 26 + .../Basics/Color/Creating/applet/loading.gif | Bin 0 -> 2232 bytes android/examples/Basics/Color/Hue/Hue.pde | 31 ++ .../examples/Basics/Color/Hue/applet/Hue.java | 51 ++ .../examples/Basics/Color/Hue/applet/Hue.pde | 31 ++ .../Basics/Color/Hue/applet/loading.gif | Bin 0 -> 2232 bytes .../Color/LinearGradient/LinearGradient.pde | 73 +++ .../LinearGradient/applet/LinearGradient.java | 93 ++++ .../LinearGradient/applet/LinearGradient.pde | 73 +++ .../Color/LinearGradient/applet/loading.gif | Bin 0 -> 2232 bytes .../Color/RadialGradient/RadialGradient.pde | 58 +++ .../RadialGradient/applet/RadialGradient.java | 78 +++ .../RadialGradient/applet/RadialGradient.pde | 58 +++ .../Color/RadialGradient/applet/loading.gif | Bin 0 -> 2232 bytes .../Color/RadialGradient2/RadialGradient2.pde | 43 ++ .../examples/Basics/Color/Reading/Reading.pde | 46 ++ .../Basics/Color/Reading/applet/Reading.java | 63 +++ .../Basics/Color/Reading/applet/Reading.pde | 42 ++ .../Basics/Color/Reading/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Color/Relativity/Relativity.pde | 42 ++ .../Color/Relativity/applet/Relativity.java | 62 +++ .../Color/Relativity/applet/Relativity.pde | 42 ++ .../Color/Relativity/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Color/Saturation/Saturation.pde | 29 ++ .../Color/Saturation/applet/Saturation.java | 52 ++ .../Color/Saturation/applet/Saturation.pde | 32 ++ .../Color/Saturation/applet/loading.gif | Bin 0 -> 2232 bytes .../Color/WaveGradient/WaveGradient.pde | 39 ++ .../WaveGradient/applet/WaveGradient.java | 59 +++ .../WaveGradient/applet/WaveGradient.pde | 39 ++ .../Color/WaveGradient/applet/loading.gif | Bin 0 -> 2232 bytes .../Control/Conditionals1/Conditionals1.pde | 26 + .../Conditionals1/applet/Conditionals1.java | 47 ++ .../Conditionals1/applet/Conditionals1.pde | 26 + .../Control/Conditionals1/applet/loading.gif | Bin 0 -> 2232 bytes .../Control/Conditionals2/Conditionals2.pde | 26 + .../Conditionals2/applet/Conditionals2.java | 47 ++ .../Conditionals2/applet/Conditionals2.pde | 26 + .../Control/Conditionals2/applet/loading.gif | Bin 0 -> 2232 bytes .../EmbeddedIteration/EmbeddedIteration.pde | 27 ++ .../applet/EmbeddedIteration.java | 48 ++ .../applet/EmbeddedIteration.pde | 27 ++ .../EmbeddedIteration/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Control/Iteration/Iteration.pde | 45 ++ .../Control/Iteration/applet/Iteration.java | 66 +++ .../Control/Iteration/applet/Iteration.pde | 45 ++ .../Control/Iteration/applet/loading.gif | Bin 0 -> 2232 bytes .../LogicalOperators/LogicalOperators.pde | 45 ++ .../applet/LogicalOperators.java | 66 +++ .../applet/LogicalOperators.pde | 45 ++ .../LogicalOperators/applet/loading.gif | Bin 0 -> 2232 bytes .../CharactersStrings/CharactersStrings.pde | 82 ++++ .../applet/CharactersStrings.java | 101 ++++ .../applet/CharactersStrings.pde | 81 ++++ .../Data/CharactersStrings/applet/loading.gif | Bin 0 -> 2232 bytes .../Data/CharactersStrings/data/Eureka-90.vlw | Bin 0 -> 433385 bytes .../DatatypeConversion/DatatypeConversion.pde | 28 ++ .../applet/DatatypeConversion.java | 49 ++ .../applet/DatatypeConversion.pde | 28 ++ .../DatatypeConversion/applet/loading.gif | Bin 0 -> 2232 bytes .../Data/IntegersFloats/IntegersFloats.pde | 36 ++ .../IntegersFloats/applet/IntegersFloats.java | 56 +++ .../IntegersFloats/applet/IntegersFloats.pde | 36 ++ .../Data/IntegersFloats/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Data/TrueFalse/TrueFalse.pde | 34 ++ .../Data/TrueFalse/applet/TrueFalse.java | 55 +++ .../Data/TrueFalse/applet/TrueFalse.pde | 34 ++ .../Basics/Data/TrueFalse/applet/loading.gif | Bin 0 -> 2232 bytes .../Data/VariableScope/VariableScope.pde | 61 +++ .../VariableScope/applet/VariableScope.java | 81 ++++ .../VariableScope/applet/VariableScope.pde | 61 +++ .../Data/VariableScope/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Data/Variables/Variables.pde | 23 + .../Data/Variables/applet/Variables.java | 44 ++ .../Data/Variables/applet/Variables.pde | 23 + .../Basics/Data/Variables/applet/loading.gif | Bin 0 -> 2232 bytes .../examples/Basics/Form/Bezier/Bezier.pde | 18 + .../Basics/Form/Bezier/applet/Bezier.java | 39 ++ .../Basics/Form/Bezier/applet/Bezier.pde | 18 + .../Basics/Form/Bezier/applet/loading.gif | Bin 0 -> 2232 bytes .../Form/BezierEllipse/BezierEllipse.pde | 103 ++++ .../BezierEllipse/applet/BezierEllipse.java | 123 +++++ .../BezierEllipse/applet/BezierEllipse.pde | 103 ++++ .../Form/BezierEllipse/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Form/PieChart/PieChart.pde | 23 + .../Basics/Form/PieChart/applet/PieChart.java | 44 ++ .../Basics/Form/PieChart/applet/PieChart.pde | 23 + .../Basics/Form/PieChart/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Form/PointsLines/PointsLines.pde | 32 ++ .../Form/PointsLines/applet/PointsLines.java | 53 ++ .../Form/PointsLines/applet/PointsLines.pde | 32 ++ .../Form/PointsLines/applet/loading.gif | Bin 0 -> 2232 bytes .../Form/ShapePrimitives/ShapePrimitives.pde | 21 + .../applet/ShapePrimitives.java | 42 ++ .../applet/ShapePrimitives.pde | 21 + .../Form/ShapePrimitives/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Form/SimpleCurves/SimpleCurves.pde | 81 ++++ .../SimpleCurves/applet/SimpleCurves.java | 101 ++++ .../Form/SimpleCurves/applet/SimpleCurves.pde | 81 ++++ .../Form/SimpleCurves/applet/loading.gif | Bin 0 -> 2232 bytes .../Form/TriangleStrip/TriangleStrip.pde | 36 ++ .../TriangleStrip/applet/TriangleStrip.java | 57 +++ .../TriangleStrip/applet/TriangleStrip.pde | 36 ++ .../Form/TriangleStrip/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Form/Vertices/Vertices.pde | 47 ++ .../Basics/Form/Vertices/applet/Vertices.java | 68 +++ .../Basics/Form/Vertices/applet/Vertices.pde | 47 ++ .../Basics/Form/Vertices/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Image/Alphamask/Alphamask.pde | 24 + .../Image/Alphamask/applet/Alphamask.java | 45 ++ .../Image/Alphamask/applet/Alphamask.pde | 25 + .../Basics/Image/Alphamask/applet/loading.gif | Bin 0 -> 2232 bytes .../Image/BackgroundImage/BackgroundImage.pde | 30 ++ .../applet/BackgroundImage.java | 50 ++ .../applet/BackgroundImage.pde | 30 ++ .../Image/BackgroundImage/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Image/CreateImage/CreateImage.pde | 24 + .../Image/CreateImage/applet/CreateImage.java | 44 ++ .../Image/CreateImage/applet/CreateImage.pde | 24 + .../Image/CreateImage/applet/loading.gif | Bin 0 -> 2232 bytes .../LoadDisplayImage/LoadDisplayImage.pde | 23 + .../applet/LoadDisplayImage.java | 44 ++ .../applet/LoadDisplayImage.pde | 23 + .../Image/LoadDisplayImage/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Image/Pointillism/Pointillism.pde | 38 ++ .../Image/Pointillism/applet/Pointillism.java | 49 ++ .../Image/Pointillism/applet/Pointillism.pde | 29 ++ .../Image/Pointillism/applet/loading.gif | Bin 0 -> 2232 bytes .../Image/RequestImage/RequestImage.pde | 91 ++++ .../examples/Basics/Image/Sprite/Sprite.pde | 38 ++ .../Basics/Image/Sprite/applet/Sprite.java | 61 +++ .../Basics/Image/Sprite/applet/Sprite.pde | 41 ++ .../Basics/Image/Sprite/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Image/Sprite/data/teddy.gif | Bin 0 -> 746 bytes .../examples/Basics/Image/Sprite2/Sprite2.pde | 45 ++ .../Basics/Image/Sprite2/data/teddy.gif | Bin 0 -> 746 bytes .../Image/Transparency/Transparency.pde | 29 ++ .../Transparency/applet/Transparency.java | 50 ++ .../Transparency/applet/Transparency.pde | 30 ++ .../Image/Transparency/applet/loading.gif | Bin 0 -> 2232 bytes android/examples/Basics/Input/Clock/Clock.pde | 64 +++ .../Basics/Input/Clock/applet/Clock.java | 59 +++ .../Basics/Input/Clock/applet/Clock.pde | 39 ++ .../Basics/Input/Clock/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Input/Constrain/Constrain.pde | 41 ++ .../Input/Constrain/applet/Constrain.java | 60 +++ .../Input/Constrain/applet/Constrain.pde | 40 ++ .../Basics/Input/Constrain/applet/loading.gif | Bin 0 -> 2232 bytes .../examples/Basics/Input/Easing/Easing.pde | 41 ++ .../Basics/Input/Easing/applet/Easing.java | 61 +++ .../Basics/Input/Easing/applet/Easing.pde | 41 ++ .../Basics/Input/Easing/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Input/Keyboard/Keyboard.pde | 39 ++ .../Input/Keyboard/applet/Keyboard.java | 60 +++ .../Basics/Input/Keyboard/applet/Keyboard.pde | 40 ++ .../Basics/Input/Keyboard/applet/loading.gif | Bin 0 -> 2232 bytes .../KeyboardFunctions/KeyboardFunctions.pde | 89 ++++ .../applet/KeyboardFunctions.java | 109 +++++ .../applet/KeyboardFunctions.pde | 89 ++++ .../KeyboardFunctions/applet/loading.gif | Bin 0 -> 2232 bytes .../Input/Milliseconds/Milliseconds.pde | 26 + .../Milliseconds/applet/Milliseconds.java | 46 ++ .../Milliseconds/applet/Milliseconds.pde | 26 + .../Input/Milliseconds/applet/loading.gif | Bin 0 -> 2232 bytes .../examples/Basics/Input/Mouse1D/Mouse1D.pde | 47 ++ .../Basics/Input/Mouse1D/applet/Mouse1D.java | 70 +++ .../Basics/Input/Mouse1D/applet/Mouse1D.pde | 50 ++ .../Basics/Input/Mouse1D/applet/loading.gif | Bin 0 -> 2232 bytes .../examples/Basics/Input/Mouse2D/Mouse2D.pde | 24 + .../Basics/Input/Mouse2D/applet/Mouse2D.java | 45 ++ .../Basics/Input/Mouse2D/applet/Mouse2D.pde | 25 + .../Basics/Input/Mouse2D/applet/loading.gif | Bin 0 -> 2232 bytes .../Input/MouseFunctions/MouseFunctions.pde | 68 +++ .../MouseFunctions/applet/MouseFunctions.java | 88 ++++ .../MouseFunctions/applet/MouseFunctions.pde | 68 +++ .../Input/MouseFunctions/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Input/MousePress/MousePress.pde | 23 + .../Input/MousePress/applet/MousePress.java | 43 ++ .../Input/MousePress/applet/MousePress.pde | 23 + .../Input/MousePress/applet/loading.gif | Bin 0 -> 2232 bytes .../Input/MouseSignals/MouseSignals.pde | 54 +++ .../MouseSignals/applet/MouseSignals.java | 74 +++ .../MouseSignals/applet/MouseSignals.pde | 54 +++ .../Input/MouseSignals/applet/loading.gif | Bin 0 -> 2232 bytes .../Input/StoringInput/StoringInput.pde | 38 ++ .../StoringInput/applet/StoringInput.java | 60 +++ .../StoringInput/applet/StoringInput.pde | 40 ++ .../Input/StoringInput/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Math/AdditiveWave/AdditiveWave.pde | 69 +++ .../AdditiveWave/applet/AdditiveWave.java | 89 ++++ .../Math/AdditiveWave/applet/AdditiveWave.pde | 69 +++ .../Math/AdditiveWave/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Math/Arctangent/Arctangent.pde | 67 +++ .../Math/Arctangent/applet/Arctangent.java | 87 ++++ .../Math/Arctangent/applet/Arctangent.pde | 67 +++ .../Basics/Math/Arctangent/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Math/Distance1D/Distance1D.pde | 51 ++ .../Math/Distance1D/applet/Distance1D.java | 71 +++ .../Math/Distance1D/applet/Distance1D.pde | 51 ++ .../Basics/Math/Distance1D/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Math/Distance2D/Distance2D.pde | 29 ++ .../Math/Distance2D/applet/Distance2D.java | 49 ++ .../Math/Distance2D/applet/Distance2D.pde | 29 ++ .../Basics/Math/Distance2D/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Math/DoubleRandom/DoubleRandom.pde | 20 + .../DoubleRandom/applet/DoubleRandom.java | 41 ++ .../Math/DoubleRandom/applet/DoubleRandom.pde | 20 + .../Math/DoubleRandom/applet/loading.gif | Bin 0 -> 2232 bytes .../Graphing2DEquation/Graphing2DEquation.pde | 40 ++ .../applet/Graphing2DEquation.java | 60 +++ .../applet/Graphing2DEquation.pde | 40 ++ .../Graphing2DEquation/applet/loading.gif | Bin 0 -> 2232 bytes .../IncrementDecrement/IncrementDecrement.pde | 46 ++ .../applet/IncrementDecrement.java | 66 +++ .../applet/IncrementDecrement.pde | 46 ++ .../IncrementDecrement/applet/loading.gif | Bin 0 -> 2232 bytes .../examples/Basics/Math/Modulo/Modulo.pde | 31 ++ .../Basics/Math/Modulo/applet/Modulo.java | 51 ++ .../Basics/Math/Modulo/applet/Modulo.pde | 31 ++ .../Basics/Math/Modulo/applet/loading.gif | Bin 0 -> 2232 bytes .../examples/Basics/Math/Noise1D/Noise1D.pde | 37 ++ .../Basics/Math/Noise1D/applet/Noise1D.java | 57 +++ .../Basics/Math/Noise1D/applet/Noise1D.pde | 37 ++ .../Basics/Math/Noise1D/applet/loading.gif | Bin 0 -> 2232 bytes .../examples/Basics/Math/Noise2D/Noise2D.pde | 47 ++ .../Basics/Math/Noise2D/applet/Noise2D.java | 67 +++ .../Basics/Math/Noise2D/applet/Noise2D.pde | 47 ++ .../Basics/Math/Noise2D/applet/loading.gif | Bin 0 -> 2232 bytes .../examples/Basics/Math/Noise3D/Noise3D.pde | 54 +++ .../Basics/Math/Noise3D/applet/Noise3D.java | 74 +++ .../Basics/Math/Noise3D/applet/Noise3D.pde | 54 +++ .../Basics/Math/Noise3D/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Math/NoiseWave/NoiseWave.pde | 60 +++ .../Math/NoiseWave/applet/NoiseWave.java | 80 ++++ .../Math/NoiseWave/applet/NoiseWave.pde | 60 +++ .../Basics/Math/NoiseWave/applet/loading.gif | Bin 0 -> 2232 bytes .../OperatorPrecedence/OperatorPrecedence.pde | 58 +++ .../applet/OperatorPrecedence.java | 79 +++ .../applet/OperatorPrecedence.pde | 58 +++ .../OperatorPrecedence/applet/loading.gif | Bin 0 -> 2232 bytes .../PolarToCartesian/PolarToCartesian.pde | 52 ++ .../applet/PolarToCartesian.java | 72 +++ .../applet/PolarToCartesian.pde | 52 ++ .../Math/PolarToCartesian/applet/loading.gif | Bin 0 -> 2232 bytes .../examples/Basics/Math/Random/Random.pde | 19 + .../Basics/Math/Random/applet/Random.java | 40 ++ .../Basics/Math/Random/applet/Random.pde | 19 + .../Basics/Math/Random/applet/loading.gif | Bin 0 -> 2232 bytes android/examples/Basics/Math/Sine/Sine.pde | 46 ++ .../Basics/Math/Sine/applet/Sine.java | 66 +++ .../examples/Basics/Math/Sine/applet/Sine.pde | 46 ++ .../Basics/Math/Sine/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Math/SineCosine/SineCosine.pde | 59 +++ .../Math/SineCosine/applet/SineCosine.java | 79 +++ .../Math/SineCosine/applet/SineCosine.pde | 59 +++ .../Basics/Math/SineCosine/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Math/SineWave/SineWave.pde | 55 +++ .../Basics/Math/SineWave/applet/SineWave.java | 75 +++ .../Basics/Math/SineWave/applet/SineWave.pde | 55 +++ .../Basics/Math/SineWave/applet/loading.gif | Bin 0 -> 2232 bytes .../CompositeObjects/CompositeObjects.pde | 24 + .../Basics/Objects/CompositeObjects/Egg.pde | 36 ++ .../Objects/CompositeObjects/EggRing.pde | 19 + .../Basics/Objects/CompositeObjects/Ring.pde | 27 ++ .../applet/CompositeObjects.java | 125 +++++ .../applet/CompositeObjects.pde | 105 ++++ .../CompositeObjects/applet/loading.gif | Bin 0 -> 2232 bytes .../Objects/Inheritance/Inheritance.pde | 78 +++ .../Inheritance/applet/Inheritance.java | 98 ++++ .../Inheritance/applet/Inheritance.pde | 78 +++ .../Objects/Inheritance/applet/loading.gif | Bin 0 -> 2232 bytes .../MultipleConstructors.pde | 47 ++ .../applet/MultipleConstructors.java | 67 +++ .../applet/MultipleConstructors.pde | 47 ++ .../MultipleConstructors/applet/loading.gif | Bin 0 -> 2232 bytes .../Objects/Neighborhood/Neighborhood.pde | 303 ++++++++++++ .../Neighborhood/applet/Neighborhood.java | 323 +++++++++++++ .../Neighborhood/applet/Neighborhood.pde | 303 ++++++++++++ .../Objects/Neighborhood/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Objects/Objects/Objects.pde | 71 +++ .../Objects/Objects/applet/Objects.java | 91 ++++ .../Basics/Objects/Objects/applet/Objects.pde | 71 +++ .../Basics/Objects/Objects/applet/loading.gif | Bin 0 -> 2232 bytes .../Shape/DisableStyle/DisableStyle.pde | 34 ++ .../DisableStyle/applet/DisableStyle.java | 55 +++ .../DisableStyle/applet/DisableStyle.pde | 34 ++ .../Shape/DisableStyle/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Shape/DisableStyle/data/bot1.svg | 160 +++++++ .../Basics/Shape/GetChild/GetChild.pde | 45 ++ .../Shape/GetChild/applet/GetChild.java | 66 +++ .../Basics/Shape/GetChild/applet/GetChild.pde | 45 ++ .../Basics/Shape/GetChild/applet/loading.gif | Bin 0 -> 2232 bytes .../Shape/GetChild/data/usa-wikipedia.svg | 452 ++++++++++++++++++ .../LoadDisplayShape/LoadDisplayShape.pde | 26 + .../applet/LoadDisplayShape.java | 47 ++ .../applet/LoadDisplayShape.pde | 26 + .../Shape/LoadDisplayShape/applet/loading.gif | Bin 0 -> 2232 bytes .../Shape/LoadDisplayShape/data/bot1.svg | 160 +++++++ .../Basics/Shape/ScaleShape/ScaleShape.pde | 26 + .../Shape/ScaleShape/applet/ScaleShape.java | 47 ++ .../Shape/ScaleShape/applet/ScaleShape.pde | 26 + .../Shape/ScaleShape/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Shape/ScaleShape/data/bot1.svg | 160 +++++++ .../Structure/Coordinates/Coordinates.pde | 41 ++ .../Coordinates/applet/Coordinates.java | 62 +++ .../Coordinates/applet/Coordinates.pde | 41 ++ .../Structure/Coordinates/applet/loading.gif | Bin 0 -> 2232 bytes .../CreateGraphics/CreateGraphics.pde | 33 ++ .../CreateGraphics/applet/CreateGraphics.java | 53 ++ .../CreateGraphics/applet/CreateGraphics.pde | 33 ++ .../CreateGraphics/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Structure/Functions/Functions.pde | 33 ++ .../Structure/Functions/applet/Functions.java | 53 ++ .../Structure/Functions/applet/Functions.pde | 33 ++ .../Structure/Functions/applet/loading.gif | Bin 0 -> 2232 bytes .../examples/Basics/Structure/Loop/Loop.pde | 40 ++ .../Basics/Structure/Loop/applet/Loop.java | 60 +++ .../Basics/Structure/Loop/applet/Loop.pde | 40 ++ .../Basics/Structure/Loop/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Structure/NoLoop/NoLoop.pde | 33 ++ .../Structure/NoLoop/applet/NoLoop.java | 53 ++ .../Basics/Structure/NoLoop/applet/NoLoop.pde | 33 ++ .../Structure/NoLoop/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Structure/Recursion/Recursion.pde | 32 ++ .../Structure/Recursion/applet/Recursion.java | 52 ++ .../Structure/Recursion/applet/Recursion.pde | 32 ++ .../Structure/Recursion/applet/loading.gif | Bin 0 -> 2232 bytes .../Structure/Recursion2/Recursion2.pde | 32 ++ .../Recursion2/applet/Recursion2.java | 52 ++ .../Recursion2/applet/Recursion2.pde | 32 ++ .../Structure/Recursion2/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Structure/Redraw/Redraw.pde | 37 ++ .../Structure/Redraw/applet/Redraw.java | 57 +++ .../Basics/Structure/Redraw/applet/Redraw.pde | 37 ++ .../Structure/Redraw/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Structure/SetupDraw/SetupDraw.pde | 30 ++ .../Structure/SetupDraw/applet/SetupDraw.java | 50 ++ .../Structure/SetupDraw/applet/SetupDraw.pde | 30 ++ .../Structure/SetupDraw/applet/loading.gif | Bin 0 -> 2232 bytes .../StatementsComments/StatementsComments.pde | 20 + .../applet/StatementsComments.java | 41 ++ .../applet/StatementsComments.pde | 20 + .../StatementsComments/applet/loading.gif | Bin 0 -> 2232 bytes .../Structure/WidthHeight/WidthHeight.pde | 16 + .../WidthHeight/applet/WidthHeight.java | 37 ++ .../WidthHeight/applet/WidthHeight.pde | 16 + .../Structure/WidthHeight/applet/loading.gif | Bin 0 -> 2232 bytes android/examples/Basics/Transform/Arm/Arm.pde | 39 ++ .../Basics/Transform/Arm/applet/Arm.java | 59 +++ .../Basics/Transform/Arm/applet/Arm.pde | 39 ++ .../Basics/Transform/Arm/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Transform/Rotate/Rotate.pde | 36 ++ .../Transform/Rotate/applet/Rotate.java | 58 +++ .../Basics/Transform/Rotate/applet/Rotate.pde | 38 ++ .../Transform/Rotate/applet/loading.gif | Bin 0 -> 2232 bytes .../examples/Basics/Transform/Scale/Scale.pde | 38 ++ .../Basics/Transform/Scale/applet/Scale.java | 58 +++ .../Basics/Transform/Scale/applet/Scale.pde | 38 ++ .../Basics/Transform/Scale/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Transform/Translate/Translate.pde | 41 ++ .../Transform/Translate/applet/Translate.java | 61 +++ .../Transform/Translate/applet/Translate.pde | 41 ++ .../Transform/Translate/applet/loading.gif | Bin 0 -> 2232 bytes .../TriangleFlower/TriangleFlower.pde | 47 ++ .../TriangleFlower/applet/TriangleFlower.java | 63 +++ .../TriangleFlower/applet/TriangleFlower.pde | 43 ++ .../TriangleFlower/applet/loading.gif | Bin 0 -> 2232 bytes .../Basics/Typography/Letters/Letters.pde | 72 +++ .../Typography/Letters/applet/Letters.java | 86 ++++ .../Typography/Letters/applet/Letters.pde | 66 +++ .../Typography/Letters/applet/loading.gif | Bin 0 -> 2232 bytes .../Typography/Letters/data/CourierNew36.vlw | Bin 0 -> 114920 bytes .../Basics/Typography/Words/Words.pde | 39 ++ .../Basics/Typography/Words/applet/Words.java | 62 +++ .../Basics/Typography/Words/applet/Words.pde | 42 ++ .../Typography/Words/applet/loading.gif | Bin 0 -> 2232 bytes .../Words/data/Ziggurat-HTF-Black-32.vlw | Bin 0 -> 118799 bytes .../Web/EmbeddedLinks/EmbeddedLinks.pde | 67 +++ .../EmbeddedLinks/applet/EmbeddedLinks.java | 93 ++++ .../EmbeddedLinks/applet/EmbeddedLinks.pde | 73 +++ .../Web/EmbeddedLinks/applet/loading.gif | Bin 0 -> 2232 bytes .../Web/LoadingImages/LoadingImages.pde | 16 + .../LoadingImages/applet/LoadingImages.java | 37 ++ .../LoadingImages/applet/LoadingImages.pde | 16 + .../Web/LoadingImages/applet/loading.gif | Bin 0 -> 2232 bytes 408 files changed, 16462 insertions(+) create mode 100644 android/examples/Basics/Arrays/Array/Array.pde create mode 100644 android/examples/Basics/Arrays/Array/applet/Array.java create mode 100644 android/examples/Basics/Arrays/Array/applet/Array.pde create mode 100644 android/examples/Basics/Arrays/Array/applet/loading.gif create mode 100644 android/examples/Basics/Arrays/Array2D/Array2D.pde create mode 100644 android/examples/Basics/Arrays/Array2D/applet/Array2D.java create mode 100644 android/examples/Basics/Arrays/Array2D/applet/Array2D.pde create mode 100644 android/examples/Basics/Arrays/Array2D/applet/loading.gif create mode 100644 android/examples/Basics/Arrays/ArrayObjects/ArrayObjects.pde create mode 100644 android/examples/Basics/Arrays/ArrayObjects/Module.pde create mode 100644 android/examples/Basics/Arrays/ArrayObjects/applet/ArrayObjects.java create mode 100644 android/examples/Basics/Arrays/ArrayObjects/applet/ArrayObjects.pde create mode 100644 android/examples/Basics/Arrays/ArrayObjects/applet/loading.gif create mode 100644 android/examples/Basics/Color/Brightness/Brightness.pde create mode 100644 android/examples/Basics/Color/Brightness/applet/Brightness.java create mode 100644 android/examples/Basics/Color/Brightness/applet/Brightness.pde create mode 100644 android/examples/Basics/Color/Brightness/applet/loading.gif create mode 100644 android/examples/Basics/Color/ColorWheel/ColorWheel.pde create mode 100644 android/examples/Basics/Color/ColorWheel/applet/ColorWheel.java create mode 100644 android/examples/Basics/Color/ColorWheel/applet/ColorWheel.pde create mode 100644 android/examples/Basics/Color/ColorWheel/applet/loading.gif create mode 100644 android/examples/Basics/Color/Creating/Creating.pde create mode 100644 android/examples/Basics/Color/Creating/applet/Creating.java create mode 100644 android/examples/Basics/Color/Creating/applet/Creating.pde create mode 100644 android/examples/Basics/Color/Creating/applet/loading.gif create mode 100644 android/examples/Basics/Color/Hue/Hue.pde create mode 100644 android/examples/Basics/Color/Hue/applet/Hue.java create mode 100644 android/examples/Basics/Color/Hue/applet/Hue.pde create mode 100644 android/examples/Basics/Color/Hue/applet/loading.gif create mode 100644 android/examples/Basics/Color/LinearGradient/LinearGradient.pde create mode 100644 android/examples/Basics/Color/LinearGradient/applet/LinearGradient.java create mode 100644 android/examples/Basics/Color/LinearGradient/applet/LinearGradient.pde create mode 100644 android/examples/Basics/Color/LinearGradient/applet/loading.gif create mode 100644 android/examples/Basics/Color/RadialGradient/RadialGradient.pde create mode 100644 android/examples/Basics/Color/RadialGradient/applet/RadialGradient.java create mode 100644 android/examples/Basics/Color/RadialGradient/applet/RadialGradient.pde create mode 100644 android/examples/Basics/Color/RadialGradient/applet/loading.gif create mode 100644 android/examples/Basics/Color/RadialGradient2/RadialGradient2.pde create mode 100644 android/examples/Basics/Color/Reading/Reading.pde create mode 100644 android/examples/Basics/Color/Reading/applet/Reading.java create mode 100644 android/examples/Basics/Color/Reading/applet/Reading.pde create mode 100644 android/examples/Basics/Color/Reading/applet/loading.gif create mode 100644 android/examples/Basics/Color/Relativity/Relativity.pde create mode 100644 android/examples/Basics/Color/Relativity/applet/Relativity.java create mode 100644 android/examples/Basics/Color/Relativity/applet/Relativity.pde create mode 100644 android/examples/Basics/Color/Relativity/applet/loading.gif create mode 100644 android/examples/Basics/Color/Saturation/Saturation.pde create mode 100644 android/examples/Basics/Color/Saturation/applet/Saturation.java create mode 100644 android/examples/Basics/Color/Saturation/applet/Saturation.pde create mode 100644 android/examples/Basics/Color/Saturation/applet/loading.gif create mode 100644 android/examples/Basics/Color/WaveGradient/WaveGradient.pde create mode 100644 android/examples/Basics/Color/WaveGradient/applet/WaveGradient.java create mode 100644 android/examples/Basics/Color/WaveGradient/applet/WaveGradient.pde create mode 100644 android/examples/Basics/Color/WaveGradient/applet/loading.gif create mode 100644 android/examples/Basics/Control/Conditionals1/Conditionals1.pde create mode 100644 android/examples/Basics/Control/Conditionals1/applet/Conditionals1.java create mode 100644 android/examples/Basics/Control/Conditionals1/applet/Conditionals1.pde create mode 100644 android/examples/Basics/Control/Conditionals1/applet/loading.gif create mode 100644 android/examples/Basics/Control/Conditionals2/Conditionals2.pde create mode 100644 android/examples/Basics/Control/Conditionals2/applet/Conditionals2.java create mode 100644 android/examples/Basics/Control/Conditionals2/applet/Conditionals2.pde create mode 100644 android/examples/Basics/Control/Conditionals2/applet/loading.gif create mode 100644 android/examples/Basics/Control/EmbeddedIteration/EmbeddedIteration.pde create mode 100644 android/examples/Basics/Control/EmbeddedIteration/applet/EmbeddedIteration.java create mode 100644 android/examples/Basics/Control/EmbeddedIteration/applet/EmbeddedIteration.pde create mode 100644 android/examples/Basics/Control/EmbeddedIteration/applet/loading.gif create mode 100644 android/examples/Basics/Control/Iteration/Iteration.pde create mode 100644 android/examples/Basics/Control/Iteration/applet/Iteration.java create mode 100644 android/examples/Basics/Control/Iteration/applet/Iteration.pde create mode 100644 android/examples/Basics/Control/Iteration/applet/loading.gif create mode 100644 android/examples/Basics/Control/LogicalOperators/LogicalOperators.pde create mode 100644 android/examples/Basics/Control/LogicalOperators/applet/LogicalOperators.java create mode 100644 android/examples/Basics/Control/LogicalOperators/applet/LogicalOperators.pde create mode 100644 android/examples/Basics/Control/LogicalOperators/applet/loading.gif create mode 100644 android/examples/Basics/Data/CharactersStrings/CharactersStrings.pde create mode 100644 android/examples/Basics/Data/CharactersStrings/applet/CharactersStrings.java create mode 100644 android/examples/Basics/Data/CharactersStrings/applet/CharactersStrings.pde create mode 100644 android/examples/Basics/Data/CharactersStrings/applet/loading.gif create mode 100644 android/examples/Basics/Data/CharactersStrings/data/Eureka-90.vlw create mode 100644 android/examples/Basics/Data/DatatypeConversion/DatatypeConversion.pde create mode 100644 android/examples/Basics/Data/DatatypeConversion/applet/DatatypeConversion.java create mode 100644 android/examples/Basics/Data/DatatypeConversion/applet/DatatypeConversion.pde create mode 100644 android/examples/Basics/Data/DatatypeConversion/applet/loading.gif create mode 100644 android/examples/Basics/Data/IntegersFloats/IntegersFloats.pde create mode 100644 android/examples/Basics/Data/IntegersFloats/applet/IntegersFloats.java create mode 100644 android/examples/Basics/Data/IntegersFloats/applet/IntegersFloats.pde create mode 100644 android/examples/Basics/Data/IntegersFloats/applet/loading.gif create mode 100644 android/examples/Basics/Data/TrueFalse/TrueFalse.pde create mode 100644 android/examples/Basics/Data/TrueFalse/applet/TrueFalse.java create mode 100644 android/examples/Basics/Data/TrueFalse/applet/TrueFalse.pde create mode 100644 android/examples/Basics/Data/TrueFalse/applet/loading.gif create mode 100644 android/examples/Basics/Data/VariableScope/VariableScope.pde create mode 100644 android/examples/Basics/Data/VariableScope/applet/VariableScope.java create mode 100644 android/examples/Basics/Data/VariableScope/applet/VariableScope.pde create mode 100644 android/examples/Basics/Data/VariableScope/applet/loading.gif create mode 100644 android/examples/Basics/Data/Variables/Variables.pde create mode 100644 android/examples/Basics/Data/Variables/applet/Variables.java create mode 100644 android/examples/Basics/Data/Variables/applet/Variables.pde create mode 100644 android/examples/Basics/Data/Variables/applet/loading.gif create mode 100644 android/examples/Basics/Form/Bezier/Bezier.pde create mode 100644 android/examples/Basics/Form/Bezier/applet/Bezier.java create mode 100644 android/examples/Basics/Form/Bezier/applet/Bezier.pde create mode 100644 android/examples/Basics/Form/Bezier/applet/loading.gif create mode 100644 android/examples/Basics/Form/BezierEllipse/BezierEllipse.pde create mode 100644 android/examples/Basics/Form/BezierEllipse/applet/BezierEllipse.java create mode 100644 android/examples/Basics/Form/BezierEllipse/applet/BezierEllipse.pde create mode 100644 android/examples/Basics/Form/BezierEllipse/applet/loading.gif create mode 100644 android/examples/Basics/Form/PieChart/PieChart.pde create mode 100644 android/examples/Basics/Form/PieChart/applet/PieChart.java create mode 100644 android/examples/Basics/Form/PieChart/applet/PieChart.pde create mode 100644 android/examples/Basics/Form/PieChart/applet/loading.gif create mode 100644 android/examples/Basics/Form/PointsLines/PointsLines.pde create mode 100644 android/examples/Basics/Form/PointsLines/applet/PointsLines.java create mode 100644 android/examples/Basics/Form/PointsLines/applet/PointsLines.pde create mode 100644 android/examples/Basics/Form/PointsLines/applet/loading.gif create mode 100644 android/examples/Basics/Form/ShapePrimitives/ShapePrimitives.pde create mode 100644 android/examples/Basics/Form/ShapePrimitives/applet/ShapePrimitives.java create mode 100644 android/examples/Basics/Form/ShapePrimitives/applet/ShapePrimitives.pde create mode 100644 android/examples/Basics/Form/ShapePrimitives/applet/loading.gif create mode 100644 android/examples/Basics/Form/SimpleCurves/SimpleCurves.pde create mode 100644 android/examples/Basics/Form/SimpleCurves/applet/SimpleCurves.java create mode 100644 android/examples/Basics/Form/SimpleCurves/applet/SimpleCurves.pde create mode 100644 android/examples/Basics/Form/SimpleCurves/applet/loading.gif create mode 100644 android/examples/Basics/Form/TriangleStrip/TriangleStrip.pde create mode 100644 android/examples/Basics/Form/TriangleStrip/applet/TriangleStrip.java create mode 100644 android/examples/Basics/Form/TriangleStrip/applet/TriangleStrip.pde create mode 100644 android/examples/Basics/Form/TriangleStrip/applet/loading.gif create mode 100644 android/examples/Basics/Form/Vertices/Vertices.pde create mode 100644 android/examples/Basics/Form/Vertices/applet/Vertices.java create mode 100644 android/examples/Basics/Form/Vertices/applet/Vertices.pde create mode 100644 android/examples/Basics/Form/Vertices/applet/loading.gif create mode 100644 android/examples/Basics/Image/Alphamask/Alphamask.pde create mode 100644 android/examples/Basics/Image/Alphamask/applet/Alphamask.java create mode 100644 android/examples/Basics/Image/Alphamask/applet/Alphamask.pde create mode 100644 android/examples/Basics/Image/Alphamask/applet/loading.gif create mode 100644 android/examples/Basics/Image/BackgroundImage/BackgroundImage.pde create mode 100644 android/examples/Basics/Image/BackgroundImage/applet/BackgroundImage.java create mode 100644 android/examples/Basics/Image/BackgroundImage/applet/BackgroundImage.pde create mode 100644 android/examples/Basics/Image/BackgroundImage/applet/loading.gif create mode 100644 android/examples/Basics/Image/CreateImage/CreateImage.pde create mode 100644 android/examples/Basics/Image/CreateImage/applet/CreateImage.java create mode 100644 android/examples/Basics/Image/CreateImage/applet/CreateImage.pde create mode 100644 android/examples/Basics/Image/CreateImage/applet/loading.gif create mode 100644 android/examples/Basics/Image/LoadDisplayImage/LoadDisplayImage.pde create mode 100644 android/examples/Basics/Image/LoadDisplayImage/applet/LoadDisplayImage.java create mode 100644 android/examples/Basics/Image/LoadDisplayImage/applet/LoadDisplayImage.pde create mode 100644 android/examples/Basics/Image/LoadDisplayImage/applet/loading.gif create mode 100644 android/examples/Basics/Image/Pointillism/Pointillism.pde create mode 100644 android/examples/Basics/Image/Pointillism/applet/Pointillism.java create mode 100644 android/examples/Basics/Image/Pointillism/applet/Pointillism.pde create mode 100644 android/examples/Basics/Image/Pointillism/applet/loading.gif create mode 100644 android/examples/Basics/Image/RequestImage/RequestImage.pde create mode 100644 android/examples/Basics/Image/Sprite/Sprite.pde create mode 100644 android/examples/Basics/Image/Sprite/applet/Sprite.java create mode 100644 android/examples/Basics/Image/Sprite/applet/Sprite.pde create mode 100644 android/examples/Basics/Image/Sprite/applet/loading.gif create mode 100644 android/examples/Basics/Image/Sprite/data/teddy.gif create mode 100644 android/examples/Basics/Image/Sprite2/Sprite2.pde create mode 100644 android/examples/Basics/Image/Sprite2/data/teddy.gif create mode 100644 android/examples/Basics/Image/Transparency/Transparency.pde create mode 100644 android/examples/Basics/Image/Transparency/applet/Transparency.java create mode 100644 android/examples/Basics/Image/Transparency/applet/Transparency.pde create mode 100644 android/examples/Basics/Image/Transparency/applet/loading.gif create mode 100644 android/examples/Basics/Input/Clock/Clock.pde create mode 100644 android/examples/Basics/Input/Clock/applet/Clock.java create mode 100644 android/examples/Basics/Input/Clock/applet/Clock.pde create mode 100644 android/examples/Basics/Input/Clock/applet/loading.gif create mode 100644 android/examples/Basics/Input/Constrain/Constrain.pde create mode 100644 android/examples/Basics/Input/Constrain/applet/Constrain.java create mode 100644 android/examples/Basics/Input/Constrain/applet/Constrain.pde create mode 100644 android/examples/Basics/Input/Constrain/applet/loading.gif create mode 100644 android/examples/Basics/Input/Easing/Easing.pde create mode 100644 android/examples/Basics/Input/Easing/applet/Easing.java create mode 100644 android/examples/Basics/Input/Easing/applet/Easing.pde create mode 100644 android/examples/Basics/Input/Easing/applet/loading.gif create mode 100644 android/examples/Basics/Input/Keyboard/Keyboard.pde create mode 100644 android/examples/Basics/Input/Keyboard/applet/Keyboard.java create mode 100644 android/examples/Basics/Input/Keyboard/applet/Keyboard.pde create mode 100644 android/examples/Basics/Input/Keyboard/applet/loading.gif create mode 100644 android/examples/Basics/Input/KeyboardFunctions/KeyboardFunctions.pde create mode 100644 android/examples/Basics/Input/KeyboardFunctions/applet/KeyboardFunctions.java create mode 100644 android/examples/Basics/Input/KeyboardFunctions/applet/KeyboardFunctions.pde create mode 100644 android/examples/Basics/Input/KeyboardFunctions/applet/loading.gif create mode 100644 android/examples/Basics/Input/Milliseconds/Milliseconds.pde create mode 100644 android/examples/Basics/Input/Milliseconds/applet/Milliseconds.java create mode 100644 android/examples/Basics/Input/Milliseconds/applet/Milliseconds.pde create mode 100644 android/examples/Basics/Input/Milliseconds/applet/loading.gif create mode 100644 android/examples/Basics/Input/Mouse1D/Mouse1D.pde create mode 100644 android/examples/Basics/Input/Mouse1D/applet/Mouse1D.java create mode 100644 android/examples/Basics/Input/Mouse1D/applet/Mouse1D.pde create mode 100644 android/examples/Basics/Input/Mouse1D/applet/loading.gif create mode 100644 android/examples/Basics/Input/Mouse2D/Mouse2D.pde create mode 100644 android/examples/Basics/Input/Mouse2D/applet/Mouse2D.java create mode 100644 android/examples/Basics/Input/Mouse2D/applet/Mouse2D.pde create mode 100644 android/examples/Basics/Input/Mouse2D/applet/loading.gif create mode 100644 android/examples/Basics/Input/MouseFunctions/MouseFunctions.pde create mode 100644 android/examples/Basics/Input/MouseFunctions/applet/MouseFunctions.java create mode 100644 android/examples/Basics/Input/MouseFunctions/applet/MouseFunctions.pde create mode 100644 android/examples/Basics/Input/MouseFunctions/applet/loading.gif create mode 100644 android/examples/Basics/Input/MousePress/MousePress.pde create mode 100644 android/examples/Basics/Input/MousePress/applet/MousePress.java create mode 100644 android/examples/Basics/Input/MousePress/applet/MousePress.pde create mode 100644 android/examples/Basics/Input/MousePress/applet/loading.gif create mode 100644 android/examples/Basics/Input/MouseSignals/MouseSignals.pde create mode 100644 android/examples/Basics/Input/MouseSignals/applet/MouseSignals.java create mode 100644 android/examples/Basics/Input/MouseSignals/applet/MouseSignals.pde create mode 100644 android/examples/Basics/Input/MouseSignals/applet/loading.gif create mode 100644 android/examples/Basics/Input/StoringInput/StoringInput.pde create mode 100644 android/examples/Basics/Input/StoringInput/applet/StoringInput.java create mode 100644 android/examples/Basics/Input/StoringInput/applet/StoringInput.pde create mode 100644 android/examples/Basics/Input/StoringInput/applet/loading.gif create mode 100644 android/examples/Basics/Math/AdditiveWave/AdditiveWave.pde create mode 100644 android/examples/Basics/Math/AdditiveWave/applet/AdditiveWave.java create mode 100644 android/examples/Basics/Math/AdditiveWave/applet/AdditiveWave.pde create mode 100644 android/examples/Basics/Math/AdditiveWave/applet/loading.gif create mode 100644 android/examples/Basics/Math/Arctangent/Arctangent.pde create mode 100644 android/examples/Basics/Math/Arctangent/applet/Arctangent.java create mode 100644 android/examples/Basics/Math/Arctangent/applet/Arctangent.pde create mode 100644 android/examples/Basics/Math/Arctangent/applet/loading.gif create mode 100644 android/examples/Basics/Math/Distance1D/Distance1D.pde create mode 100644 android/examples/Basics/Math/Distance1D/applet/Distance1D.java create mode 100644 android/examples/Basics/Math/Distance1D/applet/Distance1D.pde create mode 100644 android/examples/Basics/Math/Distance1D/applet/loading.gif create mode 100644 android/examples/Basics/Math/Distance2D/Distance2D.pde create mode 100644 android/examples/Basics/Math/Distance2D/applet/Distance2D.java create mode 100644 android/examples/Basics/Math/Distance2D/applet/Distance2D.pde create mode 100644 android/examples/Basics/Math/Distance2D/applet/loading.gif create mode 100644 android/examples/Basics/Math/DoubleRandom/DoubleRandom.pde create mode 100644 android/examples/Basics/Math/DoubleRandom/applet/DoubleRandom.java create mode 100644 android/examples/Basics/Math/DoubleRandom/applet/DoubleRandom.pde create mode 100644 android/examples/Basics/Math/DoubleRandom/applet/loading.gif create mode 100644 android/examples/Basics/Math/Graphing2DEquation/Graphing2DEquation.pde create mode 100644 android/examples/Basics/Math/Graphing2DEquation/applet/Graphing2DEquation.java create mode 100644 android/examples/Basics/Math/Graphing2DEquation/applet/Graphing2DEquation.pde create mode 100644 android/examples/Basics/Math/Graphing2DEquation/applet/loading.gif create mode 100644 android/examples/Basics/Math/IncrementDecrement/IncrementDecrement.pde create mode 100644 android/examples/Basics/Math/IncrementDecrement/applet/IncrementDecrement.java create mode 100644 android/examples/Basics/Math/IncrementDecrement/applet/IncrementDecrement.pde create mode 100644 android/examples/Basics/Math/IncrementDecrement/applet/loading.gif create mode 100644 android/examples/Basics/Math/Modulo/Modulo.pde create mode 100644 android/examples/Basics/Math/Modulo/applet/Modulo.java create mode 100644 android/examples/Basics/Math/Modulo/applet/Modulo.pde create mode 100644 android/examples/Basics/Math/Modulo/applet/loading.gif create mode 100644 android/examples/Basics/Math/Noise1D/Noise1D.pde create mode 100644 android/examples/Basics/Math/Noise1D/applet/Noise1D.java create mode 100644 android/examples/Basics/Math/Noise1D/applet/Noise1D.pde create mode 100644 android/examples/Basics/Math/Noise1D/applet/loading.gif create mode 100644 android/examples/Basics/Math/Noise2D/Noise2D.pde create mode 100644 android/examples/Basics/Math/Noise2D/applet/Noise2D.java create mode 100644 android/examples/Basics/Math/Noise2D/applet/Noise2D.pde create mode 100644 android/examples/Basics/Math/Noise2D/applet/loading.gif create mode 100644 android/examples/Basics/Math/Noise3D/Noise3D.pde create mode 100644 android/examples/Basics/Math/Noise3D/applet/Noise3D.java create mode 100644 android/examples/Basics/Math/Noise3D/applet/Noise3D.pde create mode 100644 android/examples/Basics/Math/Noise3D/applet/loading.gif create mode 100644 android/examples/Basics/Math/NoiseWave/NoiseWave.pde create mode 100644 android/examples/Basics/Math/NoiseWave/applet/NoiseWave.java create mode 100644 android/examples/Basics/Math/NoiseWave/applet/NoiseWave.pde create mode 100644 android/examples/Basics/Math/NoiseWave/applet/loading.gif create mode 100644 android/examples/Basics/Math/OperatorPrecedence/OperatorPrecedence.pde create mode 100644 android/examples/Basics/Math/OperatorPrecedence/applet/OperatorPrecedence.java create mode 100644 android/examples/Basics/Math/OperatorPrecedence/applet/OperatorPrecedence.pde create mode 100644 android/examples/Basics/Math/OperatorPrecedence/applet/loading.gif create mode 100644 android/examples/Basics/Math/PolarToCartesian/PolarToCartesian.pde create mode 100644 android/examples/Basics/Math/PolarToCartesian/applet/PolarToCartesian.java create mode 100644 android/examples/Basics/Math/PolarToCartesian/applet/PolarToCartesian.pde create mode 100644 android/examples/Basics/Math/PolarToCartesian/applet/loading.gif create mode 100644 android/examples/Basics/Math/Random/Random.pde create mode 100644 android/examples/Basics/Math/Random/applet/Random.java create mode 100644 android/examples/Basics/Math/Random/applet/Random.pde create mode 100644 android/examples/Basics/Math/Random/applet/loading.gif create mode 100644 android/examples/Basics/Math/Sine/Sine.pde create mode 100644 android/examples/Basics/Math/Sine/applet/Sine.java create mode 100644 android/examples/Basics/Math/Sine/applet/Sine.pde create mode 100644 android/examples/Basics/Math/Sine/applet/loading.gif create mode 100644 android/examples/Basics/Math/SineCosine/SineCosine.pde create mode 100644 android/examples/Basics/Math/SineCosine/applet/SineCosine.java create mode 100644 android/examples/Basics/Math/SineCosine/applet/SineCosine.pde create mode 100644 android/examples/Basics/Math/SineCosine/applet/loading.gif create mode 100644 android/examples/Basics/Math/SineWave/SineWave.pde create mode 100644 android/examples/Basics/Math/SineWave/applet/SineWave.java create mode 100644 android/examples/Basics/Math/SineWave/applet/SineWave.pde create mode 100644 android/examples/Basics/Math/SineWave/applet/loading.gif create mode 100644 android/examples/Basics/Objects/CompositeObjects/CompositeObjects.pde create mode 100644 android/examples/Basics/Objects/CompositeObjects/Egg.pde create mode 100644 android/examples/Basics/Objects/CompositeObjects/EggRing.pde create mode 100644 android/examples/Basics/Objects/CompositeObjects/Ring.pde create mode 100644 android/examples/Basics/Objects/CompositeObjects/applet/CompositeObjects.java create mode 100644 android/examples/Basics/Objects/CompositeObjects/applet/CompositeObjects.pde create mode 100644 android/examples/Basics/Objects/CompositeObjects/applet/loading.gif create mode 100644 android/examples/Basics/Objects/Inheritance/Inheritance.pde create mode 100644 android/examples/Basics/Objects/Inheritance/applet/Inheritance.java create mode 100644 android/examples/Basics/Objects/Inheritance/applet/Inheritance.pde create mode 100644 android/examples/Basics/Objects/Inheritance/applet/loading.gif create mode 100644 android/examples/Basics/Objects/MultipleConstructors/MultipleConstructors.pde create mode 100644 android/examples/Basics/Objects/MultipleConstructors/applet/MultipleConstructors.java create mode 100644 android/examples/Basics/Objects/MultipleConstructors/applet/MultipleConstructors.pde create mode 100644 android/examples/Basics/Objects/MultipleConstructors/applet/loading.gif create mode 100644 android/examples/Basics/Objects/Neighborhood/Neighborhood.pde create mode 100644 android/examples/Basics/Objects/Neighborhood/applet/Neighborhood.java create mode 100644 android/examples/Basics/Objects/Neighborhood/applet/Neighborhood.pde create mode 100644 android/examples/Basics/Objects/Neighborhood/applet/loading.gif create mode 100644 android/examples/Basics/Objects/Objects/Objects.pde create mode 100644 android/examples/Basics/Objects/Objects/applet/Objects.java create mode 100644 android/examples/Basics/Objects/Objects/applet/Objects.pde create mode 100644 android/examples/Basics/Objects/Objects/applet/loading.gif create mode 100644 android/examples/Basics/Shape/DisableStyle/DisableStyle.pde create mode 100644 android/examples/Basics/Shape/DisableStyle/applet/DisableStyle.java create mode 100644 android/examples/Basics/Shape/DisableStyle/applet/DisableStyle.pde create mode 100644 android/examples/Basics/Shape/DisableStyle/applet/loading.gif create mode 100644 android/examples/Basics/Shape/DisableStyle/data/bot1.svg create mode 100644 android/examples/Basics/Shape/GetChild/GetChild.pde create mode 100644 android/examples/Basics/Shape/GetChild/applet/GetChild.java create mode 100644 android/examples/Basics/Shape/GetChild/applet/GetChild.pde create mode 100644 android/examples/Basics/Shape/GetChild/applet/loading.gif create mode 100644 android/examples/Basics/Shape/GetChild/data/usa-wikipedia.svg create mode 100644 android/examples/Basics/Shape/LoadDisplayShape/LoadDisplayShape.pde create mode 100644 android/examples/Basics/Shape/LoadDisplayShape/applet/LoadDisplayShape.java create mode 100644 android/examples/Basics/Shape/LoadDisplayShape/applet/LoadDisplayShape.pde create mode 100644 android/examples/Basics/Shape/LoadDisplayShape/applet/loading.gif create mode 100644 android/examples/Basics/Shape/LoadDisplayShape/data/bot1.svg create mode 100644 android/examples/Basics/Shape/ScaleShape/ScaleShape.pde create mode 100644 android/examples/Basics/Shape/ScaleShape/applet/ScaleShape.java create mode 100644 android/examples/Basics/Shape/ScaleShape/applet/ScaleShape.pde create mode 100644 android/examples/Basics/Shape/ScaleShape/applet/loading.gif create mode 100644 android/examples/Basics/Shape/ScaleShape/data/bot1.svg create mode 100644 android/examples/Basics/Structure/Coordinates/Coordinates.pde create mode 100644 android/examples/Basics/Structure/Coordinates/applet/Coordinates.java create mode 100644 android/examples/Basics/Structure/Coordinates/applet/Coordinates.pde create mode 100644 android/examples/Basics/Structure/Coordinates/applet/loading.gif create mode 100644 android/examples/Basics/Structure/CreateGraphics/CreateGraphics.pde create mode 100644 android/examples/Basics/Structure/CreateGraphics/applet/CreateGraphics.java create mode 100644 android/examples/Basics/Structure/CreateGraphics/applet/CreateGraphics.pde create mode 100644 android/examples/Basics/Structure/CreateGraphics/applet/loading.gif create mode 100644 android/examples/Basics/Structure/Functions/Functions.pde create mode 100644 android/examples/Basics/Structure/Functions/applet/Functions.java create mode 100644 android/examples/Basics/Structure/Functions/applet/Functions.pde create mode 100644 android/examples/Basics/Structure/Functions/applet/loading.gif create mode 100644 android/examples/Basics/Structure/Loop/Loop.pde create mode 100644 android/examples/Basics/Structure/Loop/applet/Loop.java create mode 100644 android/examples/Basics/Structure/Loop/applet/Loop.pde create mode 100644 android/examples/Basics/Structure/Loop/applet/loading.gif create mode 100644 android/examples/Basics/Structure/NoLoop/NoLoop.pde create mode 100644 android/examples/Basics/Structure/NoLoop/applet/NoLoop.java create mode 100644 android/examples/Basics/Structure/NoLoop/applet/NoLoop.pde create mode 100644 android/examples/Basics/Structure/NoLoop/applet/loading.gif create mode 100644 android/examples/Basics/Structure/Recursion/Recursion.pde create mode 100644 android/examples/Basics/Structure/Recursion/applet/Recursion.java create mode 100644 android/examples/Basics/Structure/Recursion/applet/Recursion.pde create mode 100644 android/examples/Basics/Structure/Recursion/applet/loading.gif create mode 100644 android/examples/Basics/Structure/Recursion2/Recursion2.pde create mode 100644 android/examples/Basics/Structure/Recursion2/applet/Recursion2.java create mode 100644 android/examples/Basics/Structure/Recursion2/applet/Recursion2.pde create mode 100644 android/examples/Basics/Structure/Recursion2/applet/loading.gif create mode 100644 android/examples/Basics/Structure/Redraw/Redraw.pde create mode 100644 android/examples/Basics/Structure/Redraw/applet/Redraw.java create mode 100644 android/examples/Basics/Structure/Redraw/applet/Redraw.pde create mode 100644 android/examples/Basics/Structure/Redraw/applet/loading.gif create mode 100644 android/examples/Basics/Structure/SetupDraw/SetupDraw.pde create mode 100644 android/examples/Basics/Structure/SetupDraw/applet/SetupDraw.java create mode 100644 android/examples/Basics/Structure/SetupDraw/applet/SetupDraw.pde create mode 100644 android/examples/Basics/Structure/SetupDraw/applet/loading.gif create mode 100644 android/examples/Basics/Structure/StatementsComments/StatementsComments.pde create mode 100644 android/examples/Basics/Structure/StatementsComments/applet/StatementsComments.java create mode 100644 android/examples/Basics/Structure/StatementsComments/applet/StatementsComments.pde create mode 100644 android/examples/Basics/Structure/StatementsComments/applet/loading.gif create mode 100644 android/examples/Basics/Structure/WidthHeight/WidthHeight.pde create mode 100644 android/examples/Basics/Structure/WidthHeight/applet/WidthHeight.java create mode 100644 android/examples/Basics/Structure/WidthHeight/applet/WidthHeight.pde create mode 100644 android/examples/Basics/Structure/WidthHeight/applet/loading.gif create mode 100644 android/examples/Basics/Transform/Arm/Arm.pde create mode 100644 android/examples/Basics/Transform/Arm/applet/Arm.java create mode 100644 android/examples/Basics/Transform/Arm/applet/Arm.pde create mode 100644 android/examples/Basics/Transform/Arm/applet/loading.gif create mode 100644 android/examples/Basics/Transform/Rotate/Rotate.pde create mode 100644 android/examples/Basics/Transform/Rotate/applet/Rotate.java create mode 100644 android/examples/Basics/Transform/Rotate/applet/Rotate.pde create mode 100644 android/examples/Basics/Transform/Rotate/applet/loading.gif create mode 100644 android/examples/Basics/Transform/Scale/Scale.pde create mode 100644 android/examples/Basics/Transform/Scale/applet/Scale.java create mode 100644 android/examples/Basics/Transform/Scale/applet/Scale.pde create mode 100644 android/examples/Basics/Transform/Scale/applet/loading.gif create mode 100644 android/examples/Basics/Transform/Translate/Translate.pde create mode 100644 android/examples/Basics/Transform/Translate/applet/Translate.java create mode 100644 android/examples/Basics/Transform/Translate/applet/Translate.pde create mode 100644 android/examples/Basics/Transform/Translate/applet/loading.gif create mode 100644 android/examples/Basics/Transform/TriangleFlower/TriangleFlower.pde create mode 100644 android/examples/Basics/Transform/TriangleFlower/applet/TriangleFlower.java create mode 100644 android/examples/Basics/Transform/TriangleFlower/applet/TriangleFlower.pde create mode 100644 android/examples/Basics/Transform/TriangleFlower/applet/loading.gif create mode 100644 android/examples/Basics/Typography/Letters/Letters.pde create mode 100644 android/examples/Basics/Typography/Letters/applet/Letters.java create mode 100644 android/examples/Basics/Typography/Letters/applet/Letters.pde create mode 100644 android/examples/Basics/Typography/Letters/applet/loading.gif create mode 100644 android/examples/Basics/Typography/Letters/data/CourierNew36.vlw create mode 100644 android/examples/Basics/Typography/Words/Words.pde create mode 100644 android/examples/Basics/Typography/Words/applet/Words.java create mode 100644 android/examples/Basics/Typography/Words/applet/Words.pde create mode 100644 android/examples/Basics/Typography/Words/applet/loading.gif create mode 100644 android/examples/Basics/Typography/Words/data/Ziggurat-HTF-Black-32.vlw create mode 100644 android/examples/Basics/Web/EmbeddedLinks/EmbeddedLinks.pde create mode 100644 android/examples/Basics/Web/EmbeddedLinks/applet/EmbeddedLinks.java create mode 100644 android/examples/Basics/Web/EmbeddedLinks/applet/EmbeddedLinks.pde create mode 100644 android/examples/Basics/Web/EmbeddedLinks/applet/loading.gif create mode 100644 android/examples/Basics/Web/LoadingImages/LoadingImages.pde create mode 100644 android/examples/Basics/Web/LoadingImages/applet/LoadingImages.java create mode 100644 android/examples/Basics/Web/LoadingImages/applet/LoadingImages.pde create mode 100644 android/examples/Basics/Web/LoadingImages/applet/loading.gif diff --git a/android/examples/Basics/Arrays/Array/Array.pde b/android/examples/Basics/Arrays/Array/Array.pde new file mode 100644 index 000000000..a981fa470 --- /dev/null +++ b/android/examples/Basics/Arrays/Array/Array.pde @@ -0,0 +1,35 @@ +/** + * 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/android/examples/Basics/Arrays/Array/applet/Array.java b/android/examples/Basics/Arrays/Array/applet/Array.java new file mode 100644 index 000000000..3beda6698 --- /dev/null +++ b/android/examples/Basics/Arrays/Array/applet/Array.java @@ -0,0 +1,56 @@ +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/android/examples/Basics/Arrays/Array/applet/Array.pde b/android/examples/Basics/Arrays/Array/applet/Array.pde new file mode 100644 index 000000000..a981fa470 --- /dev/null +++ b/android/examples/Basics/Arrays/Array/applet/Array.pde @@ -0,0 +1,35 @@ +/** + * 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/android/examples/Basics/Arrays/Array/applet/loading.gif b/android/examples/Basics/Arrays/Array/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a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VCq1fap0`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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Arrays/Array2D/Array2D.pde b/android/examples/Basics/Arrays/Array2D/Array2D.pde new file mode 100644 index 000000000..3a97587e7 --- /dev/null +++ b/android/examples/Basics/Arrays/Array2D/Array2D.pde @@ -0,0 +1,32 @@ +/** + * 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~YM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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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Arrays/ArrayObjects/ArrayObjects.pde b/android/examples/Basics/Arrays/ArrayObjects/ArrayObjects.pde new file mode 100644 index 000000000..db476e7c9 --- /dev/null +++ b/android/examples/Basics/Arrays/ArrayObjects/ArrayObjects.pde @@ -0,0 +1,39 @@ +/** + * Array Objects. + * + * Demonstrates the syntax for creating an array of custom objects. + * + * Updated 26 February 2010. + */ + +int unit = 40; +int count; +Module[] mods; + + +void setup() { + size(320, 240); + background(176); + noStroke(); + + int wideCount = width / unit; + int highCount = height / unit; + count = wideCount * highCount; + mods = new Module[count]; + + int index = 0; + for (int y = 0; y < highCount; y++) { + for (int x = 0; x < wideCount; x++) { + mods[index++] = new Module(x*unit, y*unit, unit/2, unit/2, random(0.05, 0.8)); + } + } +} + + +void draw() { + for (int i = 0; i < count; i++) { + mods[i].update(); + mods[i].draw(); + } +} + diff --git a/android/examples/Basics/Arrays/ArrayObjects/Module.pde b/android/examples/Basics/Arrays/ArrayObjects/Module.pde new file mode 100644 index 000000000..0094ab4aa --- /dev/null +++ b/android/examples/Basics/Arrays/ArrayObjects/Module.pde @@ -0,0 +1,38 @@ +class Module { + int mx, my; + int big; + float x, y; + int xdir = 1; + int ydir = 1; + float speed; + + // Contructor (required) + Module(int imx, int imy, int ix, int iy, float ispeed) { + mx = imx; + my = imy; + x = ix; + y = iy; + speed = ispeed; + big = unit; + } + + // Custom method for updating the variables + void update() { + x = x + (speed * xdir); + if (x >= big || x <= 0) { + xdir *= -1; + x = x + (1 * xdir); + y = y + (1 * ydir); + } + if (y >= big || 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/android/examples/Basics/Arrays/ArrayObjects/applet/ArrayObjects.java b/android/examples/Basics/Arrays/ArrayObjects/applet/ArrayObjects.java new file mode 100644 index 000000000..3ce1aa1a9 --- /dev/null +++ b/android/examples/Basics/Arrays/ArrayObjects/applet/ArrayObjects.java @@ -0,0 +1,94 @@ +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/android/examples/Basics/Arrays/ArrayObjects/applet/ArrayObjects.pde b/android/examples/Basics/Arrays/ArrayObjects/applet/ArrayObjects.pde new file mode 100644 index 000000000..c2ea3b4a2 --- /dev/null +++ b/android/examples/Basics/Arrays/ArrayObjects/applet/ArrayObjects.pde @@ -0,0 +1,74 @@ +/** + * 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/android/examples/Basics/Arrays/ArrayObjects/applet/loading.gif b/android/examples/Basics/Arrays/ArrayObjects/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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=3KK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6v01DUu2{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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Color/Brightness/Brightness.pde b/android/examples/Basics/Color/Brightness/Brightness.pde new file mode 100644 index 000000000..a91331e30 --- /dev/null +++ b/android/examples/Basics/Color/Brightness/Brightness.pde @@ -0,0 +1,29 @@ +/** + * 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. + * + * Updated 28 February 2010. + */ + +int barWidth = 5; +int lastBar = -1; + +void setup() { + size(200, 200); + colorMode(HSB, 360, 100, height); + noStroke(); + background(0); +} + +void draw() { + int whichBar = mouseX / barWidth; + if (whichBar != lastBar) { + int barX = whichBar * barWidth; + fill(barX, 100, mouseY); + rect(barX, 0, barWidth, height); + lastBar = whichBar; + } +} diff --git a/android/examples/Basics/Color/Brightness/applet/Brightness.java b/android/examples/Basics/Color/Brightness/applet/Brightness.java new file mode 100644 index 000000000..03e7c208c --- /dev/null +++ b/android/examples/Basics/Color/Brightness/applet/Brightness.java @@ -0,0 +1,51 @@ +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/android/examples/Basics/Color/Brightness/applet/Brightness.pde b/android/examples/Basics/Color/Brightness/applet/Brightness.pde new file mode 100644 index 000000000..c9dba6d28 --- /dev/null +++ b/android/examples/Basics/Color/Brightness/applet/Brightness.pde @@ -0,0 +1,31 @@ +/** + * 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/android/examples/Basics/Color/Brightness/applet/loading.gif b/android/examples/Basics/Color/Brightness/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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@v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=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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Color/ColorWheel/ColorWheel.pde b/android/examples/Basics/Color/ColorWheel/ColorWheel.pde new file mode 100644 index 000000000..69c34602a --- /dev/null +++ b/android/examples/Basics/Color/ColorWheel/ColorWheel.pde @@ -0,0 +1,88 @@ +/** + * 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. + * + * Updated 26 February 2010. + */ + +int segs = 12; +int steps = 6; +float rotAdjust = TWO_PI / segs / 2; +float radius; +float segWidth; +float interval = TWO_PI / segs; + + +void setup() { + size(200, 200); + background(127); + smooth(); + ellipseMode(RADIUS); + noStroke(); + // make the diameter 90% of the sketch area + radius = min(width, height) * 0.45; + segWidth = radius / steps; + + // swap which line is commented out to draw the other version + //drawTintWheel(); + drawShadeWheel(); +} + + +void drawShadeWheel() { + for (int j = 0; j < steps; j++) { + color[] cols = { + color(255-(255/steps)*j, 255-(255/steps)*j, 0), + color(255-(255/steps)*j, (255/1.5)-((255/1.5)/steps)*j, 0), + color(255-(255/steps)*j, (255/2)-((255/2)/steps)*j, 0), + color(255-(255/steps)*j, (255/2.5)-((255/2.5)/steps)*j, 0), + color(255-(255/steps)*j, 0, 0), + color(255-(255/steps)*j, 0, (255/2)-((255/2)/steps)*j), + color(255-(255/steps)*j, 0, 255-(255/steps)*j), + color((255/2)-((255/2)/steps)*j, 0, 255-(255/steps)*j), + color(0, 0, 255-(255/steps)*j), + color(0, 255-(255/steps)*j, (255/2.5)-((255/2.5)/steps)*j), + color(0, 255-(255/steps)*j, 0), + color((255/2)-((255/2)/steps)*j, 255-(255/steps)*j, 0) + }; + for (int i = 0; i < segs; i++) { + fill(cols[i]); + arc(width/2, height/2, radius, radius, + interval*i+rotAdjust, interval*(i+1)+rotAdjust); + } + radius -= segWidth; + } +} + + +void drawTintWheel() { + for (int j = 0; j < steps; j++) { + color[] cols = { + color((255/steps)*j, (255/steps)*j, 0), + color((255/steps)*j, ((255/1.5)/steps)*j, 0), + color((255/steps)*j, ((255/2)/steps)*j, 0), + color((255/steps)*j, ((255/2.5)/steps)*j, 0), + color((255/steps)*j, 0, 0), + color((255/steps)*j, 0, ((255/2)/steps)*j), + color((255/steps)*j, 0, (255/steps)*j), + color(((255/2)/steps)*j, 0, (255/steps)*j), + color(0, 0, (255/steps)*j), + color(0, (255/steps)*j, ((255/2.5)/steps)*j), + color(0, (255/steps)*j, 0), + color(((255/2)/steps)*j, (255/steps)*j, 0) + }; + for (int i = 0; i < segs; i++) { + fill(cols[i]); + arc(width/2, height/2, radius, radius, + interval*i+rotAdjust, interval*(i+1)+rotAdjust); + } + radius -= segWidth; + } +} diff --git a/android/examples/Basics/Color/ColorWheel/applet/ColorWheel.java b/android/examples/Basics/Color/ColorWheel/applet/ColorWheel.java new file mode 100644 index 000000000..c9ecabb74 --- /dev/null +++ b/android/examples/Basics/Color/ColorWheel/applet/ColorWheel.java @@ -0,0 +1,99 @@ +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=?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!dc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HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Color/Creating/Creating.pde b/android/examples/Basics/Color/Creating/Creating.pde new file mode 100644 index 000000000..628e1f7ac --- /dev/null +++ b/android/examples/Basics/Color/Creating/Creating.pde @@ -0,0 +1,26 @@ +/** + * 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/android/examples/Basics/Color/Creating/applet/Creating.java b/android/examples/Basics/Color/Creating/applet/Creating.java new file mode 100644 index 000000000..a999e8a55 --- /dev/null +++ b/android/examples/Basics/Color/Creating/applet/Creating.java @@ -0,0 +1,47 @@ +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/android/examples/Basics/Color/Creating/applet/Creating.pde b/android/examples/Basics/Color/Creating/applet/Creating.pde new file mode 100644 index 000000000..628e1f7ac --- /dev/null +++ b/android/examples/Basics/Color/Creating/applet/Creating.pde @@ -0,0 +1,26 @@ +/** + * 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/android/examples/Basics/Color/Creating/applet/loading.gif b/android/examples/Basics/Color/Creating/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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$vJ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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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Color/Hue/Hue.pde b/android/examples/Basics/Color/Hue/Hue.pde new file mode 100644 index 000000000..b22ffb535 --- /dev/null +++ b/android/examples/Basics/Color/Hue/Hue.pde @@ -0,0 +1,31 @@ +/** + * 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/android/examples/Basics/Color/Hue/applet/Hue.java b/android/examples/Basics/Color/Hue/applet/Hue.java new file mode 100644 index 000000000..e75799f52 --- /dev/null +++ b/android/examples/Basics/Color/Hue/applet/Hue.java @@ -0,0 +1,51 @@ +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/android/examples/Basics/Color/Hue/applet/Hue.pde b/android/examples/Basics/Color/Hue/applet/Hue.pde new file mode 100644 index 000000000..b22ffb535 --- /dev/null +++ b/android/examples/Basics/Color/Hue/applet/Hue.pde @@ -0,0 +1,31 @@ +/** + * 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/android/examples/Basics/Color/Hue/applet/loading.gif b/android/examples/Basics/Color/Hue/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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$vZ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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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Color/LinearGradient/LinearGradient.pde b/android/examples/Basics/Color/LinearGradient/LinearGradient.pde new file mode 100644 index 000000000..f41fc2b66 --- /dev/null +++ b/android/examples/Basics/Color/LinearGradient/LinearGradient.pde @@ -0,0 +1,73 @@ +/** + * 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/android/examples/Basics/Color/LinearGradient/applet/LinearGradient.java b/android/examples/Basics/Color/LinearGradient/applet/LinearGradient.java new file mode 100644 index 000000000..6fbbc5c2e --- /dev/null +++ b/android/examples/Basics/Color/LinearGradient/applet/LinearGradient.java @@ -0,0 +1,93 @@ +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/android/examples/Basics/Color/LinearGradient/applet/LinearGradient.pde b/android/examples/Basics/Color/LinearGradient/applet/LinearGradient.pde new file mode 100644 index 000000000..f41fc2b66 --- /dev/null +++ b/android/examples/Basics/Color/LinearGradient/applet/LinearGradient.pde @@ -0,0 +1,73 @@ +/** + * 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/android/examples/Basics/Color/LinearGradient/applet/loading.gif b/android/examples/Basics/Color/LinearGradient/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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;o7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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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Color/RadialGradient/RadialGradient.pde b/android/examples/Basics/Color/RadialGradient/RadialGradient.pde new file mode 100644 index 000000000..f5ba2b3fe --- /dev/null +++ b/android/examples/Basics/Color/RadialGradient/RadialGradient.pde @@ -0,0 +1,58 @@ +/** + * 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/android/examples/Basics/Color/RadialGradient/applet/RadialGradient.java b/android/examples/Basics/Color/RadialGradient/applet/RadialGradient.java new file mode 100644 index 000000000..1ba6eaa19 --- /dev/null +++ b/android/examples/Basics/Color/RadialGradient/applet/RadialGradient.java @@ -0,0 +1,78 @@ +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/android/examples/Basics/Color/RadialGradient/applet/RadialGradient.pde b/android/examples/Basics/Color/RadialGradient/applet/RadialGradient.pde new file mode 100644 index 000000000..f5ba2b3fe --- /dev/null +++ b/android/examples/Basics/Color/RadialGradient/applet/RadialGradient.pde @@ -0,0 +1,58 @@ +/** + * 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/android/examples/Basics/Color/RadialGradient/applet/loading.gif b/android/examples/Basics/Color/RadialGradient/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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?|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rCT8XprHsO#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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Color/RadialGradient2/RadialGradient2.pde b/android/examples/Basics/Color/RadialGradient2/RadialGradient2.pde new file mode 100644 index 000000000..ad571fcc0 --- /dev/null +++ b/android/examples/Basics/Color/RadialGradient2/RadialGradient2.pde @@ -0,0 +1,43 @@ +/** + * Inspired by Ira Greenberg's RadialGradient sketch, + * but uses a different method for the gradients. + */ + +int dim = 40; + +void setup() { + size(200, 200); + background(0); + smooth(); + noStroke(); + ellipseMode(RADIUS); + + // create a simple table of gradients + int rows = height / dim; + int cols = width / dim; + + for (int row = 0; row < rows; row++) { + for (int col = 0; col < cols; col++) { + drawGradient(col*dim + dim/2, row*dim + dim/2); + } + } +} + +void drawGradient(float x, float y) { + int radius = dim/2 - 2; + float r1 = random(255); + float g1 = random(255); + float b1 = random(255); + float dr = (random(255) - r1) / radius; + float dg = (random(255) - g1) / radius; + float db = (random(255) - b1) / radius; + + for (int r = radius; r > 0; --r) { + fill(r1, g1, b1); + ellipse(x, y, r, r); + r1 += dr; + g1 += dg; + b1 += db; + } +} + diff --git a/android/examples/Basics/Color/Reading/Reading.pde b/android/examples/Basics/Color/Reading/Reading.pde new file mode 100644 index 000000000..d142aff88 --- /dev/null +++ b/android/examples/Basics/Color/Reading/Reading.pde @@ -0,0 +1,46 @@ +/** + * 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 img = loadImage("cait.jpg"); +img.loadPixels(); + +// figure out how big to make each block based on +// the sketch area and the size of the input image +int eachW = width / img.width; +int eachH = height / img.height; +int each = min(eachW, eachH); +// vertical stripes will be a third as wide +int stripeW = each / 3; +// make sure the block size is a multiple of 3 +each = 3 * stripeW; + +int left = (width - (img.width * each)) / 2; +int top = (height - (img.height * each)) / 2; + +for (int y = 0; y < img.height; y++) { + int y1 = top + y*each; + + for (int x = 0; x < img.width; x++) { + int pixel = img.get(x, y); + int x1 = left + x*each; + + fill(red(pixel), 0, 0); + rect(x1 + stripeW*0, y1, stripeW, each); + + fill(0, green(pixel), 0); + rect(x1 + stripeW*1, y1, stripeW, each); + + fill(0, 0, blue(pixel)); + rect(x1 + stripeW*2, y1, stripeW, each); + } +} diff --git a/android/examples/Basics/Color/Reading/applet/Reading.java b/android/examples/Basics/Color/Reading/applet/Reading.java new file mode 100644 index 000000000..5ce02d462 --- /dev/null +++ b/android/examples/Basics/Color/Reading/applet/Reading.java @@ -0,0 +1,63 @@ +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/android/examples/Basics/Color/Reading/applet/Reading.pde b/android/examples/Basics/Color/Reading/applet/Reading.pde new file mode 100644 index 000000000..6f1ec2042 --- /dev/null +++ b/android/examples/Basics/Color/Reading/applet/Reading.pde @@ -0,0 +1,42 @@ +/** + * 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/android/examples/Basics/Color/Reading/applet/loading.gif b/android/examples/Basics/Color/Reading/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X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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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Color/Relativity/Relativity.pde b/android/examples/Basics/Color/Relativity/Relativity.pde new file mode 100644 index 000000000..9332e9baf --- /dev/null +++ b/android/examples/Basics/Color/Relativity/Relativity.pde @@ -0,0 +1,42 @@ +/** + * 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, width/50); + drawBand(c, a, d, b, e, height/2, width/50); +} + +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/android/examples/Basics/Color/Relativity/applet/Relativity.java b/android/examples/Basics/Color/Relativity/applet/Relativity.java new file mode 100644 index 000000000..3612db49e --- /dev/null +++ b/android/examples/Basics/Color/Relativity/applet/Relativity.java @@ -0,0 +1,62 @@ +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/android/examples/Basics/Color/Relativity/applet/Relativity.pde b/android/examples/Basics/Color/Relativity/applet/Relativity.pde new file mode 100644 index 000000000..59a3365a6 --- /dev/null +++ b/android/examples/Basics/Color/Relativity/applet/Relativity.pde @@ -0,0 +1,42 @@ +/** + * 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/android/examples/Basics/Color/Relativity/applet/loading.gif b/android/examples/Basics/Color/Relativity/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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^F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d00001 diff --git a/android/examples/Basics/Color/Saturation/Saturation.pde b/android/examples/Basics/Color/Saturation/Saturation.pde new file mode 100644 index 000000000..84137147e --- /dev/null +++ b/android/examples/Basics/Color/Saturation/Saturation.pde @@ -0,0 +1,29 @@ +/** + * 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 lastBar = -1; + + +void setup() { + size(200, 200); + colorMode(HSB, width, height, 100); + noStroke(); +} + + +void draw() { + int whichBar = mouseX / barWidth; + if (whichBar != lastBar) { + int barX = whichBar * barWidth; + fill(barX, mouseY, 66); + rect(barX, 0, barWidth, height); + lastBar = whichBar; + } +} diff --git a/android/examples/Basics/Color/Saturation/applet/Saturation.java b/android/examples/Basics/Color/Saturation/applet/Saturation.java new file mode 100644 index 000000000..62ac4f2f0 --- /dev/null +++ b/android/examples/Basics/Color/Saturation/applet/Saturation.java @@ -0,0 +1,52 @@ +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/android/examples/Basics/Color/Saturation/applet/Saturation.pde b/android/examples/Basics/Color/Saturation/applet/Saturation.pde new file mode 100644 index 000000000..0902ead92 --- /dev/null +++ b/android/examples/Basics/Color/Saturation/applet/Saturation.pde @@ -0,0 +1,32 @@ +/** + * 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/android/examples/Basics/Color/Saturation/applet/loading.gif b/android/examples/Basics/Color/Saturation/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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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8vec&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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Color/WaveGradient/WaveGradient.pde b/android/examples/Basics/Color/WaveGradient/WaveGradient.pde new file mode 100644 index 000000000..eac305093 --- /dev/null +++ b/android/examples/Basics/Color/WaveGradient/WaveGradient.pde @@ -0,0 +1,39 @@ +/** + * 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.5; +color c; + +void setup() { + size(200, 200); + background(200,200,200); + noLoop(); +} + +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+=.006; + 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&p0$OeJNd*RgRf1TE3D_Kg*5Hw&98*cdlta5kB$11s?3CeZK-H1h zK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w0u}(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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Control/Conditionals1/Conditionals1.pde b/android/examples/Basics/Control/Conditionals1/Conditionals1.pde new file mode 100644 index 000000000..8ea0ee3f5 --- /dev/null +++ b/android/examples/Basics/Control/Conditionals1/Conditionals1.pde @@ -0,0 +1,26 @@ +/** + * 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~&+!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-?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6I<;ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Control/Conditionals2/Conditionals2.pde b/android/examples/Basics/Control/Conditionals2/Conditionals2.pde new file mode 100644 index 000000000..d9c7d707f --- /dev/null +++ b/android/examples/Basics/Control/Conditionals2/Conditionals2.pde @@ -0,0 +1,26 @@ +/** + * 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_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_QIQ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EmbeddedIteration/EmbeddedIteration.pde b/android/examples/Basics/Control/EmbeddedIteration/EmbeddedIteration.pde new file mode 100644 index 000000000..3473aca2e --- /dev/null +++ b/android/examples/Basics/Control/EmbeddedIteration/EmbeddedIteration.pde @@ -0,0 +1,27 @@ +/** + * 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/android/examples/Basics/Control/EmbeddedIteration/applet/EmbeddedIteration.java b/android/examples/Basics/Control/EmbeddedIteration/applet/EmbeddedIteration.java new file mode 100644 index 000000000..8c0056bbf --- /dev/null +++ b/android/examples/Basics/Control/EmbeddedIteration/applet/EmbeddedIteration.java @@ -0,0 +1,48 @@ +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/android/examples/Basics/Control/EmbeddedIteration/applet/EmbeddedIteration.pde b/android/examples/Basics/Control/EmbeddedIteration/applet/EmbeddedIteration.pde new file mode 100644 index 000000000..3473aca2e --- /dev/null +++ b/android/examples/Basics/Control/EmbeddedIteration/applet/EmbeddedIteration.pde @@ -0,0 +1,27 @@ +/** + * 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/android/examples/Basics/Control/EmbeddedIteration/applet/loading.gif b/android/examples/Basics/Control/EmbeddedIteration/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Control/Iteration/Iteration.pde b/android/examples/Basics/Control/Iteration/Iteration.pde new file mode 100644 index 000000000..722806122 --- /dev/null +++ b/android/examples/Basics/Control/Iteration/Iteration.pde @@ -0,0 +1,45 @@ +/** + * 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/android/examples/Basics/Control/Iteration/applet/Iteration.java b/android/examples/Basics/Control/Iteration/applet/Iteration.java new file mode 100644 index 000000000..56274253b --- /dev/null +++ b/android/examples/Basics/Control/Iteration/applet/Iteration.java @@ -0,0 +1,66 @@ +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/android/examples/Basics/Control/Iteration/applet/Iteration.pde b/android/examples/Basics/Control/Iteration/applet/Iteration.pde new file mode 100644 index 000000000..722806122 --- /dev/null +++ b/android/examples/Basics/Control/Iteration/applet/Iteration.pde @@ -0,0 +1,45 @@ +/** + * 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/android/examples/Basics/Control/Iteration/applet/loading.gif b/android/examples/Basics/Control/Iteration/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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^-XuEREr5Rlu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MwS)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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Control/LogicalOperators/LogicalOperators.pde b/android/examples/Basics/Control/LogicalOperators/LogicalOperators.pde new file mode 100644 index 000000000..d9329c004 --- /dev/null +++ b/android/examples/Basics/Control/LogicalOperators/LogicalOperators.pde @@ -0,0 +1,45 @@ +/** + * 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/android/examples/Basics/Control/LogicalOperators/applet/LogicalOperators.java b/android/examples/Basics/Control/LogicalOperators/applet/LogicalOperators.java new file mode 100644 index 000000000..bf9354786 --- /dev/null +++ b/android/examples/Basics/Control/LogicalOperators/applet/LogicalOperators.java @@ -0,0 +1,66 @@ +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/android/examples/Basics/Control/LogicalOperators/applet/LogicalOperators.pde b/android/examples/Basics/Control/LogicalOperators/applet/LogicalOperators.pde new file mode 100644 index 000000000..d9329c004 --- /dev/null +++ b/android/examples/Basics/Control/LogicalOperators/applet/LogicalOperators.pde @@ -0,0 +1,45 @@ +/** + * 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/android/examples/Basics/Control/LogicalOperators/applet/loading.gif b/android/examples/Basics/Control/LogicalOperators/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Data/CharactersStrings/CharactersStrings.pde b/android/examples/Basics/Data/CharactersStrings/CharactersStrings.pde new file mode 100644 index 000000000..c5b528562 --- /dev/null +++ b/android/examples/Basics/Data/CharactersStrings/CharactersStrings.pde @@ -0,0 +1,82 @@ +/** + * 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 font; +int xoffset; +char letter; + +void setup() +{ + size(200, 200, P2D); + + font = loadFont("Eureka-90.vlw"); + textFont(font); + // Draw text more accurately and efficiently. + textMode(SCREEN); + textAlign(CENTER); + + // 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 + + // Same as image(frog, xoffset, 0), but more efficient + // because no transformations or tint() or smooth() are used. + set(xoffset, 0, frog); + + // Draw an X + line(0, 0, width, height); + line(0, height, width, 0); + +// // Get the width of the letter +// float letterWidth = textWidth(letter); +// + // Draw the letter to the center of the screen + text(letter, width/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') { + // Map the index of the key pressed from the range between 'A' and 'z', + // into a position for the left edge of the image. The maximum xoffset + // is the width of the drawing area minus the size of the image. + xoffset = int(map(key, 'A', 'z', 0, width - frog.width)); + // Update the letter shown to the screen + letter = key; + // Write the letter to the console + println(key); + } +} diff --git a/android/examples/Basics/Data/CharactersStrings/applet/CharactersStrings.java b/android/examples/Basics/Data/CharactersStrings/applet/CharactersStrings.java new file mode 100644 index 000000000..6d3433d02 --- /dev/null +++ b/android/examples/Basics/Data/CharactersStrings/applet/CharactersStrings.java @@ -0,0 +1,101 @@ +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/android/examples/Basics/Data/CharactersStrings/applet/CharactersStrings.pde b/android/examples/Basics/Data/CharactersStrings/applet/CharactersStrings.pde new file mode 100644 index 000000000..868037671 --- /dev/null +++ b/android/examples/Basics/Data/CharactersStrings/applet/CharactersStrings.pde @@ -0,0 +1,81 @@ +/** + * 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/android/examples/Basics/Data/CharactersStrings/applet/loading.gif b/android/examples/Basics/Data/CharactersStrings/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Data/CharactersStrings/data/Eureka-90.vlw b/android/examples/Basics/Data/CharactersStrings/data/Eureka-90.vlw new file mode 100644 index 0000000000000000000000000000000000000000..d78d182728e860c712252da68669136d9bbede4a GIT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KDEz!{)iouUX?)(2}d zbdXIKpRF+>-v03Pw6_6+;f<$GpS%0`!MVP!y&O2gUj@3ZPtkD>a5SD96t1Vj(;|Au z`IDwoD%fdKJpSwK$tOU5J$HcPsUV>7+~f}gi`p}UVGDP4pI}n(Vt9BM)To!rsg=Rl zequ5O=o_4C_y$*PkP)EOZWv8^bnq4lm;(VHEn3~_4W8N{Ex_!LlL9oGO~Dcfh^gRi zV+f4pTEH_cOA5H70QDLQk zk_t2vwK_}yeZ{X6XD_sPW74Dm42wDtO>@;n3h}>d2@2>Ucx*pT=QoIBoRULyK>>EQ zVSAK=8hB4jglWCki3J5%1IiVX4l~nS($4$FFaPAJWd{YAo~GPrRN^HCI;2_G;j3L7 z7d5xKf&#`h!$vf(AG*soagRaalBFO+z;n&G2*;qRNxs&(l}@aydK^Ptw(Kb>c&&jm zksU-=>r6n4W6G}mw;nN-dTjSC<-HkmlKCdo^1X$IqSFv0p z0jHJky!GLHU4^JCB%s#-Pbq2}3NRZ;Yz_BxfslZH!=}4V{1)GKKG4RxG=Z*=fLlg@ zNhwYc&uRuxNkm;PoqPzL?c$?OFp3LSf(OGpg zzg;+JYa6_}8p9ThbH@EAY7C$K3I$xlv=KupPH{XP!2v=2k#ii4p(u170qt6}+R7Rf c&}9C!OgB9iH;_*|w1wojdLC8Jqb}wD0OH*>wg3PC literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Data/DatatypeConversion/DatatypeConversion.pde b/android/examples/Basics/Data/DatatypeConversion/DatatypeConversion.pde new file mode 100644 index 000000000..381afd181 --- /dev/null +++ b/android/examples/Basics/Data/DatatypeConversion/DatatypeConversion.pde @@ -0,0 +1,28 @@ +/** + * 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/android/examples/Basics/Data/DatatypeConversion/applet/DatatypeConversion.java b/android/examples/Basics/Data/DatatypeConversion/applet/DatatypeConversion.java new file mode 100644 index 000000000..d9b5077a0 --- /dev/null +++ b/android/examples/Basics/Data/DatatypeConversion/applet/DatatypeConversion.java @@ -0,0 +1,49 @@ +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/android/examples/Basics/Data/DatatypeConversion/applet/DatatypeConversion.pde b/android/examples/Basics/Data/DatatypeConversion/applet/DatatypeConversion.pde new file mode 100644 index 000000000..381afd181 --- /dev/null +++ b/android/examples/Basics/Data/DatatypeConversion/applet/DatatypeConversion.pde @@ -0,0 +1,28 @@ +/** + * 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/android/examples/Basics/Data/DatatypeConversion/applet/loading.gif b/android/examples/Basics/Data/DatatypeConversion/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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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ZIrfYug| z;vJ&YjwXRcnBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Data/IntegersFloats/IntegersFloats.pde b/android/examples/Basics/Data/IntegersFloats/IntegersFloats.pde new file mode 100644 index 000000000..87bf67f19 --- /dev/null +++ b/android/examples/Basics/Data/IntegersFloats/IntegersFloats.pde @@ -0,0 +1,36 @@ +/** + * 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/android/examples/Basics/Data/IntegersFloats/applet/IntegersFloats.java b/android/examples/Basics/Data/IntegersFloats/applet/IntegersFloats.java new file mode 100644 index 000000000..e705fde4c --- /dev/null +++ b/android/examples/Basics/Data/IntegersFloats/applet/IntegersFloats.java @@ -0,0 +1,56 @@ +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/android/examples/Basics/Data/IntegersFloats/applet/IntegersFloats.pde b/android/examples/Basics/Data/IntegersFloats/applet/IntegersFloats.pde new file mode 100644 index 000000000..87bf67f19 --- /dev/null +++ b/android/examples/Basics/Data/IntegersFloats/applet/IntegersFloats.pde @@ -0,0 +1,36 @@ +/** + * 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/android/examples/Basics/Data/IntegersFloats/applet/loading.gif b/android/examples/Basics/Data/IntegersFloats/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Data/TrueFalse/TrueFalse.pde b/android/examples/Basics/Data/TrueFalse/TrueFalse.pde new file mode 100644 index 000000000..c4bb0531f --- /dev/null +++ b/android/examples/Basics/Data/TrueFalse/TrueFalse.pde @@ -0,0 +1,34 @@ +/** + * 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/android/examples/Basics/Data/TrueFalse/applet/TrueFalse.java b/android/examples/Basics/Data/TrueFalse/applet/TrueFalse.java new file mode 100644 index 000000000..0d30054b6 --- /dev/null +++ b/android/examples/Basics/Data/TrueFalse/applet/TrueFalse.java @@ -0,0 +1,55 @@ +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/android/examples/Basics/Data/TrueFalse/applet/TrueFalse.pde b/android/examples/Basics/Data/TrueFalse/applet/TrueFalse.pde new file mode 100644 index 000000000..c4bb0531f --- /dev/null +++ b/android/examples/Basics/Data/TrueFalse/applet/TrueFalse.pde @@ -0,0 +1,34 @@ +/** + * 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/android/examples/Basics/Data/TrueFalse/applet/loading.gif b/android/examples/Basics/Data/TrueFalse/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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~z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h9(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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Data/VariableScope/VariableScope.pde b/android/examples/Basics/Data/VariableScope/VariableScope.pde new file mode 100644 index 000000000..8c2ae3559 --- /dev/null +++ b/android/examples/Basics/Data/VariableScope/VariableScope.pde @@ -0,0 +1,61 @@ +/** + * 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/android/examples/Basics/Data/VariableScope/applet/VariableScope.java b/android/examples/Basics/Data/VariableScope/applet/VariableScope.java new file mode 100644 index 000000000..426ba59a1 --- /dev/null +++ b/android/examples/Basics/Data/VariableScope/applet/VariableScope.java @@ -0,0 +1,81 @@ +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/android/examples/Basics/Data/VariableScope/applet/VariableScope.pde b/android/examples/Basics/Data/VariableScope/applet/VariableScope.pde new file mode 100644 index 000000000..8c2ae3559 --- /dev/null +++ b/android/examples/Basics/Data/VariableScope/applet/VariableScope.pde @@ -0,0 +1,61 @@ +/** + * 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/android/examples/Basics/Data/VariableScope/applet/loading.gif b/android/examples/Basics/Data/VariableScope/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Data/Variables/Variables.pde b/android/examples/Basics/Data/Variables/Variables.pde new file mode 100644 index 000000000..9566ae472 --- /dev/null +++ b/android/examples/Basics/Data/Variables/Variables.pde @@ -0,0 +1,23 @@ +/** + * 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/android/examples/Basics/Data/Variables/applet/Variables.java b/android/examples/Basics/Data/Variables/applet/Variables.java new file mode 100644 index 000000000..60471a43b --- /dev/null +++ b/android/examples/Basics/Data/Variables/applet/Variables.java @@ -0,0 +1,44 @@ +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/android/examples/Basics/Data/Variables/applet/Variables.pde b/android/examples/Basics/Data/Variables/applet/Variables.pde new file mode 100644 index 000000000..9566ae472 --- /dev/null +++ b/android/examples/Basics/Data/Variables/applet/Variables.pde @@ -0,0 +1,23 @@ +/** + * 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/android/examples/Basics/Data/Variables/applet/loading.gif b/android/examples/Basics/Data/Variables/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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?t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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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Form/Bezier/Bezier.pde b/android/examples/Basics/Form/Bezier/Bezier.pde new file mode 100644 index 000000000..e0b53db21 --- /dev/null +++ b/android/examples/Basics/Form/Bezier/Bezier.pde @@ -0,0 +1,18 @@ +/** + * 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/android/examples/Basics/Form/Bezier/applet/Bezier.java b/android/examples/Basics/Form/Bezier/applet/Bezier.java new file mode 100644 index 000000000..1b0a14a3b --- /dev/null +++ b/android/examples/Basics/Form/Bezier/applet/Bezier.java @@ -0,0 +1,39 @@ +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/android/examples/Basics/Form/Bezier/applet/Bezier.pde b/android/examples/Basics/Form/Bezier/applet/Bezier.pde new file mode 100644 index 000000000..e0b53db21 --- /dev/null +++ b/android/examples/Basics/Form/Bezier/applet/Bezier.pde @@ -0,0 +1,18 @@ +/** + * 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/android/examples/Basics/Form/Bezier/applet/loading.gif b/android/examples/Basics/Form/Bezier/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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_4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by 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Form/BezierEllipse/BezierEllipse.pde b/android/examples/Basics/Form/BezierEllipse/BezierEllipse.pde new file mode 100644 index 000000000..7db555f8c --- /dev/null +++ b/android/examples/Basics/Form/BezierEllipse/BezierEllipse.pde @@ -0,0 +1,103 @@ +/** + * 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; + +color controlPtCol = #222222; +color anchorPtCol = #BBBBBB; + +void setup(){ + size(200, 200); + smooth(); + setEllipse(pts, 65, 65); + frameRate(1); +} + +void draw(){ + background(145); + drawEllipse(); + setEllipse(int(random(3, 12)), random(-100, 150), random(-100, 150)); +} + +// draw ellipse with anchor/control points +void drawEllipse(){ + strokeWeight(1.125); + 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 +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; 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%2YZ7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MkkY^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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Form/PieChart/PieChart.pde b/android/examples/Basics/Form/PieChart/PieChart.pde new file mode 100644 index 000000000..b1a3622d6 --- /dev/null +++ b/android/examples/Basics/Form/PieChart/PieChart.pde @@ -0,0 +1,23 @@ +/** + * 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(); + +float diameter = min(width, height) * 0.75; +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/android/examples/Basics/Form/PieChart/applet/PieChart.java b/android/examples/Basics/Form/PieChart/applet/PieChart.java new file mode 100644 index 000000000..35a008490 --- /dev/null +++ b/android/examples/Basics/Form/PieChart/applet/PieChart.java @@ -0,0 +1,44 @@ +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/android/examples/Basics/Form/PieChart/applet/PieChart.pde b/android/examples/Basics/Form/PieChart/applet/PieChart.pde new file mode 100644 index 000000000..3c6720e1a --- /dev/null +++ b/android/examples/Basics/Form/PieChart/applet/PieChart.pde @@ -0,0 +1,23 @@ +/** + * 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/android/examples/Basics/Form/PieChart/applet/loading.gif b/android/examples/Basics/Form/PieChart/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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~z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h9(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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Form/PointsLines/PointsLines.pde b/android/examples/Basics/Form/PointsLines/PointsLines.pde new file mode 100644 index 000000000..6c504f165 --- /dev/null +++ b/android/examples/Basics/Form/PointsLines/PointsLines.pde @@ -0,0 +1,32 @@ +/** + * 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/android/examples/Basics/Form/PointsLines/applet/PointsLines.java b/android/examples/Basics/Form/PointsLines/applet/PointsLines.java new file mode 100644 index 000000000..ad5b00407 --- /dev/null +++ b/android/examples/Basics/Form/PointsLines/applet/PointsLines.java @@ -0,0 +1,53 @@ +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/android/examples/Basics/Form/PointsLines/applet/PointsLines.pde b/android/examples/Basics/Form/PointsLines/applet/PointsLines.pde new file mode 100644 index 000000000..6c504f165 --- /dev/null +++ b/android/examples/Basics/Form/PointsLines/applet/PointsLines.pde @@ -0,0 +1,32 @@ +/** + * 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/android/examples/Basics/Form/PointsLines/applet/loading.gif b/android/examples/Basics/Form/PointsLines/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca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v=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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Form/ShapePrimitives/ShapePrimitives.pde b/android/examples/Basics/Form/ShapePrimitives/ShapePrimitives.pde new file mode 100644 index 000000000..4c0158f5d --- /dev/null +++ b/android/examples/Basics/Form/ShapePrimitives/ShapePrimitives.pde @@ -0,0 +1,21 @@ +/** + * 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 to determine the shape's 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/android/examples/Basics/Form/ShapePrimitives/applet/ShapePrimitives.java b/android/examples/Basics/Form/ShapePrimitives/applet/ShapePrimitives.java new file mode 100644 index 000000000..3356a28b7 --- /dev/null +++ b/android/examples/Basics/Form/ShapePrimitives/applet/ShapePrimitives.java @@ -0,0 +1,42 @@ +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/android/examples/Basics/Form/ShapePrimitives/applet/ShapePrimitives.pde b/android/examples/Basics/Form/ShapePrimitives/applet/ShapePrimitives.pde new file mode 100644 index 000000000..e06ca3929 --- /dev/null +++ b/android/examples/Basics/Form/ShapePrimitives/applet/ShapePrimitives.pde @@ -0,0 +1,21 @@ +/** + * 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/android/examples/Basics/Form/ShapePrimitives/applet/loading.gif b/android/examples/Basics/Form/ShapePrimitives/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Form/SimpleCurves/SimpleCurves.pde b/android/examples/Basics/Form/SimpleCurves/SimpleCurves.pde new file mode 100644 index 000000000..8507d6dc1 --- /dev/null +++ b/android/examples/Basics/Form/SimpleCurves/SimpleCurves.pde @@ -0,0 +1,81 @@ +/** + * 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/android/examples/Basics/Form/SimpleCurves/applet/SimpleCurves.java b/android/examples/Basics/Form/SimpleCurves/applet/SimpleCurves.java new file mode 100644 index 000000000..7a6f48e93 --- /dev/null +++ b/android/examples/Basics/Form/SimpleCurves/applet/SimpleCurves.java @@ -0,0 +1,101 @@ +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/android/examples/Basics/Form/SimpleCurves/applet/SimpleCurves.pde b/android/examples/Basics/Form/SimpleCurves/applet/SimpleCurves.pde new file mode 100644 index 000000000..8507d6dc1 --- /dev/null +++ b/android/examples/Basics/Form/SimpleCurves/applet/SimpleCurves.pde @@ -0,0 +1,81 @@ +/** + * 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/android/examples/Basics/Form/SimpleCurves/applet/loading.gif b/android/examples/Basics/Form/SimpleCurves/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Form/TriangleStrip/TriangleStrip.pde b/android/examples/Basics/Form/TriangleStrip/TriangleStrip.pde new file mode 100644 index 000000000..8ad1dbdc0 --- /dev/null +++ b/android/examples/Basics/Form/TriangleStrip/TriangleStrip.pde @@ -0,0 +1,36 @@ +/** + * 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; +float outerRad = min(width, height) * 0.4; +float innerRad = outerRad * 0.6; +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/android/examples/Basics/Form/TriangleStrip/applet/TriangleStrip.java b/android/examples/Basics/Form/TriangleStrip/applet/TriangleStrip.java new file mode 100644 index 000000000..ece5f8d81 --- /dev/null +++ b/android/examples/Basics/Form/TriangleStrip/applet/TriangleStrip.java @@ -0,0 +1,57 @@ +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/android/examples/Basics/Form/TriangleStrip/applet/TriangleStrip.pde b/android/examples/Basics/Form/TriangleStrip/applet/TriangleStrip.pde new file mode 100644 index 000000000..fdb99d032 --- /dev/null +++ b/android/examples/Basics/Form/TriangleStrip/applet/TriangleStrip.pde @@ -0,0 +1,36 @@ +/** + * 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/android/examples/Basics/Form/TriangleStrip/applet/loading.gif b/android/examples/Basics/Form/TriangleStrip/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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^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hGK_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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Form/Vertices/Vertices.pde b/android/examples/Basics/Form/Vertices/Vertices.pde new file mode 100644 index 000000000..f8c705650 --- /dev/null +++ b/android/examples/Basics/Form/Vertices/Vertices.pde @@ -0,0 +1,47 @@ +/** + * 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/android/examples/Basics/Form/Vertices/applet/Vertices.java b/android/examples/Basics/Form/Vertices/applet/Vertices.java new file mode 100644 index 000000000..062bc838f --- /dev/null +++ b/android/examples/Basics/Form/Vertices/applet/Vertices.java @@ -0,0 +1,68 @@ +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/android/examples/Basics/Form/Vertices/applet/Vertices.pde b/android/examples/Basics/Form/Vertices/applet/Vertices.pde new file mode 100644 index 000000000..f8c705650 --- /dev/null +++ b/android/examples/Basics/Form/Vertices/applet/Vertices.pde @@ -0,0 +1,47 @@ +/** + * 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/android/examples/Basics/Form/Vertices/applet/loading.gif b/android/examples/Basics/Form/Vertices/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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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android/examples/Basics/Image/Alphamask/Alphamask.pde new file mode 100644 index 000000000..59684e6a4 --- /dev/null +++ b/android/examples/Basics/Image/Alphamask/Alphamask.pde @@ -0,0 +1,24 @@ +/** + * 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); + imageMode(CENTER); +} + +void draw() { + background(map(mouseX+mouseY, 0, width+height, 0, 255)); + image(img, width/2, height/2); + image(img, mouseX, mouseY); +} diff --git a/android/examples/Basics/Image/Alphamask/applet/Alphamask.java b/android/examples/Basics/Image/Alphamask/applet/Alphamask.java new file mode 100644 index 000000000..2d0e3317d --- /dev/null +++ b/android/examples/Basics/Image/Alphamask/applet/Alphamask.java @@ -0,0 +1,45 @@ +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/android/examples/Basics/Image/Alphamask/applet/Alphamask.pde b/android/examples/Basics/Image/Alphamask/applet/Alphamask.pde new file mode 100644 index 000000000..6eb55ef9f --- /dev/null +++ b/android/examples/Basics/Image/Alphamask/applet/Alphamask.pde @@ -0,0 +1,25 @@ +/** + * 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/android/examples/Basics/Image/Alphamask/applet/loading.gif b/android/examples/Basics/Image/Alphamask/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Image/BackgroundImage/BackgroundImage.pde b/android/examples/Basics/Image/BackgroundImage/BackgroundImage.pde new file mode 100644 index 000000000..2c5f1aac8 --- /dev/null +++ b/android/examples/Basics/Image/BackgroundImage/BackgroundImage.pde @@ -0,0 +1,30 @@ +/** + * 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/android/examples/Basics/Image/BackgroundImage/applet/BackgroundImage.java b/android/examples/Basics/Image/BackgroundImage/applet/BackgroundImage.java new file mode 100644 index 000000000..b56dafb5b --- /dev/null +++ b/android/examples/Basics/Image/BackgroundImage/applet/BackgroundImage.java @@ -0,0 +1,50 @@ +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/android/examples/Basics/Image/BackgroundImage/applet/BackgroundImage.pde b/android/examples/Basics/Image/BackgroundImage/applet/BackgroundImage.pde new file mode 100644 index 000000000..2c5f1aac8 --- /dev/null +++ b/android/examples/Basics/Image/BackgroundImage/applet/BackgroundImage.pde @@ -0,0 +1,30 @@ +/** + * 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/android/examples/Basics/Image/BackgroundImage/applet/loading.gif b/android/examples/Basics/Image/BackgroundImage/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Image/CreateImage/CreateImage.pde b/android/examples/Basics/Image/CreateImage/CreateImage.pde new file mode 100644 index 000000000..df095a75e --- /dev/null +++ b/android/examples/Basics/Image/CreateImage/CreateImage.pde @@ -0,0 +1,24 @@ +/** + * 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/android/examples/Basics/Image/CreateImage/applet/CreateImage.java b/android/examples/Basics/Image/CreateImage/applet/CreateImage.java new file mode 100644 index 000000000..0ae2e5bd5 --- /dev/null +++ b/android/examples/Basics/Image/CreateImage/applet/CreateImage.java @@ -0,0 +1,44 @@ +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/android/examples/Basics/Image/CreateImage/applet/CreateImage.pde b/android/examples/Basics/Image/CreateImage/applet/CreateImage.pde new file mode 100644 index 000000000..df095a75e --- /dev/null +++ b/android/examples/Basics/Image/CreateImage/applet/CreateImage.pde @@ -0,0 +1,24 @@ +/** + * 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/android/examples/Basics/Image/CreateImage/applet/loading.gif b/android/examples/Basics/Image/CreateImage/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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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001 diff --git a/android/examples/Basics/Image/LoadDisplayImage/LoadDisplayImage.pde b/android/examples/Basics/Image/LoadDisplayImage/LoadDisplayImage.pde new file mode 100644 index 000000000..8252c5cbc --- /dev/null +++ b/android/examples/Basics/Image/LoadDisplayImage/LoadDisplayImage.pde @@ -0,0 +1,23 @@ +/** + * 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/android/examples/Basics/Image/LoadDisplayImage/applet/LoadDisplayImage.java b/android/examples/Basics/Image/LoadDisplayImage/applet/LoadDisplayImage.java new file mode 100644 index 000000000..8807d2d60 --- /dev/null +++ b/android/examples/Basics/Image/LoadDisplayImage/applet/LoadDisplayImage.java @@ -0,0 +1,44 @@ +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/android/examples/Basics/Image/LoadDisplayImage/applet/LoadDisplayImage.pde b/android/examples/Basics/Image/LoadDisplayImage/applet/LoadDisplayImage.pde new file mode 100644 index 000000000..8252c5cbc --- /dev/null +++ b/android/examples/Basics/Image/LoadDisplayImage/applet/LoadDisplayImage.pde @@ -0,0 +1,23 @@ +/** + * 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/android/examples/Basics/Image/LoadDisplayImage/applet/loading.gif b/android/examples/Basics/Image/LoadDisplayImage/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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?c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ycG%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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Image/Pointillism/Pointillism.pde b/android/examples/Basics/Image/Pointillism/Pointillism.pde new file mode 100644 index 000000000..3b7c96700 --- /dev/null +++ b/android/examples/Basics/Image/Pointillism/Pointillism.pde @@ -0,0 +1,38 @@ +/** + * 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. + * + * Updated 27 February 2010. + */ + +PImage img; + +int smallPoint = 2; +int largePoint; +int top, left; + +void setup() { + size(200, 200); + img = loadImage("eames.jpg"); + //img = loadImage("sunflower.jpg"); // an alternative image + noStroke(); + background(255); + smooth(); + largePoint = min(width, height) / 10; + // center the image on the screen + left = (width - img.width) / 2; + top = (height - img.height) / 2; +} + +void draw() { + float pointillize = map(mouseX, 0, width, smallPoint, largePoint); + int x = int(random(img.width)); + int y = int(random(img.height)); + color pix = img.get(x, y); + fill(pix, 128); + ellipse(left + x, top + y, pointillize, pointillize); +} diff --git a/android/examples/Basics/Image/Pointillism/applet/Pointillism.java b/android/examples/Basics/Image/Pointillism/applet/Pointillism.java new file mode 100644 index 000000000..a80eac561 --- /dev/null +++ b/android/examples/Basics/Image/Pointillism/applet/Pointillism.java @@ -0,0 +1,49 @@ +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/android/examples/Basics/Image/Pointillism/applet/Pointillism.pde b/android/examples/Basics/Image/Pointillism/applet/Pointillism.pde new file mode 100644 index 000000000..53f5c3a48 --- /dev/null +++ b/android/examples/Basics/Image/Pointillism/applet/Pointillism.pde @@ -0,0 +1,29 @@ +/** + * 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/android/examples/Basics/Image/Pointillism/applet/loading.gif b/android/examples/Basics/Image/Pointillism/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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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S)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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Image/RequestImage/RequestImage.pde b/android/examples/Basics/Image/RequestImage/RequestImage.pde new file mode 100644 index 000000000..0e835c7ca --- /dev/null +++ b/android/examples/Basics/Image/RequestImage/RequestImage.pde @@ -0,0 +1,91 @@ +/** + * Request Image + * by Ira Greenberg. + * From Processing for Flash Developers, Friends of ED, 2009. + * + * Shows how to use the requestImage() function with preloader animation. + * The requestImage() function loads images on a separate thread so that + * the sketch does not freeze while they load. It's very useful when you are + * loading large images, as this example demonstrates. + * + * To work, this example requires 10 images named dublin0.jpg ... dublin9.jpg + * in the sketch data directory. To save space, these images are not included + * with the example. + */ + +int imgCount = 10; +PImage[] imgs = new PImage[imgCount]; +float imgW; + +// Keeps track of loaded images (true or false) +boolean[] loadStates = new boolean[imgCount]; + +// For loading animation +float loaderX, loaderY, theta; + +void setup() { + size(800, 60); + smooth(); + imgW = width/imgCount; + + // Load images asynchronously + for (int i = 0; i < imgCount; i++){ + imgs[i] = requestImage("dublin"+i+".jpg"); + } +} + +void draw(){ + background(0); + + // Start loading animation + runLoaderAni(); + + for (int i = 0; i < imgs.length; i++){ + // Check if individual images are fully loaded + if ((imgs[i].width != 0) && (imgs[i].width != -1)){ + // As images are loaded set true in boolean array + loadStates[i] = true; + } + } + // When all images are loaded draw them to the screen + if (checkLoadStates()){ + drawImages(); + } +} + +void drawImages(){ + for (int i = 0; i < imgs.length; i++){ + image(imgs[i], width/10*i, 0, imgW, height); + } +} + +// Loading animation +void runLoaderAni(){ + // Only run when images are loading + if (!checkLoadStates()){ + ellipse(loaderX, loaderY, 10, 10); + loaderX += 2; + loaderY = height/2 + sin(theta) * (height/2.5); + theta += PI/22; + // Reposition ellipse if it goes off the screen + if (loaderX > width + 5){ + loaderX = -5; + } + } +} + +// Return true when all images are loaded - no false values left in array +boolean checkLoadStates(){ + for (int i = 0; i < imgs.length; i++){ + if (loadStates[i] == false){ + return false; + } + } + return true; +} + + + + + + diff --git a/android/examples/Basics/Image/Sprite/Sprite.pde b/android/examples/Basics/Image/Sprite/Sprite.pde new file mode 100644 index 000000000..2ea0c2782 --- /dev/null +++ b/android/examples/Basics/Image/Sprite/Sprite.pde @@ -0,0 +1,38 @@ +/** + * Sprite (Teddy) + * by James Patterson. + * + * Demonstrates loading and displaying a transparent GIF image. + */ + +PImage teddy; + +float xpos; +float ypos; +float drag = 30; + +void setup() { + size(200, 200); + teddy = loadImage("teddy.gif"); + xpos = width/2; + ypos = height/2; +} + +void draw() { + background(102); + + float difx = mouseX - xpos-teddy.width/2; + if (abs(difx) > 1) { + xpos = xpos + difx/drag; + xpos = constrain(xpos, 0, width-teddy.width); + } + + float dify = mouseY - ypos-teddy.height/2; + if (abs(dify) > 1) { + 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/android/examples/Basics/Image/Sprite/applet/Sprite.java b/android/examples/Basics/Image/Sprite/applet/Sprite.java new file mode 100644 index 000000000..c777d010f --- /dev/null +++ b/android/examples/Basics/Image/Sprite/applet/Sprite.java @@ -0,0 +1,61 @@ +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/android/examples/Basics/Image/Sprite/applet/Sprite.pde b/android/examples/Basics/Image/Sprite/applet/Sprite.pde new file mode 100644 index 000000000..b46edfc2f --- /dev/null +++ b/android/examples/Basics/Image/Sprite/applet/Sprite.pde @@ -0,0 +1,41 @@ +/** + * 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/android/examples/Basics/Image/Sprite/applet/loading.gif b/android/examples/Basics/Image/Sprite/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b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vfcd 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Image/Sprite/data/teddy.gif b/android/examples/Basics/Image/Sprite/data/teddy.gif new file mode 100644 index 0000000000000000000000000000000000000000..8994c1bdd611dc47c37554778e8fd9d2f67fa0b3 GIT binary patch literal 746 zcmVi|3L_yF&8i-mV88xd0mnj%eW{u~%qwh;h8VQBHqA^Fb{QxZH z@Cl7db<(NwR?RxI-0rZ&S$Uh1@u=nnhs|Zp7|B)hwsATuZ9j{na#x=Jw+EQCRc2Ko zXrTqw-hwS%nkL2RODVUUP0Nur`BaU3s{qlC3gd9jhgImTXAjEGa9FOS8H zihMLH)5N{b{j+|Gr ztz$2JGK(B|qBhEh{UU7|TK2or`$l3DEp{>NVX+=2*1emx#(dv=#~v-fqS#MBQmdZr z6!OzHV)b%99^2n>=*>B~uG2lD@Z6|waXejiwQ{>}KXN~|p8a-!LGgdPZ|GcDInkp9 zSJB-Cm3ZJG$CQHS(FWdVaDj#oU-tZG;cyUkCYXHlEeK+6Q^6yhf**F6+=&`}7GQQ< zmB<=(zr~j#hc1p&(1qA72v>%Lz1UNb#kmCGh(d0tR$4mN=u~(W%7tQsN`|PGK1)h@ z8!vacXWMn8p$E{A%1u(sgUt0PCW$4WDQ25$eRgyrQ7 cVaVXaBhU$oC{uhU%IF+w$k1q{4-^0ZJEcu&`2YX_ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Image/Sprite2/Sprite2.pde b/android/examples/Basics/Image/Sprite2/Sprite2.pde new file mode 100644 index 000000000..dff97453a --- /dev/null +++ b/android/examples/Basics/Image/Sprite2/Sprite2.pde @@ -0,0 +1,45 @@ +/** + * Sprite2 (Teddy) + * by James Patterson. + * + * Demonstrates loading and displaying a transparent GIF image. + * This alternate version shows a sky image in the background. + */ + +PImage teddy; +PImage sky; + +float xpos; +float ypos; +float drag = 30.0; + +void setup() { + size(200, 200); + teddy = loadImage("teddy.gif"); + sky = loadImage("sky.jpg"); + xpos = width/2; + ypos = height/2; + // resize the background image so that it fills the screen + if (sky.width != width || sky.height != height) { + sky.resize(width, height); + } +} + +void draw() { + background(sky); + + float difx = mouseX - xpos-teddy.width/2; + if (abs(difx) > 1) { + xpos = xpos + difx/drag; + xpos = constrain(xpos, 0, width-teddy.width); + } + + float dify = mouseY - ypos-teddy.height/2; + if (abs(dify) > 1 ) { + 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/android/examples/Basics/Image/Sprite2/data/teddy.gif b/android/examples/Basics/Image/Sprite2/data/teddy.gif new file mode 100644 index 0000000000000000000000000000000000000000..8994c1bdd611dc47c37554778e8fd9d2f67fa0b3 GIT binary patch literal 746 zcmVi|3L_yF&8i-mV88xd0mnj%eW{u~%qwh;h8VQBHqA^Fb{QxZH z@Cl7db<(NwR?RxI-0rZ&S$Uh1@u=nnhs|Zp7|B)hwsATuZ9j{na#x=Jw+EQCRc2Ko zXrTqw-hwS%nkL2RODVUUP0Nur`BaU3s{qlC3gd9jhgImTXAjEGa9FOS8H zihMLH)5N{b{j+|Gr ztz$2JGK(B|qBhEh{UU7|TK2or`$l3DEp{>NVX+=2*1emx#(dv=#~v-fqS#MBQmdZr z6!OzHV)b%99^2n>=*>B~uG2lD@Z6|waXejiwQ{>}KXN~|p8a-!LGgdPZ|GcDInkp9 zSJB-Cm3ZJG$CQHS(FWdVaDj#oU-tZG;cyUkCYXHlEeK+6Q^6yhf**F6+=&`}7GQQ< zmB<=(zr~j#hc1p&(1qA72v>%Lz1UNb#kmCGh(d0tR$4mN=u~(W%7tQsN`|PGK1)h@ z8!vacXWMn8p$E{A%1u(sgUt0PCW$4WDQ25$eRgyrQ7 cVaVXaBhU$oC{uhU%IF+w$k1q{4-^0ZJEcu&`2YX_ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Image/Transparency/Transparency.pde b/android/examples/Basics/Image/Transparency/Transparency.pde new file mode 100644 index 000000000..a528ddb35 --- /dev/null +++ b/android/examples/Basics/Image/Transparency/Transparency.pde @@ -0,0 +1,29 @@ +/** + * 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 +} + +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/android/examples/Basics/Image/Transparency/applet/Transparency.java b/android/examples/Basics/Image/Transparency/applet/Transparency.java new file mode 100644 index 000000000..1aff169ee --- /dev/null +++ b/android/examples/Basics/Image/Transparency/applet/Transparency.java @@ -0,0 +1,50 @@ +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/android/examples/Basics/Image/Transparency/applet/Transparency.pde b/android/examples/Basics/Image/Transparency/applet/Transparency.pde new file mode 100644 index 000000000..ec4f66658 --- /dev/null +++ b/android/examples/Basics/Image/Transparency/applet/Transparency.pde @@ -0,0 +1,30 @@ +/** + * 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/android/examples/Basics/Image/Transparency/applet/loading.gif b/android/examples/Basics/Image/Transparency/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch literal 2232 zcmV;p2uJrv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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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Input/Clock/Clock.pde b/android/examples/Basics/Input/Clock/Clock.pde new file mode 100644 index 000000000..27ce7b334 --- /dev/null +++ b/android/examples/Basics/Input/Clock/Clock.pde @@ -0,0 +1,64 @@ +/** + * 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. + * + * Updated 27 February 2010 to handle size() changes. + */ + +int cx, cy; +float secondsRadius; +float minutesRadius; +float hoursRadius; +float clockDiameter; + +void setup() { + size(200, 200); + stroke(255); + smooth(); + + int radius = min(width, height) / 2; + secondsRadius = radius * 0.72; + minutesRadius = radius * 0.60; + hoursRadius = radius * 0.50; + clockDiameter = radius * 1.8; + + cx = width / 2; + cy = height / 2; +} + +void draw2() { + background(0); + + // Draw the clock background + fill(80); + noStroke(); + ellipse(cx, cy, clockDiameter, clockDiameter); + + // Angles for sin() and cos() start at 3 o'clock; + // subtract HALF_PI to make them start at the top + 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; + + // Draw the hands of the clock + stroke(255); + strokeWeight(1); + line(cx, cy, cx + cos(s) * secondsRadius, cy + sin(s) * secondsRadius); + strokeWeight(2); + line(cx, cy, cx + cos(m) * minutesRadius, cy + sin(m) * minutesRadius); + strokeWeight(4); + line(cx, cy, cx + cos(h) * hoursRadius, cy + sin(h) * hoursRadius); + + // Draw the minute ticks + strokeWeight(2); + beginShape(POINTS); + for (int a = 0; a < 360; a+=6) { + float x = cx + cos(radians(a)) * secondsRadius; + float y = cy + sin(radians(a)) * secondsRadius; + vertex(x, y); + } + endShape(); +} diff --git a/android/examples/Basics/Input/Clock/applet/Clock.java b/android/examples/Basics/Input/Clock/applet/Clock.java new file mode 100644 index 000000000..7e3412158 --- /dev/null +++ b/android/examples/Basics/Input/Clock/applet/Clock.java @@ -0,0 +1,59 @@ +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/android/examples/Basics/Input/Clock/applet/Clock.pde b/android/examples/Basics/Input/Clock/applet/Clock.pde new file mode 100644 index 000000000..397af66f0 --- /dev/null +++ b/android/examples/Basics/Input/Clock/applet/Clock.pde @@ -0,0 +1,39 @@ +/** + * 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/android/examples/Basics/Input/Clock/applet/loading.gif b/android/examples/Basics/Input/Clock/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Input/Constrain/Constrain.pde b/android/examples/Basics/Input/Constrain/Constrain.pde new file mode 100644 index 000000000..84fcf06fe --- /dev/null +++ b/android/examples/Basics/Input/Constrain/Constrain.pde @@ -0,0 +1,41 @@ +/** + * Constrain. + * + * Move the mouse across the screen to move the circle. + * The program constrains the circle to its box. + * + * Updated 27 February 2010 to handle changes in size(). + */ + +float mx; +float my; +float easing = 0.05; +int radius = 24; +int edge = 56; +int inner = edge + radius; + +void setup() { + size(200, 200); + noStroke(); + smooth(); + ellipseMode(RADIUS); + rectMode(CORNERS); +} + +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; + } + + mx = constrain(mx, inner, width - inner); + my = constrain(my, inner, height - inner); + fill(76); + rect(edge, edge, width-edge, height-edge); + fill(255); + ellipse(mx, my, radius, radius); +} diff --git a/android/examples/Basics/Input/Constrain/applet/Constrain.java b/android/examples/Basics/Input/Constrain/applet/Constrain.java new file mode 100644 index 000000000..1a11e1e02 --- /dev/null +++ b/android/examples/Basics/Input/Constrain/applet/Constrain.java @@ -0,0 +1,60 @@ +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/android/examples/Basics/Input/Constrain/applet/Constrain.pde b/android/examples/Basics/Input/Constrain/applet/Constrain.pde new file mode 100644 index 000000000..6d57b97d6 --- /dev/null +++ b/android/examples/Basics/Input/Constrain/applet/Constrain.pde @@ -0,0 +1,40 @@ +/** + * 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/android/examples/Basics/Input/Constrain/applet/loading.gif b/android/examples/Basics/Input/Constrain/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Input/Easing/Easing.pde b/android/examples/Basics/Input/Easing/Easing.pde new file mode 100644 index 000000000..a09011639 --- /dev/null +++ b/android/examples/Basics/Input/Easing/Easing.pde @@ -0,0 +1,41 @@ +/** + * 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 = targetX - x; + if(abs(dx) > 1) { + x += dx * easing; + } + + targetY = mouseY; + float dy = targetY - y; + if(abs(dy) > 1) { + y += dy * easing; + } + + ellipse(x, y, 33, 33); +} diff --git a/android/examples/Basics/Input/Easing/applet/Easing.java b/android/examples/Basics/Input/Easing/applet/Easing.java new file mode 100644 index 000000000..7e6f2749f --- /dev/null +++ b/android/examples/Basics/Input/Easing/applet/Easing.java @@ -0,0 +1,61 @@ +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/android/examples/Basics/Input/Easing/applet/Easing.pde b/android/examples/Basics/Input/Easing/applet/Easing.pde new file mode 100644 index 000000000..9ef837afc --- /dev/null +++ b/android/examples/Basics/Input/Easing/applet/Easing.pde @@ -0,0 +1,41 @@ +/** + * 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/android/examples/Basics/Input/Easing/applet/loading.gif b/android/examples/Basics/Input/Easing/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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{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NRowzWMhGK_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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Input/Keyboard/Keyboard.pde b/android/examples/Basics/Input/Keyboard/Keyboard.pde new file mode 100644 index 000000000..3eba1f1d2 --- /dev/null +++ b/android/examples/Basics/Input/Keyboard/Keyboard.pde @@ -0,0 +1,39 @@ +/** + * 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 its ASCII value. These numbers can be used to position + * shapes in space. + */ + +int rectWidth; + +void setup() { + size(200, 200); + noStroke(); + background(0); + rectWidth = width/4; +} + +void draw() { + // keep draw() here to continue looping while waiting for keys +} + +void keyPressed() { + int keyIndex = -1; + if (key >= 'A' && key <= 'Z') { + keyIndex = key - 'A'; + } else if (key >= 'a' && key <= 'z') { + keyIndex = key - 'a'; + } + if (keyIndex == -1) { + // If it's not a letter key, clear the screen + background(0); + } else { + // It's a letter key, fill a rectangle + fill(millis() % 255); + float x = map(keyIndex, 0, 25, 0, width - rectWidth); + rect(x, 0, rectWidth, height); + } +} diff --git a/android/examples/Basics/Input/Keyboard/applet/Keyboard.java b/android/examples/Basics/Input/Keyboard/applet/Keyboard.java new file mode 100644 index 000000000..73d9c7202 --- /dev/null +++ b/android/examples/Basics/Input/Keyboard/applet/Keyboard.java @@ -0,0 +1,60 @@ +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/android/examples/Basics/Input/Keyboard/applet/Keyboard.pde b/android/examples/Basics/Input/Keyboard/applet/Keyboard.pde new file mode 100644 index 000000000..ee1a3c156 --- /dev/null +++ b/android/examples/Basics/Input/Keyboard/applet/Keyboard.pde @@ -0,0 +1,40 @@ +/** + * 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/android/examples/Basics/Input/Keyboard/applet/loading.gif b/android/examples/Basics/Input/Keyboard/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Input/KeyboardFunctions/KeyboardFunctions.pde b/android/examples/Basics/Input/KeyboardFunctions/KeyboardFunctions.pde new file mode 100644 index 000000000..882e92d63 --- /dev/null +++ b/android/examples/Basics/Input/KeyboardFunctions/KeyboardFunctions.pde @@ -0,0 +1,89 @@ +/** + * 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/android/examples/Basics/Input/KeyboardFunctions/applet/KeyboardFunctions.java b/android/examples/Basics/Input/KeyboardFunctions/applet/KeyboardFunctions.java new file mode 100644 index 000000000..7d7d4b2f4 --- /dev/null +++ b/android/examples/Basics/Input/KeyboardFunctions/applet/KeyboardFunctions.java @@ -0,0 +1,109 @@ +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/android/examples/Basics/Input/KeyboardFunctions/applet/KeyboardFunctions.pde b/android/examples/Basics/Input/KeyboardFunctions/applet/KeyboardFunctions.pde new file mode 100644 index 000000000..882e92d63 --- /dev/null +++ b/android/examples/Basics/Input/KeyboardFunctions/applet/KeyboardFunctions.pde @@ -0,0 +1,89 @@ +/** + * 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/android/examples/Basics/Input/KeyboardFunctions/applet/loading.gif b/android/examples/Basics/Input/KeyboardFunctions/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Input/Milliseconds/Milliseconds.pde b/android/examples/Basics/Input/Milliseconds/Milliseconds.pde new file mode 100644 index 000000000..2439ba363 --- /dev/null +++ b/android/examples/Basics/Input/Milliseconds/Milliseconds.pde @@ -0,0 +1,26 @@ +/** + * 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; + +void setup() +{ + size(200, 200); + noStroke(); + scale = width/10; +} + +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?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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Input/Mouse1D/Mouse1D.pde b/android/examples/Basics/Input/Mouse1D/Mouse1D.pde new file mode 100644 index 000000000..536e65459 --- /dev/null +++ b/android/examples/Basics/Input/Mouse1D/Mouse1D.pde @@ -0,0 +1,47 @@ +/** + * 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, height/2-gx, gx*2, gx*2); + fill(0.0, rightColor + 0.2, rightColor + 0.4); + rect(width/1.33-gy, height/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/android/examples/Basics/Input/Mouse1D/applet/Mouse1D.java b/android/examples/Basics/Input/Mouse1D/applet/Mouse1D.java new file mode 100644 index 000000000..c08cf2368 --- /dev/null +++ b/android/examples/Basics/Input/Mouse1D/applet/Mouse1D.java @@ -0,0 +1,70 @@ +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/android/examples/Basics/Input/Mouse1D/applet/Mouse1D.pde b/android/examples/Basics/Input/Mouse1D/applet/Mouse1D.pde new file mode 100644 index 000000000..2d1da507f --- /dev/null +++ b/android/examples/Basics/Input/Mouse1D/applet/Mouse1D.pde @@ -0,0 +1,50 @@ +/** + * 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/android/examples/Basics/Input/Mouse1D/applet/loading.gif b/android/examples/Basics/Input/Mouse1D/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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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XprHsO#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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Input/Mouse2D/Mouse2D.pde b/android/examples/Basics/Input/Mouse2D/Mouse2D.pde new file mode 100644 index 000000000..c316bc6ce --- /dev/null +++ b/android/examples/Basics/Input/Mouse2D/Mouse2D.pde @@ -0,0 +1,24 @@ +/** + * Mouse 2D. + * + * Moving the mouse changes the position and size of each box. + */ + +void setup() +{ + size(200, 200); + noStroke(); + rectMode(CENTER); +} + +void draw() +{ + background(51); + fill(255, 204); + rect(mouseX, height/2, mouseY/2+10, mouseY/2+10); + fill(255, 204); + int inverseX = width-mouseX; + int inverseY = height-mouseY; + rect(inverseX, height/2, (inverseY/2)+10, (inverseY/2)+10); +} + diff --git a/android/examples/Basics/Input/Mouse2D/applet/Mouse2D.java b/android/examples/Basics/Input/Mouse2D/applet/Mouse2D.java new file mode 100644 index 000000000..aee6375f4 --- /dev/null +++ b/android/examples/Basics/Input/Mouse2D/applet/Mouse2D.java @@ -0,0 +1,45 @@ +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/android/examples/Basics/Input/Mouse2D/applet/Mouse2D.pde b/android/examples/Basics/Input/Mouse2D/applet/Mouse2D.pde new file mode 100644 index 000000000..d1c36a258 --- /dev/null +++ b/android/examples/Basics/Input/Mouse2D/applet/Mouse2D.pde @@ -0,0 +1,25 @@ +/** + * 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/android/examples/Basics/Input/Mouse2D/applet/loading.gif b/android/examples/Basics/Input/Mouse2D/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;Pxkcl zFDW1*8xuJ)D*ylgA^8LV00000EC2ui0Av7U000I5;3tk`X`X1Ru59bRa4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X9b} 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Input/MouseFunctions/MouseFunctions.pde b/android/examples/Basics/Input/MouseFunctions/MouseFunctions.pde new file mode 100644 index 000000000..8d4e0fe36 --- /dev/null +++ b/android/examples/Basics/Input/MouseFunctions/MouseFunctions.pde @@ -0,0 +1,68 @@ +/** + * 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(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/android/examples/Basics/Input/MouseFunctions/applet/MouseFunctions.java b/android/examples/Basics/Input/MouseFunctions/applet/MouseFunctions.java new file mode 100644 index 000000000..5b89aeff0 --- /dev/null +++ b/android/examples/Basics/Input/MouseFunctions/applet/MouseFunctions.java @@ -0,0 +1,88 @@ +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/android/examples/Basics/Input/MouseFunctions/applet/MouseFunctions.pde b/android/examples/Basics/Input/MouseFunctions/applet/MouseFunctions.pde new file mode 100644 index 000000000..22717d718 --- /dev/null +++ b/android/examples/Basics/Input/MouseFunctions/applet/MouseFunctions.pde @@ -0,0 +1,68 @@ +/** + * 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/android/examples/Basics/Input/MouseFunctions/applet/loading.gif b/android/examples/Basics/Input/MouseFunctions/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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*RgRf1T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`@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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Input/MousePress/MousePress.pde b/android/examples/Basics/Input/MousePress/MousePress.pde new file mode 100644 index 000000000..526eced76 --- /dev/null +++ b/android/examples/Basics/Input/MousePress/MousePress.pde @@ -0,0 +1,23 @@ +/** + * 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/android/examples/Basics/Input/MousePress/applet/MousePress.java b/android/examples/Basics/Input/MousePress/applet/MousePress.java new file mode 100644 index 000000000..82bc9f6ca --- /dev/null +++ b/android/examples/Basics/Input/MousePress/applet/MousePress.java @@ -0,0 +1,43 @@ +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/android/examples/Basics/Input/MousePress/applet/MousePress.pde b/android/examples/Basics/Input/MousePress/applet/MousePress.pde new file mode 100644 index 000000000..526eced76 --- /dev/null +++ b/android/examples/Basics/Input/MousePress/applet/MousePress.pde @@ -0,0 +1,23 @@ +/** + * 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/android/examples/Basics/Input/MousePress/applet/loading.gif b/android/examples/Basics/Input/MousePress/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Input/MouseSignals/MouseSignals.pde b/android/examples/Basics/Input/MouseSignals/MouseSignals.pde new file mode 100644 index 000000000..6e1fd2bbc --- /dev/null +++ b/android/examples/Basics/Input/MouseSignals/MouseSignals.pde @@ -0,0 +1,54 @@ +/** + * 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; + +void setup() +{ + size(200, 200); + xvals = new int[width]; + yvals = new int[width]; + bvals = new int[width]; +} + +int arrayindex = 0; + +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`tY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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Input/StoringInput/StoringInput.pde b/android/examples/Basics/Input/StoringInput/StoringInput.pde new file mode 100644 index 000000000..6bd986ea9 --- /dev/null +++ b/android/examples/Basics/Input/StoringInput/StoringInput.pde @@ -0,0 +1,38 @@ +/** + * 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. + * + * Updated 27 February 2010. + */ + +int num = 60; +float mx[] = new float[num]; +float my[] = new float[num]; + +void setup() { + size(200, 200); + smooth(); + noStroke(); + fill(255, 153); +} + +void draw() { + background(51); + + // Cycle through the array, using a different entry on each frame. + // Using modulo (%) like this is faster than moving all the values over. + int which = frameCount % num; + mx[which] = mouseX; + my[which] = mouseY; + + for (int i = 0; i < num; i++) { + // which+1 is the smallest (the oldest in the array) + int index = (which+1 + i) % num; + ellipse(mx[index], my[index], i/2, i/2); + } +} diff --git a/android/examples/Basics/Input/StoringInput/applet/StoringInput.java b/android/examples/Basics/Input/StoringInput/applet/StoringInput.java new file mode 100644 index 000000000..98d0ee88e --- /dev/null +++ b/android/examples/Basics/Input/StoringInput/applet/StoringInput.java @@ -0,0 +1,60 @@ +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`3w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1&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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Math/AdditiveWave/AdditiveWave.pde b/android/examples/Basics/Math/AdditiveWave/AdditiveWave.pde new file mode 100644 index 000000000..14ba9914f --- /dev/null +++ b/android/examples/Basics/Math/AdditiveWave/AdditiveWave.pde @@ -0,0 +1,69 @@ +/** + * 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/android/examples/Basics/Math/AdditiveWave/applet/AdditiveWave.java b/android/examples/Basics/Math/AdditiveWave/applet/AdditiveWave.java new file mode 100644 index 000000000..083c2d276 --- /dev/null +++ b/android/examples/Basics/Math/AdditiveWave/applet/AdditiveWave.java @@ -0,0 +1,89 @@ +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/android/examples/Basics/Math/AdditiveWave/applet/AdditiveWave.pde b/android/examples/Basics/Math/AdditiveWave/applet/AdditiveWave.pde new file mode 100644 index 000000000..14ba9914f --- /dev/null +++ b/android/examples/Basics/Math/AdditiveWave/applet/AdditiveWave.pde @@ -0,0 +1,69 @@ +/** + * 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/android/examples/Basics/Math/AdditiveWave/applet/loading.gif b/android/examples/Basics/Math/AdditiveWave/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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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dZR!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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Math/Arctangent/Arctangent.pde b/android/examples/Basics/Math/Arctangent/Arctangent.pde new file mode 100644 index 000000000..b03e0bda6 --- /dev/null +++ b/android/examples/Basics/Math/Arctangent/Arctangent.pde @@ -0,0 +1,67 @@ +/** + * 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/android/examples/Basics/Math/Arctangent/applet/Arctangent.java b/android/examples/Basics/Math/Arctangent/applet/Arctangent.java new file mode 100644 index 000000000..c0e2c9b5a --- /dev/null +++ b/android/examples/Basics/Math/Arctangent/applet/Arctangent.java @@ -0,0 +1,87 @@ +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/android/examples/Basics/Math/Arctangent/applet/Arctangent.pde b/android/examples/Basics/Math/Arctangent/applet/Arctangent.pde new file mode 100644 index 000000000..b03e0bda6 --- /dev/null +++ b/android/examples/Basics/Math/Arctangent/applet/Arctangent.pde @@ -0,0 +1,67 @@ +/** + * 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/android/examples/Basics/Math/Arctangent/applet/loading.gif b/android/examples/Basics/Math/Arctangent/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Math/Distance1D/Distance1D.pde b/android/examples/Basics/Math/Distance1D/Distance1D.pde new file mode 100644 index 000000000..a17b3febc --- /dev/null +++ b/android/examples/Basics/Math/Distance1D/Distance1D.pde @@ -0,0 +1,51 @@ +/** + * 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/android/examples/Basics/Math/Distance1D/applet/Distance1D.java b/android/examples/Basics/Math/Distance1D/applet/Distance1D.java new file mode 100644 index 000000000..28b2212af --- /dev/null +++ b/android/examples/Basics/Math/Distance1D/applet/Distance1D.java @@ -0,0 +1,71 @@ +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/android/examples/Basics/Math/Distance1D/applet/Distance1D.pde b/android/examples/Basics/Math/Distance1D/applet/Distance1D.pde new file mode 100644 index 000000000..a17b3febc --- /dev/null +++ b/android/examples/Basics/Math/Distance1D/applet/Distance1D.pde @@ -0,0 +1,51 @@ +/** + * 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/android/examples/Basics/Math/Distance1D/applet/loading.gif b/android/examples/Basics/Math/Distance1D/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Math/Distance2D/Distance2D.pde b/android/examples/Basics/Math/Distance2D/Distance2D.pde new file mode 100644 index 000000000..e2bfe4b44 --- /dev/null +++ b/android/examples/Basics/Math/Distance2D/Distance2D.pde @@ -0,0 +1,29 @@ +/** + * 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/android/examples/Basics/Math/Distance2D/applet/Distance2D.java b/android/examples/Basics/Math/Distance2D/applet/Distance2D.java new file mode 100644 index 000000000..c4fe4f70e --- /dev/null +++ b/android/examples/Basics/Math/Distance2D/applet/Distance2D.java @@ -0,0 +1,49 @@ +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/android/examples/Basics/Math/Distance2D/applet/Distance2D.pde b/android/examples/Basics/Math/Distance2D/applet/Distance2D.pde new file mode 100644 index 000000000..e2bfe4b44 --- /dev/null +++ b/android/examples/Basics/Math/Distance2D/applet/Distance2D.pde @@ -0,0 +1,29 @@ +/** + * 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/android/examples/Basics/Math/Distance2D/applet/loading.gif b/android/examples/Basics/Math/Distance2D/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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)C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x$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Math/DoubleRandom/DoubleRandom.pde b/android/examples/Basics/Math/DoubleRandom/DoubleRandom.pde new file mode 100644 index 000000000..a33bc7523 --- /dev/null +++ b/android/examples/Basics/Math/DoubleRandom/DoubleRandom.pde @@ -0,0 +1,20 @@ +/** + * Double Random + * by Ira Greenberg. + * + * Using two random() calls and the 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/android/examples/Basics/Math/DoubleRandom/applet/DoubleRandom.java b/android/examples/Basics/Math/DoubleRandom/applet/DoubleRandom.java new file mode 100644 index 000000000..bea794379 --- /dev/null +++ b/android/examples/Basics/Math/DoubleRandom/applet/DoubleRandom.java @@ -0,0 +1,41 @@ +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/android/examples/Basics/Math/DoubleRandom/applet/DoubleRandom.pde b/android/examples/Basics/Math/DoubleRandom/applet/DoubleRandom.pde new file mode 100644 index 000000000..10b1fe0c9 --- /dev/null +++ b/android/examples/Basics/Math/DoubleRandom/applet/DoubleRandom.pde @@ -0,0 +1,20 @@ +/** + * 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/android/examples/Basics/Math/DoubleRandom/applet/loading.gif b/android/examples/Basics/Math/DoubleRandom/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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@- zsLx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android/examples/Basics/Math/Graphing2DEquation/Graphing2DEquation.pde b/android/examples/Basics/Math/Graphing2DEquation/Graphing2DEquation.pde new file mode 100644 index 000000000..bd20ed864 --- /dev/null +++ b/android/examples/Basics/Math/Graphing2DEquation/Graphing2DEquation.pde @@ -0,0 +1,40 @@ +/** + * 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/android/examples/Basics/Math/Graphing2DEquation/applet/Graphing2DEquation.java b/android/examples/Basics/Math/Graphing2DEquation/applet/Graphing2DEquation.java new file mode 100644 index 000000000..2049a3988 --- /dev/null +++ b/android/examples/Basics/Math/Graphing2DEquation/applet/Graphing2DEquation.java @@ -0,0 +1,60 @@ +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/android/examples/Basics/Math/Graphing2DEquation/applet/Graphing2DEquation.pde b/android/examples/Basics/Math/Graphing2DEquation/applet/Graphing2DEquation.pde new file mode 100644 index 000000000..bd20ed864 --- /dev/null +++ b/android/examples/Basics/Math/Graphing2DEquation/applet/Graphing2DEquation.pde @@ -0,0 +1,40 @@ +/** + * 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/android/examples/Basics/Math/Graphing2DEquation/applet/loading.gif b/android/examples/Basics/Math/Graphing2DEquation/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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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/IncrementDecrement.pde b/android/examples/Basics/Math/IncrementDecrement/IncrementDecrement.pde new file mode 100644 index 000000000..8398c5faa --- /dev/null +++ b/android/examples/Basics/Math/IncrementDecrement/IncrementDecrement.pde @@ -0,0 +1,46 @@ +/** + * 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/android/examples/Basics/Math/IncrementDecrement/applet/IncrementDecrement.java b/android/examples/Basics/Math/IncrementDecrement/applet/IncrementDecrement.java new file mode 100644 index 000000000..87cdd99d6 --- /dev/null +++ b/android/examples/Basics/Math/IncrementDecrement/applet/IncrementDecrement.java @@ -0,0 +1,66 @@ +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/android/examples/Basics/Math/IncrementDecrement/applet/IncrementDecrement.pde b/android/examples/Basics/Math/IncrementDecrement/applet/IncrementDecrement.pde new file mode 100644 index 000000000..8398c5faa --- /dev/null +++ b/android/examples/Basics/Math/IncrementDecrement/applet/IncrementDecrement.pde @@ -0,0 +1,46 @@ +/** + * 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/android/examples/Basics/Math/IncrementDecrement/applet/loading.gif b/android/examples/Basics/Math/IncrementDecrement/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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*RgRf1T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`@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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Math/Modulo/Modulo.pde b/android/examples/Basics/Math/Modulo/Modulo.pde new file mode 100644 index 000000000..7ad1f5dc3 --- /dev/null +++ b/android/examples/Basics/Math/Modulo/Modulo.pde @@ -0,0 +1,31 @@ +/** + * 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; + +void setup() +{ + size(200,200); + fill(255); + frameRate(30); +} + +void draw() +{ + background(0); + c+=0.1; + 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#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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Math/Noise1D/Noise1D.pde b/android/examples/Basics/Math/Noise1D/Noise1D.pde new file mode 100644 index 000000000..99d02b85d --- /dev/null +++ b/android/examples/Basics/Math/Noise1D/Noise1D.pde @@ -0,0 +1,37 @@ +/** + * 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/android/examples/Basics/Math/Noise1D/applet/Noise1D.java b/android/examples/Basics/Math/Noise1D/applet/Noise1D.java new file mode 100644 index 000000000..6a5adbc66 --- /dev/null +++ b/android/examples/Basics/Math/Noise1D/applet/Noise1D.java @@ -0,0 +1,57 @@ +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/android/examples/Basics/Math/Noise1D/applet/Noise1D.pde b/android/examples/Basics/Math/Noise1D/applet/Noise1D.pde new file mode 100644 index 000000000..99d02b85d --- /dev/null +++ b/android/examples/Basics/Math/Noise1D/applet/Noise1D.pde @@ -0,0 +1,37 @@ +/** + * 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/android/examples/Basics/Math/Noise1D/applet/loading.gif b/android/examples/Basics/Math/Noise1D/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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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N;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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Math/Noise2D/Noise2D.pde b/android/examples/Basics/Math/Noise2D/Noise2D.pde new file mode 100644 index 000000000..e5e04b010 --- /dev/null +++ b/android/examples/Basics/Math/Noise2D/Noise2D.pde @@ -0,0 +1,47 @@ +/** + * 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/android/examples/Basics/Math/Noise2D/applet/Noise2D.java b/android/examples/Basics/Math/Noise2D/applet/Noise2D.java new file mode 100644 index 000000000..32097009c --- /dev/null +++ b/android/examples/Basics/Math/Noise2D/applet/Noise2D.java @@ -0,0 +1,67 @@ +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/android/examples/Basics/Math/Noise2D/applet/Noise2D.pde b/android/examples/Basics/Math/Noise2D/applet/Noise2D.pde new file mode 100644 index 000000000..e5e04b010 --- /dev/null +++ b/android/examples/Basics/Math/Noise2D/applet/Noise2D.pde @@ -0,0 +1,47 @@ +/** + * 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/android/examples/Basics/Math/Noise2D/applet/loading.gif b/android/examples/Basics/Math/Noise2D/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Math/Noise3D/Noise3D.pde b/android/examples/Basics/Math/Noise3D/Noise3D.pde new file mode 100644 index 000000000..24bcfddc8 --- /dev/null +++ b/android/examples/Basics/Math/Noise3D/Noise3D.pde @@ -0,0 +1,54 @@ +/** + * 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/android/examples/Basics/Math/Noise3D/applet/Noise3D.java b/android/examples/Basics/Math/Noise3D/applet/Noise3D.java new file mode 100644 index 000000000..1bcbe7f0d --- /dev/null +++ b/android/examples/Basics/Math/Noise3D/applet/Noise3D.java @@ -0,0 +1,74 @@ +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/android/examples/Basics/Math/Noise3D/applet/Noise3D.pde b/android/examples/Basics/Math/Noise3D/applet/Noise3D.pde new file mode 100644 index 000000000..24bcfddc8 --- /dev/null +++ b/android/examples/Basics/Math/Noise3D/applet/Noise3D.pde @@ -0,0 +1,54 @@ +/** + * 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/android/examples/Basics/Math/Noise3D/applet/loading.gif b/android/examples/Basics/Math/Noise3D/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Math/NoiseWave/NoiseWave.pde b/android/examples/Basics/Math/NoiseWave/NoiseWave.pde new file mode 100644 index 000000000..9a632fafa --- /dev/null +++ b/android/examples/Basics/Math/NoiseWave/NoiseWave.pde @@ -0,0 +1,60 @@ +/** + * 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/android/examples/Basics/Math/NoiseWave/applet/NoiseWave.java b/android/examples/Basics/Math/NoiseWave/applet/NoiseWave.java new file mode 100644 index 000000000..4ecc653a6 --- /dev/null +++ b/android/examples/Basics/Math/NoiseWave/applet/NoiseWave.java @@ -0,0 +1,80 @@ +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/android/examples/Basics/Math/NoiseWave/applet/NoiseWave.pde b/android/examples/Basics/Math/NoiseWave/applet/NoiseWave.pde new file mode 100644 index 000000000..9a632fafa --- /dev/null +++ b/android/examples/Basics/Math/NoiseWave/applet/NoiseWave.pde @@ -0,0 +1,60 @@ +/** + * 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/android/examples/Basics/Math/NoiseWave/applet/loading.gif b/android/examples/Basics/Math/NoiseWave/applet/loading.gif new file mode 100644 index 0000000000000000000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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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Math/OperatorPrecedence/OperatorPrecedence.pde b/android/examples/Basics/Math/OperatorPrecedence/OperatorPrecedence.pde new file mode 100644 index 000000000..6509b9026 --- /dev/null +++ b/android/examples/Basics/Math/OperatorPrecedence/OperatorPrecedence.pde @@ -0,0 +1,58 @@ +/** + * 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/android/examples/Basics/Math/OperatorPrecedence/applet/OperatorPrecedence.java b/android/examples/Basics/Math/OperatorPrecedence/applet/OperatorPrecedence.java new file mode 100644 index 000000000..60bb03f4e --- /dev/null +++ b/android/examples/Basics/Math/OperatorPrecedence/applet/OperatorPrecedence.java @@ -0,0 +1,79 @@ +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/android/examples/Basics/Math/OperatorPrecedence/applet/OperatorPrecedence.pde b/android/examples/Basics/Math/OperatorPrecedence/applet/OperatorPrecedence.pde new file mode 100644 index 000000000..7f8cf52ca --- /dev/null +++ b/android/examples/Basics/Math/OperatorPrecedence/applet/OperatorPrecedence.pde @@ -0,0 +1,58 @@ +/** + * 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/android/examples/Basics/Math/OperatorPrecedence/applet/loading.gif b/android/examples/Basics/Math/OperatorPrecedence/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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~&+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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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Math/PolarToCartesian/PolarToCartesian.pde b/android/examples/Basics/Math/PolarToCartesian/PolarToCartesian.pde new file mode 100644 index 000000000..f1f2b1e7d --- /dev/null +++ b/android/examples/Basics/Math/PolarToCartesian/PolarToCartesian.pde @@ -0,0 +1,52 @@ +/** + * 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; + theta = 0; + theta_vel = 0; + theta_acc = 0.0001; +} + +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/android/examples/Basics/Math/PolarToCartesian/applet/PolarToCartesian.java b/android/examples/Basics/Math/PolarToCartesian/applet/PolarToCartesian.java new file mode 100644 index 000000000..75a8ea736 --- /dev/null +++ b/android/examples/Basics/Math/PolarToCartesian/applet/PolarToCartesian.java @@ -0,0 +1,72 @@ +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/android/examples/Basics/Math/PolarToCartesian/applet/PolarToCartesian.pde b/android/examples/Basics/Math/PolarToCartesian/applet/PolarToCartesian.pde new file mode 100644 index 000000000..fdcd948db --- /dev/null +++ b/android/examples/Basics/Math/PolarToCartesian/applet/PolarToCartesian.pde @@ -0,0 +1,52 @@ +/** + * 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/android/examples/Basics/Math/PolarToCartesian/applet/loading.gif b/android/examples/Basics/Math/PolarToCartesian/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Math/Random/Random.pde b/android/examples/Basics/Math/Random/Random.pde new file mode 100644 index 000000000..5fa97b8f0 --- /dev/null +++ b/android/examples/Basics/Math/Random/Random.pde @@ -0,0 +1,19 @@ +/** + * 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/android/examples/Basics/Math/Random/applet/Random.java b/android/examples/Basics/Math/Random/applet/Random.java new file mode 100644 index 000000000..ca26fea54 --- /dev/null +++ b/android/examples/Basics/Math/Random/applet/Random.java @@ -0,0 +1,40 @@ +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/android/examples/Basics/Math/Random/applet/Random.pde b/android/examples/Basics/Math/Random/applet/Random.pde new file mode 100644 index 000000000..5fa97b8f0 --- /dev/null +++ b/android/examples/Basics/Math/Random/applet/Random.pde @@ -0,0 +1,19 @@ +/** + * 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/android/examples/Basics/Math/Random/applet/loading.gif b/android/examples/Basics/Math/Random/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}BN|>;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oH(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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Math/Sine/Sine.pde b/android/examples/Basics/Math/Sine/Sine.pde new file mode 100644 index 000000000..848add369 --- /dev/null +++ b/android/examples/Basics/Math/Sine/Sine.pde @@ -0,0 +1,46 @@ +/** + * 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/android/examples/Basics/Math/Sine/applet/Sine.java b/android/examples/Basics/Math/Sine/applet/Sine.java new file mode 100644 index 000000000..a29502d3b --- /dev/null +++ b/android/examples/Basics/Math/Sine/applet/Sine.java @@ -0,0 +1,66 @@ +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/android/examples/Basics/Math/Sine/applet/Sine.pde b/android/examples/Basics/Math/Sine/applet/Sine.pde new file mode 100644 index 000000000..848add369 --- /dev/null +++ b/android/examples/Basics/Math/Sine/applet/Sine.pde @@ -0,0 +1,46 @@ +/** + * 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/android/examples/Basics/Math/Sine/applet/loading.gif b/android/examples/Basics/Math/Sine/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Math/SineCosine/SineCosine.pde b/android/examples/Basics/Math/SineCosine/SineCosine.pde new file mode 100644 index 000000000..4a40ddee2 --- /dev/null +++ b/android/examples/Basics/Math/SineCosine/SineCosine.pde @@ -0,0 +1,59 @@ +/** + * 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/android/examples/Basics/Math/SineCosine/applet/SineCosine.java b/android/examples/Basics/Math/SineCosine/applet/SineCosine.java new file mode 100644 index 000000000..c308f7fed --- /dev/null +++ b/android/examples/Basics/Math/SineCosine/applet/SineCosine.java @@ -0,0 +1,79 @@ +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/android/examples/Basics/Math/SineCosine/applet/SineCosine.pde b/android/examples/Basics/Math/SineCosine/applet/SineCosine.pde new file mode 100644 index 000000000..4a40ddee2 --- /dev/null +++ b/android/examples/Basics/Math/SineCosine/applet/SineCosine.pde @@ -0,0 +1,59 @@ +/** + * 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/android/examples/Basics/Math/SineCosine/applet/loading.gif b/android/examples/Basics/Math/SineCosine/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc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1fap0`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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Math/SineWave/SineWave.pde b/android/examples/Basics/Math/SineWave/SineWave.pde new file mode 100644 index 000000000..da47bed36 --- /dev/null +++ b/android/examples/Basics/Math/SineWave/SineWave.pde @@ -0,0 +1,55 @@ +/** + * 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/android/examples/Basics/Math/SineWave/applet/SineWave.java b/android/examples/Basics/Math/SineWave/applet/SineWave.java new file mode 100644 index 000000000..165700473 --- /dev/null +++ b/android/examples/Basics/Math/SineWave/applet/SineWave.java @@ -0,0 +1,75 @@ +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/android/examples/Basics/Math/SineWave/applet/SineWave.pde b/android/examples/Basics/Math/SineWave/applet/SineWave.pde new file mode 100644 index 000000000..da47bed36 --- /dev/null +++ b/android/examples/Basics/Math/SineWave/applet/SineWave.pde @@ -0,0 +1,55 @@ +/** + * 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/android/examples/Basics/Math/SineWave/applet/loading.gif b/android/examples/Basics/Math/SineWave/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Objects/CompositeObjects/CompositeObjects.pde b/android/examples/Basics/Objects/CompositeObjects/CompositeObjects.pde new file mode 100644 index 000000000..8987bda9e --- /dev/null +++ b/android/examples/Basics/Objects/CompositeObjects/CompositeObjects.pde @@ -0,0 +1,24 @@ +/** + * 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(); +} diff --git a/android/examples/Basics/Objects/CompositeObjects/Egg.pde b/android/examples/Basics/Objects/CompositeObjects/Egg.pde new file mode 100644 index 000000000..e6638aa79 --- /dev/null +++ b/android/examples/Basics/Objects/CompositeObjects/Egg.pde @@ -0,0 +1,36 @@ +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(); + } +} \ No newline at end of file diff --git a/android/examples/Basics/Objects/CompositeObjects/EggRing.pde b/android/examples/Basics/Objects/CompositeObjects/EggRing.pde new file mode 100644 index 000000000..2648603f9 --- /dev/null +++ b/android/examples/Basics/Objects/CompositeObjects/EggRing.pde @@ -0,0 +1,19 @@ +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; + } + } +} diff --git a/android/examples/Basics/Objects/CompositeObjects/Ring.pde b/android/examples/Basics/Objects/CompositeObjects/Ring.pde new file mode 100644 index 000000000..3baf5623d --- /dev/null +++ b/android/examples/Basics/Objects/CompositeObjects/Ring.pde @@ -0,0 +1,27 @@ +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/android/examples/Basics/Objects/CompositeObjects/applet/CompositeObjects.java b/android/examples/Basics/Objects/CompositeObjects/applet/CompositeObjects.java new file mode 100644 index 000000000..3da16d412 --- /dev/null +++ b/android/examples/Basics/Objects/CompositeObjects/applet/CompositeObjects.java @@ -0,0 +1,125 @@ +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/android/examples/Basics/Objects/CompositeObjects/applet/CompositeObjects.pde b/android/examples/Basics/Objects/CompositeObjects/applet/CompositeObjects.pde new file mode 100644 index 000000000..171c03ae9 --- /dev/null +++ b/android/examples/Basics/Objects/CompositeObjects/applet/CompositeObjects.pde @@ -0,0 +1,105 @@ +/** + * 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/android/examples/Basics/Objects/CompositeObjects/applet/loading.gif b/android/examples/Basics/Objects/CompositeObjects/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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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nBqzx$3zWQ0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Objects/Inheritance/Inheritance.pde b/android/examples/Basics/Objects/Inheritance/Inheritance.pde new file mode 100644 index 000000000..6c4af0bc8 --- /dev/null +++ b/android/examples/Basics/Objects/Inheritance/Inheritance.pde @@ -0,0 +1,78 @@ +/** + * 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/android/examples/Basics/Objects/Inheritance/applet/Inheritance.java b/android/examples/Basics/Objects/Inheritance/applet/Inheritance.java new file mode 100644 index 000000000..6b517719f --- /dev/null +++ b/android/examples/Basics/Objects/Inheritance/applet/Inheritance.java @@ -0,0 +1,98 @@ +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/android/examples/Basics/Objects/Inheritance/applet/Inheritance.pde b/android/examples/Basics/Objects/Inheritance/applet/Inheritance.pde new file mode 100644 index 000000000..6c4af0bc8 --- /dev/null +++ b/android/examples/Basics/Objects/Inheritance/applet/Inheritance.pde @@ -0,0 +1,78 @@ +/** + * 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/android/examples/Basics/Objects/Inheritance/applet/loading.gif b/android/examples/Basics/Objects/Inheritance/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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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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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Objects/MultipleConstructors/MultipleConstructors.pde b/android/examples/Basics/Objects/MultipleConstructors/MultipleConstructors.pde new file mode 100644 index 000000000..fd57edbfd --- /dev/null +++ b/android/examples/Basics/Objects/MultipleConstructors/MultipleConstructors.pde @@ -0,0 +1,47 @@ +/** + * 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/android/examples/Basics/Objects/MultipleConstructors/applet/MultipleConstructors.java b/android/examples/Basics/Objects/MultipleConstructors/applet/MultipleConstructors.java new file mode 100644 index 000000000..db8031348 --- /dev/null +++ b/android/examples/Basics/Objects/MultipleConstructors/applet/MultipleConstructors.java @@ -0,0 +1,67 @@ +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/android/examples/Basics/Objects/MultipleConstructors/applet/MultipleConstructors.pde b/android/examples/Basics/Objects/MultipleConstructors/applet/MultipleConstructors.pde new file mode 100644 index 000000000..fd57edbfd --- /dev/null +++ b/android/examples/Basics/Objects/MultipleConstructors/applet/MultipleConstructors.pde @@ -0,0 +1,47 @@ +/** + * 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/android/examples/Basics/Objects/MultipleConstructors/applet/loading.gif b/android/examples/Basics/Objects/MultipleConstructors/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Objects/Neighborhood/Neighborhood.pde b/android/examples/Basics/Objects/Neighborhood/Neighborhood.pde new file mode 100644 index 000000000..f70893d25 --- /dev/null +++ b/android/examples/Basics/Objects/Neighborhood/Neighborhood.pde @@ -0,0 +1,303 @@ +/** + * 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/android/examples/Basics/Objects/Neighborhood/applet/Neighborhood.java b/android/examples/Basics/Objects/Neighborhood/applet/Neighborhood.java new file mode 100644 index 000000000..d6646893c --- /dev/null +++ b/android/examples/Basics/Objects/Neighborhood/applet/Neighborhood.java @@ -0,0 +1,323 @@ +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/android/examples/Basics/Objects/Neighborhood/applet/Neighborhood.pde b/android/examples/Basics/Objects/Neighborhood/applet/Neighborhood.pde new file mode 100644 index 000000000..f70893d25 --- /dev/null +++ b/android/examples/Basics/Objects/Neighborhood/applet/Neighborhood.pde @@ -0,0 +1,303 @@ +/** + * 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/android/examples/Basics/Objects/Neighborhood/applet/loading.gif b/android/examples/Basics/Objects/Neighborhood/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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!Z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StC2*+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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Objects/Objects/Objects.pde b/android/examples/Basics/Objects/Objects/Objects.pde new file mode 100644 index 000000000..80a09a3d6 --- /dev/null +++ b/android/examples/Basics/Objects/Objects/Objects.pde @@ -0,0 +1,71 @@ +/** + * 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; + +void setup() +{ + size(200, 200); + fill(255, 204); + noStroke(); + r1 = new MRect(1, 134.0, 0.532, 0.083*height, 10.0, 60.0); + r2 = new MRect(2, 44.0, 0.166, 0.332*height, 5.0, 50.0); + r3 = new MRect(2, 58.0, 0.332, 0.4482*height, 10.0, 35.0); + r4 = new MRect(1, 120.0, 0.0498, 0.913*height, 15.0, 60.0); +} + +void draw() +{ + background(0); + + r1.display(); + r2.display(); + r3.display(); + r4.display(); + + r1.move(mouseX-(width/2), mouseY+(height*0.1), 30); + r2.move((mouseX+(width*0.05))%width, mouseY+(height*0.025), 20); + r3.move(mouseX/4, mouseY-(height*0.025), 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; + } + + 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; + } + } + + void display() { + for (int i=0; i 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^ 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Shape/DisableStyle/DisableStyle.pde b/android/examples/Basics/Shape/DisableStyle/DisableStyle.pde new file mode 100644 index 000000000..656132ce2 --- /dev/null +++ b/android/examples/Basics/Shape/DisableStyle/DisableStyle.pde @@ -0,0 +1,34 @@ +/** + * 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/android/examples/Basics/Shape/DisableStyle/applet/DisableStyle.java b/android/examples/Basics/Shape/DisableStyle/applet/DisableStyle.java new file mode 100644 index 000000000..14a716f4c --- /dev/null +++ b/android/examples/Basics/Shape/DisableStyle/applet/DisableStyle.java @@ -0,0 +1,55 @@ +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/android/examples/Basics/Shape/DisableStyle/applet/DisableStyle.pde b/android/examples/Basics/Shape/DisableStyle/applet/DisableStyle.pde new file mode 100644 index 000000000..656132ce2 --- /dev/null +++ b/android/examples/Basics/Shape/DisableStyle/applet/DisableStyle.pde @@ -0,0 +1,34 @@ +/** + * 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/android/examples/Basics/Shape/DisableStyle/applet/loading.gif b/android/examples/Basics/Shape/DisableStyle/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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_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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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Shape/DisableStyle/data/bot1.svg b/android/examples/Basics/Shape/DisableStyle/data/bot1.svg new file mode 100644 index 000000000..3c56f2d60 --- /dev/null +++ b/android/examples/Basics/Shape/DisableStyle/data/bot1.svg @@ -0,0 +1,160 @@ + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/examples/Basics/Shape/GetChild/GetChild.pde b/android/examples/Basics/Shape/GetChild/GetChild.pde new file mode 100644 index 000000000..0b9b9d393 --- /dev/null +++ b/android/examples/Basics/Shape/GetChild/GetChild.pde @@ -0,0 +1,45 @@ +/** + * 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); // Go Blue! + + // 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); // Boo Buckeyes! +} diff --git a/android/examples/Basics/Shape/GetChild/applet/GetChild.java b/android/examples/Basics/Shape/GetChild/applet/GetChild.java new file mode 100644 index 000000000..2854fbb45 --- /dev/null +++ b/android/examples/Basics/Shape/GetChild/applet/GetChild.java @@ -0,0 +1,66 @@ +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/android/examples/Basics/Shape/GetChild/applet/GetChild.pde b/android/examples/Basics/Shape/GetChild/applet/GetChild.pde new file mode 100644 index 000000000..0e1e69407 --- /dev/null +++ b/android/examples/Basics/Shape/GetChild/applet/GetChild.pde @@ -0,0 +1,45 @@ +/** + * 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/android/examples/Basics/Shape/GetChild/applet/loading.gif b/android/examples/Basics/Shape/GetChild/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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`tY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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Shape/GetChild/data/usa-wikipedia.svg b/android/examples/Basics/Shape/GetChild/data/usa-wikipedia.svg new file mode 100644 index 000000000..247ba7383 --- /dev/null +++ b/android/examples/Basics/Shape/GetChild/data/usa-wikipedia.svg @@ -0,0 +1,452 @@ + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/examples/Basics/Shape/LoadDisplayShape/LoadDisplayShape.pde b/android/examples/Basics/Shape/LoadDisplayShape/LoadDisplayShape.pde new file mode 100644 index 000000000..3d18b4b4a --- /dev/null +++ b/android/examples/Basics/Shape/LoadDisplayShape/LoadDisplayShape.pde @@ -0,0 +1,26 @@ +/** + * 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/android/examples/Basics/Shape/LoadDisplayShape/applet/LoadDisplayShape.java b/android/examples/Basics/Shape/LoadDisplayShape/applet/LoadDisplayShape.java new file mode 100644 index 000000000..f7dc4e0af --- /dev/null +++ b/android/examples/Basics/Shape/LoadDisplayShape/applet/LoadDisplayShape.java @@ -0,0 +1,47 @@ +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/android/examples/Basics/Shape/LoadDisplayShape/applet/LoadDisplayShape.pde b/android/examples/Basics/Shape/LoadDisplayShape/applet/LoadDisplayShape.pde new file mode 100644 index 000000000..3d18b4b4a --- /dev/null +++ b/android/examples/Basics/Shape/LoadDisplayShape/applet/LoadDisplayShape.pde @@ -0,0 +1,26 @@ +/** + * 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/android/examples/Basics/Shape/LoadDisplayShape/applet/loading.gif b/android/examples/Basics/Shape/LoadDisplayShape/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}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vS@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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Shape/LoadDisplayShape/data/bot1.svg b/android/examples/Basics/Shape/LoadDisplayShape/data/bot1.svg new file mode 100644 index 000000000..3c56f2d60 --- /dev/null +++ b/android/examples/Basics/Shape/LoadDisplayShape/data/bot1.svg @@ -0,0 +1,160 @@ + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/examples/Basics/Shape/ScaleShape/ScaleShape.pde b/android/examples/Basics/Shape/ScaleShape/ScaleShape.pde new file mode 100644 index 000000000..879f20b68 --- /dev/null +++ b/android/examples/Basics/Shape/ScaleShape/ScaleShape.pde @@ -0,0 +1,26 @@ +/** + * 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/android/examples/Basics/Shape/ScaleShape/applet/ScaleShape.java b/android/examples/Basics/Shape/ScaleShape/applet/ScaleShape.java new file mode 100644 index 000000000..3a6aa5e19 --- /dev/null +++ b/android/examples/Basics/Shape/ScaleShape/applet/ScaleShape.java @@ -0,0 +1,47 @@ +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/android/examples/Basics/Shape/ScaleShape/applet/ScaleShape.pde b/android/examples/Basics/Shape/ScaleShape/applet/ScaleShape.pde new file mode 100644 index 000000000..879f20b68 --- /dev/null +++ b/android/examples/Basics/Shape/ScaleShape/applet/ScaleShape.pde @@ -0,0 +1,26 @@ +/** + * 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/android/examples/Basics/Shape/ScaleShape/applet/loading.gif b/android/examples/Basics/Shape/ScaleShape/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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~+*^6b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1.svg new file mode 100644 index 000000000..3c56f2d60 --- /dev/null +++ b/android/examples/Basics/Shape/ScaleShape/data/bot1.svg @@ -0,0 +1,160 @@ + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/examples/Basics/Structure/Coordinates/Coordinates.pde b/android/examples/Basics/Structure/Coordinates/Coordinates.pde new file mode 100644 index 000000000..c63c147b7 --- /dev/null +++ b/android/examples/Basics/Structure/Coordinates/Coordinates.pde @@ -0,0 +1,41 @@ +/** + * 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/android/examples/Basics/Structure/Coordinates/applet/Coordinates.java b/android/examples/Basics/Structure/Coordinates/applet/Coordinates.java new file mode 100644 index 000000000..cc173b9aa --- /dev/null +++ b/android/examples/Basics/Structure/Coordinates/applet/Coordinates.java @@ -0,0 +1,62 @@ +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/android/examples/Basics/Structure/Coordinates/applet/Coordinates.pde b/android/examples/Basics/Structure/Coordinates/applet/Coordinates.pde new file mode 100644 index 000000000..c63c147b7 --- /dev/null +++ b/android/examples/Basics/Structure/Coordinates/applet/Coordinates.pde @@ -0,0 +1,41 @@ +/** + * 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/android/examples/Basics/Structure/Coordinates/applet/loading.gif b/android/examples/Basics/Structure/Coordinates/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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$eQ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reateGraphics.pde b/android/examples/Basics/Structure/CreateGraphics/CreateGraphics.pde new file mode 100644 index 000000000..7f1b1d0eb --- /dev/null +++ b/android/examples/Basics/Structure/CreateGraphics/CreateGraphics.pde @@ -0,0 +1,33 @@ +/** + * 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, P2D); +} + +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/android/examples/Basics/Structure/CreateGraphics/applet/CreateGraphics.java b/android/examples/Basics/Structure/CreateGraphics/applet/CreateGraphics.java new file mode 100644 index 000000000..8c2eaf6bb --- /dev/null +++ b/android/examples/Basics/Structure/CreateGraphics/applet/CreateGraphics.java @@ -0,0 +1,53 @@ +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/android/examples/Basics/Structure/CreateGraphics/applet/CreateGraphics.pde b/android/examples/Basics/Structure/CreateGraphics/applet/CreateGraphics.pde new file mode 100644 index 000000000..5bd6710bb --- /dev/null +++ b/android/examples/Basics/Structure/CreateGraphics/applet/CreateGraphics.pde @@ -0,0 +1,33 @@ +/** + * 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/android/examples/Basics/Structure/CreateGraphics/applet/loading.gif b/android/examples/Basics/Structure/CreateGraphics/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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@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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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Structure/Functions/Functions.pde b/android/examples/Basics/Structure/Functions/Functions.pde new file mode 100644 index 000000000..b94fdb01e --- /dev/null +++ b/android/examples/Basics/Structure/Functions/Functions.pde @@ -0,0 +1,33 @@ +/** + * 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. + */ + +void setup() +{ + size(200, 200); + background(51); + noStroke(); + smooth(); + noLoop(); +} + +void draw() +{ + drawTarget(68, 34, 200, 10); + drawTarget(152, 16, 100, 3); + drawTarget(100, 144, 80, 5); +} + +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{@#pS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WMhGK_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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Structure/Loop/Loop.pde b/android/examples/Basics/Structure/Loop/Loop.pde new file mode 100644 index 000000000..0f6e96d01 --- /dev/null +++ b/android/examples/Basics/Structure/Loop/Loop.pde @@ -0,0 +1,40 @@ +/** + * 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/android/examples/Basics/Structure/Loop/applet/Loop.java b/android/examples/Basics/Structure/Loop/applet/Loop.java new file mode 100644 index 000000000..8ef7bc7d1 --- /dev/null +++ b/android/examples/Basics/Structure/Loop/applet/Loop.java @@ -0,0 +1,60 @@ +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/android/examples/Basics/Structure/Loop/applet/Loop.pde b/android/examples/Basics/Structure/Loop/applet/Loop.pde new file mode 100644 index 000000000..0f6e96d01 --- /dev/null +++ b/android/examples/Basics/Structure/Loop/applet/Loop.pde @@ -0,0 +1,40 @@ +/** + * 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/android/examples/Basics/Structure/Loop/applet/loading.gif b/android/examples/Basics/Structure/Loop/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch literal 2232 zcmV;p2uJrvNk%w1VPpVg0K@}>*LOe9f#Jf~YMPyu5XIn*qdT-#}+3e)oz`3wAE++5m<~=qpPDei}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~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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Structure/NoLoop/NoLoop.pde b/android/examples/Basics/Structure/NoLoop/NoLoop.pde new file mode 100644 index 000000000..cb0d954d2 --- /dev/null +++ b/android/examples/Basics/Structure/NoLoop/NoLoop.pde @@ -0,0 +1,33 @@ +/** + * 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/android/examples/Basics/Structure/NoLoop/applet/NoLoop.java b/android/examples/Basics/Structure/NoLoop/applet/NoLoop.java new file mode 100644 index 000000000..67681015b --- /dev/null +++ b/android/examples/Basics/Structure/NoLoop/applet/NoLoop.java @@ -0,0 +1,53 @@ +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/android/examples/Basics/Structure/NoLoop/applet/NoLoop.pde b/android/examples/Basics/Structure/NoLoop/applet/NoLoop.pde new file mode 100644 index 000000000..cb0d954d2 --- /dev/null +++ b/android/examples/Basics/Structure/NoLoop/applet/NoLoop.pde @@ -0,0 +1,33 @@ +/** + * 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/android/examples/Basics/Structure/NoLoop/applet/loading.gif b/android/examples/Basics/Structure/NoLoop/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000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Km=|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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Structure/Recursion/Recursion.pde b/android/examples/Basics/Structure/Recursion/Recursion.pde new file mode 100644 index 000000000..2e77668f4 --- /dev/null +++ b/android/examples/Basics/Structure/Recursion/Recursion.pde @@ -0,0 +1,32 @@ +/** + * 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/android/examples/Basics/Structure/Recursion/applet/Recursion.java b/android/examples/Basics/Structure/Recursion/applet/Recursion.java new file mode 100644 index 000000000..c739d0b06 --- /dev/null +++ b/android/examples/Basics/Structure/Recursion/applet/Recursion.java @@ -0,0 +1,52 @@ +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/android/examples/Basics/Structure/Recursion/applet/Recursion.pde b/android/examples/Basics/Structure/Recursion/applet/Recursion.pde new file mode 100644 index 000000000..2e77668f4 --- /dev/null +++ b/android/examples/Basics/Structure/Recursion/applet/Recursion.pde @@ -0,0 +1,32 @@ +/** + * 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/android/examples/Basics/Structure/Recursion/applet/loading.gif b/android/examples/Basics/Structure/Recursion/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Structure/Recursion2/Recursion2.pde b/android/examples/Basics/Structure/Recursion2/Recursion2.pde new file mode 100644 index 000000000..0da7d10cc --- /dev/null +++ b/android/examples/Basics/Structure/Recursion2/Recursion2.pde @@ -0,0 +1,32 @@ +/** + * 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(); + drawCircle(100, 100, 80, 8); +} + +void drawCircle(float x, float y, int radius, int level) +{ + float tt = 126 * level/6.0; + fill(tt, 153); + ellipse(x, y, radius*2, radius*2); + if(level > 1) { + level = level - 1; + int num = int(random(2, 6)); + for(int i=0; i 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*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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de new file mode 100644 index 000000000..01e82b6bf --- /dev/null +++ b/android/examples/Basics/Structure/Redraw/Redraw.pde @@ -0,0 +1,37 @@ +/** + * 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/android/examples/Basics/Structure/Redraw/applet/Redraw.java b/android/examples/Basics/Structure/Redraw/applet/Redraw.java new file mode 100644 index 000000000..f00e2d0eb --- /dev/null +++ b/android/examples/Basics/Structure/Redraw/applet/Redraw.java @@ -0,0 +1,57 @@ +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/android/examples/Basics/Structure/Redraw/applet/Redraw.pde b/android/examples/Basics/Structure/Redraw/applet/Redraw.pde new file mode 100644 index 000000000..01e82b6bf --- /dev/null +++ b/android/examples/Basics/Structure/Redraw/applet/Redraw.pde @@ -0,0 +1,37 @@ +/** + * 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/android/examples/Basics/Structure/Redraw/applet/loading.gif b/android/examples/Basics/Structure/Redraw/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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&!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0TnPX_!4c(7-HCuzboM`iLewbvgg}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Structure/SetupDraw/SetupDraw.pde b/android/examples/Basics/Structure/SetupDraw/SetupDraw.pde new file mode 100644 index 000000000..19b5518a6 --- /dev/null +++ b/android/examples/Basics/Structure/SetupDraw/SetupDraw.pde @@ -0,0 +1,30 @@ +/** + * 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 must 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/android/examples/Basics/Structure/SetupDraw/applet/SetupDraw.java b/android/examples/Basics/Structure/SetupDraw/applet/SetupDraw.java new file mode 100644 index 000000000..9aeb6201f --- /dev/null +++ b/android/examples/Basics/Structure/SetupDraw/applet/SetupDraw.java @@ -0,0 +1,50 @@ +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/android/examples/Basics/Structure/SetupDraw/applet/SetupDraw.pde b/android/examples/Basics/Structure/SetupDraw/applet/SetupDraw.pde new file mode 100644 index 000000000..191aff0f4 --- /dev/null +++ b/android/examples/Basics/Structure/SetupDraw/applet/SetupDraw.pde @@ -0,0 +1,30 @@ +/** + * 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/android/examples/Basics/Structure/SetupDraw/applet/loading.gif b/android/examples/Basics/Structure/SetupDraw/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Structure/StatementsComments/StatementsComments.pde b/android/examples/Basics/Structure/StatementsComments/StatementsComments.pde new file mode 100644 index 000000000..9ab2417fc --- /dev/null +++ b/android/examples/Basics/Structure/StatementsComments/StatementsComments.pde @@ -0,0 +1,20 @@ +/** + * 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/android/examples/Basics/Structure/StatementsComments/applet/StatementsComments.java b/android/examples/Basics/Structure/StatementsComments/applet/StatementsComments.java new file mode 100644 index 000000000..c3bb42923 --- /dev/null +++ b/android/examples/Basics/Structure/StatementsComments/applet/StatementsComments.java @@ -0,0 +1,41 @@ +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/android/examples/Basics/Structure/StatementsComments/applet/StatementsComments.pde b/android/examples/Basics/Structure/StatementsComments/applet/StatementsComments.pde new file mode 100644 index 000000000..9ab2417fc --- /dev/null +++ b/android/examples/Basics/Structure/StatementsComments/applet/StatementsComments.pde @@ -0,0 +1,20 @@ +/** + * 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/android/examples/Basics/Structure/StatementsComments/applet/loading.gif b/android/examples/Basics/Structure/StatementsComments/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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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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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Structure/WidthHeight/WidthHeight.pde b/android/examples/Basics/Structure/WidthHeight/WidthHeight.pde new file mode 100644 index 000000000..c8ed0b5e3 --- /dev/null +++ b/android/examples/Basics/Structure/WidthHeight/WidthHeight.pde @@ -0,0 +1,16 @@ +/** + * 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+1f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}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Transform/Arm/Arm.pde b/android/examples/Basics/Transform/Arm/Arm.pde new file mode 100644 index 000000000..8169d914d --- /dev/null +++ b/android/examples/Basics/Transform/Arm/Arm.pde @@ -0,0 +1,39 @@ +/** + * 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/android/examples/Basics/Transform/Arm/applet/Arm.java b/android/examples/Basics/Transform/Arm/applet/Arm.java new file mode 100644 index 000000000..ccec6be96 --- /dev/null +++ b/android/examples/Basics/Transform/Arm/applet/Arm.java @@ -0,0 +1,59 @@ +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/android/examples/Basics/Transform/Arm/applet/Arm.pde b/android/examples/Basics/Transform/Arm/applet/Arm.pde new file mode 100644 index 000000000..8169d914d --- /dev/null +++ b/android/examples/Basics/Transform/Arm/applet/Arm.pde @@ -0,0 +1,39 @@ +/** + * 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/android/examples/Basics/Transform/Arm/applet/loading.gif b/android/examples/Basics/Transform/Arm/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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^kzCZ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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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Transform/Rotate/Rotate.pde b/android/examples/Basics/Transform/Rotate/Rotate.pde new file mode 100644 index 000000000..e70fbb8e5 --- /dev/null +++ b/android/examples/Basics/Transform/Rotate/Rotate.pde @@ -0,0 +1,36 @@ +/** + * 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). + */ + +float angle; +float jitter; + +void setup() { + size(200, 200); + smooth(); + noStroke(); + fill(255); + rectMode(CENTER); + frameRate(30); +} + +void draw() { + background(102); + + // during even-numbered seconds (0, 2, 4, 6...) + if (second() % 2 == 0) { + jitter = random(-0.1, 0.1); + } + angle = angle + jitter; + float c = cos(angle); + translate(width/2, height/2); + rotate(c); + rect(0, 0, 115, 115); +} diff --git a/android/examples/Basics/Transform/Rotate/applet/Rotate.java b/android/examples/Basics/Transform/Rotate/applet/Rotate.java new file mode 100644 index 000000000..6d37c00a6 --- /dev/null +++ b/android/examples/Basics/Transform/Rotate/applet/Rotate.java @@ -0,0 +1,58 @@ +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/android/examples/Basics/Transform/Rotate/applet/Rotate.pde b/android/examples/Basics/Transform/Rotate/applet/Rotate.pde new file mode 100644 index 000000000..1950efd7a --- /dev/null +++ b/android/examples/Basics/Transform/Rotate/applet/Rotate.pde @@ -0,0 +1,38 @@ +/** + * 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/android/examples/Basics/Transform/Rotate/applet/loading.gif b/android/examples/Basics/Transform/Rotate/applet/loading.gif new file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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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Transform/Scale/Scale.pde b/android/examples/Basics/Transform/Scale/Scale.pde new file mode 100644 index 000000000..dc41a584d --- /dev/null +++ b/android/examples/Basics/Transform/Scale/Scale.pde @@ -0,0 +1,38 @@ +/** + * 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/android/examples/Basics/Transform/Scale/applet/Scale.java b/android/examples/Basics/Transform/Scale/applet/Scale.java new file mode 100644 index 000000000..d8adf49b3 --- /dev/null +++ b/android/examples/Basics/Transform/Scale/applet/Scale.java @@ -0,0 +1,58 @@ +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/android/examples/Basics/Transform/Scale/applet/Scale.pde b/android/examples/Basics/Transform/Scale/applet/Scale.pde new file mode 100644 index 000000000..dc41a584d --- /dev/null +++ b/android/examples/Basics/Transform/Scale/applet/Scale.pde @@ -0,0 +1,38 @@ +/** + * 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/android/examples/Basics/Transform/Scale/applet/loading.gif b/android/examples/Basics/Transform/Scale/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Transform/Translate/Translate.pde b/android/examples/Basics/Transform/Translate/Translate.pde new file mode 100644 index 000000000..81b39af9d --- /dev/null +++ b/android/examples/Basics/Transform/Translate/Translate.pde @@ -0,0 +1,41 @@ +/** + * 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/android/examples/Basics/Transform/Translate/applet/Translate.java b/android/examples/Basics/Transform/Translate/applet/Translate.java new file mode 100644 index 000000000..c62a13544 --- /dev/null +++ b/android/examples/Basics/Transform/Translate/applet/Translate.java @@ -0,0 +1,61 @@ +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/android/examples/Basics/Transform/Translate/applet/Translate.pde b/android/examples/Basics/Transform/Translate/applet/Translate.pde new file mode 100644 index 000000000..81b39af9d --- /dev/null +++ b/android/examples/Basics/Transform/Translate/applet/Translate.pde @@ -0,0 +1,41 @@ +/** + * 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/android/examples/Basics/Transform/Translate/applet/loading.gif b/android/examples/Basics/Transform/Translate/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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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1OPih>8w-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Transform/TriangleFlower/TriangleFlower.pde b/android/examples/Basics/Transform/TriangleFlower/TriangleFlower.pde new file mode 100644 index 000000000..e87e97c72 --- /dev/null +++ b/android/examples/Basics/Transform/TriangleFlower/TriangleFlower.pde @@ -0,0 +1,47 @@ +/** + * 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. + * + * Updated 27 February 2010. + */ + +PVector[] p = new PVector[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 PVector(-width/2, height/2); + p[1] = new PVector(width/2, height/2); + p[2] = new PVector(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/android/examples/Basics/Transform/TriangleFlower/applet/TriangleFlower.java b/android/examples/Basics/Transform/TriangleFlower/applet/TriangleFlower.java new file mode 100644 index 000000000..b4bf9b0ad --- /dev/null +++ b/android/examples/Basics/Transform/TriangleFlower/applet/TriangleFlower.java @@ -0,0 +1,63 @@ +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/android/examples/Basics/Transform/TriangleFlower/applet/TriangleFlower.pde b/android/examples/Basics/Transform/TriangleFlower/applet/TriangleFlower.pde new file mode 100644 index 000000000..e46988519 --- /dev/null +++ b/android/examples/Basics/Transform/TriangleFlower/applet/TriangleFlower.pde @@ -0,0 +1,43 @@ +/** + * 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/android/examples/Basics/Transform/TriangleFlower/applet/loading.gif b/android/examples/Basics/Transform/TriangleFlower/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Typography/Letters/Letters.pde b/android/examples/Basics/Typography/Letters/Letters.pde new file mode 100644 index 000000000..66fd2302f --- /dev/null +++ b/android/examples/Basics/Typography/Letters/Letters.pde @@ -0,0 +1,72 @@ +/** + * Letters. + * + * Draws letters to the screen. This requires loading a font, + * setting the font, and then drawing the letters. + */ + +PFont fontA; + +void setup() +{ + size(200, 200); + background(0); + smooth(); + // 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"); + textAlign(CENTER); + + // Set the font and its size (in units of pixels) + textFont(fontA, 32); + + // Only draw once + 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/android/examples/Basics/Typography/Letters/applet/Letters.java b/android/examples/Basics/Typography/Letters/applet/Letters.java new file mode 100644 index 000000000..da77d549a --- /dev/null +++ b/android/examples/Basics/Typography/Letters/applet/Letters.java @@ -0,0 +1,86 @@ +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/android/examples/Basics/Typography/Letters/applet/Letters.pde b/android/examples/Basics/Typography/Letters/applet/Letters.pde new file mode 100644 index 000000000..82e943f2f --- /dev/null +++ b/android/examples/Basics/Typography/Letters/applet/Letters.pde @@ -0,0 +1,66 @@ +/** + * 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/android/examples/Basics/Typography/Letters/applet/loading.gif b/android/examples/Basics/Typography/Letters/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Typography/Letters/data/CourierNew36.vlw b/android/examples/Basics/Typography/Letters/data/CourierNew36.vlw new file mode 100644 index 0000000000000000000000000000000000000000..904771486a1a6d241fb5184282eb99780f730615 GIT binary patch literal 114920 zcmeFa4{%l6_aAiL{l%ElG%aF^6jR<0`9(}4QW23KrYS8_M8uR9DMiYU(niFXrV*tS zX@}7hD*SK3{~yKw@5le&iT_`>{z~f- z&vb;%`2XGb|6TYez83#~2mT3vAO1Jse=YtQNB^(kpTIim@bAZE7y4A(XVm! z@c-Rj9Q|76-w!|A!mzeQ+qo6EjreDnar|F{f5Jb2|8!i1!~{VD+~0@)-;00Er}h0I z;MhiO=iddtwzCm_wnghBO-M_^KZt*p!E#w=*HV+&^N&ewmtYr;RID=09rV{B|m>ca@3L zKKx@V#O*FqpO*QXh+|z!Px_Ufd*CPkDDN_kJWlw>@lRgnKl@Erp$Q)5(KymT;g7(x zT)t)-r!-?a?cX1T|L?&+c|mEdaeIMdTEigq1ZXI0h!*}o#_TiuT z*nf?KSKyz(FXMFF>DPSwZJeJ^l%zH7dJ+QyZm=V2Si@}x|U*8hx+E7$iH8&|HrKZ!Wb)pGfc*nF-&gcbf2 zJnVzcBl?vm{aT~{Y z$p=^A&%#5z-v=Fs6Tq`B%0=emKj#(UpTqxhvhF0}()o1W{yD^P4k<5jjFo1mtY7+$ zaV_9q`~F*qV;R~O=2Lln8h*+Kr8WK9hd&QL+pTn=U*QZq%jNqEh)d_wGXG+kd^(R> zZ9biwEJOSE&%@8Tpl$KndDiCBIOfwb{{tjFrPu{xv~A1Z5-=izv(Ki&s&`4 zW4xC6uh_Io7v@u1|Eo66_1%*%7i^r)Bj!{1EATMv$7z`tfoFN;%KWP~AM>XBa0xih zBkDnn-j!_N#N|%2fezuwaEb{>R{y)GaJitHO z&-xk1_UbzQZ@~WtERJ!Uzd8;N;U`UW9O&2j{!RGFf69Ywlg2%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(PeTJ(kSzBfc`3K z&{b;yj{g}qORn$*d;1GhM@+fYe3 zs#mTmfSae^`v}LrHCTh#>9G3@6%p7_vibMG`Np0>bm}z^@T+>?E)~VUkB6R#i@a7z z0J|}Y8R(JPZRSyzgfIN|mFl34;UUvnrLt!2qGjqt*3V;N8;W7K1NvlaaIC-pAmZsb zF8#3!;LEjFxGv+<$61^iVOrDgT47zqV)G|lcSlOcti87pAu3$cH8gE8khLfD#A*Fx zo+oo8ne_{ERtxzc0|iEP{&r{qCjMn@SFSWBD(&Y` z!&6K=!MtqC;5-%Kw(3VC=p4MBC~Q<0&Hmen(p3}ZroS8O4L<_lN@_`LZe3FK4&tQD z6fFZ0C~DTo77k1F&WchH5BJ!Z+A!9cWm;8A-MnupU|rb>!k31IkNl}n!cCg|?&(4& zJU!vB_gb9M=hW}+dEOJ)R^Gw~eErbHqF@<)EZ&cR%FfJcgO4MFFb#&a)aQ+ zC8K_s5`22mIOeL9F;_Xa=l6r+5!$@BnY4h!doNZD+Sqc0g*uWk3`>u8H4`Iy$+8;c2)=dA=n4{n_ z!`|M5fPMS}b`RgoD7Uk{d$FV$cG!7u&MWyw)sy^zugnlDXd|)B?c18r`8tX*d}h#6 z=TjSAE564SP_}Q~S+TumUxGvmy>|Nl_nmURyp?dyZdk8jk}T@8E#w+SoT+Mohj`S~ zM6cXFwW`3tW4d*p6z*6cvRW|;l5aq?V!{YW2v-wE02?kQa_?jq0gz-1g@0bKu|v=~ zvgNW-CfwK|%J*%WFXG+GNml%-zatrwO_qZGnpIGiHMs0Rcx@BSP-@uo89pA#D<3hF p1I#39Op8e4s4-Q(8grS&7FzR}3|8Ks5wrTh1g$ 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/android/examples/Basics/Typography/Words/applet/Words.java b/android/examples/Basics/Typography/Words/applet/Words.java new file mode 100644 index 000000000..192678348 --- /dev/null +++ b/android/examples/Basics/Typography/Words/applet/Words.java @@ -0,0 +1,62 @@ +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/android/examples/Basics/Typography/Words/applet/Words.pde b/android/examples/Basics/Typography/Words/applet/Words.pde new file mode 100644 index 000000000..e7622a4c7 --- /dev/null +++ b/android/examples/Basics/Typography/Words/applet/Words.pde @@ -0,0 +1,42 @@ +/** + * 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/android/examples/Basics/Typography/Words/applet/loading.gif b/android/examples/Basics/Typography/Words/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Typography/Words/data/Ziggurat-HTF-Black-32.vlw b/android/examples/Basics/Typography/Words/data/Ziggurat-HTF-Black-32.vlw new file mode 100644 index 0000000000000000000000000000000000000000..84c2d4b59e9d3bbb8e7eada0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}+DlsP#8d45`!@&hGCM-&#iLQ)gsN78$etba^s%nMHRK z^SUuJa&a&=r}IYBaDljSbSP6NI&Q~rOuWFBnyK;2jSeqYuTIJj^U;M+o%}-mrjSx6 zuQ3KG@RrYB>SW{LxO6CN1$&sWmpb7~816vqvs&kf)e$NH(eLGQyMgBjhPTYPkOpJfk348024bNX)hy88TN#Wv?;_U47_{GX4VN`WjBrJzy z`&Piw5|mGJ*l5M^jSTv!Viq5ZYJrW~fNif%lE`ij5OhWj+qg`t&~wf|uFnXVp_j|? zPP=Ssi5*r%redQ5UA0lGOhJcTlAN{@t?f3EBG}9{bcP(JJfQH|+4oJ@jK!9iX?&u| zP7f_Ge>jW3-@h34)a2xy{oCA4msv11U{FQkvgEKdUf@vM0Lg_8%63awh81?Z0_(gZ zAlk00#5QkPZhDnnkXLnmHZDlo`%cue7c^Y#m5pK^S99Uv6gGHGPYkq&23FMgJYkpk zx4{H=)z)LK?m35YyW*xs9m8JNT5NZ)?C2cOY|j*P%L-v@bE@116jL;eSRS>ba~lh8 zHogflO3eTB>HR%U%dAzruVmS|pu*Vg1)s&7O%ARM_wdN_EXCKUh1*{k6Y%a}xEJST z$X%(0LFo_1*dW$i9Gjk 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/android/examples/Basics/Web/EmbeddedLinks/applet/EmbeddedLinks.java b/android/examples/Basics/Web/EmbeddedLinks/applet/EmbeddedLinks.java new file mode 100644 index 000000000..1ee4b1a64 --- /dev/null +++ b/android/examples/Basics/Web/EmbeddedLinks/applet/EmbeddedLinks.java @@ -0,0 +1,93 @@ +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/android/examples/Basics/Web/EmbeddedLinks/applet/EmbeddedLinks.pde b/android/examples/Basics/Web/EmbeddedLinks/applet/EmbeddedLinks.pde new file mode 100644 index 000000000..ab41385c7 --- /dev/null +++ b/android/examples/Basics/Web/EmbeddedLinks/applet/EmbeddedLinks.pde @@ -0,0 +1,73 @@ +/** + * 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/android/examples/Basics/Web/EmbeddedLinks/applet/loading.gif b/android/examples/Basics/Web/EmbeddedLinks/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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+1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g}sN`dc6zyd@D@_N0? zUI17i0N2$U00sreo G1OPih>8w-$ literal 0 HcmV?d00001 diff --git a/android/examples/Basics/Web/LoadingImages/LoadingImages.pde b/android/examples/Basics/Web/LoadingImages/LoadingImages.pde new file mode 100644 index 000000000..325fbba56 --- /dev/null +++ b/android/examples/Basics/Web/LoadingImages/LoadingImages.pde @@ -0,0 +1,16 @@ +/** + * 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/android/examples/Basics/Web/LoadingImages/applet/LoadingImages.java b/android/examples/Basics/Web/LoadingImages/applet/LoadingImages.java new file mode 100644 index 000000000..76bab8631 --- /dev/null +++ b/android/examples/Basics/Web/LoadingImages/applet/LoadingImages.java @@ -0,0 +1,37 @@ +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/android/examples/Basics/Web/LoadingImages/applet/LoadingImages.pde b/android/examples/Basics/Web/LoadingImages/applet/LoadingImages.pde new file mode 100644 index 000000000..325fbba56 --- /dev/null +++ b/android/examples/Basics/Web/LoadingImages/applet/LoadingImages.pde @@ -0,0 +1,16 @@ +/** + * 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/android/examples/Basics/Web/LoadingImages/applet/loading.gif b/android/examples/Basics/Web/LoadingImages/applet/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..1ddae5089f0dbca27d59c7d8b8ae0568a569dc58 GIT binary patch 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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