initial commit
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Mon, 28 Jul 2025 00:41:43 +0000 (03:41 +0300)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Mon, 28 Jul 2025 00:41:43 +0000 (03:41 +0300)
652 files changed:
.gitignore [new file with mode: 0644]
.project [new file with mode: 0755]
2D GFX/Animations/2D rotation.bas [new file with mode: 0755]
2D GFX/Animations/2D rotation.webm [new file with mode: 0644]
2D GFX/Animations/Bump mapping.bas [new file with mode: 0755]
2D GFX/Animations/Bump mapping.webm [new file with mode: 0644]
2D GFX/Animations/DNA.bas [new file with mode: 0755]
2D GFX/Animations/DNA.webm [new file with mode: 0644]
2D GFX/Animations/Orbiting particles.bas [new file with mode: 0755]
2D GFX/Animations/Orbiting particles.webm [new file with mode: 0644]
2D GFX/Animations/Polygon textured.bas [new file with mode: 0755]
2D GFX/Animations/Polygon textured.webm [new file with mode: 0644]
2D GFX/Animations/Polygon.bas [new file with mode: 0755]
2D GFX/Animations/Polygon.webm [new file with mode: 0644]
2D GFX/Animations/Screensaver, flying hand fans.bas [new file with mode: 0755]
2D GFX/Animations/Screensaver, flying hand fans.webm [new file with mode: 0644]
2D GFX/Animations/Screensaver.bas [new file with mode: 0755]
2D GFX/Animations/Screensaver.webm [new file with mode: 0644]
2D GFX/Animations/Snowfall.bas [new file with mode: 0755]
2D GFX/Animations/Snowfall.webm [new file with mode: 0644]
2D GFX/Animations/Tree.bas [new file with mode: 0755]
2D GFX/Animations/Tree.webm [new file with mode: 0644]
2D GFX/Animations/Yin and yang.bas [new file with mode: 0755]
2D GFX/Animations/Yin and yang.webm [new file with mode: 0644]
2D GFX/Animations/circular patterns.bas [new file with mode: 0644]
2D GFX/Animations/circular patterns.webm [new file with mode: 0644]
2D GFX/Animations/hacker.bas [new file with mode: 0755]
2D GFX/Animations/hacker.webm [new file with mode: 0644]
2D GFX/Animations/index.org [new file with mode: 0644]
2D GFX/Animations/logo.png [new file with mode: 0644]
2D GFX/Animations/matrix.bas [new file with mode: 0755]
2D GFX/Animations/matrix.webm [new file with mode: 0644]
2D GFX/Animations/matrix2.bas [new file with mode: 0755]
2D GFX/Animations/matrix2.webm [new file with mode: 0644]
2D GFX/Animations/maze.BAS [new file with mode: 0755]
2D GFX/Animations/maze.webm [new file with mode: 0644]
2D GFX/Animations/programming is fun.BAS [new file with mode: 0755]
2D GFX/Animations/programming is fun.webm [new file with mode: 0644]
2D GFX/Animations/sun&eart.bas [new file with mode: 0755]
2D GFX/Animations/text mode animation.bas [new file with mode: 0755]
2D GFX/Animations/text mode animation.webm [new file with mode: 0644]
2D GFX/Animations/txtpal.bas [new file with mode: 0755]
2D GFX/Fractals/fractal circles animated.bas [new file with mode: 0755]
2D GFX/Fractals/fractal circles animated.webm [new file with mode: 0644]
2D GFX/Fractals/fractal circles.bas [new file with mode: 0755]
2D GFX/Fractals/fractal circles.png [new file with mode: 0644]
2D GFX/Fractals/fractal squares animated.bas [new file with mode: 0755]
2D GFX/Fractals/fractal squares animated.webm [new file with mode: 0644]
2D GFX/Fractals/fractal squares, 1.png [new file with mode: 0644]
2D GFX/Fractals/fractal squares, 2.png [new file with mode: 0644]
2D GFX/Fractals/fractal squares.bas [new file with mode: 0755]
2D GFX/Fractals/fractal trees.bas [new file with mode: 0755]
2D GFX/Fractals/fractal trees.webm [new file with mode: 0644]
2D GFX/Fractals/index.html [new file with mode: 0644]
2D GFX/Fractals/index.org [new file with mode: 0644]
2D GFX/Hello friend.bas [new file with mode: 0755]
2D GFX/Hello friend.png [new file with mode: 0644]
2D GFX/People.bas [new file with mode: 0755]
2D GFX/People.webm [new file with mode: 0644]
2D GFX/Spirals/index.html [new file with mode: 0644]
2D GFX/Spirals/index.org [new file with mode: 0644]
2D GFX/Spirals/logo.png [new file with mode: 0644]
2D GFX/Spirals/spiral, 2.bas [new file with mode: 0644]
2D GFX/Spirals/spiral, 2.png [new file with mode: 0644]
2D GFX/Spirals/spiral, 3.bas [new file with mode: 0644]
2D GFX/Spirals/spiral, 3.png [new file with mode: 0644]
2D GFX/Spirals/spiral, 4, 1.png [new file with mode: 0644]
2D GFX/Spirals/spiral, 4, 2.png [new file with mode: 0644]
2D GFX/Spirals/spiral, 4.bas [new file with mode: 0644]
2D GFX/Spirals/spiral, 5.bas [new file with mode: 0644]
2D GFX/Spirals/spiral, 5.png [new file with mode: 0644]
2D GFX/Spirals/spiral, 6.bas [new file with mode: 0644]
2D GFX/Spirals/spiral, 6.png [new file with mode: 0644]
2D GFX/Spirals/spiral.bas [new file with mode: 0644]
2D GFX/Spirals/spiral.png [new file with mode: 0644]
2D GFX/Spirals/texture.dat [new file with mode: 0644]
2D GFX/Spirals/texture1.dat [new file with mode: 0644]
2D GFX/Stroboscope.bas [new file with mode: 0644]
2D GFX/Stroboscope.png [new file with mode: 0644]
2D GFX/Textures/Circular waves.bas [new file with mode: 0755]
2D GFX/Textures/Circular waves.png [new file with mode: 0644]
2D GFX/Textures/Diamond square clouds.bas [new file with mode: 0755]
2D GFX/Textures/Diamond square clouds.png [new file with mode: 0644]
2D GFX/Textures/Old paper.bas [new file with mode: 0755]
2D GFX/Textures/Old paper.png [new file with mode: 0644]
2D GFX/Textures/Wood.bas [new file with mode: 0755]
2D GFX/Textures/Wood.png [new file with mode: 0644]
2D GFX/Textures/Yellow flame.bas [new file with mode: 0755]
2D GFX/Textures/Yellow flame.png [new file with mode: 0644]
2D GFX/Textures/index.html [new file with mode: 0644]
2D GFX/Textures/index.org [new file with mode: 0644]
2D GFX/Textures/logo.png [new file with mode: 0644]
2D GFX/Truncated cone.bas [new file with mode: 0755]
2D GFX/Truncated cone.png [new file with mode: 0644]
3D GFX/3D Synthezier/.project [new file with mode: 0644]
3D GFX/3D Synthezier/bin/3dparse.bas [new file with mode: 0755]
3D GFX/3D Synthezier/bin/city1.3d [new file with mode: 0644]
3D GFX/3D Synthezier/bin/city1.bat [new file with mode: 0755]
3D GFX/3D Synthezier/bin/city2.3d [new file with mode: 0644]
3D GFX/3D Synthezier/bin/city2.bat [new file with mode: 0755]
3D GFX/3D Synthezier/bin/result.mtl [new file with mode: 0644]
3D GFX/3D Synthezier/doc/hexagonal city, 1.jpeg [new file with mode: 0644]
3D GFX/3D Synthezier/doc/hexagonal city, 2.jpeg [new file with mode: 0644]
3D GFX/3D Synthezier/doc/hexagonal city, 3.jpeg [new file with mode: 0644]
3D GFX/3D Synthezier/doc/hexagonal city.blend [new file with mode: 0644]
3D GFX/3D Synthezier/doc/index.html [new file with mode: 0644]
3D GFX/3D Synthezier/doc/index.org [new file with mode: 0644]
3D GFX/3D Synthezier/doc/rectangular city, 1.jpeg [new file with mode: 0644]
3D GFX/3D Synthezier/doc/rectangular city, 2.jpeg [new file with mode: 0644]
3D GFX/3D Synthezier/doc/rectangular city, 3.jpeg [new file with mode: 0644]
3D GFX/3D Synthezier/doc/rectangular city.blend [new file with mode: 0644]
3D GFX/3D Synthezier/doc/rotation.png [new file with mode: 0644]
3D GFX/3D Synthezier/include/6nrk0s.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/6nrk2s.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/blk1.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/blk2.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/blk3.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/blk4.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/bridge.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/bridge1.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/bridgegl.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/bus.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/bus_frnt.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/bus_wind.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/car.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/car_frnt.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/cars.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/flare_r.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/flare_w.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/handrail.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/katus.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/katus2.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/katus3.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/krs1.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/krs2.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/kuppel.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/maja.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/nrk4.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/nrk6.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/nrk8.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/plaat.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/pol.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/pol_ceil.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/pol_frnt.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/ring.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/seinl1.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/seinp1.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/solar.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/toru.3d [new file with mode: 0644]
3D GFX/3D Synthezier/include/vedru.3d [new file with mode: 0644]
3D GFX/3D land.bas [new file with mode: 0755]
3D GFX/3D land.webm [new file with mode: 0644]
3D GFX/Anaglyph.bas [new file with mode: 0755]
3D GFX/Anaglyph.html [new file with mode: 0644]
3D GFX/Anaglyph.png [new file with mode: 0644]
3D GFX/Helicopter/Helicopter.bas [new file with mode: 0644]
3D GFX/Helicopter/data.dat [new file with mode: 0755]
3D GFX/Helicopter/data2.dat [new file with mode: 0755]
3D GFX/Helicopter/demo, 1.png [new file with mode: 0644]
3D GFX/Helicopter/demo, 2.png [new file with mode: 0644]
3D GFX/Helicopter/demo, 3.png [new file with mode: 0644]
3D GFX/Helicopter/demo, 4.png [new file with mode: 0644]
3D GFX/Miscellaneous/!.bas [new file with mode: 0644]
3D GFX/Miscellaneous/!.webm [new file with mode: 0644]
3D GFX/Miscellaneous/3D ball.bas [new file with mode: 0755]
3D GFX/Miscellaneous/3D ball.webm [new file with mode: 0644]
3D GFX/Miscellaneous/3D text.bas [new file with mode: 0755]
3D GFX/Miscellaneous/3D text.webm [new file with mode: 0644]
3D GFX/Miscellaneous/Bouncing cubes.bas [new file with mode: 0755]
3D GFX/Miscellaneous/Bouncing cubes.webm [new file with mode: 0644]
3D GFX/Miscellaneous/Matrix math.bas [new file with mode: 0755]
3D GFX/Miscellaneous/Matrix math.webm [new file with mode: 0644]
3D GFX/Miscellaneous/Maze explorer.bas [new file with mode: 0755]
3D GFX/Miscellaneous/Maze explorer.png [new file with mode: 0644]
3D GFX/Miscellaneous/Tank.bas [new file with mode: 0755]
3D GFX/Miscellaneous/Tank.webm [new file with mode: 0644]
3D GFX/Miscellaneous/Tiled room.bas [new file with mode: 0755]
3D GFX/Miscellaneous/Tiled room.webm [new file with mode: 0644]
3D GFX/Miscellaneous/font.dat [new file with mode: 0644]
3D GFX/Miscellaneous/index.html [new file with mode: 0644]
3D GFX/Miscellaneous/index.org [new file with mode: 0644]
3D GFX/Miscellaneous/logo.png [new file with mode: 0644]
3D GFX/Ray casting engine.bas [new file with mode: 0755]
3D GFX/Ray casting engine.html [new file with mode: 0644]
3D GFX/Ray casting engine.png [new file with mode: 0644]
3D GFX/Space/Galaxy explorer.bas [new file with mode: 0755]
3D GFX/Space/Galaxy explorer.png [new file with mode: 0644]
3D GFX/Space/Rocket simulator.bas [new file with mode: 0755]
3D GFX/Space/Rocket simulator.webm [new file with mode: 0644]
3D GFX/Space/Stars.bas [new file with mode: 0755]
3D GFX/Space/Stars.webm [new file with mode: 0644]
3D GFX/Space/Universe explorer/1.png [new file with mode: 0644]
3D GFX/Space/Universe explorer/2.png [new file with mode: 0644]
3D GFX/Space/Universe explorer/3.png [new file with mode: 0644]
3D GFX/Space/Universe explorer/Universe explorer.bas [new file with mode: 0755]
3D GFX/Space/Universe explorer/index.html [new file with mode: 0644]
3D GFX/Space/Universe explorer/qbext.com [new file with mode: 0755]
3D GFX/Space/Universe explorer/run.bat [new file with mode: 0755]
3D GFX/Space/index.html [new file with mode: 0644]
3D GFX/Space/index.org [new file with mode: 0644]
3D GFX/Space/logo.png [new file with mode: 0644]
3D GFX/Space/qbext.com [new file with mode: 0755]
3D GFX/Swapping 3D engine/engine.bas [new file with mode: 0755]
3D GFX/Swapping 3D engine/index.html [new file with mode: 0644]
3D GFX/Swapping 3D engine/index.org [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR100.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR101.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR102.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR103.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR104.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR105.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR106.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR107.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR108.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR109.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR110.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR111.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR112.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR113.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR114.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR115.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR116.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR117.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR118.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR119.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR120.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR121.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR122.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR123.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR124.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR125.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR126.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR127.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR128.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR129.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR130.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR131.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR132.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR133.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR134.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR135.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR136.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR137.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR138.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR139.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR140.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR141.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR142.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR143.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR144.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR145.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR146.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR147.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR148.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR149.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR150.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR151.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR152.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR153.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR154.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR155.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR156.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR157.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR158.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR159.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR160.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR161.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR162.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR163.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR164.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR165.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR166.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR167.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR168.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR169.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR170.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR171.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR172.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR173.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR174.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR175.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR176.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR177.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR178.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR179.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR180.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR181.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR182.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR183.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR184.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR185.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR186.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR187.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR188.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR189.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR190.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR191.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR192.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR193.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR194.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR195.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR196.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR197.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR198.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR199.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR200.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR201.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR202.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR203.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR204.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR205.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR206.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR207.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR208.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR209.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR210.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR211.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR212.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR213.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR214.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR215.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR216.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR217.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR218.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR219.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR220.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR221.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR222.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR223.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR224.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR225.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR226.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR227.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR228.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR229.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR230.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR231.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR232.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR233.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR234.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR235.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR236.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR237.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR238.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR239.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR240.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR241.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR242.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR243.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR244.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR245.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR246.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR247.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR248.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR249.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR250.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR251.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR252.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR253.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR254.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR255.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR32.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR33.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR34.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR35.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR36.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR37.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR38.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR39.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR40.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR41.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR42.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR43.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR44.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR45.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR46.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR47.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR48.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR49.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR50.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR51.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR52.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR53.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR54.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR55.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR56.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR57.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR58.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR59.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR60.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR61.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR62.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR63.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR64.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR65.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR66.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR67.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR68.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR69.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR70.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR71.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR72.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR73.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR74.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR75.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR76.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR77.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR78.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR79.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR80.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR81.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR82.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR83.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR84.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR85.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR86.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR87.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR88.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR89.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR90.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR91.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR92.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR93.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR94.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR95.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR96.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR97.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR98.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/LTR99.3D [new file with mode: 0755]
3D GFX/Swapping 3D engine/objects/font/mk3dfont.bas [new file with mode: 0755]
3D GFX/Swapping 3D engine/qbext.com [new file with mode: 0755]
3D GFX/Swapping 3D engine/run.bat [new file with mode: 0755]
3D GFX/Swapping 3D engine/screenshot, 2.png [new file with mode: 0644]
3D GFX/Swapping 3D engine/screenshot.png [new file with mode: 0755]
3D GFX/qbext.com [new file with mode: 0755]
COPYING [new file with mode: 0644]
Games/Worm/1.lvl [new file with mode: 0644]
Games/Worm/10.lvl [new file with mode: 0644]
Games/Worm/11.lvl [new file with mode: 0644]
Games/Worm/2.lvl [new file with mode: 0644]
Games/Worm/3.lvl [new file with mode: 0644]
Games/Worm/4.lvl [new file with mode: 0644]
Games/Worm/5.lvl [new file with mode: 0644]
Games/Worm/6.lvl [new file with mode: 0644]
Games/Worm/7.lvl [new file with mode: 0644]
Games/Worm/8.lvl [new file with mode: 0644]
Games/Worm/9.lvl [new file with mode: 0644]
Games/Worm/screencast.webm [new file with mode: 0644]
Games/Worm/worm.bas [new file with mode: 0755]
Games/checkers.bas [new file with mode: 0755]
Games/checkers2.bas [new file with mode: 0755]
Games/checkers2.png [new file with mode: 0644]
Math/3dlife.dat [new file with mode: 0644]
Math/Game of life in 3D.bas [new file with mode: 0755]
Math/Game of life in 3D.webm [new file with mode: 0644]
Math/Game of life/1 [new file with mode: 0644]
Math/Game of life/10 [new file with mode: 0644]
Math/Game of life/11 [new file with mode: 0644]
Math/Game of life/2 [new file with mode: 0644]
Math/Game of life/3 [new file with mode: 0644]
Math/Game of life/4 [new file with mode: 0644]
Math/Game of life/5 [new file with mode: 0644]
Math/Game of life/6 [new file with mode: 0644]
Math/Game of life/7 [new file with mode: 0644]
Math/Game of life/8 [new file with mode: 0644]
Math/Game of life/9 [new file with mode: 0644]
Math/Game of life/Game of life.bas [new file with mode: 0755]
Math/Game of life/e [new file with mode: 0644]
Math/Game of life/index.html [new file with mode: 0644]
Math/Game of life/screenshot.png [new file with mode: 0644]
Math/Lottery/Lottery analysis.bas [new file with mode: 0755]
Math/Lottery/loto.txt [new file with mode: 0644]
Math/Lottery/screenshot, 1.png [new file with mode: 0644]
Math/Lottery/screenshot, 2.png [new file with mode: 0644]
Math/Lottery/screenshot, 3.png [new file with mode: 0644]
Math/Multiplication trainer.bas [new file with mode: 0644]
Math/Multiplication trainer.png [new file with mode: 0644]
Math/Plotting/2D graph plot.bas [new file with mode: 0755]
Math/Plotting/2D graph plot.png [new file with mode: 0644]
Math/Plotting/3D graph.bas [new file with mode: 0644]
Math/Plotting/3D graph.png [new file with mode: 0644]
Math/Plotting/Deriviative calculator.bas [new file with mode: 0755]
Math/Plotting/Deriviative calculator.png [new file with mode: 0644]
Math/Plotting/Sine and cosine table.bas [new file with mode: 0755]
Math/Plotting/Sine and cosine table.png [new file with mode: 0644]
Math/Simulation/Explosion/Explosion simulator.bas [new file with mode: 0755]
Math/Simulation/Explosion/index.html [new file with mode: 0644]
Math/Simulation/Explosion/screenshot.png [new file with mode: 0644]
Math/Simulation/Gravity in 2D.bas [new file with mode: 0755]
Math/Simulation/Gravity in 2D.png [new file with mode: 0644]
Math/Simulation/Gravity in 3D.bas [new file with mode: 0755]
Math/Simulation/Gravity in 3D.webm [new file with mode: 0644]
Math/Simulation/Interference.BAS [new file with mode: 0755]
Math/Simulation/Interference.webm [new file with mode: 0644]
Math/Simulation/Interferogram.BAS [new file with mode: 0755]
Math/Simulation/Interferogram.png [new file with mode: 0644]
Math/Simulation/Surface tension.bas [new file with mode: 0755]
Math/Simulation/Surface tension.png [new file with mode: 0644]
Math/Simulation/Wave 1.bas [new file with mode: 0755]
Math/Simulation/Wave 1.png [new file with mode: 0644]
Math/Simulation/Wave 2.bas [new file with mode: 0755]
Math/Simulation/Wave 2.png [new file with mode: 0644]
Math/Sine computation.bas [new file with mode: 0755]
Math/Sine computation.png [new file with mode: 0644]
Math/Truth table calculator/img/screenshot, 1.png [new file with mode: 0644]
Math/Truth table calculator/img/screenshot, 2.png [new file with mode: 0644]
Math/Truth table calculator/img/screenshot, 3.png [new file with mode: 0644]
Math/Truth table calculator/index.html [new file with mode: 0644]
Math/Truth table calculator/index.org [new file with mode: 0644]
Math/Truth table calculator/truth.bas [new file with mode: 0755]
Miscellaneous/4D engine/index.html [new file with mode: 0644]
Miscellaneous/4D engine/qeng.bas [new file with mode: 0755]
Miscellaneous/4D engine/sshot.png [new file with mode: 0644]
Miscellaneous/Alien font.bas [new file with mode: 0644]
Miscellaneous/Alien font.png [new file with mode: 0644]
Miscellaneous/Automated school clock/v1/Electronics/1.png [new file with mode: 0644]
Miscellaneous/Automated school clock/v1/Electronics/2.png [new file with mode: 0644]
Miscellaneous/Automated school clock/v1/Electronics/3 key keyboard.png [new file with mode: 0644]
Miscellaneous/Automated school clock/v1/Electronics/3.png [new file with mode: 0644]
Miscellaneous/Automated school clock/v1/Electronics/4.png [new file with mode: 0644]
Miscellaneous/Automated school clock/v1/Electronics/skeem.png [new file with mode: 0644]
Miscellaneous/Automated school clock/v1/README.html [new file with mode: 0644]
Miscellaneous/Automated school clock/v1/README.org [new file with mode: 0644]
Miscellaneous/Automated school clock/v1/aasta.ap [new file with mode: 0644]
Miscellaneous/Automated school clock/v1/autoexec.bat [new file with mode: 0755]
Miscellaneous/Automated school clock/v1/coff.asm [new file with mode: 0644]
Miscellaneous/Automated school clock/v1/coff.com [new file with mode: 0755]
Miscellaneous/Automated school clock/v1/ekr.bas [new file with mode: 0755]
Miscellaneous/Automated school clock/v1/kk.bas [new file with mode: 0755]
Miscellaneous/Automated school clock/v1/opetajap.pp [new file with mode: 0644]
Miscellaneous/Automated school clock/v1/rebased.pp [new file with mode: 0644]
Miscellaneous/Automated school clock/v1/reede.pp [new file with mode: 0644]
Miscellaneous/Automated school clock/v1/sync.txt [new file with mode: 0644]
Miscellaneous/Automated school clock/v1/tava.pp [new file with mode: 0644]
Miscellaneous/Automated school clock/v1/tuhi.pp [new file with mode: 0644]
Miscellaneous/Automated school clock/v2/aasta.ap [new file with mode: 0644]
Miscellaneous/Automated school clock/v2/kkmini.bas [new file with mode: 0755]
Miscellaneous/Automated school clock/v2/luhend.pp [new file with mode: 0644]
Miscellaneous/Automated school clock/v2/opetajap.pp [new file with mode: 0644]
Miscellaneous/Automated school clock/v2/rebased.pp [new file with mode: 0644]
Miscellaneous/Automated school clock/v2/reede.pp [new file with mode: 0644]
Miscellaneous/Automated school clock/v2/sync.txt [new file with mode: 0644]
Miscellaneous/Automated school clock/v2/tava.pp [new file with mode: 0644]
Miscellaneous/Automated school clock/v2/tuhi.pp [new file with mode: 0644]
Miscellaneous/Automated school clock/v3/aasta.ap [new file with mode: 0644]
Miscellaneous/Automated school clock/v3/kell3.bas [new file with mode: 0755]
Miscellaneous/Automated school clock/v3/luhend.pp [new file with mode: 0644]
Miscellaneous/Automated school clock/v3/reede.pp [new file with mode: 0644]
Miscellaneous/Automated school clock/v3/skeem.png [new file with mode: 0644]
Miscellaneous/Automated school clock/v3/tava.pp [new file with mode: 0644]
Miscellaneous/Automated school clock/v3/tuhi.pp [new file with mode: 0644]
Miscellaneous/Automated school clock/v3/tutorial.org [new file with mode: 0644]
Miscellaneous/Custom palette, 2.png [new file with mode: 0644]
Miscellaneous/Custom palette, 3.png [new file with mode: 0644]
Miscellaneous/Custom palette.bas [new file with mode: 0644]
Miscellaneous/Custom palette.png [new file with mode: 0644]
Miscellaneous/Database/auto.scr [new file with mode: 0644]
Miscellaneous/Database/data.ddb [new file with mode: 0644]
Miscellaneous/Database/ddbase6.bas [new file with mode: 0755]
Miscellaneous/Database/lisa.scr [new file with mode: 0644]
Miscellaneous/Mouse driver/index.html [new file with mode: 0644]
Miscellaneous/Mouse driver/mousedrv.bas [new file with mode: 0755]
Miscellaneous/Mouse driver/qbext.asm [new file with mode: 0644]
Miscellaneous/Mouse driver/qbext.com [new file with mode: 0755]
Miscellaneous/Password lock/passw.bas [new file with mode: 0644]
Miscellaneous/Password lock/passw.dat [new file with mode: 0644]
Miscellaneous/Password lock/screenshot, 1.png [new file with mode: 0644]
Miscellaneous/Password lock/screenshot, 2.png [new file with mode: 0644]
Miscellaneous/Pressed key test.bas [new file with mode: 0644]
Miscellaneous/Video modes detector.bas [new file with mode: 0644]
Miscellaneous/alarm 1.bas [new file with mode: 0755]
Miscellaneous/alarm 1.mp3 [new file with mode: 0644]
Miscellaneous/alarm 2.bas [new file with mode: 0755]
Miscellaneous/alarm 2.mp3 [new file with mode: 0644]
Miscellaneous/windowing system.bas [new file with mode: 0755]
Miscellaneous/windowing system.webm [new file with mode: 0644]
Networking/COM port terminal.bas [new file with mode: 0755]
Networking/Digital data over analog audio channel/INPUT.TXT [new file with mode: 0644]
Networking/Digital data over analog audio channel/OUTPUT.TXT [new file with mode: 0644]
Networking/Digital data over analog audio channel/SOUND.XI [new file with mode: 0644]
Networking/Digital data over analog audio channel/aver.bas [new file with mode: 0644]
Networking/Digital data over analog audio channel/index.org [new file with mode: 0755]
Networking/Digital data over analog audio channel/msg2xi.bas [new file with mode: 0644]
Networking/Digital data over analog audio channel/screenshot.png [new file with mode: 0755]
Networking/Digital data over analog audio channel/xi2msg.bas [new file with mode: 0644]
Networking/LPT communication driver/lptdrv.asm [new file with mode: 0644]
Networking/LPT communication driver/lptdrv.com [new file with mode: 0644]
Networking/LPT communication driver/lptdrv.txt [new file with mode: 0644]
Networking/LPT communication driver/test.ASM [new file with mode: 0644]
Networking/LPT communication driver/test.COM [new file with mode: 0644]
Networking/LPT morse.bas [new file with mode: 0755]
Networking/LPT pin control.bas [new file with mode: 0755]
Networking/LPT to COM port data transfer.bas [new file with mode: 0755]
Networking/morse.bas [new file with mode: 0755]
Networking/morse.txt [new file with mode: 0644]
Tools/Commit and push [new file with mode: 0755]
Tools/Open with IntelliJ IDEA [new file with mode: 0755]
Tools/Update web site [new file with mode: 0755]
Tutorial/Group 1/00.bas [new file with mode: 0755]
Tutorial/Group 1/01.bas [new file with mode: 0755]
Tutorial/Group 1/02.bas [new file with mode: 0755]
Tutorial/Group 1/03.bas [new file with mode: 0755]
Tutorial/Group 1/04.bas [new file with mode: 0755]
Tutorial/Group 1/05.bas [new file with mode: 0755]
Tutorial/Group 1/06.bas [new file with mode: 0755]
Tutorial/Group 1/07.bas [new file with mode: 0755]
Tutorial/Group 1/08.bas [new file with mode: 0755]
Tutorial/Group 1/09.bas [new file with mode: 0755]
Tutorial/Group 1/10.bas [new file with mode: 0755]
Tutorial/Group 1/11.bas [new file with mode: 0755]
Tutorial/Group 1/12.bas [new file with mode: 0755]
Tutorial/Group 1/13.bas [new file with mode: 0755]
Tutorial/Group 1/15.bas [new file with mode: 0755]
Tutorial/Group 1/16.bas [new file with mode: 0755]
Tutorial/Group 1/17.bas [new file with mode: 0755]
Tutorial/Group 1/18.bas [new file with mode: 0755]
Tutorial/Group 1/19.bas [new file with mode: 0755]
Tutorial/Group 2/01.bas [new file with mode: 0755]
Tutorial/Group 2/02.bas [new file with mode: 0755]
Tutorial/Group 2/03.bas [new file with mode: 0755]
Tutorial/Group 2/04.bas [new file with mode: 0755]
Tutorial/Group 2/05.bas [new file with mode: 0755]
Tutorial/Group 2/06.bas [new file with mode: 0755]
Tutorial/Group 2/07.bas [new file with mode: 0755]
Tutorial/Group 2/08.bas [new file with mode: 0755]
Tutorial/Group 2/09.bas [new file with mode: 0755]
Tutorial/Group 2/10.bas [new file with mode: 0755]
Tutorial/Group 2/11.bas [new file with mode: 0755]
Tutorial/Group 2/12.bas [new file with mode: 0755]
Tutorial/Group 2/13.bas [new file with mode: 0755]
Tutorial/Group 2/14.bas [new file with mode: 0755]
Tutorial/Group 2/15.bas [new file with mode: 0755]
Tutorial/Group 2/16.bas [new file with mode: 0755]
Tutorial/Group 2/17.bas [new file with mode: 0755]
Tutorial/Group 2/18.bas [new file with mode: 0755]
Tutorial/Group 3/00.bas [new file with mode: 0755]
Tutorial/Group 3/01.bas [new file with mode: 0755]
Tutorial/Group 3/02.bas [new file with mode: 0755]
Tutorial/Group 3/03.bas [new file with mode: 0755]
Tutorial/Group 3/04.bas [new file with mode: 0755]
Tutorial/Group 3/05.bas [new file with mode: 0755]
Tutorial/Group 3/06.bas [new file with mode: 0755]
Tutorial/Group 3/07.bas [new file with mode: 0755]
Tutorial/Group 3/08.bas [new file with mode: 0755]
Tutorial/Group 3/09.bas [new file with mode: 0755]
Tutorial/Group 3/10.bas [new file with mode: 0755]
Tutorial/Group 3/11.bas [new file with mode: 0755]
Tutorial/index.html [new file with mode: 0644]
Tutorial/qsort3.bas [new file with mode: 0644]
VC.EXT [new file with mode: 0644]
index.org [new file with mode: 0644]
run_dosbox.sh [new file with mode: 0755]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..17a01d0
--- /dev/null
@@ -0,0 +1,12 @@
+/qbasicapps.iml
+/.idea/
+/VC.COM
+/VC.INI
+/QB45
+/index.html
+/Graphics/3D/3D Synthezier/doc/index.html
+/Math/Truth table calculator/doc/index.html
+/Graphics/Spirals/index.html
+/Graphics/index.html
+/2D GFX/Animations/index.html
+/3D GFX/3D Synthezier/index.html
\ No newline at end of file
diff --git a/.project b/.project
new file mode 100755 (executable)
index 0000000..3e5d85f
--- /dev/null
+++ b/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>QBasicApps</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+       </buildSpec>
+       <natures>
+       </natures>
+</projectDescription>
diff --git a/2D GFX/Animations/2D rotation.bas b/2D GFX/Animations/2D rotation.bas
new file mode 100755 (executable)
index 0000000..f7e3af4
--- /dev/null
@@ -0,0 +1,64 @@
+' This program showcases the rotation of points on an X-Y coordinate\r
+' system using trigonometric functions, specifically sine and cosine. By\r
+' simulating the effect of rotating a collection of grid points around\r
+' the origin, it demonstrates the mathematical principles behind 2D\r
+' rotation.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+\r
+' Changelog:\r
+' 2003.12, Initial version\r
+' 2024, Improved program readability\r
+\r
+DIM SHARED pointXCoordinates(1000) ' Array to store x coordinates of points\r
+DIM SHARED pointYCoordinates(1000) ' Array to store y coordinates of points\r
+DIM SHARED oldPointXCoordinates(1000) ' Array to store previous x coordinates of points\r
+DIM SHARED oldPointYCoordinates(1000) ' Array to store previous y coordinates of points\r
+\r
+SCREEN 13\r
+\r
+numPoints = 0 ' Initialize the number of points\r
+FOR pointXVal = -10 TO 10\r
+    FOR pointYVal = -10 TO 10\r
+        numPoints = numPoints + 1\r
+        pointXCoordinates(numPoints) = pointXVal\r
+        pointYCoordinates(numPoints) = pointYVal\r
+    NEXT pointYVal\r
+NEXT pointXVal\r
+\r
+' Main rotation loop\r
+rotationAngle = 0 ' Initialize the rotation angle to 0\r
+\r
+1\r
+    rotationAngle = rotationAngle + .01  ' Increment the rotation angle by 0.01 radians\r
+\r
+    ' Calculate the sine and cosine of the current rotation angle\r
+    sineOfRotationAngle = SIN(rotationAngle)\r
+    cosineOfRotationAngle = COS(rotationAngle)\r
+\r
+    FOR pointIndex = 1 TO numPoints\r
+        PSET (oldPointXCoordinates(pointIndex), oldPointYCoordinates(pointIndex)), 0 ' Clear the previous position\r
+\r
+        xCoordinate = pointXCoordinates(pointIndex)\r
+        yCoordinate = pointYCoordinates(pointIndex)\r
+\r
+        ' Calculate the new x and y coordinate after rotation\r
+        newXCoordinate = xCoordinate * sineOfRotationAngle + yCoordinate * cosineOfRotationAngle\r
+        newYCoordinate = xCoordinate * cosineOfRotationAngle - yCoordinate * sineOfRotationAngle\r
+\r
+        ' Scale and translate the new x and y coordinates to the center of the screen\r
+        newXCoordinate = newXCoordinate * 7 + 160\r
+        newYCoordinate = newYCoordinate * 7 + 100\r
+\r
+        ' Store x and y on-screen coordinates for clearing on next iteration\r
+        oldPointXCoordinates(pointIndex) = newXCoordinate\r
+        oldPointYCoordinates(pointIndex) = newYCoordinate\r
+\r
+        PSET (newXCoordinate, newYCoordinate), 15 ' Draw the point at the new position\r
+    NEXT pointIndex\r
+\r
+IF INKEY$ = "" THEN GOTO 1 ' Continue rotating if no key is pressed\r
+\r
diff --git a/2D GFX/Animations/2D rotation.webm b/2D GFX/Animations/2D rotation.webm
new file mode 100644 (file)
index 0000000..d3384d3
Binary files /dev/null and b/2D GFX/Animations/2D rotation.webm differ
diff --git a/2D GFX/Animations/Bump mapping.bas b/2D GFX/Animations/Bump mapping.bas
new file mode 100755 (executable)
index 0000000..ba65e7d
--- /dev/null
@@ -0,0 +1,133 @@
+DECLARE SUB paintSurface ()\r
+' Program renders bump mapping animation where light source moves around.\r
+' Based on light source location, different parts of the surface become illuminated.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+\r
+' Changelog:\r
+' ?, Initial version\r
+' 2024, Improved program readability\r
+\r
+DECLARE SUB makeSurface ()\r
+DECLARE SUB animate ()\r
+DECLARE SUB makeDot (x!, y!)\r
+DECLARE SUB paintImage ()\r
+SCREEN 13\r
+\r
+' surface height map\r
+DIM SHARED imgHeight(0 TO 50, 0 TO 50)\r
+\r
+PAINT (0, 0), 1\r
+\r
+makeSurface\r
+paintSurface\r
+animate\r
+\r
+SUB animate\r
+\r
+    frame = 0\r
+1\r
+    ' Increment the frame counter\r
+    frame = frame + 5\r
+\r
+    ' Calculate light position based on sine functions\r
+    lightX = SIN(frame / 100) * 20 + 25\r
+    lightY = SIN(frame / 71.32) * 20 + 25\r
+    lightX = lightX + SIN(frame / 34) * 10\r
+    lightY = lightY + SIN(frame / 45) * 10\r
+\r
+    ' Calculate brightness for each pixel based on distance and angle from light\r
+    FOR y = 2 TO 48\r
+        FOR x = 2 TO 48\r
+            distance = SQR((x - lightX) ^ 2 + (y - lightY) ^ 2)\r
+            brightness = (30 - distance) / 4\r
+\r
+            ' Calculate surface inclination relative to light location\r
+            value = imgHeight(x - 1, y) - imgHeight(x, y)\r
+            brightnessX = (lightX - x) * value\r
+\r
+            value = imgHeight(x, y - 1) - imgHeight(x, y)\r
+            brightnessY = (lightY - y) * value\r
+\r
+            brightness = brightness + (brightnessX + brightnessY) / (distance / 2)\r
+\r
+            ' Clamp brightness within valid range\r
+            IF brightness < 0 THEN brightness = 0\r
+            IF brightness > 15 THEN brightness = 15\r
+\r
+            ' Set pixel color based on brightness\r
+            PSET (x + 150, y), 16 + brightness\r
+        NEXT x\r
+    NEXT y\r
+\r
+    ' Draw light source as a circle\r
+    CIRCLE (lightX + 150, lightY), 2, 12\r
+\r
+\r
+    ' Loop back to the start of animation until\r
+    ' no key has been pressed by the user.\r
+    IF INKEY$ = "" THEN GOTO 1\r
+\r
+END SUB\r
+\r
+' Current subroutine creates somewhat fat round dot.\r
+' Center of the dot is fully elevated.\r
+' There is smooth drop-off in elevation from the center.\r
+SUB makeDot (x, y)\r
+\r
+    FOR x1 = -10 TO 10\r
+        FOR y1 = -10 TO 10\r
+            distanceFromCenter = SQR(x1 * x1 + y1 * y1)\r
+            height = 4 - distanceFromCenter\r
+            IF height < 0 THEN height = 0\r
+\r
+            ' Calculate image coordinates\r
+            imgX = x1 + x\r
+            imgY = y1 + y\r
+\r
+            ' Ensure coordinates are within bounds\r
+            IF imgX < 0 THEN imgX = 0\r
+            IF imgY < 0 THEN imgY = 0\r
+            IF imgX > 50 THEN imgX = 50\r
+            IF imgY > 50 THEN imgY = 50\r
+\r
+            ' Add power to the height map\r
+            imgHeight(imgX, imgY) = imgHeight(imgX, imgY) + height\r
+        NEXT y1\r
+    NEXT x1\r
+\r
+END SUB\r
+\r
+SUB makeSurface\r
+\r
+    ' Generate random dots on the surface\r
+    FOR x = 0 TO 10\r
+        CALL makeDot(RND * 50, RND * 50)\r
+    NEXT x\r
+\r
+    ' Add some lines composed from dots\r
+    FOR x = 0 TO 45 STEP 2\r
+        CALL makeDot(x, x / 2 + 5)\r
+    NEXT x\r
+\r
+    FOR x = 5 TO 30 STEP 2\r
+        CALL makeDot(x, -x / 1.2 + 30)\r
+    NEXT x\r
+\r
+END SUB\r
+\r
+SUB paintSurface\r
+\r
+    ' Paint the image based on height map\r
+    FOR x = 0 TO 50\r
+        FOR y = 0 TO 50\r
+            clr = imgHeight(x, y) + 16\r
+            PSET (x, y), clr\r
+        NEXT y\r
+    NEXT x\r
+\r
+END SUB\r
+\r
diff --git a/2D GFX/Animations/Bump mapping.webm b/2D GFX/Animations/Bump mapping.webm
new file mode 100644 (file)
index 0000000..4bf57e0
Binary files /dev/null and b/2D GFX/Animations/Bump mapping.webm differ
diff --git a/2D GFX/Animations/DNA.bas b/2D GFX/Animations/DNA.bas
new file mode 100755 (executable)
index 0000000..4d9237d
--- /dev/null
@@ -0,0 +1,76 @@
+' Program to render animated DNA as seen in the movies.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' ?, Initial version\r
+' 2024, Improved program readability\r
+\r
+DIM SHARED xCoordinates(1 TO 100)\r
+DIM SHARED yCoordinates(1 TO 100)\r
+DIM SHARED zCoordinates(1 TO 100)\r
+DIM SHARED colorCodes(1 TO 100)\r
+\r
+SCREEN 7, , , 1\r
+\r
+1:\r
+b = 0\r
+rotationAngle = rotationAngle + 0.1\r
+FOR a = 1 TO 20\r
+    b = b + 1\r
+    ' Calculate x-coordinate using sine function and add to array\r
+    xCoordinates(b) = SIN(a / 2 + rotationAngle) * 30 + 150\r
+    ' Calculate z-coordinate using sine function and add to array\r
+    zCoordinates(b) = SIN(a / 2 + rotationAngle + 1.6) * 2 + 2\r
+    ' Calculate y-coordinate by multiplying a with 8 and adding z-coordinate\r
+    yCoordinates(b) = a * 8 + zCoordinates(b)\r
+    ' Assign color code to the current point\r
+    colorCodes(b) = 3\r
+\r
+    b = b + 1\r
+    ' Calculate x-coordinate using sine function and add to array\r
+    xCoordinates(b) = SIN(a / 2 + rotationAngle + 2.5) * 30 + 150\r
+    ' Calculate z-coordinate using sine function and add to array\r
+    zCoordinates(b) = SIN(a / 2 + rotationAngle + 1.6 + 2.5) * 2 + 2\r
+    ' Calculate y-coordinate by multiplying a with 8 and adding z-coordinate\r
+    yCoordinates(b) = a * 8 + zCoordinates(b)\r
+    ' Assign color code to the current point\r
+    colorCodes(b) = 4\r
+NEXT a\r
+\r
+' Clear the screen\r
+CLS\r
+\r
+' Draw lines and circles based on z-coordinate\r
+FOR b = 0 TO 4\r
+    IF b = 1 THEN\r
+        FOR a = 1 TO 40 STEP 2\r
+            ' Draw line between consecutive points\r
+            LINE (xCoordinates(a), yCoordinates(a))-(xCoordinates(a + 1), yCoordinates(a + 1)), 15\r
+        NEXT a\r
+    END IF\r
+\r
+    FOR a = 1 TO 40\r
+        ' Check if the current z-coordinate matches the loop variable b\r
+        IF int(zCoordinates(a)) = b THEN\r
+            ' Draw circle with specified color code\r
+            CIRCLE (xCoordinates(a), yCoordinates(a)), b + 5, colorCodes(a)\r
+            PAINT (xCoordinates(a), yCoordinates(a)), colorCodes(a)\r
+            ' Draw an black outline of the circle\r
+            CIRCLE (xCoordinates(a), yCoordinates(a)), b + 5, 0\r
+        END IF\r
+    NEXT a\r
+NEXT b\r
+\r
+' Copy the screen to buffer and clear the screen\r
+PCOPY 0, 1\r
+CLS\r
+\r
+' Check if any key is pressed\r
+IF INKEY$ = "" THEN GOTO 1\r
+\r
+' End the program\r
+SYSTEM\r
diff --git a/2D GFX/Animations/DNA.webm b/2D GFX/Animations/DNA.webm
new file mode 100644 (file)
index 0000000..794d6ad
Binary files /dev/null and b/2D GFX/Animations/DNA.webm differ
diff --git a/2D GFX/Animations/Orbiting particles.bas b/2D GFX/Animations/Orbiting particles.bas
new file mode 100755 (executable)
index 0000000..f3653e6
--- /dev/null
@@ -0,0 +1,67 @@
+' Projects animated particles in orbit around a central point.\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+\r
+' Changelog:\r
+' ?, Initial version\r
+' 2024, Improved program readability\r
+\r
+SCREEN 7, , , 1\r
+RANDOMIZE TIMER\r
+\r
+' Declare shared arrays to store particles\r
+DIM SHARED particleColor(1 TO 100)\r
+DIM SHARED particleX(1 TO 100)\r
+DIM SHARED particleAngle(1 TO 100)\r
+\r
+' Initialize the arrays with random values\r
+FOR a = 1 TO 100\r
+    particleColor(a) = RND * 15\r
+    particleX(a) = RND * 100\r
+    particleAngle(a) = RND * 100\r
+NEXT a\r
+\r
+' Main loop to draw the animated particles\r
+1\r
+CLS\r
+FOR a = 1 TO 50\r
+    ' Get current segment data\r
+    currentColor = particleColor(a)\r
+    currentParticleX = particleX(a)\r
+    currentparticleAngle = particleAngle(a)\r
+\r
+    ' Calculate the x and y coordinates for the current segment\r
+    xCoordinate = SIN(currentparticleAngle) * 25\r
+    yCoordinate = SIN(currentParticleX) * 20\r
+\r
+    ' Scale the coordinates\r
+    scaleFactor = (COS(currentparticleAngle) + 2) * 2\r
+    xCoordinate = xCoordinate * scaleFactor\r
+    yCoordinate = yCoordinate * scaleFactor\r
+\r
+    ' Draw the current particle as a circle\r
+    CIRCLE (xCoordinate + 160, yCoordinate + 100), scaleFactor, currentColor\r
+\r
+    ' Fill the inside of the circle with color\r
+    PAINT (xCoordinate + 160, yCoordinate + 100), currentColor\r
+\r
+    ' Draw a line from the center to the current particle\r
+    LINE (160, 100)-(xCoordinate + 160, yCoordinate + 100), currentColor\r
+\r
+    ' Rotate particle by small amount for next frame\r
+    particleAngle(a) = particleAngle(a) + .1\r
+NEXT a\r
+\r
+' Copy screen buffer 0 to screen buffer 1\r
+PCOPY 0, 1\r
+\r
+' Check for user input and exit if any key is pressed\r
+IF INKEY$ <> "" THEN SYSTEM\r
+\r
+' Use sound function with inaudible 0 Hz but fixed delay to slow down animation\r
+SOUND 0, 1\r
+\r
+' Go back to the main loop\r
+GOTO 1\r
diff --git a/2D GFX/Animations/Orbiting particles.webm b/2D GFX/Animations/Orbiting particles.webm
new file mode 100644 (file)
index 0000000..754e33e
Binary files /dev/null and b/2D GFX/Animations/Orbiting particles.webm differ
diff --git a/2D GFX/Animations/Polygon textured.bas b/2D GFX/Animations/Polygon textured.bas
new file mode 100755 (executable)
index 0000000..12bc91d
--- /dev/null
@@ -0,0 +1,250 @@
+' Texture mapping demonstration.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.04, Initial version\r
+' 2024.08, Improved program readability\r
+\r
+DECLARE SUB Demo3 ()\r
+DECLARE SUB Demo2 ()\r
+DECLARE SUB Demo1 ()\r
+DECLARE SUB HLine (xCoord1!, yCoord!, xCoord2!, textureX1!, textureY1!, textureX2!, textureY2!)\r
+DECLARE SUB Polygon (xCoord1!, yCoord1!, xCoord2!, yCoord2!, xCoord3!, yCoord3!, textureX1!, textureY1!, textureX2!, textureY2!, textureX3!, textureY3!)\r
+DECLARE SUB PLine (xCoord1!, yCoord1!, xCoord2!, yCoord2!, textureX1!, textureY1!, textureX2!, textureY2!)\r
+DECLARE SUB Start ()\r
+\r
+DIM SHARED img(0 TO 100, 0 TO 100)\r
+DIM SHARED bufx(0 TO 199)\r
+DIM SHARED buftx(0 TO 199)\r
+DIM SHARED bufty(0 TO 199)\r
+\r
+Start\r
+Demo1\r
+Demo2\r
+Demo3\r
+SYSTEM\r
+\r
+SUB Demo1\r
+    ' Demonstrates texture mapping by drawing a polygon with predefined vertices and texture coordinates.\r
+    ' It waits for user input and then repeatedly draws polygons with random vertices and predefined texture coordinates.\r
+\r
+    ' Draw a polygon with predefined vertices and texture coordinates\r
+    Polygon 10, 10, 300, 80, 100, 180, 1, 1, 99, 1, 30, 99\r
+\r
+    ' Wait for user input\r
+    userInput$ = INPUT$(1)\r
+\r
+    ' Label to repeat the polygon drawing\r
+RepeatPolygonDrawing:\r
+    ' Generate random vertices for the polygon\r
+    vertexX1 = RND * 300 + 10\r
+    vertexX2 = RND * 300 + 10\r
+    vertexX3 = RND * 300 + 10\r
+    vertexY1 = RND * 180 + 10\r
+    vertexY2 = RND * 180 + 10\r
+    vertexY3 = RND * 180 + 10\r
+\r
+    ' Draw a polygon with random vertices and predefined texture coordinates\r
+    Polygon vertexX1, vertexY1, vertexX2, vertexY2, vertexX3, vertexY3, 1, 1, 99, 1, 30, 99\r
+\r
+    ' Repeat the process until a key is pressed\r
+    IF INKEY$ = "" THEN GOTO RepeatPolygonDrawing\r
+\r
+    ' Clear the screen\r
+    CLS\r
+END SUB\r
+\r
+SUB Demo2\r
+    ' Demonstrates texture mapping by drawing a polygon with vertices calculated using trigonometric functions.\r
+    ' It creates a rotating effect and repeatedly draws polygons with calculated vertices and predefined texture coordinates.\r
+\r
+    ' Initialize the angle variable\r
+    angle = 0\r
+\r
+    ' Label to repeat the polygon drawing\r
+RepeatRotatingPolygonDrawing:\r
+    ' Calculate the vertices of the polygon using trigonometric functions\r
+    vertexX1 = SIN(angle) * 80 + 160\r
+    vertexY1 = COS(angle) * 80 + 100\r
+    vertexX2 = SIN(angle + 2) * 80 + 160\r
+    vertexY2 = COS(angle + 2) * 80 + 100\r
+    vertexX3 = SIN(angle + 4) * 90 + 160\r
+    vertexY3 = COS(angle + 4) * 90 + 100\r
+\r
+    ' Draw a polygon with calculated vertices and predefined texture coordinates\r
+    Polygon vertexX1, vertexY1, vertexX2, vertexY2, vertexX3, vertexY3, 1, 1, 99, 1, 30, 99\r
+\r
+    ' Increment the angle variable\r
+    angle = angle + .1\r
+\r
+    ' Repeat the process until a key is pressed\r
+    IF INKEY$ = "" THEN GOTO RepeatRotatingPolygonDrawing\r
+\r
+    ' Clear the screen\r
+    CLS\r
+END SUB\r
+\r
+SUB Demo3\r
+    ' Demonstrates texture mapping by drawing a polygon with fixed vertices and rotating texture coordinates.\r
+    ' It creates a rotating effect for the texture while keeping the polygon location fixed on the screen.\r
+\r
+    ' Initialize the angle variable for texture rotation\r
+    textureAngle = 0\r
+\r
+    ' Label to repeat the polygon drawing with rotating texture coordinates\r
+RepeatTextureRotation:\r
+    ' Calculate the texture coordinates using trigonometric functions to create a rotating effect\r
+    textureX1 = SIN(textureAngle) * 40 + 50\r
+    textureY1 = COS(textureAngle) * 40 + 50\r
+    textureX2 = SIN(textureAngle + 2) * 40 + 50\r
+    textureY2 = COS(textureAngle + 2) * 40 + 50\r
+    textureX3 = SIN(textureAngle + 4) * 40 + 50\r
+    textureY3 = COS(textureAngle + 4) * 40 + 50\r
+\r
+    ' Draw a polygon with fixed vertices and rotating texture coordinates\r
+    Polygon 1, 50, 300, 1, 100, 180, textureX1, textureY1, textureX2, textureY2, textureX3, textureY3\r
+\r
+    ' Increment the texture angle variable\r
+    textureAngle = textureAngle + .1\r
+\r
+    ' Repeat the process until a key is pressed\r
+    IF INKEY$ = "" THEN GOTO RepeatTextureRotation\r
+\r
+    ' Clear the screen\r
+    CLS\r
+END SUB\r
+\r
+SUB HLine (xCoord1, yCoord, xCoord2, textureX1, textureY1, textureX2, textureY2)\r
+    ' Draws a horizontal line with texture mapping between two points.\r
+    ' It calculates texture coordinates for each pixel along the line and sets the pixel color accordingly.\r
+\r
+    ' Exit if the horizontal line has zero length\r
+    IF INT(xCoord2) = INT(xCoord1) THEN GOTO ExitHLine\r
+\r
+    ' Determine the direction and initialize variables\r
+    IF xCoord2 > xCoord1 THEN\r
+        normalizedX1 = INT(xCoord1)\r
+        normalizedX2 = INT(xCoord2)\r
+        normalizedTextureX1 = textureX1\r
+        normalizedTextureY1 = textureY1\r
+        normalizedTextureX2 = textureX2\r
+        normalizedTextureY2 = textureY2\r
+    ELSE\r
+        normalizedX1 = INT(xCoord2)\r
+        normalizedX2 = INT(xCoord1)\r
+        normalizedTextureX1 = textureX2\r
+        normalizedTextureY1 = textureY2\r
+        normalizedTextureX2 = textureX1\r
+        normalizedTextureY2 = textureY1\r
+    END IF\r
+\r
+    ' Calculate the line parameters\r
+    horizontalLength = normalizedX2 - normalizedX1\r
+    textureDeltaX = normalizedTextureX2 - normalizedTextureX1\r
+    textureDeltaY = normalizedTextureY2 - normalizedTextureY1\r
+\r
+    FOR pixelOffset = 0 TO horizontalLength\r
+        ' Calculate the texture coordinates for the current pixel\r
+        currentTextureX = textureDeltaX * pixelOffset / horizontalLength + normalizedTextureX1\r
+        currentTextureY = textureDeltaY * pixelOffset / horizontalLength + normalizedTextureY1\r
+\r
+        ' Set the pixel color using texture coordinates\r
+        PSET (pixelOffset + normalizedX1, yCoord), img(currentTextureX, currentTextureY)\r
+    NEXT pixelOffset\r
+\r
+ExitHLine:\r
+END SUB\r
+\r
+SUB PLine (xCoord1, yCoord1, xCoord2, yCoord2, textureX1, textureY1, textureX2, textureY2)\r
+    ' Draws a line with texture mapping between two points.\r
+    ' It calculates intermediate points along the line and uses the HLine subroutine to draw horizontal segments.\r
+\r
+    ' Calculate the number of vertical steps\r
+    verticalSteps = ABS(yCoord2 - yCoord1)\r
+    IF verticalSteps = 0 THEN GOTO ExitPLine\r
+\r
+    ' Calculate the differences in coordinates and texture coordinates\r
+    deltaY = yCoord2 - yCoord1\r
+    deltaX = xCoord2 - xCoord1\r
+    deltaTextureY = textureY2 - textureY1\r
+    deltaTextureX = textureX2 - textureX1\r
+\r
+    ' Loop through each vertical step\r
+    FOR stepCounter = 0 TO verticalSteps\r
+        ' Calculate the intermediate coordinates and texture coordinates\r
+        intermediateX = deltaX * stepCounter / verticalSteps + xCoord1\r
+        intermediateY = deltaY * stepCounter / verticalSteps + yCoord1\r
+        intermediateTextureX = deltaTextureX * stepCounter / verticalSteps + textureX1\r
+        intermediateTextureY = deltaTextureY * stepCounter / verticalSteps + textureY1\r
+\r
+        ' Check if the buffer is empty for this row\r
+        IF bufx(intermediateY) = -1 THEN\r
+            ' Store the intermediate coordinates and texture coordinates in the buffer\r
+            bufx(intermediateY) = intermediateX\r
+            buftx(intermediateY) = intermediateTextureX\r
+            bufty(intermediateY) = intermediateTextureY\r
+        ELSE\r
+            ' Draw a horizontal line using the stored and current intermediate coordinates and texture coordinates\r
+            HLine bufx(intermediateY), intermediateY, intermediateX, buftx(intermediateY), bufty(intermediateY), intermediateTextureX, intermediateTextureY\r
+        END IF\r
+    NEXT stepCounter\r
+\r
+ExitPLine:\r
+END SUB\r
+\r
+SUB Polygon (xCoord1, yCoord1, xCoord2, yCoord2, xCoord3, yCoord3, textureX1, textureY1, textureX2, textureY2, textureX3, textureY3)\r
+    ' Fills a triangular area by connecting the edges with texture mapping.\r
+    ' It uses the PLine subroutine to draw lines connecting the vertices of the polygon.\r
+\r
+    ' Initialize the buffer\r
+    FOR bufferIndex = 0 TO 199\r
+        bufx(bufferIndex) = -1\r
+    NEXT bufferIndex\r
+\r
+    ' Draw three lines connecting the vertices of the polygon\r
+    PLine xCoord1, yCoord1, xCoord2, yCoord2, textureX1, textureY1, textureX2, textureY2\r
+    PLine xCoord1, yCoord1, xCoord3, yCoord3, textureX1, textureY1, textureX3, textureY3\r
+    PLine xCoord3, yCoord3, xCoord2, yCoord2, textureX3, textureY3, textureX2, textureY2\r
+END SUB\r
+\r
+SUB Start\r
+    ' Set the screen mode to 320x200 with 256 colors\r
+    SCREEN 13\r
+\r
+    ' Prepare sample texture to be used later for textured polygons demonstration:\r
+\r
+    ' Draw random circles on the screen\r
+    FOR circleCounter = 1 TO 100\r
+        ' Generate random coordinates and color for each circle\r
+        xCoord = RND * 150\r
+        yCoord = RND * 150\r
+        circleColor = RND * 255\r
+\r
+        ' Draw a circle with random radius and fill it with the same color\r
+        CIRCLE (xCoord, yCoord), RND * 20 + 3, circleColor\r
+        PAINT (xCoord, yCoord), circleColor\r
+    NEXT circleCounter\r
+\r
+    ' Display "Test!" on the screen\r
+    LOCATE 8, 8\r
+    PRINT "Test!"\r
+\r
+    ' Wait for user input\r
+    userInput$ = INPUT$(1)\r
+\r
+    ' Copy the screen content to the image array and clear the screen\r
+    FOR yPixel = 0 TO 100\r
+        FOR xPixel = 0 TO 100\r
+            ' Copy the color of each pixel to the image array\r
+            img(xPixel, yPixel) = POINT(xPixel + 20, yPixel + 20)\r
+            ' Clear the pixel on the screen\r
+            PSET (xPixel + 20, yPixel + 20), 0\r
+        NEXT xPixel\r
+    NEXT yPixel\r
+    CLS\r
+END SUB\r
+\r
diff --git a/2D GFX/Animations/Polygon textured.webm b/2D GFX/Animations/Polygon textured.webm
new file mode 100644 (file)
index 0000000..41c764d
Binary files /dev/null and b/2D GFX/Animations/Polygon textured.webm differ
diff --git a/2D GFX/Animations/Polygon.bas b/2D GFX/Animations/Polygon.bas
new file mode 100755 (executable)
index 0000000..203e399
--- /dev/null
@@ -0,0 +1,87 @@
+' Program to render polygons at random locations and random colors.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+\r
+' Changelog:\r
+' 2001,    Initial version\r
+' 2024,    Improved program readability\r
+\r
+DEFINT A-Z\r
+DECLARE SUB fillPolygon (x1, y1, x2, y2, x3, y3, c)\r
+SCREEN 13\r
+\r
+MainLoop:\r
+    ' Generate random coordinates for the first vertex\r
+    x1 = RND * 318 + 1\r
+    y1 = RND * 198 + 1\r
+\r
+    ' Generate random coordinates for the second vertex\r
+    x2 = RND * 318 + 1\r
+    y2 = RND * 198 + 1\r
+\r
+    ' Generate random coordinates for the third vertex\r
+    x3 = RND * 318 + 1\r
+    y3 = RND * 198 + 1\r
+\r
+    ' Fill the polygon with a random color\r
+    fillPolygon x1, y1, x2, y2, x3, y3, RND * 255\r
+\r
+    ' Add delay\r
+    SOUND 0, 1\r
+\r
+    ' Check if any key is pressed to exit the loop\r
+    IF INKEY$ <> "" THEN SYSTEM\r
+GOTO MainLoop\r
+\r
+SUB fillPolygon (x1, y1, x2, y2, x3, y3, c)\r
+    ' Buffer array to store x-coordinates for each y-index\r
+    DIM yBuffer(-10 TO 210)\r
+\r
+    ' Draw the line between the first and second vertices\r
+    tempX1 = x1\r
+    tempY1 = y1\r
+    tempX2 = x2\r
+    tempY2 = y2\r
+    GOSUB makeLine\r
+\r
+    ' Draw the line between the first and third vertices\r
+    tempX1 = x1\r
+    tempY1 = y1\r
+    tempX2 = x3\r
+    tempY2 = y3\r
+    GOSUB makeLine\r
+\r
+    ' Draw the line between the second and third vertices\r
+    tempX1 = x3\r
+    tempY1 = y3\r
+    tempX2 = x2\r
+    tempY2 = y2\r
+    GOSUB makeLine\r
+\r
+GOTO FillEnd\r
+\r
+makeLine:\r
+    ' Ensure that the start point is always below the end point\r
+    IF tempY2 < tempY1 THEN SWAP tempY1, tempY2: SWAP tempX1, tempX2\r
+\r
+    ' Loop through each y-index from the start to the end\r
+    FOR yIndex = tempY1 TO tempY2 - 1\r
+        ' Calculate the x-position for the current y-index\r
+        xPos = tempX1 + (tempX2 - tempX1) * ((yIndex - tempY1) / (tempY2 - tempY1))\r
+\r
+        ' If the buffer is empty, store the x-position\r
+        IF yBuffer(yIndex) = 0 THEN\r
+            yBuffer(yIndex) = xPos\r
+        ELSE\r
+            ' Otherwise, draw a line between the stored and calculated positions\r
+            LINE (xPos, yIndex)-(yBuffer(yIndex), yIndex), c\r
+        END IF\r
+    NEXT yIndex\r
+RETURN\r
+\r
+FillEnd:\r
+END SUB\r
+\r
diff --git a/2D GFX/Animations/Polygon.webm b/2D GFX/Animations/Polygon.webm
new file mode 100644 (file)
index 0000000..31bf79f
Binary files /dev/null and b/2D GFX/Animations/Polygon.webm differ
diff --git a/2D GFX/Animations/Screensaver, flying hand fans.bas b/2D GFX/Animations/Screensaver, flying hand fans.bas
new file mode 100755 (executable)
index 0000000..4478601
--- /dev/null
@@ -0,0 +1,64 @@
+' Screensaver\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.04, Initial version\r
+' 2024.08, Improved program readability\r
+\r
+\r
+SCREEN 7, , , 1\r
+\r
+' Main animation loop\r
+1 :\r
+    ' Adjust frame counter if it exceeds a certain threshold\r
+    IF frameCounter > 10000 THEN frameCounter = -10000\r
+\r
+    ' Update the positions of six points based on the frame counter\r
+    FOR pointIndex = 1 TO 6\r
+        OUT &H3C8, pointIndex\r
+        OUT &H3C9, SIN(pointIndex + frameCounter * 3) * 30 + 31\r
+        OUT &H3C9, COS(pointIndex * 1 + frameCounter * 5) * 30 + 31\r
+        OUT &H3C9, SIN(pointIndex * .7 + frameCounter * 2.23) * 30 + 31\r
+    NEXT pointIndex\r
+\r
+    ' Increment the frame counter for the next iteration\r
+    frameCounter = frameCounter + .01\r
+\r
+    ' Render lines connecting points\r
+    FOR objectIndex = 1 TO 10\r
+        ' Determine the color based on the remainder of objectIndex divided by 6\r
+        pointColor = (objectIndex MOD 6) + 1\r
+        ' Calculate the X coordinate for the starting point of the line\r
+        xCoordinate = SIN(objectIndex + frameCounter) * 100 + 150\r
+        ' Calculate the Y coordinate for the starting point of the line\r
+        yCoordinate = COS(objectIndex * 1.2 + frameCounter * 1.81) * 80 + 100\r
+        ' Calculate the sine component for the line's angle\r
+        xSineComponent = SIN(objectIndex * frameCounter * 2.3)\r
+        ' Draw lines from the starting point with varying lengths and angles\r
+        FOR xPositionOffset = -50 TO 50 STEP 10\r
+            ' Calculate the cosine component for the line's angle based on xPositionOffset\r
+            yCosineComponent = COS(xPositionOffset / 60 + frameCounter * 1 + objectIndex) * 50\r
+            ' Draw a line segment with varying thickness and color\r
+            LINE (xCoordinate, yCoordinate)-(xCoordinate + xPositionOffset * xSineComponent, yCoordinate - yCosineComponent), pointColor\r
+        NEXT xPositionOffset\r
+    NEXT objectIndex\r
+\r
+    ' Copy the graphics from the hidden page to the visible page\r
+    PCOPY 0, 1\r
+\r
+    ' Clear the screen for the next frame\r
+    CLS\r
+\r
+    ' Play a sound at a specific frequency and duration\r
+    SOUND 0, .4\r
+\r
+    ' Check if any key is pressed; if so, exit the program\r
+    IF INKEY$ <> "" THEN SYSTEM\r
+\r
+    ' Loop back to the start of the animation\r
+GOTO 1\r
+\r
diff --git a/2D GFX/Animations/Screensaver, flying hand fans.webm b/2D GFX/Animations/Screensaver, flying hand fans.webm
new file mode 100644 (file)
index 0000000..66769f7
Binary files /dev/null and b/2D GFX/Animations/Screensaver, flying hand fans.webm differ
diff --git a/2D GFX/Animations/Screensaver.bas b/2D GFX/Animations/Screensaver.bas
new file mode 100755 (executable)
index 0000000..b867ff2
--- /dev/null
@@ -0,0 +1,46 @@
+' Mystery screensaver\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2004.01, Initial version\r
+' 2024.08, Improved program readability\r
+\r
+SCREEN 7, , , 1\r
+\r
+' Main loop for animation\r
+DO\r
+    ' Increment frame counter\r
+    frameCounter = frameCounter + 1\r
+\r
+    ' Calculate scaling factor based on frame counter\r
+    scaleFactor = (SIN(frameCounter / 100) + 1.1) * 2\r
+\r
+    ' Draw lines to create animation effect\r
+    FOR s = 1 TO 20 STEP .1\r
+        ' Calculate x and y coordinates for the first point\r
+        x = SIN(s / 1 + frameCounter / 7) * 100\r
+        y = COS(s / 1 + frameCounter / 10) * 100\r
+\r
+        ' Calculate x and y coordinates for the second point\r
+        x1 = SIN(s / 1 - frameCounter / 8) * 100\r
+        y1 = COS(s / 1 + frameCounter / 15) * 100\r
+\r
+        ' Draw a line between the two points with varying thickness\r
+        LINE (x + 160, y + 100)-(x1 + 160, y1 + 100), s MOD 15\r
+    NEXT s\r
+\r
+    ' Copy screen buffer to display the animation\r
+    PCOPY 0, 1\r
+\r
+    ' Generate a sound effect\r
+    SOUND 0, 1\r
+\r
+    ' Clear the screen for the next frame\r
+    CLS\r
+\r
+    ' Check if a key is pressed and exit if so\r
+    IF INKEY$ <> "" THEN SYSTEM\r
+LOOP\r
diff --git a/2D GFX/Animations/Screensaver.webm b/2D GFX/Animations/Screensaver.webm
new file mode 100644 (file)
index 0000000..fd41592
Binary files /dev/null and b/2D GFX/Animations/Screensaver.webm differ
diff --git a/2D GFX/Animations/Snowfall.bas b/2D GFX/Animations/Snowfall.bas
new file mode 100755 (executable)
index 0000000..528724e
--- /dev/null
@@ -0,0 +1,96 @@
+' Svjatoslav Agejenko 2003.04\r
+\r
+DEFINT A-Z\r
+DECLARE SUB fall (particleIndex)\r
+DECLARE SUB start ()\r
+\r
+amo = 500\r
+\r
+DIM SHARED fx(1 TO amo)\r
+DIM SHARED fy(1 TO amo)\r
+\r
+' Initialize particle positions\r
+FOR a = 1 TO amo\r
+    fx(a) = RND * 300 + 10\r
+    fy(a) = RND * 100 + 10\r
+NEXT a\r
+\r
+start\r
+\r
+1\r
+' Main loop to simulate snowfall\r
+FOR b = 1 TO 100\r
+    a = INT(RND * amo) + 1\r
+    fall a\r
+NEXT b\r
+SOUND 0, .1\r
+IF INKEY$ <> "" THEN SYSTEM\r
+GOTO 1\r
+\r
+SUB fall (particleIndex)\r
+\r
+t = 0\r
+2\r
+' Draw the particle at its current position\r
+PSET (fx(particleIndex), fy(particleIndex)), 0\r
+\r
+ny = fy(particleIndex) + 1\r
+nx = fx(particleIndex) + INT(RND * 3) - 1\r
+\r
+' Check for collision with another particle\r
+IF POINT(nx, ny) > 0 THEN\r
+    ' If collision detected and t is less than 10, increment t and retry\r
+    IF t < 10 THEN\r
+        t = t + 1\r
+        GOTO 2\r
+    END IF\r
+    ' If collision persists, change particle color to indicate collision\r
+    PSET (fx(particleIndex), fy(particleIndex)), 15\r
+    nx = RND * 300 + 10\r
+    ny = 1\r
+END IF\r
+\r
+' Check if the particle has reached the bottom of the screen\r
+IF fy(particleIndex) > 198 THEN\r
+    PSET (fx(particleIndex), fy(particleIndex)), 15\r
+    nx = RND * 300 + 10\r
+    ny = 1\r
+END IF\r
+\r
+' Update particle position\r
+fx(particleIndex) = nx\r
+fy(particleIndex) = ny\r
+\r
+' Draw the particle at its new position\r
+PSET (fx(particleIndex), fy(particleIndex)), 15\r
+\r
+END SUB\r
+\r
+DEFSNG A-Z\r
+SUB start\r
+SCREEN 13\r
+\r
+' Create nice and curvy surface for snow particles to fall onto.\r
+' Here we draw "SNOW" with big and wobbly letters to the screen\r
+' to serve as an obstacle for snow particles.\r
+\r
+LOCATE 1, 1\r
+PRINT "SNOW"\r
+\r
+FOR y = 0 TO 15 STEP .2\r
+    xp = SIN(y / 1) * 3 + 65\r
+    FOR x = 0 TO 30 STEP .1\r
+        ys = 4 + COS(x / 5)\r
+        yp = COS(x / 4 + 3) * 5 + 130\r
+        c = POINT(x, y)\r
+        ' Draw a line if the point is not black\r
+        IF c > 0 THEN\r
+            LINE (x * 6 + xp, y * ys + yp)-(x * 6 + xp + 1, y * ys + yp + 1), 11, BF\r
+        END IF\r
+    NEXT x\r
+NEXT y\r
+\r
+LOCATE 1, 1\r
+PRINT "      "\r
+\r
+END SUB\r
diff --git a/2D GFX/Animations/Snowfall.webm b/2D GFX/Animations/Snowfall.webm
new file mode 100644 (file)
index 0000000..64ced88
Binary files /dev/null and b/2D GFX/Animations/Snowfall.webm differ
diff --git a/2D GFX/Animations/Tree.bas b/2D GFX/Animations/Tree.bas
new file mode 100755 (executable)
index 0000000..15e78bb
--- /dev/null
@@ -0,0 +1,116 @@
+DECLARE SUB setPalette ()\r
+' Render tree that starts with single root and then branches out.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2001, Initial version\r
+' 2024.08, Improved program readability\r
+\r
+\r
+DECLARE SUB start ()\r
+DECLARE SUB show (d%)\r
+DECLARE SUB setpal ()\r
+DECLARE SUB showpal ()\r
+DEFINT A-Y\r
+\r
+DIM SHARED x(1 TO 500)\r
+DIM SHARED y(1 TO 500)\r
+DIM SHARED s(1 TO 500)\r
+\r
+DIM SHARED x4(1 TO 500)\r
+DIM SHARED y4(1 TO 500)\r
+\r
+DIM SHARED z(1 TO 500)\r
+DIM SHARED mitu\r
+\r
+\r
+start\r
+\r
+1\r
+mitu = 1\r
+\r
+x4(1) = -1\r
+y4(1) = -1\r
+x(1) = 420\r
+y(1) = 340\r
+s(1) = 70 * 100\r
+z(1) = 1\r
+\r
+' Main loop to render the tree branches\r
+FOR tr = 1 TO 6\r
+    FOR b = 1 TO 50\r
+        FOR a = 1 TO mitu\r
+            show a\r
+        NEXT a\r
+    NEXT b\r
+\r
+    ' Duplicate existing branches and add randomness\r
+    FOR a = 1 TO mitu\r
+        x(mitu + a) = x(a)\r
+        y(mitu + a) = y(a)\r
+        s(mitu + a) = s(a)\r
+        z(mitu + a) = z(a)\r
+        x4(mitu + a) = RND * 4 - 2\r
+        y4(mitu + a) = RND * 4 - 2\r
+    NEXT a\r
+    mitu = mitu * 2\r
+\r
+NEXT tr\r
+\r
+' Exit application if any key was pressed by user\r
+IF INKEY$ <> "" THEN SYSTEM\r
+\r
+\r
+SLEEP 2\r
+CLS\r
+GOTO 1\r
+\r
+SUB setPalette\r
+    ' Set the palette colors to grayscale\r
+    FOR a = 0 TO 16\r
+        OUT &H3C8, a\r
+        OUT &H3C9, a * 4\r
+        OUT &H3C9, a * 4\r
+        OUT &H3C9, a * 4\r
+    NEXT\r
+END SUB\r
+\r
+SUB show (d)\r
+    ' Retrieve current branch properties\r
+    x1 = x(d)\r
+    y1 = y(d)\r
+    s1 = s(d)\r
+    z1 = z(d)\r
+\r
+    ' Calculate color based on angle\r
+    c = SIN(z1) * 7 + 9\r
+\r
+    ' Draw and fill the circle representing the branch\r
+    CIRCLE (x1, y1), s1 / 100, c\r
+    PAINT (x1, y1), c\r
+\r
+    ' Update position based on current angle and size\r
+    x(d) = x(d) + (SIN(z1) * 1000) / (s1 + 15)\r
+    y(d) = y(d) + (COS(z1) * 1000) / (s1 + 15)\r
+\r
+    ' Decay the size slightly\r
+    s(d) = s(d) / 1.01\r
+\r
+    ' Update angle based on direction\r
+    IF x4(d) >= 0 THEN z(d) = z(d) + .1 ELSE z(d) = z(d) - .1\r
+\r
+    ' Move branch in its random direction\r
+    x(d) = x(d) + x4(d)\r
+    y(d) = y(d) + y4(d)\r
+END SUB\r
+\r
+SUB start\r
+    SCREEN 12\r
+    setPalette\r
+    RANDOMIZE TIMER\r
+END SUB\r
+\r
diff --git a/2D GFX/Animations/Tree.webm b/2D GFX/Animations/Tree.webm
new file mode 100644 (file)
index 0000000..a3d8b66
Binary files /dev/null and b/2D GFX/Animations/Tree.webm differ
diff --git a/2D GFX/Animations/Yin and yang.bas b/2D GFX/Animations/Yin and yang.bas
new file mode 100755 (executable)
index 0000000..bca4394
--- /dev/null
@@ -0,0 +1,57 @@
+' Yin and yang animation.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2000, Initial version\r
+' 2024.08, Improved program readability\r
+\r
+DECLARE SUB Cir (x!, y!, r!, c!)\r
+SCREEN 13\r
+pi = 3.141592599999999#\r
+PAINT (1, 1), 1\r
+\r
+' Main animation loop\r
+DO\r
+    ' Calculate the x and y positions for both circles using sine and cosine functions\r
+    x = SIN(a) * 40 + 160\r
+    x1 = SIN(a + pi) * 40 + 160\r
+    y = COS(a) * 34 + 100\r
+    y1 = COS(a + pi) * 34 + 100\r
+\r
+    ' Draw the first circle with color 0 (black)\r
+    Cir x, y, 40, 0\r
+    ' Draw the second circle with color 1 (blue)\r
+    Cir x1, y1, 40, 1\r
+\r
+    ' Increment the angle to animate the circles\r
+    a = a + .05\r
+\r
+    ' Check for user input to exit the program\r
+    IF INKEY$ <> "" THEN SYSTEM\r
+\r
+    ' delay to slow down animation\r
+    SOUND 0, 1\r
+LOOP\r
+\r
+' Subroutine to draw a circle with specified center (x, y), radius r, and color c\r
+SUB Cir (x, y, r, c)\r
+    ' Define colors for the circle outline\r
+    cc1 = 0 ' Black\r
+    cc2 = 15 ' White\r
+\r
+    ' Swap colors if the second color is desired for the inner part of the circle\r
+    IF c = 1 THEN SWAP cc1, cc2\r
+\r
+    ' Draw the circle from radius 1 to r\r
+    FOR a = 1 TO r\r
+        ' Determine the color for the current circle segment\r
+        IF a < r / 2 THEN c1 = cc1 ELSE c1 = cc2\r
+        ' Draw the circle segment with the determined color\r
+        CIRCLE (x, y), a, c1\r
+    NEXT a\r
+END SUB\r
+\r
diff --git a/2D GFX/Animations/Yin and yang.webm b/2D GFX/Animations/Yin and yang.webm
new file mode 100644 (file)
index 0000000..9c78c91
Binary files /dev/null and b/2D GFX/Animations/Yin and yang.webm differ
diff --git a/2D GFX/Animations/circular patterns.bas b/2D GFX/Animations/circular patterns.bas
new file mode 100644 (file)
index 0000000..b68024e
--- /dev/null
@@ -0,0 +1,58 @@
+' Program generates fractal animation that looks like atoms.\r
+' While it uses a simple formula to calculate the color of every pixel,\r
+' visual effect is quite impressive. Formula was accidentally discovered.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+\r
+' Changelog:\r
+' 2002, Original version\r
+' 2024 - 2025, Improved program readability\r
+\r
+SCREEN 13\r
+DIM SHARED pixelByte AS STRING * 1\r
+\r
+zoomFactor = 100\r
+frameNumber = 0\r
+fileNameChar1 = 97\r
+fileNameChar2 = 97\r
+\r
+1\r
+frameNumber = frameNumber + 1\r
+\r
+' Calculate transformed screen dimensions based on current zoom level\r
+transformedScreenWidth = 320 * zoomFactor / 30\r
+transformedScreenHeight = 200 * zoomFactor / 30\r
+\r
+' Calculate starting coordinates to center the fractal pattern\r
+startCoordinateX = 160 - (transformedScreenWidth / 2)\r
+startCoordinateY = 100 - (transformedScreenHeight / 2)\r
+\r
+' CLS\r
+\r
+' Generate fractal pattern pixel by pixel\r
+FOR currentY = 0 TO 199\r
+    FOR currentX = 0 TO 319\r
+        ' Calculate new coordinates with current zoom level\r
+        newX = startCoordinateX + (transformedScreenWidth * currentX / 320)\r
+        newY = startCoordinateY + (transformedScreenHeight * currentY / 200)\r
+\r
+        ' Calculate color value using fractal formula\r
+        ' Formula: sin((x² + y²) / 10) * 6 + 23\r
+        colorValue = SIN((newX ^ 2 + newY ^ 2) / 10) * 6 + 23\r
+\r
+        ' Clamp color values to valid range (16-31)\r
+        IF colorValue < 16 THEN colorValue = 16\r
+        IF colorValue > 31 THEN colorValue = 31\r
+        PSET (currentX, currentY), colorValue\r
+    NEXT currentX\r
+NEXT currentY\r
+\r
+\r
+' Decrease zoom factor for next frame to create zooming effect\r
+zoomFactor = zoomFactor / 1.1\r
+\r
+' Continue generating frames while zoom factor is above minimum threshold\r
+IF zoomFactor > 5 THEN GOTO 1\r
diff --git a/2D GFX/Animations/circular patterns.webm b/2D GFX/Animations/circular patterns.webm
new file mode 100644 (file)
index 0000000..99243c8
Binary files /dev/null and b/2D GFX/Animations/circular patterns.webm differ
diff --git a/2D GFX/Animations/hacker.bas b/2D GFX/Animations/hacker.bas
new file mode 100755 (executable)
index 0000000..48a2ddb
--- /dev/null
@@ -0,0 +1,244 @@
+' Program to render animation inspired by Matrix movie.\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.04, Initial version\r
+' 2024.08, Improved program readability\r
+\r
+\r
+DECLARE FUNCTION getCharacter% ()\r
+DECLARE SUB makeSound ()\r
+DEFINT A-Z\r
+DECLARE SUB displayScreen ()\r
+DECLARE SUB showPalette ()\r
+DECLARE SUB initializeGame ()\r
+\r
+DIM SHARED screenBuffer(1 TO 40, 1 TO 25) AS INTEGER\r
+DIM SHARED colorBuffer(1 TO 40, 1 TO 25) AS INTEGER\r
+DIM SHARED soundArray(1 TO 20)\r
+DIM SHARED soundPointer\r
+\r
+initializeGame\r
+'showPalette()\r
+\r
+' Initialize the screen buffer with random characters\r
+FOR row = 1 TO 25\r
+  FOR col = 1 TO 40\r
+    screenBuffer(col, row) = getCharacter\r
+  NEXT col\r
+NEXT row\r
+\r
+' Initialize the color buffer with a default color\r
+FOR row = 1 TO 25\r
+  FOR col = 1 TO 40\r
+    colorBuffer(col, row) = 1\r
+  NEXT col\r
+NEXT row\r
+\r
+actionCounter = 0\r
+\r
+10 ' Main game loop\r
+makeSound\r
+frameCounter = frameCounter + 1\r
+IF frameCounter > 10000 THEN frameCounter = 1\r
+\r
+' Shift the screen buffer contents down by one row\r
+FOR row = 25 TO 2 STEP -1\r
+  FOR col = 1 TO 40\r
+    screenBuffer(col, row) = screenBuffer(col, row - 1)\r
+  NEXT col\r
+NEXT row\r
+makeSound\r
+\r
+' Move the top row to the bottom\r
+FOR col = 1 TO 40\r
+  screenBuffer(col, 1) = screenBuffer(col, 25)\r
+NEXT col\r
+\r
+' Randomly change a character in the buffer\r
+screenBuffer(INT(RND * 39 + 1), INT(RND * 10 + 1)) = getCharacter\r
+actionCounter = actionCounter + 1\r
+displayScreen\r
+\r
+SELECT CASE actionCounter\r
+CASE 1\r
+  ' Initialize sound array with random values\r
+  FOR a = 1 TO 20\r
+    soundArray(a) = 0\r
+    IF RND * 100 < 2 THEN soundArray(a) = INT(RND * 4000 + 4000)\r
+  NEXT a\r
+  ' Set sound frequencies based on sine wave\r
+  b = SIN(frameCounter / 100) * 3 + 6\r
+  FOR a = 1 TO 20 STEP b\r
+    soundArray(a) = 10000\r
+  NEXT a\r
+\r
+CASE 2\r
+  ' Draw a horizontal line with random color\r
+  c = INT(RND * 5)\r
+  x1 = INT(RND * 38 + 1)\r
+  y = INT(RND * 23 + 1)\r
+  x2 = INT(RND * 38 + 1)\r
+  IF x1 > x2 THEN SWAP x1, x2\r
+  FOR x = x1 TO x2\r
+    colorBuffer(x, y) = c\r
+  NEXT x\r
+\r
+CASE 3\r
+  ' Draw a vertical line with random color\r
+  c = INT(RND * 5)\r
+  y1 = INT(RND * 23 + 1)\r
+  x = INT(RND * 38 + 1)\r
+  y2 = INT(RND * 23 + 1)\r
+  IF y1 > y2 THEN SWAP y1, y2\r
+  FOR y = y1 TO y2\r
+    colorBuffer(x, y) = c\r
+  NEXT y\r
+\r
+CASE 4\r
+  ' Decrease the intensity of colors on the screen\r
+  IF RND * 100 < 20 THEN\r
+    FOR y = 1 TO 25\r
+      FOR x = 1 TO 40\r
+        IF colorBuffer(x, y) > 1 THEN colorBuffer(x, y) = colorBuffer(x, y) - 1\r
+      NEXT x\r
+    NEXT y\r
+  END IF\r
+\r
+CASE 5\r
+  ' Reset every second row to default color\r
+  IF RND * 100 < 5 THEN\r
+    FOR y = 1 TO 25 STEP 2\r
+      FOR x = 1 TO 40\r
+        colorBuffer(x, y) = 1\r
+      NEXT x\r
+    NEXT y\r
+  END IF\r
+\r
+CASE 6\r
+  ' Reset every second column to default color\r
+  IF RND * 100 < 5 THEN\r
+    FOR x = 1 TO 40 STEP 2\r
+      FOR y = 1 TO 25\r
+        colorBuffer(x, y) = 1\r
+      NEXT y\r
+    NEXT x\r
+  END IF\r
+\r
+CASE 7\r
+  ' Randomly set some characters to random colors\r
+  FOR a = 1 TO 30\r
+    colorBuffer(INT(RND * 39 + 1), INT(RND * 23 + 1)) = INT(RND * 4 + 1)\r
+  NEXT a\r
+\r
+CASE 8\r
+  ' Check for user input to exit the game\r
+  IF INKEY$ <> "" THEN SYSTEM\r
+  actionCounter = 0\r
+END SELECT\r
+\r
+GOTO 10\r
+\r
+SYSTEM:\r
+' Exit the game\r
+END\r
+\r
+SUB displayScreen\r
+\r
+makeSound\r
+LOCATE 1, 1\r
+\r
+' Display the top half of the screen\r
+FOR y = 1 TO 10\r
+  FOR x = 1 TO 40\r
+    COLOR colorBuffer(x, y), 0\r
+    PRINT CHR$(screenBuffer(x, y));\r
+  NEXT x\r
+NEXT y\r
+\r
+makeSound\r
+' Display the middle part of the screen\r
+FOR y = 11 TO 20\r
+  FOR x = 1 TO 40\r
+    COLOR colorBuffer(x, y), 0\r
+    PRINT CHR$(screenBuffer(x, y));\r
+  NEXT x\r
+NEXT y\r
+\r
+makeSound\r
+' Display the bottom half of the screen\r
+FOR y = 21 TO 25\r
+  FOR x = 1 TO 40\r
+    COLOR colorBuffer(x, y), 0\r
+    PRINT CHR$(screenBuffer(x, y));\r
+  NEXT x\r
+NEXT y\r
+\r
+makeSound\r
+\r
+END SUB\r
+\r
+FUNCTION getCharacter\r
+' Generate a random character based on probability\r
+IF RND * 100 > 50 THEN\r
+  getCharacter = INT(RND * 9 + 48)\r
+ELSE\r
+  getCharacter = INT(RND * 25 + 65)\r
+END IF\r
+IF RND * 100 < 15 THEN getCharacter = 32 ' 15% chance to return a space\r
+END FUNCTION\r
+\r
+SUB initializeGame\r
+\r
+RANDOMIZE TIMER ' Seed the random number generator\r
+CLS ' Clear the screen\r
+WIDTH 40, 25 ' Set screen dimensions\r
+VIEW PRINT 1 TO 25 ' Set the print area\r
+\r
+' Initialize palette registers for color text mode\r
+OUT &H3C8, 0\r
+OUT &H3C9, 0\r
+OUT &H3C9, 0\r
+OUT &H3C9, 0\r
+\r
+' Set up color palettes\r
+FOR a = 1 TO 5\r
+  OUT &H3C8, a\r
+\r
+  b = a * 5\r
+  g = a * 10 + 20\r
+  r = a * 0\r
+\r
+  ' Ensure RGB values do not exceed the maximum value\r
+  IF r > 63 THEN r = 63\r
+  IF g > 63 THEN g = 63\r
+  IF b > 63 THEN b = 63\r
+  OUT &H3C9, r\r
+  OUT &H3C9, g\r
+  OUT &H3C9, b\r
+NEXT a\r
+\r
+END SUB\r
+\r
+SUB makeSound\r
+' Update the sound pointer and play a sound\r
+soundPointer = soundPointer + 1\r
+IF soundPointer > 20 THEN soundPointer = 1\r
+SOUND soundArray(soundPointer), .07\r
+' SOUND 0, .07 ' Uncomment to play a continuous tone\r
+END SUB\r
+\r
+SUB showPalette\r
+\r
+' Display a palette test on the screen\r
+FOR a = 0 TO 15\r
+  COLOR a\r
+  PRINT a; " Palette test"\r
+NEXT a\r
+a$ = INPUT$(1) ' Wait for user input\r
+\r
+END SUB\r
+\r
diff --git a/2D GFX/Animations/hacker.webm b/2D GFX/Animations/hacker.webm
new file mode 100644 (file)
index 0000000..553dc27
Binary files /dev/null and b/2D GFX/Animations/hacker.webm differ
diff --git a/2D GFX/Animations/index.org b/2D GFX/Animations/index.org
new file mode 100644 (file)
index 0000000..867f7ae
--- /dev/null
@@ -0,0 +1,272 @@
+#+TITLE: Graphics demos
+#+LANGUAGE: en
+#+LATEX_HEADER: \usepackage[margin=1.0in]{geometry}
+#+LATEX_HEADER: \usepackage{parskip}
+#+LATEX_HEADER: \usepackage[none]{hyphenat}
+
+#+OPTIONS: H:20 num:20
+#+OPTIONS: author:nil
+
+#+begin_export html
+<style>
+  .flex-center {
+    display: flex;            /* activate flexbox */
+    justify-content: center;  /* horizontally center anything inside   */
+  }
+
+  .flex-center video {
+    width: min(90%, 1000px); /* whichever is smaller wins */
+    height: auto;            /* preserve aspect ratio */
+  }
+
+  .responsive-img {
+    width: min(100%, 1000px);
+    height: auto;
+  }
+</style>
+#+end_export
+
+
+* Bump mapping
+
+Light source moves around. Based on light source location, different
+parts of the surface become illuminated.
+
+#+begin_export html
+<div class="flex-center">
+  <video width="300" controls loop autoplay>
+    <source src="Bump mapping.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:Bump mapping.bas][Source code]]
+
+* Tree
+
+Tree grows and branches out.
+
+#+begin_export html
+<div class="flex-center">
+  <video width="1000" controls loop autoplay>
+    <source src="Tree.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:Tree.bas][Source code]]
+
+#+INCLUDE: "Tree.bas" src basic-qb45
+
+* Rotation in 2D space using trigonometry functions
+
+Grid of dots is rotated on the screen.
+
+#+begin_export html
+<div class="flex-center">
+  <video width="1000" controls loop autoplay>
+    <source src="2D rotation.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:2D rotation.bas][Source code]]
+
+#+INCLUDE: "2D rotation.bas" src basic-qb45
+
+* Various text mode animation effects
+
+Program demonstrates various animation effects that can be
+accomplished using text-mode rendering.
+
+#+begin_export html
+<div class="flex-center">
+  <video width="1000" controls loop autoplay>
+    <source src="text mode animation.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+  #+end_export
+
+[[file:text mode animation.bas][Source code]]
+
+* Snowfall
+
+Program simulates falling of snow particles. Particles fall towards
+the ground because of the gravity. Once particle falls on the surface,
+it tries to skid around a bit, bit ultimately freezes in-place.
+
+#+begin_export html
+<div class="flex-center">
+  <video width="1000" controls loop autoplay>
+    <source src="Snowfall.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:Snowfall.bas][Source code]]
+
+#+INCLUDE: "Snowfall.bas" src basic-qb45
+
+* Screensaver
+
+Application of trigonometry functions is explored here to calculate
+line coordinates.
+
+#+begin_export html
+<div class="flex-center">
+  <video width="1000" controls loop autoplay>
+    <source src="Screensaver.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:Screensaver.bas][Source code]]
+
+#+INCLUDE: "Screensaver.bas" src basic-qb45
+
+* Screensaver - flying hand fans
+
+Quick implementation for colorful flying hand fans.
+
+#+begin_export html
+<div class="flex-center">
+  <video width="1000" controls loop autoplay>
+    <source src="Screensaver, flying hand fans.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:Screensaver, flying hand fans.bas][Source code]]
+
+#+INCLUDE: "Screensaver, flying hand fans.bas" src basic-qb45
+
+* Polygon rendering
+
+Algorithm to demonstrate rendering or polygons across arbitrary
+coordinates.
+
+#+begin_export html
+<div class="flex-center">
+  <video width="1000" controls loop autoplay>
+    <source src="Polygon.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:Polygon.bas][Source code]]
+
+#+INCLUDE: "Polygon.bas" src basic-qb45
+
+* Textured polygon rendering
+
+Algorithm to demonstrate rendering or textured polygons across
+arbitrary coordinates.
+
+#+begin_export html
+<div class="flex-center">
+  <video width="1000" controls loop autoplay>
+    <source src="Polygon textured.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:Polygon textured.bas][Source code]]
+
+* Yin and yang animation
+
+Yin and yang is a concept that originated in Chinese philosophy,
+describing an opposite but interconnected, self-perpetuating
+cycle. Yin and yang can be thought of as complementary and at the same
+time opposing forces that interact to form a dynamic system in which
+the whole is greater than the assembled parts and the parts are
+important for cohesion of the whole.
+
+#+begin_export html
+<div class="flex-center">
+  <video width="1000" controls loop autoplay>
+    <source src="Yin and yang.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:Yin and yang.bas][Source code]]
+
+#+INCLUDE: "Yin and yang.bas" src basic-qb45
+
+* Orbiting particles
+
+Trivial to implement but interesting looking effect. Various particles
+are orbiting central point. Each particle is connected to the center.
+
+#+begin_export html
+<div class="flex-center">
+  <video width="1000" controls loop autoplay>
+    <source src="Orbiting particles.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:Orbiting particles.bas][Source code]]
+
+#+INCLUDE: "Orbiting particles.bas" src basic-qb45
+
+* DNA animation
+
+Animated DNA. Nowhere close to being anatomically correct, but
+resembles animation as seen in the movies :)
+
+#+begin_export html
+<div class="flex-center">
+  <video width="1000" controls loop autoplay>
+    <source src="DNA.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:DNA.bas][Source code]]
+
+#+INCLUDE: "DNA.bas" src basic-qb45
+
+* Matrix
+
+Effect inspired by "The Matrix" movie.
+
+#+begin_export html
+<div class="flex-center">
+  <video width="1000" controls loop autoplay>
+    <source src="matrix.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:matrix.bas][Source code]]
+
+* Hacker
+
+Ultra-realistic hacker screen simulator! Behold da glory of a true
+hacker's terminal, brimming wif mystical green text that cascades like
+a waterfall of knowledge across thy monitor.
+
+#+begin_export html
+<div class="flex-center">
+  <video width="1000" controls loop autoplay>
+    <source src="hacker.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:hacker.bas][Source code]]
diff --git a/2D GFX/Animations/logo.png b/2D GFX/Animations/logo.png
new file mode 100644 (file)
index 0000000..bda2751
Binary files /dev/null and b/2D GFX/Animations/logo.png differ
diff --git a/2D GFX/Animations/matrix.bas b/2D GFX/Animations/matrix.bas
new file mode 100755 (executable)
index 0000000..e49784d
--- /dev/null
@@ -0,0 +1,417 @@
+' Program renders animation/screensaver.\r
+' It is inspired by The Matrix movie.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2002, Initial version\r
+' 2024 - 2025, Improved program readability\r
+\r
+\r
+DECLARE SUB initializeStream(streamIndex%)\r
+DECLARE SUB drawPixel(x%, y%)\r
+DECLARE SUB addNewPixel(x%, y%)\r
+DECLARE SUB smoothPixels(x1%, y1%, x2%, y2%, recursionDepth%)\r
+DECLARE SUB drawSymbol(x%, y%, symbol%)\r
+DECLARE SUB setColorPalette(paletteIndex%)\r
+DECLARE SUB initializeScreen()\r
+DECLARE SUB loadFonts()\r
+DEFINT A-Z\r
+\r
+' Arrays to store font data and pixel information\r
+DIM SHARED font1(1 TO 400, 1 TO 10)\r
+DIM SHARED font2(1 TO 400, 1 TO 10)\r
+DIM SHARED font3(1 TO 400, 1 TO 10)\r
+DIM SHARED pixelFont(0 TO 20, 0 TO 20)\r
+DIM SHARED pixelPalette(0 TO 20, 0 TO 20)\r
+DIM SHARED pixelAge(0 TO 20, 0 TO 20)\r
+DIM SHARED streamX(0 TO 20)\r
+DIM SHARED streamY(0 TO 20)\r
+DIM SHARED streamUsage(0 TO 20)\r
+DIM SHARED timerValue AS DOUBLE\r
+\r
+' Number of streams or objects in the animation\r
+numberOfStreams = 8\r
+\r
+' Initialize the screen and start the animation\r
+initializeScreen\r
+\r
+' Main loop of the program\r
+MainLoop:\r
+    FOR streamIndex = 1 TO numberOfStreams\r
+        ' Check if the usage count is zero\r
+        IF streamUsage(streamIndex) = 0 THEN initializeStream streamIndex\r
+        ' Add new position to the current object\r
+        addNewPixel streamX(streamIndex), streamY(streamIndex)\r
+        ' Update the y-coordinate of the current object\r
+        streamY(streamIndex) = streamY(streamIndex) + 1\r
+        ' Check if the y-coordinate exceeds the screen height\r
+        IF streamY(streamIndex) > 13 THEN streamY(streamIndex) = 0\r
+        ' Decrease the usage count of the current object\r
+        streamUsage(streamIndex) = streamUsage(streamIndex) - 1\r
+    NEXT streamIndex\r
+\r
+    ' Update the screen\r
+    FOR y = 0 TO 13\r
+        FOR x = 0 TO 18\r
+            ' Get the current pixel value\r
+            currentAge = pixelAge(x, y)\r
+            ' Increment the pixel value\r
+            currentAge = currentAge + 1\r
+            ' Check if the pixel value is equal to 2\r
+            IF currentAge = 2 THEN\r
+                pixelPalette(x, y) = 2\r
+                drawPixel x, y\r
+            ' Check if the pixel value is equal to 5\r
+            ELSEIF currentAge = 5 THEN\r
+                pixelPalette(x, y) = 3\r
+                drawPixel x, y\r
+            ' Check if the pixel value is equal to 30\r
+            ELSEIF currentAge = 30 THEN\r
+                pixelFont(x, y) = 0\r
+                drawPixel x, y\r
+            END IF\r
+            ' Update the pixel value\r
+            pixelAge(x, y) = currentAge\r
+        NEXT x\r
+    NEXT y\r
+\r
+    ' Wait for a short period of time\r
+    WaitLoop:\r
+    IF ABS(timerValue - TIMER) < .1 THEN GOTO WaitLoop\r
+    ' Update the timer\r
+    timerValue = TIMER\r
+    ' Check if any key is pressed\r
+    IF INKEY$ <> "" THEN SYSTEM\r
+    ' Go back to the main loop\r
+    GOTO MainLoop\r
+\r
+SUB addNewPixel(x, y)\r
+    ' Set a random font for the new pixel\r
+    pixelFont(x, y) = RND * 8 + 1\r
+    ' Set the palette index for the new pixel\r
+    pixelPalette(x, y) = 1\r
+    ' Initialize the pixel value\r
+    pixelAge(x, y) = 0\r
+    ' Draw the new pixel on the screen\r
+    drawPixel x, y\r
+END SUB\r
+\r
+SUB initializeStream(streamIndex)\r
+    ' Set random initial positions for the object\r
+    streamX(streamIndex) = RND * 18\r
+    streamY(streamIndex) = RND * 13\r
+    ' Set a random usage count for the object\r
+    streamUsage(streamIndex) = RND * 5 + 3\r
+END SUB\r
+\r
+SUB loadFonts\r
+    ' Load fonts from the screen\r
+    FOR symbolIndex = 1 TO 9\r
+        LOCATE 1, 1\r
+        ' Print the loading progress\r
+        PRINT "Loading: " + STR$(symbolIndex * 10) + "%"\r
+        ' Draw a square on the screen\r
+        LINE (49, 49)-(83, 83), 0, BF\r
+        ' Draw a symbol on the screen\r
+        drawSymbol 50, 50, symbolIndex\r
+        ' Smooth the symbol\r
+        smoothPixels 50, 50, 82, 82, 1\r
+        ' Get the smoothed symbol from the screen\r
+        GET (50, 50)-(82, 82), font1(1, symbolIndex)\r
+        ' Draw another square on the screen\r
+        LINE (49, 49)-(83, 83), 0, BF\r
+        ' Draw another symbol on the screen\r
+        drawSymbol 50, 50, symbolIndex\r
+        ' Smooth the other symbol\r
+        smoothPixels 50, 50, 82, 82, 2\r
+        ' Get the smoothed symbol from the screen\r
+        GET (50, 50)-(82, 82), font2(1, symbolIndex)\r
+        ' Draw yet another square on the screen\r
+        LINE (49, 49)-(83, 83), 0, BF\r
+        ' Draw yet another symbol on the screen\r
+        drawSymbol 50, 50, symbolIndex\r
+        ' Smooth the last symbol\r
+        smoothPixels 50, 50, 82, 82, 3\r
+        ' Get the smoothed symbol from the screen\r
+        GET (50, 50)-(82, 82), font3(1, symbolIndex)\r
+    NEXT symbolIndex\r
+    ' Clear the screen\r
+    CLS\r
+END SUB\r
+\r
+SUB drawPixel(x, y)\r
+    ' Calculate the screen coordinates for the pixel\r
+    x1 = x * 32 + 12\r
+    y1 = y * 32 + 15\r
+    ' Get the current font and palette index\r
+    currentFont = pixelFont(x, y)\r
+    currentPalette = pixelPalette(x, y)\r
+    ' Check if the pixel is empty\r
+    IF currentFont = 0 THEN\r
+        ' Draw an empty square on the screen\r
+        LINE (x1, y1)-(x1 + 32, y1 + 32), 0, BF\r
+    ELSE\r
+        ' Select the appropriate font based on the palette index\r
+        SELECT CASE currentPalette\r
+            CASE 1\r
+                ' Draw the pixel using the first font\r
+                PUT (x1, y1), font1(1, currentFont), PSET\r
+            CASE 2\r
+                ' Draw the pixel using the second font\r
+                PUT (x1, y1), font2(1, currentFont), PSET\r
+            CASE 3\r
+                ' Draw the pixel using the third font\r
+                PUT (x1, y1), font3(1, currentFont), PSET\r
+        END SELECT\r
+    END IF\r
+END SUB\r
+\r
+SUB drawSymbol(x, y, symbol)\r
+    ' Select the appropriate symbol based on the input value\r
+    SELECT CASE symbol\r
+        CASE 1\r
+            ' Draw the first symbol\r
+            LINE (x + 10, y + 5)-(x + 10, y + 20), 14\r
+            LINE (x + 5, y + 15)-(x + 20, y + 15), 14\r
+            LINE (x + 15, y + 25)-(x + 20, y + 25), 14\r
+            LINE (x + 20, y + 25)-(x + 25, y + 20), 14\r
+            LINE (x + 25, y + 20)-(x + 25, y + 5), 14\r
+        CASE 2\r
+            ' Draw the second symbol\r
+            LINE (x + 5, y + 15)-(x + 25, y + 10), 14\r
+            LINE (x + 15, y + 5)-(x + 10, y + 25), 14\r
+            LINE (x + 25, y + 5)-(x + 20, y + 20), 14\r
+            LINE (x + 20, y + 30)-(x + 30, y + 20), 14\r
+        CASE 3\r
+            ' Draw the third symbol\r
+            LINE (x + 5, y + 5)-(x + 5, y + 25), 14\r
+            LINE (x + 5, y + 5)-(x + 25, y + 25), 14\r
+            LINE (x + 5, y + 25)-(x + 25, y + 25), 14\r
+            LINE (x + 10, y + 10)-(x + 25, y + 5), 14\r
+        CASE 4\r
+            ' Draw the fourth symbol\r
+            LINE (x + 10, y + 5)-(x + 20, y + 5), 14\r
+            LINE (x + 20, y + 5)-(x + 25, y + 10), 14\r
+            LINE (x + 25, y + 20)-(x + 20, y + 25), 14\r
+            LINE (x + 20, y + 25)-(x + 10, y + 25), 14\r
+            LINE (x + 10, y + 25)-(x + 10, y + 5), 14\r
+            LINE (x + 5, y + 15)-(x + 20, y + 15), 14\r
+        CASE 5\r
+            ' Draw the fifth symbol\r
+            LINE (x + 5, y + 5)-(x + 10, y + 10), 14\r
+            LINE (x + 10, y + 10)-(x + 10, y + 25), 14\r
+            LINE (x + 10, y + 25)-(x + 5, y + 30), 14\r
+            LINE (x + 10, y + 25)-(x + 15, y + 30), 14\r
+            LINE (x + 15, y + 30)-(x + 25, y + 30), 14\r
+            LINE (x + 10, y + 20)-(x + 25, y + 20), 14\r
+        CASE 6\r
+            ' Draw the sixth symbol\r
+            LINE (x + 5, y + 5)-(x + 10, y + 5), 14\r
+            LINE (x + 5, y + 5)-(x + 5, y + 10), 14\r
+            LINE (x + 10, y + 10)-(x + 10, y + 15), 14\r
+            LINE (x + 10, y + 15)-(x + 20, y + 30), 14\r
+            LINE (x + 20, y + 30)-(x + 25, y + 30), 14\r
+            LINE (x + 5, y + 30)-(x + 10, y + 30), 14\r
+            LINE (x + 25, y + 15)-(x + 10, y + 30), 14\r
+        CASE 7\r
+            ' Draw the seventh symbol\r
+            LINE (x + 5, y + 15)-(x + 10, y + 15), 14\r
+            LINE (x + 10, y + 15)-(x + 25, y + 5), 14\r
+            LINE (x + 5, y + 25)-(x + 10, y + 25), 14\r
+            LINE (x + 10, y + 25)-(x + 15, y + 5), 14\r
+            LINE (x + 20, y + 5)-(x + 20, y + 20), 14\r
+            PSET (x + 15, y + 25), 14\r
+            PSET (x + 22, y + 25), 14\r
+        CASE 8\r
+            ' Draw the eighth symbol\r
+            LINE (x + 15, y + 10)-(x + 15, y + 25), 14\r
+            LINE (x + 20, y + 15)-(x + 20, y + 25), 14\r
+            LINE (x + 5, y + 20)-(x + 10, y + 25), 14\r
+            LINE (x + 10, y + 25)-(x + 25, y + 25), 14\r
+        CASE 9\r
+            ' Draw the ninth symbol\r
+            LINE (x + 5, y + 5)-(x + 25, y + 5), 14\r
+            LINE (x + 15, y + 5)-(x + 5, y + 20), 14\r
+            LINE (x + 15, y + 5)-(x + 25, y + 20), 14\r
+            LINE (x + 15, y + 5)-(x + 15, y + 25), 14\r
+            LINE (x + 5, y + 30)-(x + 20, y + 20), 14\r
+    END SELECT\r
+END SUB\r
+\r
+SUB setColorPalette(paletteIndex)\r
+    ' Set the color palette based on the input value\r
+    SELECT CASE paletteIndex\r
+        CASE 2\r
+            ' Set the colors for palette 2\r
+            FOR colorIndex = 0 TO 14\r
+                OUT &H3C8, colorIndex\r
+                OUT &H3C9, colorIndex * 2\r
+                OUT &H3C9, colorIndex * 4.5\r
+                OUT &H3C9, colorIndex * 3\r
+            NEXT colorIndex\r
+        CASE 1\r
+            ' Set the colors for palette 1\r
+            FOR colorIndex = 0 TO 14\r
+                OUT &H3C8, colorIndex\r
+                OUT &H3C9, 0\r
+                OUT &H3C9, 0\r
+                OUT &H3C9, 0\r
+            NEXT colorIndex\r
+            ' Set the color for the background\r
+            OUT &H3C8, 15\r
+            OUT &H3C9, 20\r
+            OUT &H3C9, 63\r
+            OUT &H3C9, 63\r
+    END SELECT\r
+END SUB\r
+\r
+SUB smoothPixels(x1, y1, x2, y2, recursionDepth)\r
+    ' Initialize the smoothing variable\r
+    smoothingValue = 0\r
+    ' Perform horizontal smoothing\r
+    FOR y = y1 TO y2\r
+        FOR x = x1 TO x2\r
+            ' Get the current pixel value\r
+            currentPixelValue = POINT(x, y)\r
+            ' Update the smoothing variable\r
+            smoothingValue = smoothingValue - 5\r
+            ' Ensure the smoothing variable is non-negative\r
+            IF smoothingValue < 0 THEN smoothingValue = 0\r
+            ' Update the smoothing variable if the current pixel value is greater\r
+            IF currentPixelValue > smoothingValue THEN smoothingValue = currentPixelValue\r
+            ' Set the smoothed pixel value\r
+            PSET (x, y), smoothingValue\r
+        NEXT x\r
+    NEXT y\r
+    ' Perform vertical smoothing\r
+    FOR x = x1 TO x2\r
+        smoothingValue = 0\r
+        FOR y = y1 TO y2\r
+            ' Get the current pixel value\r
+            currentPixelValue = POINT(x, y)\r
+            ' Update the smoothing variable\r
+            smoothingValue = smoothingValue - 5\r
+            ' Ensure the smoothing variable is non-negative\r
+            IF smoothingValue < 0 THEN smoothingValue = 0\r
+            ' Update the smoothing variable if the current pixel value is greater\r
+            IF currentPixelValue > smoothingValue THEN smoothingValue = currentPixelValue\r
+            ' Set the smoothed pixel value\r
+            PSET (x, y), smoothingValue\r
+        NEXT y\r
+    NEXT x\r
+    ' Perform diagonal smoothing\r
+    FOR y = y1 TO y2\r
+        smoothingValue = 0\r
+        FOR x = x1 TO x2\r
+            ' Get the current pixel value\r
+            currentPixelValue = POINT(x, y)\r
+            ' Update the smoothing variable\r
+            smoothingValue = smoothingValue - 5\r
+            ' Ensure the smoothing variable is non-negative\r
+            IF smoothingValue < 0 THEN smoothingValue = 0\r
+            ' Update the smoothing variable if the current pixel value is greater\r
+            IF currentPixelValue > smoothingValue THEN smoothingValue = currentPixelValue\r
+            ' Set the smoothed pixel value\r
+            PSET (x, y), smoothingValue\r
+        NEXT x\r
+    NEXT y\r
+    ' Perform diagonal smoothing in the opposite direction\r
+    FOR x = x1 TO x2\r
+        smoothingValue = 0\r
+        FOR y = y2 TO y1 STEP -1\r
+            ' Get the current pixel value\r
+            currentPixelValue = POINT(x, y)\r
+            ' Update the smoothing variable\r
+            smoothingValue = smoothingValue - 5\r
+            ' Ensure the smoothing variable is non-negative\r
+            IF smoothingValue < 0 THEN smoothingValue = 0\r
+            ' Update the smoothing variable if the current pixel value is greater\r
+            IF currentPixelValue > smoothingValue THEN smoothingValue = currentPixelValue\r
+            ' Set the smoothed pixel value\r
+            PSET (x, y), smoothingValue\r
+        NEXT y\r
+    NEXT x\r
+    ' Check if the recursion depth is equal to 1\r
+    IF recursionDepth = 1 THEN GOTO ExitSmoothing\r
+    ' Increment the recursion depth\r
+    newRecursionDepth = recursionDepth + 1\r
+    ' Perform horizontal smoothing with averaging\r
+    FOR y = y1 TO y2\r
+        smoothingValue = 0\r
+        FOR x = x1 TO x2\r
+            ' Get the current pixel value\r
+            currentPixelValue = POINT(x, y)\r
+            ' Update the smoothed pixel value using averaging\r
+            smoothingValue = (smoothingValue * recursionDepth + currentPixelValue) / newRecursionDepth\r
+            ' Ensure the smoothed pixel value is non-negative\r
+            finalSmoothingValue = smoothingValue - recursionDepth\r
+            IF finalSmoothingValue < 0 THEN finalSmoothingValue = 0\r
+            ' Set the final smoothed pixel value\r
+            PSET (x, y), finalSmoothingValue\r
+        NEXT x\r
+    NEXT y\r
+    ' Perform vertical smoothing with averaging\r
+    FOR x = x1 TO x2\r
+        smoothingValue = 0\r
+        FOR y = y1 TO y2\r
+            ' Get the current pixel value\r
+            currentPixelValue = POINT(x, y)\r
+            ' Update the smoothing variable\r
+            smoothingValue = smoothingValue - 5\r
+            ' Ensure the smoothing variable is non-negative\r
+            IF smoothingValue < 0 THEN smoothingValue = 0\r
+            ' Update the smoothing variable if the current pixel value is greater\r
+            IF currentPixelValue > smoothingValue THEN smoothingValue = currentPixelValue\r
+            ' Set the smoothed pixel value\r
+            PSET (x, y), smoothingValue\r
+        NEXT y\r
+    NEXT x\r
+    ' Perform diagonal smoothing with averaging\r
+    FOR y = y1 TO y2\r
+        smoothingValue = 0\r
+        FOR x = x2 TO x1 STEP -1\r
+            ' Get the current pixel value\r
+            currentPixelValue = POINT(x, y)\r
+            ' Update the smoothing variable\r
+            smoothingValue = smoothingValue - 5\r
+            ' Ensure the smoothing variable is non-negative\r
+            IF smoothingValue < 0 THEN smoothingValue = 0\r
+            ' Update the smoothing variable if the current pixel value is greater\r
+            IF currentPixelValue > smoothingValue THEN smoothingValue = currentPixelValue\r
+            ' Set the smoothed pixel value\r
+            PSET (x, y), smoothingValue\r
+        NEXT x\r
+    NEXT y\r
+    ' Perform diagonal smoothing in the opposite direction with averaging\r
+    FOR x = x1 TO x2\r
+        smoothingValue = 0\r
+        FOR y = y2 TO y1 STEP -1\r
+            ' Get the current pixel value\r
+            currentPixelValue = POINT(x, y)\r
+            ' Update the smoothing variable\r
+            smoothingValue = smoothingValue - 5\r
+            ' Ensure the smoothing variable is non-negative\r
+            IF smoothingValue < 0 THEN smoothingValue = 0\r
+            ' Update the smoothing variable if the current pixel value is greater\r
+            IF currentPixelValue > smoothingValue THEN smoothingValue = currentPixelValue\r
+            ' Set the smoothed pixel value\r
+            PSET (x, y), smoothingValue\r
+        NEXT y\r
+    NEXT x\r
+ExitSmoothing:\r
+END SUB\r
+\r
+SUB initializeScreen\r
+    ' Set the screen mode to 12\r
+    SCREEN 12\r
+    ' Set the color palette to 1\r
+    setColorPalette 1\r
+    ' Load the fonts\r
+    loadFonts\r
+    ' Set the color palette to 2\r
+    setColorPalette 2\r
+END SUB\r
diff --git a/2D GFX/Animations/matrix.webm b/2D GFX/Animations/matrix.webm
new file mode 100644 (file)
index 0000000..2b10e3f
Binary files /dev/null and b/2D GFX/Animations/matrix.webm differ
diff --git a/2D GFX/Animations/matrix2.bas b/2D GFX/Animations/matrix2.bas
new file mode 100755 (executable)
index 0000000..5b1787d
--- /dev/null
@@ -0,0 +1,103 @@
+' Program to render animation inspired by opening scene from The Matrix movie.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+\r
+' Changelog:\r
+' 2002, Initial version\r
+' 2024, Improved program readability\r
+\r
+DEFINT A-Z\r
+DECLARE SUB DisplayMatrix ()\r
+DIM SHARED matrixArray(1 TO 20)\r
+DIM SHARED lineLength\r
+DIM SHARED displayMessage$\r
+RANDOMIZE 2\r
+\r
+CLS\r
+COLOR 10, 0\r
+displayMessage$ = ""\r
+frameCounter = 0\r
+iterationCount = 0\r
+DisplayMatrix\r
+\r
+1 :   ' Label for looping\r
+\r
+' Creates high-pitch pulsing sound by toggling it on and off while iterating\r
+soundFrequency = 0\r
+IF iterationCount >= 3 THEN soundFrequency = 10000: iterationCount = 0\r
+SOUND soundFrequency, .2\r
+iterationCount = iterationCount + 1\r
+\r
+frameCounter = frameCounter + 1\r
+IF frameCounter > 100 THEN DisplayMatrix: frameCounter = 0\r
+\r
+displayLine$ = ""\r
+lineIndex = 1\r
+FOR column = 1 TO 80\r
+    lineIndex = lineIndex + 1\r
+    randomCharacter$ = CHR$(INT(RND * 9) + 48)\r
+    IF lineIndex > lineLength THEN lineIndex = 1: randomCharacter$ = " "\r
+    displayLine$ = displayLine$ + randomCharacter$\r
+NEXT column\r
+LOCATE 25, 1\r
+PRINT displayLine$\r
+IF INKEY$ <> "" THEN COLOR 7, 0: CLS : SYSTEM\r
+GOTO 1\r
+\r
+SUB DisplayMatrix\r
+    ' Set the viewport to print from line 1 to line 25\r
+    VIEW PRINT 1 TO 25\r
+\r
+    ' Display a message based on the code decoding progress\r
+    SELECT CASE lineLength\r
+        CASE 13\r
+            displayMessage$ = "Are you sure the line is clear?"\r
+        CASE 6\r
+            displayMessage$ = "       Then I'll go ..."\r
+    END SELECT\r
+\r
+    ' Clear and print the message at position (1, 30)\r
+    LOCATE 1, 30\r
+    PRINT "                                 "\r
+    LOCATE 1, 30\r
+    PRINT displayMessage$\r
+\r
+    randomValue = INT(RND * 9) + 1\r
+    FOR pass = 1 TO 3\r
+        FOR value = randomValue TO 10\r
+            IF matrixArray(value) = -1 THEN\r
+                ' Assign a random value between 1 and 8 to the array element\r
+                matrixArray(value) = INT(RND * 8) + 1\r
+                lineLength = lineLength - 1\r
+                GOTO 2\r
+            END IF\r
+        NEXT value\r
+        ' Reset randomValue if no valid position is found\r
+        randomValue = 1\r
+    NEXT pass\r
+\r
+    ' Reset the length and initialize the array\r
+    lineLength = 13\r
+    FOR index = 1 TO 20\r
+        matrixArray(index) = -1\r
+    NEXT index\r
+\r
+    CLS\r
+    IF displayMessage$ <> "" THEN SYSTEM\r
+\r
+2 :   ' Label for continuing after GOTO\r
+    FOR index = 1 TO 20\r
+        LOCATE 1, index\r
+        ' Display a space if the array element is -1, otherwise display the value\r
+        IF matrixArray(index) = -1 THEN displayChar$ = " " ELSE displayChar$ = STR$(matrixArray(index))\r
+        displayChar$ = RIGHT$(displayChar$, 1)\r
+        PRINT displayChar$\r
+    NEXT index\r
+\r
+    ' Set the viewport to print from line 2 to line 25\r
+    VIEW PRINT 2 TO 25\r
+END SUB\r
+\r
diff --git a/2D GFX/Animations/matrix2.webm b/2D GFX/Animations/matrix2.webm
new file mode 100644 (file)
index 0000000..fb8d08d
Binary files /dev/null and b/2D GFX/Animations/matrix2.webm differ
diff --git a/2D GFX/Animations/maze.BAS b/2D GFX/Animations/maze.BAS
new file mode 100755 (executable)
index 0000000..b903011
--- /dev/null
@@ -0,0 +1,144 @@
+' Render animated 3D maze.\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2002, Initial version\r
+' 2024 - 2025, Improved program readability\r
+\r
+DECLARE FUNCTION getWord& (memoryAddress!)\r
+DECLARE FUNCTION getByte! (memoryAddress!)\r
+DECLARE SUB displayIntroText ()\r
+DECLARE SUB handleUserInput ()\r
+DECLARE SUB writeByteToMemory (memoryAddress!, dataValue!)\r
+DECLARE SUB writeWordToMemory (memoryAddress!, dataValue!)\r
+DECLARE SUB initializeProgram ()\r
+DECLARE SUB renderMaze ()\r
+\r
+DIM SHARED pointX(1 TO 5000)\r
+DIM SHARED pointY(1 TO 5000)\r
+DIM SHARED pointZ(1 TO 5000)\r
+DIM SHARED rotatedPointX(1 TO 5000)\r
+DIM SHARED rotatedPointY(1 TO 5000)\r
+DIM SHARED rotatedPointE(1 TO 5000)\r
+DIM SHARED lineStartIndex(1 TO 5000)\r
+DIM SHARED lineEndIndex(1 TO 5000)\r
+DIM SHARED lineColor(1 TO 5000)\r
+DIM SHARED numberOfLines, numberOfPoints\r
+DIM SHARED angleXZ, angleYZ\r
+DIM SHARED externalSegment, externalAddress\r
+DIM SHARED viewerX, viewerY, viewerZ\r
+DIM SHARED buttonLeft, buttonRight\r
+DIM SHARED maxMovement\r
+\r
+numberOfLines = 0\r
+numberOfPoints = 0\r
+\r
+' Initialize the program and set up the screen\r
+initializeProgram\r
+\r
+' Initialize maze starting point\r
+mazeX = 0\r
+mazeY = 0\r
+mazeZ = 0\r
+numberOfPoints = 1\r
+pointX(1) = 0\r
+pointY(1) = 0\r
+pointZ(1) = 0\r
+\r
+' Main loop\r
+1\r
+frameCounter = frameCounter + 1\r
+viewerX = SIN(frameCounter / 30) * 100\r
+viewerZ = COS(frameCounter / 59) * 100\r
+viewerY = SIN(frameCounter / 300)\r
+angleXZ = SIN(frameCounter / 60)\r
+angleYZ = SIN(frameCounter / 36) / 3\r
+\r
+' Add a new point to the maze\r
+numberOfPoints = numberOfPoints + 1\r
+pointX(numberOfPoints) = mazeX\r
+pointY(numberOfPoints) = mazeY\r
+pointZ(numberOfPoints) = mazeZ\r
+\r
+' Add a new line to the maze\r
+numberOfLines = numberOfLines + 1\r
+lineStartIndex(numberOfLines) = numberOfPoints\r
+lineEndIndex(numberOfLines) = numberOfPoints - 1\r
+lineColor(numberOfLines) = INT(RND * 15) + 1\r
+\r
+' Pick random axis (dimension) where next segment of the maze should appear\r
+mazeGrowthDirection = INT(RND * 3)\r
+SELECT CASE mazeGrowthDirection\r
+    CASE 0\r
+        mazeX = RND * 500 - 250\r
+    CASE 1\r
+        mazeY = RND * 100 - 50\r
+    CASE 2\r
+        mazeZ = RND * 500 - 250\r
+END SELECT\r
+\r
+' Render the maze\r
+renderMaze\r
+\r
+' Copy and clear the screen\r
+PCOPY 0, 1\r
+CLS\r
+\r
+' Limit animation speed by making 0 Hz sound with fixed duration\r
+SOUND 0, 1\r
+\r
+' Exit condition\r
+IF frameCounter > 1200 THEN GOTO 200\r
+GOTO 1\r
+\r
+200\r
+\r
+SUB renderMaze\r
+    ' Calculate sine and cosine values for the rotation angles\r
+    sinAngleXZ = SIN(angleXZ)\r
+    sinAngleYZ = SIN(angleYZ)\r
+    cosAngleXZ = COS(angleXZ)\r
+    cosAngleYZ = COS(angleYZ)\r
+\r
+    ' Rotate and project points\r
+    FOR index = 1 TO numberOfPoints\r
+        x = pointX(index) - viewerX\r
+        y = pointY(index) - viewerY\r
+        z = pointZ(index) - viewerZ\r
+\r
+        ' First rotation around Y axis\r
+        rotatedXAfterFirstRotation = x * cosAngleXZ + z * sinAngleXZ\r
+        rotatedZAfterFirstRotation = z * cosAngleXZ - x * sinAngleXZ\r
+\r
+        ' Second rotation around X axis\r
+        rotatedYAfterSecondRotation = y * cosAngleYZ + rotatedZAfterFirstRotation * sinAngleYZ\r
+        rotatedZAfterSecondRotation = rotatedZAfterFirstRotation * cosAngleYZ - y * sinAngleYZ\r
+\r
+        ' Check if point is behind the viewer\r
+        IF rotatedZAfterSecondRotation > 3 THEN\r
+            rotatedPointE(index) = 1\r
+            rotatedPointX(index) = rotatedXAfterFirstRotation / rotatedZAfterSecondRotation * 130 + 160\r
+            rotatedPointY(index) = rotatedYAfterSecondRotation / rotatedZAfterSecondRotation * 130 + 100\r
+        ELSE\r
+            rotatedPointE(index) = 0\r
+        END IF\r
+    NEXT index\r
+\r
+    ' Draw lines between visible points\r
+    FOR index = 1 TO numberOfLines\r
+        lineStart = lineStartIndex(index)\r
+        lineEnd = lineEndIndex(index)\r
+        IF (rotatedPointE(lineStart) = 1) AND (rotatedPointE(lineEnd) = 1) THEN\r
+            LINE (rotatedPointX(lineStart), rotatedPointY(lineStart))-(rotatedPointX(lineEnd), rotatedPointY(lineEnd)), lineColor(index)\r
+        END IF\r
+    NEXT index\r
+END SUB\r
+\r
+SUB initializeProgram\r
+    ' Set the screen mode and initialize maximum movement value\r
+    SCREEN 7, , , 1\r
+    maxMovement = 50\r
+END SUB\r
diff --git a/2D GFX/Animations/maze.webm b/2D GFX/Animations/maze.webm
new file mode 100644 (file)
index 0000000..1e8e253
Binary files /dev/null and b/2D GFX/Animations/maze.webm differ
diff --git a/2D GFX/Animations/programming is fun.BAS b/2D GFX/Animations/programming is fun.BAS
new file mode 100755 (executable)
index 0000000..4ef4268
--- /dev/null
@@ -0,0 +1,48 @@
+SCREEN 7, , , 1\r
+\r
+1\r
+FOR a = 1 TO SIN(frame / 30) * 3 + 4\r
+    LOCATE a * 2, a * 4\r
+    COLOR RND * 5 + 10\r
+    PRINT "Programming is fun!"\r
+NEXT a\r
+\r
+' Update frame and calculate new values for x, y and step size.\r
+frame = frame + 1\r
+stepSize = (SIN(frame / 10) + 2) / 3\r
+xPos = SIN(frame / 30) * 50\r
+yPos = COS(frame / 42) * 30\r
+\r
+' Draw circles with varying arc sizes.\r
+FOR a = .1 TO 10 STEP stepSize\r
+    CIRCLE (160 + xPos, 100 + yPos), 80, 2, , , a\r
+NEXT a\r
+\r
+' Generate random color value for lines.\r
+randomColor = RND * 2 + 12\r
+FOR a = 0 TO 10\r
+    f1 = (a + frame) / 12\r
+    f2 = (a + frame) / 7\r
+    x1 = SIN(f1) * 50\r
+    y1 = COS(f1) * 30\r
+    x2 = SIN(f2 + 6) * 50\r
+    y2 = COS(f2 + 6) * 30\r
+    ' Draw line between calculated points.\r
+    LINE (x1 + 180, y1 + 150)-(x2 + 180, y2 + 150), randomColor\r
+NEXT a\r
+\r
+' Draw random pixels on the screen. Like colorful stars in the night sky.\r
+FOR a = 0 TO 50\r
+    xRand = RND * 320\r
+    yRand = RND * 320\r
+    PSET (xRand, yRand), RND * 15\r
+NEXT a\r
+\r
+' Copy the current screen to the next page and clear the current screen.\r
+PCOPY 0, 1\r
+CLS\r
+\r
+' Check if frame count has exceeded the limit; if so, chain to another program.\r
+IF INKEY$ <> "" THEN SYSTEM\r
+GOTO 1\r
+\r
diff --git a/2D GFX/Animations/programming is fun.webm b/2D GFX/Animations/programming is fun.webm
new file mode 100644 (file)
index 0000000..1da56eb
Binary files /dev/null and b/2D GFX/Animations/programming is fun.webm differ
diff --git a/2D GFX/Animations/sun&eart.bas b/2D GFX/Animations/sun&eart.bas
new file mode 100755 (executable)
index 0000000..8e5dc0f
--- /dev/null
@@ -0,0 +1,96 @@
+' Projects animation of the sun, earth and moon.\r
+' The moon orbits the earth, and the earth orbits the sun.\r
+' The program uses clever trickery to determine\r
+' the drawing order of the objects based on their y-coordinates.\r
+\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+\r
+' Changelog:\r
+' 1999, Initial version\r
+' 2024, Improved program readability\r
+\r
+\r
+DECLARE SUB drawEarthMoonSystem (a2!, b2!, c2!)\r
+\r
+DIM SHARED moonX\r
+DIM SHARED moonY\r
+SCREEN 7, , , 1\r
+\r
+' Initialize the earth rotation angle\r
+earthRotationAngle = 0\r
+\r
+' Main loop to update and draw the objects\r
+1 : \r
+    ' Increment the earthRotationAngle for every frame\r
+    earthRotationAngle = earthRotationAngle + .01\r
+\r
+    ' Calculate the x and y coordinates of the earth\r
+    earthX = SIN(earthRotationAngle) * 100 + 100\r
+    earthY = COS(earthRotationAngle) * 30 + 100\r
+\r
+    ' Because we dont do proper earth, moon and sun Z-sorting,\r
+    ' instead we implement clever trickery to determine, should\r
+    ' sun be drawn before earth-moon system, or after.\r
+    IF earthY >= 100 THEN\r
+        ' Draw the sun\r
+        CIRCLE (100, 100), 50, 12\r
+        PAINT (100, 100), 12\r
+    END IF\r
+\r
+    ' Call the subroutine to draw the earth-moon system\r
+    drawEarthMoonSystem earthX, earthY, (earthY - 70) / 2 + 2\r
+\r
+    IF earthY < 100 THEN\r
+        ' Draw the sun\r
+        CIRCLE (100, 100), 50, 12\r
+        PAINT (100, 100), 12\r
+    END IF\r
+\r
+    ' Copy the screen to buffer\r
+    PCOPY 0, 1\r
+\r
+    ' Clear the screen\r
+    CLS\r
+\r
+    ' Check if a key is pressed\r
+    IF INKEY$ = "" THEN GOTO 1\r
+\r
+' End the program\r
+SYSTEM\r
+\r
+SUB drawEarthMoonSystem (a2, b2, c2)\r
+    moonSize = (b2 - 70) / 2 + 2\r
+\r
+    ' Increment the moon's x and y coordinates\r
+    moonX = moonX + .1\r
+    moonY = moonY + .01\r
+\r
+    ' Calculate the x and y offsets for the moon\r
+    moonOffsetX = SIN(moonX) * moonSize * 2\r
+    moonOffsetY = COS(moonX) * 10\r
+\r
+    ' Because we don't do proper earth and moon Z-sorting,\r
+    ' instead we implement clever trickery to determine, should\r
+    ' earth be drawn before moon or after.\r
+    IF moonOffsetY > 0 THEN\r
+        ' Draw the earth\r
+        CIRCLE (a2, b2), c2, 1\r
+        PAINT (a2, b2), 1\r
+    END IF\r
+\r
+    ' Calculate the x and y coordinates of the moon and draw it\r
+    moonXCoord = moonOffsetX + a2\r
+    moonYCoord = moonOffsetY + b2\r
+    CIRCLE (moonXCoord, moonYCoord), ((moonOffsetY + 20) * moonSize) \ 50, 14\r
+    PAINT (moonXCoord, moonYCoord), 14\r
+\r
+    IF moonOffsetY <= 0 THEN\r
+        ' Draw the earth\r
+        CIRCLE (a2, b2), c2, 1\r
+        PAINT (a2, b2), 1\r
+    END IF\r
+END SUB\r
+\r
diff --git a/2D GFX/Animations/text mode animation.bas b/2D GFX/Animations/text mode animation.bas
new file mode 100755 (executable)
index 0000000..6f8206e
--- /dev/null
@@ -0,0 +1,202 @@
+' Program to render fancy looking text mode animations.\r
+' Various effects are overlaid on top of each other\r
+' while program scrolls it's own source code in the background.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.10, Initial version\r
+' 2024, Improved program readability\r
+\r
+DECLARE SUB displayScreen ()\r
+DECLARE SUB drawCircle ()\r
+DECLARE SUB drawLines ()\r
+DECLARE SUB fillBuffer ()\r
+DECLARE SUB updateDisplay ()\r
+DIM SHARED pi\r
+DIM SHARED angle\r
+DIM SHARED frameCounter\r
+DIM SHARED buffer2(1 TO 50, 1 TO 80) AS STRING * 1\r
+DIM SHARED buffer(1 TO 50, 1 TO 80) AS STRING * 1\r
+DIM SHARED colors(1 TO 50, 1 TO 80) AS INTEGER\r
+\r
+DIM SHARED verticalLinePosition, horizontalLinePosition\r
+DIM SHARED verticalLineSpeed, horizontalLineSpeed\r
+\r
+WIDTH 80, 50\r
+VIEW PRINT 1 TO 50\r
+pi = 3.14159\r
+OPEN "mkcircle.bas" FOR INPUT AS #1\r
+\r
+CLS\r
+\r
+horizontalLinePosition = 20\r
+horizontalLineSpeed = 1\r
+verticalLinePosition = 20\r
+verticalLineSpeed = 1\r
+\r
+1\r
+frameCounter = frameCounter + 1\r
+\r
+displayScreen\r
+fillBuffer\r
+drawLines\r
+drawCircle\r
+updateDisplay\r
+IF INKEY$ <> "" THEN GOTO 2\r
+GOTO 1\r
+2\r
+CLOSE #1\r
+SYSTEM\r
+\r
+SUB updateDisplay\r
+' This subroutine updates the display with the contents of the buffer\r
+COLOR 7, 0\r
+LOCATE 1, 1\r
+FOR y = 1 TO 50\r
+  FOR x = 1 TO 80\r
+    COLOR colors(y, x)\r
+    PRINT buffer(y, x);\r
+    ' Swap the contents of buffer and buffer2\r
+    buffer(y, x) = buffer2(y, x)\r
+    colors(y, x) = 4\r
+  NEXT x\r
+NEXT y\r
+\r
+END SUB\r
+\r
+SUB fillBuffer\r
+' This subroutine fills the buffer with a pattern\r
+COLOR 4, 0\r
+sizeMultiplier = SIN(frameCounter / 7) + 1.1\r
+\r
+angle = angle + SIN(frameCounter / 30) / 10\r
+radiusXPosition = 50 - SIN(angle + pi / 4) * 12 * 20 * sizeMultiplier\r
+radiusYPosition = 50 - COS(angle + pi / 4) * 12 * 20 * sizeMultiplier\r
+\r
+stepXPosition = SIN(angle) * 6 * sizeMultiplier\r
+stepYPosition = COS(angle) * 6 * sizeMultiplier\r
+radiusStepXPosition = SIN(angle + pi / 2) * 6 * sizeMultiplier\r
+radiusStepYPosition = COS(angle + pi / 2) * 6 * sizeMultiplier\r
+\r
+FOR y = 1 TO 50\r
+  radiusXPosition = radiusXPosition + radiusStepXPosition\r
+  radiusYPosition = radiusYPosition + radiusStepYPosition\r
+\r
+4\r
+IF radiusXPosition > 100 THEN radiusXPosition = radiusXPosition - 100: GOTO 4\r
+IF radiusXPosition < 0 THEN radiusXPosition = radiusXPosition + 100: GOTO 4\r
+IF radiusYPosition > 100 THEN radiusYPosition = radiusYPosition - 100: GOTO 4\r
+IF radiusYPosition < 0 THEN radiusYPosition = radiusYPosition + 100: GOTO 4\r
+\r
+currentXPosition = radiusXPosition\r
+currentYPosition = radiusYPosition\r
+\r
+FOR x = 1 TO 80\r
+  characterCode = 0\r
+  currentXPosition = currentXPosition + stepXPosition\r
+  currentYPosition = currentYPosition + stepYPosition\r
+\r
+3\r
+IF currentXPosition > 100 THEN currentXPosition = currentXPosition - 100: GOTO 3\r
+IF currentXPosition < 0 THEN currentXPosition = currentXPosition + 100: GOTO 3\r
+IF currentYPosition > 100 THEN currentYPosition = currentYPosition - 100: GOTO 3\r
+IF currentYPosition < 0 THEN currentYPosition = currentYPosition + 100: GOTO 3\r
+\r
+IF currentXPosition < 12 OR currentYPosition < 12 THEN buffer(y, x) = "*": colors(y, x) = 9\r
+NEXT x\r
+NEXT y\r
+END SUB\r
+\r
+SUB drawCircle\r
+' This subroutine draws a circle on the screen\r
+circleSize = (SIN(frameCounter / 10) + 1.01) * 30\r
+circleYPosition = SIN(frameCounter / 12) * 30 + 40\r
+circleXPosition = COS(frameCounter / 17) * 15 + 25\r
+\r
+FOR y = 1 TO 50\r
+  xPositionOffset = SIN(y / 5 + frameCounter / 30) * circleSize / 10\r
+\r
+IF (y >= circleYPosition - circleSize) AND (y <= circleYPosition + circleSize) THEN\r
+\r
+halfHeight1 = SQR((y - (circleYPosition - circleSize)) * ((circleYPosition + circleSize) - y))\r
+IF (y >= circleYPosition - circleSize / 2) AND (y <= circleYPosition + circleSize / 2) THEN halfHeight2 = SQR((y - (circleYPosition - circleSize / 2)) * ((circleYPosition + circleSize / 2) - y)) ELSE halfHeight2 = 0\r
+\r
+startXPosition = circleXPosition - halfHeight1 + xPositionOffset\r
+IF startXPosition < 1 THEN startXPosition = 1\r
+endXPosition = circleXPosition - halfHeight2 + xPositionOffset\r
+IF endXPosition > 80 THEN endXPosition = 80\r
+\r
+FOR x = startXPosition TO endXPosition\r
+  buffer(y, x) = CHR$(RND * 40 + 48)\r
+  colors(y, x) = RND * 15\r
+NEXT x\r
+\r
+startXPosition = circleXPosition + halfHeight2 + xPositionOffset\r
+IF startXPosition < 1 THEN startXPosition = 1\r
+endXPosition = circleXPosition + halfHeight1 + xPositionOffset\r
+IF endXPosition > 80 THEN endXPosition = 80\r
+\r
+FOR x = startXPosition TO endXPosition\r
+  buffer(y, x) = CHR$(RND * 200 + 32)\r
+  colors(y, x) = RND * 15\r
+NEXT x\r
+\r
+END IF\r
+\r
+NEXT y\r
+\r
+END SUB\r
+\r
+SUB drawLines\r
+' This subroutine draws vertical and horizontal lines on the screen\r
+verticalLinePosition = verticalLinePosition + verticalLineSpeed\r
+IF verticalLinePosition > 49 THEN verticalLineSpeed = -1\r
+IF verticalLinePosition < 2 THEN verticalLineSpeed = 1\r
+\r
+horizontalLinePosition = horizontalLinePosition + horizontalLineSpeed\r
+IF horizontalLinePosition > 79 THEN horizontalLineSpeed = -1\r
+IF horizontalLinePosition < 2 THEN horizontalLineSpeed = 1\r
+\r
+FOR x = 1 TO 80\r
+  IF buffer(verticalLinePosition, x) = "*" THEN characterCode = 31 ELSE characterCode = 10\r
+  buffer(verticalLinePosition, x) = "#"\r
+  colors(verticalLinePosition, x) = characterCode\r
+NEXT x\r
+\r
+FOR y = 1 TO 50\r
+  IF buffer(y, horizontalLinePosition) = "*" THEN characterCode = 31 ELSE characterCode = 10\r
+  buffer(y, horizontalLinePosition) = "#"\r
+  colors(y, horizontalLinePosition) = characterCode\r
+NEXT y\r
+END SUB\r
+\r
+SUB displayScreen\r
+' This subroutine displays the text from a file on the screen\r
+IF EOF(1) <> 0 THEN\r
+  CLOSE 1\r
+  OPEN "mkcircle.bas" FOR INPUT AS #1\r
+END IF\r
+\r
+LINE INPUT #1, lineText$\r
+\r
+FOR y = 1 TO 49\r
+FOR x = 1 TO 80\r
+  buffer2(y, x) = buffer2(y + 1, x)\r
+NEXT x\r
+NEXT y\r
+\r
+FOR x = 1 TO 80\r
+  buffer2(50, x) = " "\r
+NEXT x\r
+\r
+IF LEN(lineText$) > 80 THEN lineText$ = LEFT$(lineText$, 80)\r
+FOR b = 1 TO LEN(lineText$)\r
+  character$ = RIGHT$(LEFT$(lineText$, b), 1)\r
+  buffer2(50, b) = character$\r
+NEXT b\r
+\r
+END SUB\r
diff --git a/2D GFX/Animations/text mode animation.webm b/2D GFX/Animations/text mode animation.webm
new file mode 100644 (file)
index 0000000..0dc2a21
Binary files /dev/null and b/2D GFX/Animations/text mode animation.webm differ
diff --git a/2D GFX/Animations/txtpal.bas b/2D GFX/Animations/txtpal.bas
new file mode 100755 (executable)
index 0000000..21f1ae8
--- /dev/null
@@ -0,0 +1,102 @@
+' This application produces beautiful colorful horizontal rainbows on the screen in text mode.\r
+' It works only on CRT monitors, because it accomplishes the effect by changing the color palette\r
+' while the CRT monitor is drawing the screen. As a result, unlimited number of colors can be\r
+' displayed on the screen simultaneously, regardless of the video card's color depth.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+\r
+' Changelog:\r
+' 2003.01, Initial version\r
+' 2024, Improved program readability\r
+\r
+DEFINT A-Z\r
+CLS\r
+COLOR 7\r
+\r
+' Fill background with random colored random numbers.\r
+FOR b = 1 TO 500\r
+    COLOR RND * 15\r
+    PRINT RND;\r
+NEXT b\r
+\r
+' Set the background and text colors\r
+COLOR 0, 1\r
+\r
+' Clear rectangular area\r
+FOR y = 5 TO 20\r
+    FOR x = 20 TO 50\r
+        LOCATE y, x\r
+        PRINT " "\r
+    NEXT x\r
+NEXT y\r
+\r
+' Print "[ TEST ]" at position (10, 25)\r
+LOCATE 10, 25\r
+PRINT "[ TEST ]"\r
+\r
+' Print "[ TEST ]" in color 2 at position (15, 37)\r
+LOCATE 15, 37\r
+COLOR 2\r
+PRINT "[ TEST ]"\r
+\r
+' Initialize variables\r
+wa = 1\r
+p = &H3DA\r
+\r
+' Loop to wait until CRT monitor has drawn single frame\r
+1\r
+' measure how much time was spent waiting for screen redraw to complete\r
+w = w + 1\r
+\r
+' Check if monitor is still drawing frame\r
+a = INP(p)\r
+IF a >= 128 THEN a = a - 128\r
+IF a >= 64 THEN a = a - 64\r
+IF a >= 32 THEN a = a - 32\r
+IF a >= 16 THEN a = a - 16\r
+IF a < 8 THEN GOTO 1\r
+\r
+frm = frm + 1\r
+IF frm > 10000 THEN frm = -10000\r
+\r
+' Adjust the color palette change speed so that it takes approximately all of the time\r
+' when Ray is actually moving along screen surface and is drawing pixels.\r
+' So if we had to wait too long for drawing to complete at the end, it means\r
+' next frame we can be slower with our palette updates.\r
+IF w > 300 THEN wa = wa + 1 ELSE wa = wa - 1\r
+IF w < 250 THEN wa = wa - 5\r
+IF w > 3000 THEN wa = wa + 30\r
+IF w > 1000 THEN wa = wa + 5\r
+\r
+' Check if a key has been pressed\r
+IF INKEY$ <> "" THEN\r
+    ' Reset color palette\r
+    OUT &H3C8, 0\r
+    OUT &H3C9, 0\r
+    OUT &H3C9, 0\r
+    OUT &H3C9, 0\r
+    ' exit application\r
+    SYSTEM\r
+END IF\r
+\r
+' Alter video graphics color palette while CRT screen in drawing scanlines simultaneously\r
+FOR a = 0 TO 70\r
+\r
+    b = a * 6 + frm\r
+\r
+    ' Alter palette within video card\r
+    OUT &H3C8, 0\r
+    OUT &H3C9, SIN(b / 20) * 30 + 30\r
+    OUT &H3C9, SIN(b / 27) * 30 + 30\r
+    OUT &H3C9, SIN(b / 31) * 30 + 30\r
+\r
+    ' Delay to give time for CRT screen to complete horizontal scanlines\r
+    FOR u = 1 TO wa\r
+    NEXT u\r
+NEXT a\r
+\r
+w = 0\r
+GOTO 1\r
diff --git a/2D GFX/Fractals/fractal circles animated.bas b/2D GFX/Fractals/fractal circles animated.bas
new file mode 100755 (executable)
index 0000000..56a48a0
--- /dev/null
@@ -0,0 +1,442 @@
+DECLARE SUB playSoundEffect (soundEffect$)
+DECLARE SUB initializeGraphics ()
+DECLARE SUB drawEllipse (xCoord!, yCoord!, size!, colorValue!, aspectRatio!)
+DECLARE SUB printMessage (xCoord!, yCoord!, message$, size!, colr!)
+DECLARE SUB addTimerElement (elementIndex!, time!, value!)
+DECLARE SUB initializeTimers ()
+DECLARE SUB processTimers ()
+DECLARE SUB drawFractal (xCoord!, yCoord!, angle!, size!, direction!)
+
+' Program that renders animation that contains fractal composed from circles.
+'
+' This program is free software: released under Creative Commons Zero (CC0) license
+' by Svjatoslav Agejenko.
+' Email: svjatoslav@svjatoslav.eu
+' Homepage: http://www.svjatoslav.eu
+
+
+' Shared variables for global state
+DIM SHARED recursionDepth
+DIM SHARED pi
+
+' Variables to store shapes and timers
+DIM SHARED shapeSize1, shapeSize2, sizeValue1, sizeValue2, horizontalPosition, verticalPosition
+DIM SHARED timerTime(0 TO 50, 0 TO 100)
+DIM SHARED timerValue(0 TO 50, 0 TO 100)
+
+' Variables to store current timer states
+DIM SHARED timerCurrentPlace(0 TO 50)
+DIM SHARED timerCurrentTime(0 TO 50)
+DIM SHARED timerCurrentValue(0 TO 50)
+DIM SHARED timerLastFrameTime
+
+' Initialize pi with a constant value
+pi = 3.14128
+
+' Turn on the screen and initialize timers
+initializeGraphics
+
+' Set up graphics mode
+SCREEN 7, , , 1
+
+' Initialize the timer system
+initializeTimers
+
+' Main loop variable
+frameSize = 50
+
+' Main loop label
+MainLoop:
+    ' Calculate sine and cosine values for animation
+    sinValue = SIN(timerCurrentValue(1) * 1.3) * .5 + 1.1
+    cosValue = COS(timerCurrentValue(1) * 1.3) * .5 + 1.1
+
+    ' Increment frame counter
+    frameCounter = frameCounter + 1
+
+    ' Calculate shape sizes and positions
+    sizeValue1 = 5 * sinValue
+    sizeValue2 = 2
+    verticalPosition = SIN(timerCurrentValue(1) * 1.3)
+    shapeSize1 = 2 * cosValue
+    shapeSize2 = 1.4
+    horizontalPosition = SIN(timerCurrentValue(1)) * .7
+
+    ' Draw the main fractal object
+    drawFractal timerCurrentValue(2), timerCurrentValue(3), timerCurrentValue(4), timerCurrentValue(0), 0
+
+    ' Draw ellipses
+    drawEllipse 100, timerCurrentValue(6), timerCurrentValue(7) + 4, 14, .5
+    drawEllipse 100, timerCurrentValue(6), timerCurrentValue(7) + 2, 10, .5
+    drawEllipse 100, timerCurrentValue(6), timerCurrentValue(7), 0, .5
+
+    ' Print messages
+    printMessage timerCurrentValue(5), 10, "KHK", 7, 250
+    printMessage timerCurrentValue(8), 130, "Infotehno-", 2, 0
+    printMessage timerCurrentValue(8), 150, "   loogia", 2, 0
+
+    ' Process the timers
+    processTimers
+    LOCATE 1, 1
+
+    ' Check if the main loop should exit
+    IF timerCurrentTime(0) > 26 THEN SYSTEM
+
+    ' Make off-screen buffer visible
+    PCOPY 0, 1
+
+    ' Clear off-screen buffer with white background color in preparation to draw new frame
+    LINE (0, 0)-(319, 199), 15, BF
+
+    ' Go back to the main loop
+    GOTO MainLoop
+
+' Subroutine to draw an ellipse
+SUB drawEllipse (xCoord!, yCoord!, size!, colorValue!, aspectRatio!)
+    ' Draw an ellipse if xCoord and yCoord are positive
+    IF xCoord > 0 THEN
+        IF yCoord > 0 THEN
+            CIRCLE (xCoord, yCoord), size, colorValue, , , aspectRatio
+            PAINT (xCoord, yCoord), colorValue
+        END IF
+    END IF
+END SUB
+
+' Subroutine to draw animated fractal
+SUB drawFractal (xCoord!, yCoord!, angle!, size!, direction!)
+    ' Variables:
+    ' direction - indicates fractal branch direction
+    ' size - fractal fragment current size
+    ' angle - fractal twist angle
+    ' xCoord and yCoord - fractal fragment current position
+
+    ' Increment fragment depth counter
+    recursionDepth = recursionDepth + 1
+
+    ' If size is less than .2, skip drawing
+    IF size < .2 THEN GOTO SkipDrawing
+
+    ' Determine color based on depth
+    IF recursionDepth / 2 = recursionDepth \ 2 THEN
+        colr = 1
+    ELSE
+        colr = 3
+    END IF
+
+    ' Draw the circle and fill it with the determined color
+    CIRCLE (xCoord, yCoord), size, colr
+    PAINT (xCoord, yCoord), colr
+
+    ' Recursively draw child objects of the fractal if direction is not equal to 1
+    IF direction <> 1 THEN
+        x1 = SIN(angle) * size * 2.5 + xCoord
+        y1 = COS(angle) * size * 2.5 + yCoord
+        ' Change size based on the value of direction
+        IF direction = 3 THEN
+            newSize = size / sizeValue2
+        ELSE
+            newSize = size / sizeValue1
+        END IF
+        drawFractal x1, y1, angle + verticalPosition, newSize, 3
+    END IF
+
+    ' Recursively draw child objects if direction is not equal to 2
+    IF direction <> 2 THEN
+        x1 = SIN(angle - pi / 2) * size * 2.5 + xCoord
+        y1 = COS(angle - pi / 2) * size * 2.5 + yCoord
+        ' Change size based on the value of direction
+        IF direction = 4 THEN
+            newSize = size / shapeSize2
+        ELSE
+            newSize = size / shapeSize1
+        END IF
+        drawFractal x1, y1, angle + horizontalPosition, newSize, 4
+    END IF
+
+    ' Recursively draw child objects if direction is not equal to 3
+    IF direction <> 3 THEN
+        x1 = SIN(angle - pi) * size * 2.5 + xCoord
+        y1 = COS(angle - pi) * size * 2.5 + yCoord
+        ' Change size based on the value of direction
+        IF direction = 1 THEN
+            newSize = size / sizeValue2
+        ELSE
+            newSize = size / sizeValue1
+        END IF
+        drawFractal x1, y1, angle + verticalPosition, newSize, 1
+    END IF
+
+    ' Recursively draw child objects if direction is not equal to 4
+    IF direction <> 4 THEN
+        x1 = SIN(angle - pi * 1.5) * size * 2.5 + xCoord
+        y1 = COS(angle - pi * 1.5) * size * 2.5 + yCoord
+        ' Change size based on the value of direction
+        IF direction = 2 THEN
+            newSize = size / shapeSize2
+        ELSE
+            newSize = size / shapeSize1
+        END IF
+        drawFractal x1, y1, angle + horizontalPosition, newSize, 2
+    END IF
+
+SkipDrawing:
+    ' Decrement depth counter
+    recursionDepth = recursionDepth - 1
+END SUB
+
+' Subroutine to print a message on the screen
+SUB printMessage (xCoord!, yCoord!, message$, size!, colr!)
+    ' Check if xCoord is out of bounds
+    IF xCoord < 0 THEN GOTO PrintMessageExit
+    IF xCoord > 319 THEN GOTO PrintMessageExit
+
+    ' Buffer to save a portion of the screen
+    DIM screenBuffer(10000)
+
+    ' Save a portion of the screen to buffer
+    GET (0, 0)-(100, 7), screenBuffer
+
+    ' Print the message on the screen
+    LOCATE 1, 1
+    PRINT message$
+
+    ' Determine the color for the text
+    textColor = colr
+
+    ' Loop through each character in the message
+    FOR x = 0 TO LEN(message$) * 8 - 1
+        ' Loop through each pixel in the character
+        FOR y = 0 TO 7
+            ' Check if the pixel is part of the character
+            IF POINT(x, y) > 0 THEN
+                ' Calculate the coordinates for the enlarged pixel
+                resizedX = x * size + xCoord
+                resizedY = y * size + yCoord
+                ' Draw the pixel based on the color value
+                IF colr > 100 THEN
+                    textColor = RND * 4 + 10
+                    ' Draw a solid box or outlined box based on the color value
+                    IF colr > 200 THEN
+                        LINE (resizedX, resizedY)-(resizedX + size - 1, resizedY + size - 1), textColor, B
+                    ELSE
+                        LINE (resizedX, resizedY)-(resizedX + size - 1, resizedY + size - 1), textColor, BF
+                    END IF
+                END IF
+            END IF
+        NEXT y
+    NEXT x
+
+    ' Restore the saved portion of the screen
+    PUT (0, 0), screenBuffer, PSET
+
+PrintMessageExit:
+END SUB
+
+' Subroutine to add a timer element
+SUB addTimerElement (elementIndex!, time!, value!)
+    ' Loop through each element in the timer array
+    FOR index = 0 TO 100
+        ' Check if the current element is empty
+        IF (timerTime(elementIndex, index) = 0) AND (timerValue(elementIndex, index) = 0) THEN GOTO AddTimerElement
+    NEXT index
+
+AddTimerElement:
+    ' Add the new timer element
+    timerTime(elementIndex, index) = time
+    timerValue(elementIndex, index) = value
+END SUB
+
+' Subroutine to initialize the timer system
+SUB initializeTimers
+    ' Store the current time
+    timerLastFrameTime = TIMER
+
+    ' Set the pause duration
+    pauseDuration = 24
+
+    ' Initialize size values
+    addTimerElement 0, 0, 50
+    addTimerElement 0, 7, 10
+    addTimerElement 0, 20, 10
+    addTimerElement 0, 24, 0
+    addTimerElement 0, 1000, 0
+
+    ' Initialize speed values
+    addTimerElement 1, 0, .1
+    addTimerElement 1, 1000, 1000
+
+    ' Initialize X & Y positions
+    addTimerElement 2, 0, 160
+    addTimerElement 3, 0, 100
+    addTimerElement 2, 5, 160
+    addTimerElement 3, 5, 100
+    addTimerElement 2, 9, 280
+    addTimerElement 3, 9, 160
+    addTimerElement 2, 10, 280
+    addTimerElement 3, 10, 160
+    addTimerElement 2, 20, 40
+    addTimerElement 3, 20, 160
+    addTimerElement 2, 1000, 40
+    addTimerElement 3, 1000, 160
+
+    ' Initialize rotation values
+    addTimerElement 4, 0, .1
+    addTimerElement 4, 10, .1
+    addTimerElement 4, 22, 18
+    addTimerElement 4, 2000, 10000
+
+    ' Initialize KHK message X position
+    addTimerElement 5, 0, -1
+    addTimerElement 5, 5, -1
+    addTimerElement 5, 9, 50
+    addTimerElement 5, 10, 30
+    addTimerElement 5, pauseDuration, 30
+    addTimerElement 5, pauseDuration + 2, 321
+
+    ' Initialize ellips Y & radius
+    addTimerElement 6, 0, -1
+    addTimerElement 6, 4, -1
+    addTimerElement 6, 10, 30
+    addTimerElement 6, 1000, 50
+    addTimerElement 7, 0, 1
+    addTimerElement 7, 6, 1
+    addTimerElement 7, 12, 130
+    addTimerElement 7, pauseDuration, 130
+    addTimerElement 7, pauseDuration + 2, 1
+
+    ' Initialize "Infotehnoloogia" message X position
+    addTimerElement 8, 0, 320
+    addTimerElement 8, 11, 320
+    addTimerElement 8, 20, 100
+    addTimerElement 8, pauseDuration, 100
+    addTimerElement 8, pauseDuration + 1, -1
+END SUB
+
+' Subroutine to process the timers
+SUB processTimers
+    ' Store the current time
+    currentTime = TIMER
+
+    ' Calculate the time difference since last frame
+    timeDifference = currentTime - timerLastFrameTime
+
+    ' Update the last frame time
+    timerLastFrameTime = currentTime
+
+    ' Loop through each timer element
+    FOR elementIndex = 0 TO 50
+        ' Calculate the current time and value of each element
+        currentElementTime = timerCurrentTime(elementIndex) + timeDifference
+        currentElementPlace = timerCurrentPlace(elementIndex)
+
+ProcessTimerElement:
+        ' Check if the next timer element is empty
+        IF timerTime(elementIndex, currentElementPlace + 1) = -1 THEN
+            ' Reset the current time and value
+            currentElementTime = 0
+            currentElementPlace = 0
+        END IF
+
+        ' Update the current time and value of each element
+        IF timerTime(elementIndex, currentElementPlace + 1) < currentElementTime THEN
+            ' Check if the next timer element is empty
+            IF timerTime(elementIndex, currentElementPlace + 1) = 0 THEN
+                ' Set the current value to the current timer value
+                timerCurrentValue(elementIndex) = timerValue(elementIndex, currentElementPlace)
+                GOTO UpdateTimerElement
+            END IF
+            ' Move to the next timer element
+            currentElementPlace = currentElementPlace + 1
+            GOTO ProcessTimerElement
+        END IF
+
+        ' Interpolate the current value based on time difference
+        value1 = timerValue(elementIndex, currentElementPlace)
+        time1 = timerTime(elementIndex, currentElementPlace)
+        value2 = timerValue(elementIndex, currentElementPlace + 1)
+        time2 = timerTime(elementIndex, currentElementPlace + 1)
+
+        IF value1 = value2 THEN
+            ' Set the current value to the first value
+            timerCurrentValue(elementIndex) = value1
+        ELSE
+            ' Calculate the time difference and value difference
+            timeDiff1 = time2 - time1
+            timeDiff2 = currentElementTime - time1
+            valueDiff = value2 - value1
+            ' Interpolate the current value
+            timerCurrentValue(elementIndex) = timeDiff2 / timeDiff1 * valueDiff + value1
+        END IF
+
+UpdateTimerElement:
+        ' Update the current place and time of each element
+        timerCurrentPlace(elementIndex) = currentElementPlace
+        timerCurrentTime(elementIndex) = currentElementTime
+    NEXT elementIndex
+END SUB
+
+' Subroutine to turn on the screen
+SUB initializeGraphics
+    ' Set up graphics mode
+    SCREEN 7, , , 1
+
+    ' Draw initial shapes
+    FOR x = 0 TO 160 STEP 15
+        LINE (160 - x - 5, 90 - 5)-(160 + x + 5, 110 + 5), 1, BF
+        LINE (160 - x - 3, 90 - 3)-(160 + x + 3, 110 + 3), 3, BF
+        LINE (160 - x, 90)-(160 + x, 110), 15, BF
+
+        ' Copy screen buffer and clear the screen
+        PCOPY 0, 1
+        CLS
+
+        ' Use sound function to create delay, to limit animation speed
+        SOUND 0, .5
+    NEXT x
+
+    ' Draw additional shapes
+    FOR y = 10 TO 100 STEP 15
+        CLS
+        LINE (160 - x - 5, 90 - y - 5)-(160 + x + 5, 110 + y + 5), 1, BF
+        LINE (160 - x - 3, 90 - y - 3)-(160 + x + 3, 110 + y + 3), 3, BF
+        LINE (160 - x, 90 - y)-(160 + x, 110 + y), 15, BF
+        PCOPY 0, 1
+        SOUND 0, .5
+    NEXT y
+
+    ' Draw zeroes and ones at random locations for decoration
+    FOR counter = 1 TO 25
+        printMessage RND * 250, RND * 180, STR$(INT(RND * 2)), 3, 0
+
+        ' Copy screen buffer and clear the screen
+        PCOPY 0, 1
+
+        ' Use sound function to create delay, to limit animation speed
+        SOUND 0, 1
+    NEXT counter
+
+    ' Buffer to save parts of the screen
+    DIM screenPartBuffer(1 TO 1000)
+
+    ' Shift parts of the screen randomly
+    FOR shiftCounter = 1 TO 30
+        FOR lineCounter = 0 TO 195
+            threshold = ABS(100 - lineCounter)
+
+            ' Check if a random condition is met
+            IF RND * 50 < threshold THEN
+                GET (1, lineCounter)-(318, lineCounter + 1), screenPartBuffer
+
+                ' Shift the screen buffer
+                IF lineCounter > 100 THEN
+                    PUT (0, lineCounter), screenPartBuffer, PSET
+                ELSE
+                    PUT (2, lineCounter), screenPartBuffer, PSET
+                END IF
+            END IF
+        NEXT lineCounter
+
+        ' Copy screen buffer and clear the screen
+        PCOPY 0, 1
+    NEXT shiftCounter
+END SUB
diff --git a/2D GFX/Fractals/fractal circles animated.webm b/2D GFX/Fractals/fractal circles animated.webm
new file mode 100644 (file)
index 0000000..f112e49
Binary files /dev/null and b/2D GFX/Fractals/fractal circles animated.webm differ
diff --git a/2D GFX/Fractals/fractal circles.bas b/2D GFX/Fractals/fractal circles.bas
new file mode 100755 (executable)
index 0000000..f5c1665
--- /dev/null
@@ -0,0 +1,121 @@
+DECLARE SUB drawFractal (x!, y!, angle AS SINGLE, size AS SINGLE, w AS INTEGER)\r
+' Renders a spiral fractal made up of circles using recursion.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.12, Initial version\r
+' 2024.08, Improved program readability\r
+\r
+' Declare shared variables to be used across the program\r
+DIM SHARED depth AS INTEGER\r
+DIM SHARED pi AS SINGLE\r
+\r
+' Define scaling factors for horizontal and vertical directions\r
+DIM SHARED scaleH1 AS SINGLE, scaleH2 AS SINGLE, scaleV1 AS SINGLE, scaleV2 AS SINGLE\r
+DIM SHARED hp AS SINGLE, vp AS SINGLE\r
+\r
+' Initialize constants\r
+pi = 3.14159\r
+\r
+SCREEN 12 ' Set the screen mode to 12 for better graphics quality\r
+\r
+' Define scaling factors and direction variables\r
+scaleV1 = 5 ' Vertical scale factor for one direction\r
+scaleV2 = 2 ' Vertical scale factor for another direction\r
+vp = .2  ' Vertical angle increment\r
+\r
+scaleH1 = 2 ' Horizontal scale factor for one direction\r
+scaleH2 = 1.4 ' Horizontal scale factor for another direction\r
+hp = .2  ' Horizontal angle increment\r
+\r
+' Start the fractal drawing process from the center of the screen\r
+drawFractal 320, 240, pi - .9, 50, 0\r
+\r
+' Wait for user input to exit the program gracefully\r
+a$ = INPUT$(1)\r
+SYSTEM ' Terminate the program\r
+\r
+SUB drawFractal (x, y, angle AS SINGLE, size AS SINGLE, w AS INTEGER)\r
+    depth = depth + 1 ' Increment the recursion depth\r
+\r
+    IF size < .2 THEN GOTO 1  ' Base case for recursion termination\r
+\r
+    ' Determine color based on the current depth\r
+    IF depth MOD 2 = 0 THEN\r
+        c = 15 ' White\r
+    ELSE\r
+        c = 10 ' Light green\r
+    END IF\r
+\r
+    CIRCLE (x, y), size, c ' Draw a circle at the current position and size with specified color\r
+    PAINT (x, y), c ' Fill the circle to create a solid shape\r
+\r
+    ' Recursive calls for different directions based on the parameter w\r
+    IF w <> 1 THEN\r
+        ' Calculate new coordinates after rotating angle + vp degrees\r
+        x1 = SIN(angle) * size * 2.5 + x\r
+        y1 = COS(angle) * size * 2.5 + y\r
+\r
+        ' Determine scaling factor based on the direction\r
+        IF w = 3 THEN\r
+            newSize = size / scaleV2\r
+        ELSE\r
+            newSize = size / scaleV1\r
+        END IF\r
+\r
+        drawFractal x1, y1, angle + vp, newSize, 3 ' Recursive call to the same subroutine with updated parameters\r
+    END IF\r
+\r
+    IF w <> 2 THEN\r
+        ' Calculate new coordinates after rotating angle - pi/2 degrees\r
+        x1 = SIN(angle - .5 * pi) * size * 2.5 + x\r
+        y1 = COS(angle - .5 * pi) * size * 2.5 + y\r
+\r
+        ' Determine scaling factor based on the direction\r
+        IF w = 4 THEN\r
+            newSize = size / scaleH2\r
+        ELSE\r
+            newSize = size / scaleH1\r
+        END IF\r
+\r
+        drawFractal x1, y1, angle + hp, newSize, 4 ' Recursive call to the same subroutine with updated parameters\r
+    END IF\r
+\r
+    IF w <> 3 THEN\r
+        ' Calculate new coordinates after rotating angle - pi degrees\r
+        x1 = SIN(angle - pi) * size * 2.5 + x\r
+        y1 = COS(angle - pi) * size * 2.5 + y\r
+\r
+        ' Determine scaling factor based on the direction\r
+        IF w = 1 THEN\r
+            newSize = size / scaleV2\r
+        ELSE\r
+            newSize = size / scaleV1\r
+        END IF\r
+\r
+        drawFractal x1, y1, angle + vp, newSize, 1 ' Recursive call to the same subroutine with updated parameters\r
+    END IF\r
+\r
+    IF w <> 4 THEN\r
+        ' Calculate new coordinates after rotating angle - pi*3/2 degrees\r
+        x1 = SIN(angle - 1.5 * pi) * size * 2.5 + x\r
+        y1 = COS(angle - 1.5 * pi) * size * 2.5 + y\r
+\r
+        ' Determine scaling factor based on the direction\r
+        IF w = 2 THEN\r
+            newSize = size / scaleH2\r
+        ELSE\r
+            newSize = size / scaleH1\r
+        END IF\r
+\r
+        drawFractal x1, y1, angle + hp, newSize, 2 ' Recursive call to the same subroutine with updated parameters\r
+    END IF\r
+\r
+1\r
+    depth = depth - 1 ' Decrement recursion depth after all recursive calls are made\r
+END SUB\r
+\r
diff --git a/2D GFX/Fractals/fractal circles.png b/2D GFX/Fractals/fractal circles.png
new file mode 100644 (file)
index 0000000..5d03f87
Binary files /dev/null and b/2D GFX/Fractals/fractal circles.png differ
diff --git a/2D GFX/Fractals/fractal squares animated.bas b/2D GFX/Fractals/fractal squares animated.bas
new file mode 100755 (executable)
index 0000000..6b62704
--- /dev/null
@@ -0,0 +1,44 @@
+' Animated fractal that is made of size shifting squares.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.04, Initial version\r
+' 2024.08, Improved program readability\r
+\r
+\r
+DECLARE SUB drawFractal (x!, y!, s!)\r
+DIM SHARED recursionDepth\r
+DIM SHARED factor1, factor2, factor3, factor4\r
+SCREEN 7, , , 1\r
+\r
+recursionDepth = 1\r
+\r
+1\r
+frameCount = frameCount + 1\r
+factor1 = SIN(frameCount / 19) * 1 + 3\r
+factor2 = SIN(frameCount / 12) * 1 + 3\r
+factor3 = SIN(frameCount / 17) * 1 + 3\r
+factor4 = SIN(frameCount / 22) * 1 + 3\r
+PCOPY 0, 1\r
+CLS\r
+drawFractal 160, 100, 40\r
+SOUND 0, .4\r
+userInput$ = INKEY$\r
+IF userInput$ <> "" THEN SYSTEM\r
+GOTO 1\r
+\r
+SUB drawFractal (x, y, s)\r
+    IF s > 1 THEN\r
+        recursionDepth = recursionDepth + 1\r
+        LINE (x - s, y - s)-(x + s, y + s), recursionDepth, BF\r
+        drawFractal x - s, y - s, s / factor1\r
+        drawFractal x + s, y - s, s / factor2\r
+        drawFractal x + s, y + s, s / factor3\r
+        drawFractal x - s, y + s, s / factor4\r
+        recursionDepth = recursionDepth - 1\r
+    END IF\r
+END SUB\r
diff --git a/2D GFX/Fractals/fractal squares animated.webm b/2D GFX/Fractals/fractal squares animated.webm
new file mode 100644 (file)
index 0000000..b29f1b4
Binary files /dev/null and b/2D GFX/Fractals/fractal squares animated.webm differ
diff --git a/2D GFX/Fractals/fractal squares, 1.png b/2D GFX/Fractals/fractal squares, 1.png
new file mode 100644 (file)
index 0000000..4aab922
Binary files /dev/null and b/2D GFX/Fractals/fractal squares, 1.png differ
diff --git a/2D GFX/Fractals/fractal squares, 2.png b/2D GFX/Fractals/fractal squares, 2.png
new file mode 100644 (file)
index 0000000..f2fcbcb
Binary files /dev/null and b/2D GFX/Fractals/fractal squares, 2.png differ
diff --git a/2D GFX/Fractals/fractal squares.bas b/2D GFX/Fractals/fractal squares.bas
new file mode 100755 (executable)
index 0000000..638b02b
--- /dev/null
@@ -0,0 +1,53 @@
+DECLARE SUB drawFractalPattern (centerX!, centerY!, size!)\r
+DIM SHARED currentColor ' This variable holds the color of the fractal and is accessible within submodules.\r
+\r
+' Program renders fractal that is made from squares.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+\r
+\r
+' Set the screen to high-resolution graphics mode.\r
+SCREEN 12\r
+\r
+' Initialize the fractal color.\r
+currentColor = 10\r
+\r
+' Draw a single fractal pattern at the center of the screen with a size of 127.\r
+drawFractalPattern 320, 240, 127\r
+\r
+' Loop to create a delay using the SOUND command.\r
+FOR iterationCounter = 1 TO 50\r
+    SOUND 0, 1 ' This creates a short delay by generating an inaudible sound.\r
+NEXT iterationCounter\r
+\r
+' Clear the screen to prepare for the next set of drawings.\r
+CLS\r
+\r
+' Loop to draw a series of fractal patterns with varying sizes and random colors.\r
+FOR iterationCounter = 1 TO 128 STEP 5\r
+    currentColor = RND * 7 + 7 ' Set the fractal color to a random value between 7 and 14.\r
+    drawFractalPattern 320, 240, iterationCounter ' Draw the fractal pattern with the current size.\r
+NEXT iterationCounter\r
+\r
+' Loop to create another delay using the SOUND command.\r
+FOR iterationCounter = 1 TO 50\r
+    SOUND 0, 1 ' This creates a short delay by generating an inaudible sound.\r
+NEXT iterationCounter\r
+\r
+' Subroutine to draw a fractal pattern using recursion.\r
+SUB drawFractalPattern (centerX, centerY, size)\r
+    ' Check if the size is greater than or equal to 1 to continue drawing.\r
+    IF size >= 1 THEN\r
+        ' Draw a square (box) centered at (centerX, centerY) with the current color.\r
+        LINE (centerX - size, centerY - size)-(centerX + size, centerY + size), currentColor, B\r
+\r
+        ' Recursively call the subroutine to draw smaller fractal patterns at the corners of the current square.\r
+        drawFractalPattern centerX - size, centerY - size, size / 2.3\r
+        drawFractalPattern centerX + size, centerY - size, size / 2.3\r
+        drawFractalPattern centerX + size, centerY + size, size / 2.3\r
+        drawFractalPattern centerX - size, centerY + size, size / 2.3\r
+    END IF\r
+END SUB\r
diff --git a/2D GFX/Fractals/fractal trees.bas b/2D GFX/Fractals/fractal trees.bas
new file mode 100755 (executable)
index 0000000..fe74278
--- /dev/null
@@ -0,0 +1,54 @@
+' Animated tree fractal.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.04, Initial version\r
+' 2024.08, Improved program readability\r
+\r
+DECLARE SUB generateFractal (x!, y!, s!)\r
+\r
+DECLARE SUB generateArt (x!, y!, s!)\r
+DIM SHARED modifier1, modifier2, modifier3\r
+DIM SHARED vector1X, vector1Y\r
+DIM SHARED vector2X, vector2Y\r
+DIM SHARED vector3X, vector3Y\r
+SCREEN 7, , , 1\r
+\r
+1\r
+frame = frame + 1\r
+modifier1 = SIN(frame / 19) + 3\r
+modifier2 = SIN(frame / 12) + 3\r
+modifier3 = SIN(frame / 17) + 3\r
+\r
+vector1X = SIN(frame / 13) / 3 + 1\r
+vector1Y = SIN(frame / 18) / 3 + 1\r
+\r
+vector2X = SIN(frame / 20) / 3 + 1\r
+vector2Y = SIN(frame / 28) / 3 + 1\r
+\r
+vector3X = SIN(frame / 31) / 3 + 1\r
+vector3Y = SIN(frame / 24) / 3 + 1\r
+\r
+PCOPY 0, 1\r
+CLS\r
+generateFractal 160, 180, 80\r
+SOUND 0, .5\r
+inputKey$ = INKEY$\r
+IF inputKey$ <> "" THEN SYSTEM\r
+GOTO 1\r
+\r
+SUB generateFractal (x, y, s)\r
+    IF s > 1 THEN\r
+        LINE (x, y)-(x - s * vector1X, y - s * vector1Y), 15\r
+        LINE (x, y)-(x + s * vector2X, y - s * vector2Y), 15\r
+        LINE (x, y)-(x, y - s), 15\r
+        generateFractal x - s * vector1X, y - s * vector1Y, s / modifier1\r
+        generateFractal x + s * vector2X, y - s * vector2Y, s / modifier2\r
+        generateFractal x, y - s, s / modifier3\r
+    END IF\r
+END SUB\r
+\r
diff --git a/2D GFX/Fractals/fractal trees.webm b/2D GFX/Fractals/fractal trees.webm
new file mode 100644 (file)
index 0000000..9d4fa52
Binary files /dev/null and b/2D GFX/Fractals/fractal trees.webm differ
diff --git a/2D GFX/Fractals/index.html b/2D GFX/Fractals/index.html
new file mode 100644 (file)
index 0000000..96269ef
--- /dev/null
@@ -0,0 +1,321 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<!-- 2025-07-28 ma 03:32 -->
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+<meta name="viewport" content="width=device-width, initial-scale=1" />
+<title>Fractals</title>
+<meta name="generator" content="Org Mode" />
+<style>
+  #content { max-width: 60em; margin: auto; }
+  .title  { text-align: center;
+             margin-bottom: .2em; }
+  .subtitle { text-align: center;
+              font-size: medium;
+              font-weight: bold;
+              margin-top:0; }
+  .todo   { font-family: monospace; color: red; }
+  .done   { font-family: monospace; color: green; }
+  .priority { font-family: monospace; color: orange; }
+  .tag    { background-color: #eee; font-family: monospace;
+            padding: 2px; font-size: 80%; font-weight: normal; }
+  .timestamp { color: #bebebe; }
+  .timestamp-kwd { color: #5f9ea0; }
+  .org-right  { margin-left: auto; margin-right: 0px;  text-align: right; }
+  .org-left   { margin-left: 0px;  margin-right: auto; text-align: left; }
+  .org-center { margin-left: auto; margin-right: auto; text-align: center; }
+  .underline { text-decoration: underline; }
+  #postamble p, #preamble p { font-size: 90%; margin: .2em; }
+  p.verse { margin-left: 3%; }
+  pre {
+    border: 1px solid #e6e6e6;
+    border-radius: 3px;
+    background-color: #f2f2f2;
+    padding: 8pt;
+    font-family: monospace;
+    overflow: auto;
+    margin: 1.2em;
+  }
+  pre.src {
+    position: relative;
+    overflow: auto;
+  }
+  pre.src:before {
+    display: none;
+    position: absolute;
+    top: -8px;
+    right: 12px;
+    padding: 3px;
+    color: #555;
+    background-color: #f2f2f299;
+  }
+  pre.src:hover:before { display: inline; margin-top: 14px;}
+  /* Languages per Org manual */
+  pre.src-asymptote:before { content: 'Asymptote'; }
+  pre.src-awk:before { content: 'Awk'; }
+  pre.src-authinfo::before { content: 'Authinfo'; }
+  pre.src-C:before { content: 'C'; }
+  /* pre.src-C++ doesn't work in CSS */
+  pre.src-clojure:before { content: 'Clojure'; }
+  pre.src-css:before { content: 'CSS'; }
+  pre.src-D:before { content: 'D'; }
+  pre.src-ditaa:before { content: 'ditaa'; }
+  pre.src-dot:before { content: 'Graphviz'; }
+  pre.src-calc:before { content: 'Emacs Calc'; }
+  pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
+  pre.src-fortran:before { content: 'Fortran'; }
+  pre.src-gnuplot:before { content: 'gnuplot'; }
+  pre.src-haskell:before { content: 'Haskell'; }
+  pre.src-hledger:before { content: 'hledger'; }
+  pre.src-java:before { content: 'Java'; }
+  pre.src-js:before { content: 'Javascript'; }
+  pre.src-latex:before { content: 'LaTeX'; }
+  pre.src-ledger:before { content: 'Ledger'; }
+  pre.src-lisp:before { content: 'Lisp'; }
+  pre.src-lilypond:before { content: 'Lilypond'; }
+  pre.src-lua:before { content: 'Lua'; }
+  pre.src-matlab:before { content: 'MATLAB'; }
+  pre.src-mscgen:before { content: 'Mscgen'; }
+  pre.src-ocaml:before { content: 'Objective Caml'; }
+  pre.src-octave:before { content: 'Octave'; }
+  pre.src-org:before { content: 'Org mode'; }
+  pre.src-oz:before { content: 'OZ'; }
+  pre.src-plantuml:before { content: 'Plantuml'; }
+  pre.src-processing:before { content: 'Processing.js'; }
+  pre.src-python:before { content: 'Python'; }
+  pre.src-R:before { content: 'R'; }
+  pre.src-ruby:before { content: 'Ruby'; }
+  pre.src-sass:before { content: 'Sass'; }
+  pre.src-scheme:before { content: 'Scheme'; }
+  pre.src-screen:before { content: 'Gnu Screen'; }
+  pre.src-sed:before { content: 'Sed'; }
+  pre.src-sh:before { content: 'shell'; }
+  pre.src-sql:before { content: 'SQL'; }
+  pre.src-sqlite:before { content: 'SQLite'; }
+  /* additional languages in org.el's org-babel-load-languages alist */
+  pre.src-forth:before { content: 'Forth'; }
+  pre.src-io:before { content: 'IO'; }
+  pre.src-J:before { content: 'J'; }
+  pre.src-makefile:before { content: 'Makefile'; }
+  pre.src-maxima:before { content: 'Maxima'; }
+  pre.src-perl:before { content: 'Perl'; }
+  pre.src-picolisp:before { content: 'Pico Lisp'; }
+  pre.src-scala:before { content: 'Scala'; }
+  pre.src-shell:before { content: 'Shell Script'; }
+  pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
+  /* additional language identifiers per "defun org-babel-execute"
+       in ob-*.el */
+  pre.src-cpp:before  { content: 'C++'; }
+  pre.src-abc:before  { content: 'ABC'; }
+  pre.src-coq:before  { content: 'Coq'; }
+  pre.src-groovy:before  { content: 'Groovy'; }
+  /* additional language identifiers from org-babel-shell-names in
+     ob-shell.el: ob-shell is the only babel language using a lambda to put
+     the execution function name together. */
+  pre.src-bash:before  { content: 'bash'; }
+  pre.src-csh:before  { content: 'csh'; }
+  pre.src-ash:before  { content: 'ash'; }
+  pre.src-dash:before  { content: 'dash'; }
+  pre.src-ksh:before  { content: 'ksh'; }
+  pre.src-mksh:before  { content: 'mksh'; }
+  pre.src-posh:before  { content: 'posh'; }
+  /* Additional Emacs modes also supported by the LaTeX listings package */
+  pre.src-ada:before { content: 'Ada'; }
+  pre.src-asm:before { content: 'Assembler'; }
+  pre.src-caml:before { content: 'Caml'; }
+  pre.src-delphi:before { content: 'Delphi'; }
+  pre.src-html:before { content: 'HTML'; }
+  pre.src-idl:before { content: 'IDL'; }
+  pre.src-mercury:before { content: 'Mercury'; }
+  pre.src-metapost:before { content: 'MetaPost'; }
+  pre.src-modula-2:before { content: 'Modula-2'; }
+  pre.src-pascal:before { content: 'Pascal'; }
+  pre.src-ps:before { content: 'PostScript'; }
+  pre.src-prolog:before { content: 'Prolog'; }
+  pre.src-simula:before { content: 'Simula'; }
+  pre.src-tcl:before { content: 'tcl'; }
+  pre.src-tex:before { content: 'TeX'; }
+  pre.src-plain-tex:before { content: 'Plain TeX'; }
+  pre.src-verilog:before { content: 'Verilog'; }
+  pre.src-vhdl:before { content: 'VHDL'; }
+  pre.src-xml:before { content: 'XML'; }
+  pre.src-nxml:before { content: 'XML'; }
+  /* add a generic configuration mode; LaTeX export needs an additional
+     (add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
+  pre.src-conf:before { content: 'Configuration File'; }
+
+  table { border-collapse:collapse; }
+  caption.t-above { caption-side: top; }
+  caption.t-bottom { caption-side: bottom; }
+  td, th { vertical-align:top;  }
+  th.org-right  { text-align: center;  }
+  th.org-left   { text-align: center;   }
+  th.org-center { text-align: center; }
+  td.org-right  { text-align: right;  }
+  td.org-left   { text-align: left;   }
+  td.org-center { text-align: center; }
+  dt { font-weight: bold; }
+  .footpara { display: inline; }
+  .footdef  { margin-bottom: 1em; }
+  .figure { padding: 1em; }
+  .figure p { text-align: center; }
+  .equation-container {
+    display: table;
+    text-align: center;
+    width: 100%;
+  }
+  .equation {
+    vertical-align: middle;
+  }
+  .equation-label {
+    display: table-cell;
+    text-align: right;
+    vertical-align: middle;
+  }
+  .inlinetask {
+    padding: 10px;
+    border: 2px solid gray;
+    margin: 10px;
+    background: #ffffcc;
+  }
+  #org-div-home-and-up
+   { text-align: right; font-size: 70%; white-space: nowrap; }
+  textarea { overflow-x: auto; }
+  .linenr { font-size: smaller }
+  .code-highlighted { background-color: #ffff00; }
+  .org-info-js_info-navigation { border-style: none; }
+  #org-info-js_console-label
+    { font-size: 10px; font-weight: bold; white-space: nowrap; }
+  .org-info-js_search-highlight
+    { background-color: #ffff00; color: #000000; font-weight: bold; }
+  .org-svg { }
+</style>
+<style type="text/css">
+               body {
+                 max-width: 35cm !important;
+               }
+               #content {
+                 max-width: 80em !important;
+                 width: 90%;
+               }
+               </style>
+<link rel="stylesheet" type="text/css" href="https://thomasf.github.io/solarized-css/solarized-dark.min.css" />
+</head>
+<body>
+<div id="content" class="content">
+<h1 class="title">Fractals</h1>
+<div id="table-of-contents" role="doc-toc">
+<h2>Table of Contents</h2>
+<div id="text-table-of-contents" role="doc-toc">
+<ul>
+<li><a href="#orgf8fab95">1. Fractal circles</a></li>
+<li><a href="#orgeb3421b">2. Fractal circles animated</a></li>
+<li><a href="#org8bc5d61">3. Fractal of squares</a></li>
+<li><a href="#orga748cab">4. Fractal of squares animated</a></li>
+<li><a href="#orgfd9ef84">5. Fractal of trees</a></li>
+</ul>
+</div>
+</div>
+<style>
+  .flex-center {
+    display: flex;            /* activate flexbox */
+    justify-content: center;  /* horizontally center anything inside   */
+  }
+
+  .flex-center video {
+    width: min(90%, 1000px); /* whichever is smaller wins */
+    height: auto;            /* preserve aspect ratio */
+  }
+
+  .responsive-img {
+    width: min(100%, 1000px);
+    height: auto;
+  }
+</style>
+
+
+<div id="outline-container-orgf8fab95" class="outline-2">
+<h2 id="orgf8fab95"><span class="section-number-2">1.</span> Fractal circles</h2>
+<div class="outline-text-2" id="text-1">
+
+<div id="org81b1864" class="figure">
+<p><a href="fractal circles.bas" class="responsive-img"><img src="fractal%20circles.png" alt="fractal%20circles.png" class="responsive-img" /></a>
+</p>
+</div>
+
+<p>
+<a href="fractal circles.bas">Source code</a>
+</p>
+</div>
+</div>
+
+<div id="outline-container-orgeb3421b" class="outline-2">
+<h2 id="orgeb3421b"><span class="section-number-2">2.</span> Fractal circles animated</h2>
+<div class="outline-text-2" id="text-2">
+<div class="flex-center">
+  <video controls loop autoplay class="flex-center">
+    <source src="fractal circles animated.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+<p>
+<a href="fractal circles animated.bas">Source code</a>
+</p>
+</div>
+</div>
+
+<div id="outline-container-org8bc5d61" class="outline-2">
+<h2 id="org8bc5d61"><span class="section-number-2">3.</span> Fractal of squares</h2>
+<div class="outline-text-2" id="text-3">
+
+<div id="org349adb0" class="figure">
+<p><a href="fractal squares.bas" class="responsive-img"><img src="fractal%20squares,%201.png" alt="fractal%20squares,%201.png" class="responsive-img" /></a>
+</p>
+</div>
+
+
+<div id="orgf1ed4b8" class="figure">
+<p><a href="fractal squares.bas" class="responsive-img"><img src="fractal%20squares,%202.png" alt="fractal%20squares,%202.png" class="responsive-img" /></a>
+</p>
+</div>
+</div>
+</div>
+
+<div id="outline-container-orga748cab" class="outline-2">
+<h2 id="orga748cab"><span class="section-number-2">4.</span> Fractal of squares animated</h2>
+<div class="outline-text-2" id="text-4">
+<div class="flex-center">
+  <video controls loop autoplay class="flex-center">
+    <source src="fractal squares animated.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+<p>
+<a href="fractal squares animated.bas">Source code</a>
+</p>
+</div>
+</div>
+
+<div id="outline-container-orgfd9ef84" class="outline-2">
+<h2 id="orgfd9ef84"><span class="section-number-2">5.</span> Fractal of trees</h2>
+<div class="outline-text-2" id="text-5">
+<div class="flex-center">
+  <video controls loop autoplay class="flex-center">
+    <source src="fractal trees.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+<p>
+<a href="fractal trees.bas">Source code</a>
+</p>
+</div>
+</div>
+</div>
+<div id="postamble" class="status">
+<p class="date">Created: 2025-07-28 ma 03:32</p>
+<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
+</div>
+</body>
+</html>
diff --git a/2D GFX/Fractals/index.org b/2D GFX/Fractals/index.org
new file mode 100644 (file)
index 0000000..0480898
--- /dev/null
@@ -0,0 +1,79 @@
+#+TITLE: Fractals
+#+LANGUAGE: en
+#+LATEX_HEADER: \usepackage[margin=1.0in]{geometry}
+#+LATEX_HEADER: \usepackage{parskip}
+#+LATEX_HEADER: \usepackage[none]{hyphenat}
+
+#+OPTIONS: H:20 num:20
+#+OPTIONS: author:nil
+
+#+begin_export html
+<style>
+  .flex-center {
+    display: flex;            /* activate flexbox */
+    justify-content: center;  /* horizontally center anything inside   */
+  }
+
+  .flex-center video {
+    width: min(90%, 1000px); /* whichever is smaller wins */
+    height: auto;            /* preserve aspect ratio */
+  }
+
+  .responsive-img {
+    width: min(100%, 1000px);
+    height: auto;
+  }
+</style>
+#+end_export
+
+
+* Fractal circles
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:fractal circles.bas][file:fractal%20circles.png]]
+
+[[file:fractal circles.bas][Source code]]
+
+* Fractal circles animated
+#+begin_export html
+<div class="flex-center">
+  <video controls loop autoplay class="flex-center">
+    <source src="fractal circles animated.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+[[file:fractal circles animated.bas][Source code]]
+
+* Fractal of squares
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:fractal squares.bas][file:fractal%20squares,%201.png]]
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:fractal squares.bas][file:fractal%20squares,%202.png]]
+
+* Fractal of squares animated
+#+begin_export html
+<div class="flex-center">
+  <video controls loop autoplay class="flex-center">
+    <source src="fractal squares animated.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+[[file:fractal squares animated.bas][Source code]]
+
+* Fractal of trees
+#+begin_export html
+<div class="flex-center">
+  <video controls loop autoplay class="flex-center">
+    <source src="fractal trees.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+[[file:fractal trees.bas][Source code]]
diff --git a/2D GFX/Hello friend.bas b/2D GFX/Hello friend.bas
new file mode 100755 (executable)
index 0000000..93dade2
--- /dev/null
@@ -0,0 +1,39 @@
+' 2D graphics demonstration.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+\r
+\r
+SCREEN 13\r
+\r
+LOCATE 1, 1\r
+PRINT "   Hello friend!"\r
+\r
+' Loop through each pixel in the screen to create an enlarged version of the current screen\r
+FOR x = 0 TO 160\r
+    FOR y = 0 TO 32\r
+        colorVal = POINT(x, y)\r
+        x1 = x * 2\r
+        y1 = y * 2 + 90\r
+        LINE (x1, y1)-(x1 + 1, y1 + 1), colorVal, BF\r
+    NEXT y\r
+NEXT x\r
+\r
+LOCATE 1, 1\r
+PRINT "                     "\r
+\r
+' Draw a series of circles along the screen\r
+FOR x = 0 TO 320\r
+    CIRCLE (x, 130), 10, 9\r
+    SOUND 0, .1\r
+NEXT x\r
+\r
+' Draw horizontal lines creating an X pattern\r
+FOR y = 0 TO 70\r
+    SOUND 0, .1\r
+    LINE (160 - 70 + y, y)-(160 + 70 - y, y), 9\r
+NEXT y\r
+\r
+\r
diff --git a/2D GFX/Hello friend.png b/2D GFX/Hello friend.png
new file mode 100644 (file)
index 0000000..c75768f
Binary files /dev/null and b/2D GFX/Hello friend.png differ
diff --git a/2D GFX/People.bas b/2D GFX/People.bas
new file mode 100755 (executable)
index 0000000..60161a5
--- /dev/null
@@ -0,0 +1,895 @@
+' Example slideshow presentation. Includes animated transitions.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2001, Initial version\r
+' 2024 - 2025, Improved program readability\r
+\r
+\r
+DECLARE SUB displaySlide1 ()\r
+DECLARE SUB setink (a!)\r
+DECLARE SUB inke (a$)\r
+DECLARE SUB mkjuku (x!, y!, a!, c!)\r
+DECLARE SUB pr (x!, y!, s!, c!, n!, a$)\r
+DECLARE SUB wpr ()\r
+DECLARE SUB displayEffect7 ()\r
+DECLARE SUB displaySlide6 ()\r
+DECLARE SUB displaySlide5 ()\r
+DECLARE SUB pal4 (c, r!, g!, b!)\r
+DECLARE SUB displaySlide4 ()\r
+DECLARE SUB inpur ()\r
+DECLARE SUB displayEffect5 ()\r
+DECLARE SUB displaySlide3 ()\r
+DECLARE SUB prin (x1!, y1!, s!, c, a$)\r
+DECLARE SUB pal3 (r!, g!, b!)\r
+DECLARE SUB mkfont ()\r
+DECLARE SUB pal2 (r!, g!, b!)\r
+DECLARE SUB box1 (x1!, y1!, x2!, y2!, c!)\r
+DECLARE SUB mkback ()\r
+DECLARE SUB displaySlide2 ()\r
+DECLARE SUB resiz ()\r
+DECLARE SUB pri (x!, y!, a$, c!)\r
+DECLARE SUB deca (xs!, ys!, fx!, fy!)\r
+DECLARE SUB box (xs!, ys!)\r
+DECLARE SUB displayEffect4 ()\r
+DECLARE SUB displayEffect3 ()\r
+DECLARE SUB displayEffect2 ()\r
+DECLARE SUB displayEffect1 ()\r
+DECLARE SUB start ()\r
+DECLARE SUB sc1 ()\r
+DECLARE SUB pal (x!)\r
+DIM SHARED fontt(0 TO 7, 0 TO 7, 0 TO 255)\r
+DIM SHARED tim\r
+DIM SHARED tim2\r
+DIM SHARED jas(1 TO 500)\r
+DIM SHARED pii\r
+DIM SHARED tmr\r
+DIM SHARED ink\r
+DIM SHARED tim$\r
+\r
+start\r
+\r
+CLS\r
+'GOTO 8\r
+\r
+displaySlide1\r
+displayEffect1\r
+displayEffect2\r
+displayEffect3\r
+\r
+displayEffect4\r
+displaySlide2\r
+displaySlide4\r
+8\r
+displaySlide5\r
+displaySlide6\r
+\r
+displayEffect7\r
+displaySlide3\r
+displayEffect5\r
+\r
+SYSTEM\r
+\r
+SUB box (xs, ys)\r
+' Draws a 3D style box border at the top-left corner of the screen\r
+' Parameters:\r
+'   xs - width of the box\r
+'   ys - height of the box\r
+\r
+LINE (0, 186)-(0 + xs, 186 - ys), 15, B\r
+LINE (1, 187)-(-1 + xs, 187 - ys), 25, B\r
+LINE (2, 188)-(-2 + xs, 188 - ys), 15, B\r
+PSET (0, 188), 0\r
+PSET (0 + xs, 188), 0\r
+PSET (0, 186 - ys), 0\r
+PSET (0 + xs, 186 - ys), 0\r
+END SUB\r
+\r
+DEFINT Z\r
+SUB box1 (x1, y1, x2, y2, c)\r
+\r
+' Draws a shaded box with a 3D effect\r
+' Parameters:\r
+'   x1, y1 - top-left corner coordinates\r
+'   x2, y2 - bottom-right corner coordinates\r
+'   c - type of shading\r
+\r
+IF c = 1 THEN za = 51 ELSE za = 102\r
+\r
+FOR zy = y1 + 7 TO y2 + 7\r
+FOR zx = x1 + 7 TO x2 + 7\r
+zc = POINT(zx, zy)\r
+IF zc < 51 THEN\r
+IF zc > 25 THEN zc = 50 - zc\r
+zc = zc / 2\r
+PSET (zx, zy), zc\r
+END IF\r
+NEXT zx\r
+NEXT zy\r
+\r
+FOR zy = y1 TO y2\r
+FOR zx = x1 TO x2\r
+zc = POINT(zx, zy)\r
+IF zc > 50 THEN zc = zc - 51\r
+PSET (zx, zy), zc + za\r
+NEXT zx\r
+NEXT zy\r
+\r
+END SUB\r
+\r
+DEFSNG Z\r
+SUB deca (xs, ys, fx, fy)\r
+LINE (0, 185 - ys)-(xs, 185 - ys + fy), 0, BF\r
+LINE (xs, 18 - ys)-(xs - fx, 188), 0, BF\r
+xs = xs - fx\r
+ys = ys - fy\r
+box xs, ys\r
+END SUB\r
+\r
+SUB displayEffect1\r
+\r
+pal 3\r
+\r
+DIM buf1(1 TO 10000)\r
+DIM buf2(1 TO 10000)\r
+DIM buf3(1 TO 400)\r
+\r
+FOR a = 1 TO 320\r
+buf3(a) = 200\r
+NEXT a\r
+\r
+b = 0\r
+c1 = 1\r
+setink 10\r
+1\r
+c1 = c1 + 1\r
+IF c1 > 50 THEN c1 = 1\r
+LINE (0, 40)-(0, 43), c1\r
+c2 = c1\r
+IF c2 > 25 THEN c2 = 50 - c2\r
+c2 = c2 - 5\r
+IF c2 < 0 THEN c2 = 0\r
+PSET (0, 39), c2\r
+PSET (0, 44), c2\r
+LINE (319, 76)-(319, 79), c1\r
+PSET (319, 75), c2\r
+PSET (319, 80), c2\r
+\r
+GET (0, 39)-(318, 44), buf1(1)\r
+PUT (1, 39), buf1(1), PSET\r
+\r
+GET (1, 75)-(319, 80), buf1(1)\r
+PUT (0, 75), buf1(1), PSET\r
+\r
+b = b + 1\r
+buf3(271) = SIN(b / 50 + 1.57) * 30 + 160\r
+FOR x = 50 TO 270\r
+PSET (x, buf3(x) - 1), 0\r
+IF x > 50 THEN\r
+PSET (x, buf3(x)), 15\r
+PSET (x, buf3(x) + 1), 20\r
+PSET (x, buf3(x) + 2), 25\r
+END IF\r
+buf3(x) = buf3(x + 1)\r
+NEXT x\r
+\r
+a = 50\r
+FOR x = 65 + 18 TO 270 STEP 40\r
+a = a + 1\r
+IF buf3(x - 1) < 190 THEN\r
+mkjuku x, buf3(x - 1) - 27, x, 0\r
+mkjuku x, buf3(x) - 27, x, a\r
+END IF\r
+NEXT x\r
+\r
+inke a$\r
+SOUND 0, .4\r
+IF a$ = "" THEN GOTO 1\r
+\r
+END SUB\r
+\r
+SUB displayEffect2\r
+\r
+FOR a = 1 TO 30\r
+e = 0\r
+c = (3.8 * (30 - a)) / 30\r
+\r
+FOR f = 0 TO 50\r
+IF f < 25 THEN e = e + 4 ELSE e = e - c\r
+OUT &H3C8, f\r
+OUT &H3C9, e / 4\r
+OUT &H3C9, e / 1.9\r
+OUT &H3C9, e / 3\r
+NEXT f\r
+\r
+FOR b = 1 TO 3\r
+SOUND 0, .3\r
+NEXT b\r
+NEXT a\r
+\r
+FOR a = 20 TO 0 STEP -1\r
+b = (a * 4) / 20\r
+e = 0\r
+FOR f = 0 TO 60\r
+IF f < 25 THEN e = e + b\r
+OUT &H3C8, f\r
+OUT &H3C9, e / 4\r
+OUT &H3C9, e / 1.9\r
+OUT &H3C9, e / 3\r
+NEXT f\r
+\r
+FOR b = 1 TO 2\r
+SOUND 0, .3\r
+NEXT b\r
+\r
+NEXT a\r
+\r
+END SUB\r
+\r
+SUB displayEffect3\r
+SCREEN 7\r
+SCREEN 7, , , 1\r
+\r
+OUT &H3C8, 1\r
+OUT &H3C9, 64 / 4\r
+OUT &H3C9, 64 / 1.9\r
+OUT &H3C9, 64 / 3\r
+\r
+b = 2\r
+c = .01\r
+2\r
+x = x + 1\r
+y = y + 1\r
+c = c + .01\r
+b = b + c\r
+\r
+FOR a = 0 TO 160 STEP b\r
+LINE (160 + a, 0)-(160 + a, 199), 1\r
+LINE (160 - a, 0)-(160 - a, 199), 1\r
+LINE (0, 100 + a)-(319, 100 + a), 1\r
+LINE (0, 100 - a)-(319, 100 - a), 1\r
+NEXT a\r
+\r
+PCOPY 0, 1\r
+CLS\r
+SOUND 0, .4\r
+IF b < 50 THEN GOTO 2\r
+\r
+SCREEN 13\r
+pal 2\r
+\r
+FOR a = 0 TO 160 STEP b\r
+LINE (160 + a, 0)-(160 + a, 199), 25\r
+LINE (160 - a, 0)-(160 - a, 199), 25\r
+LINE (0, 100 + a)-(319, 100 + a), 25\r
+LINE (0, 100 - a)-(319, 100 - a), 25\r
+NEXT a\r
+\r
+resiz\r
+pal 3\r
+\r
+pri 11, 8, "-* A U T H O R S *-", 55\r
+pri 10, 11, CHR$(254) + " John Doe", 55\r
+pri 10, 13, CHR$(254) + " Jane Doe", 55\r
+pri 10, 15, CHR$(254) + " Anonymous", 55\r
+pri 20, 19, "year 2001", 55\r
+\r
+inpur\r
+CLS\r
+END SUB\r
+\r
+SUB displayEffect4\r
+pal 2\r
+xs = 317\r
+ys = 185\r
+box xs, ys\r
+tey = 20\r
+\r
+DIM buf4(1 TO 10000)\r
+\r
+b = 0\r
+setink 10\r
+COLOR 25\r
+4\r
+b = b + 1\r
+\r
+SELECT CASE b\r
+CASE 50 TO 200\r
+deca xs, ys, 1, 1\r
+\r
+CASE 201\r
+'pal4 255, 63, 45, 0\r
+'prin 10, tey, 2, 255, "Sources:"\r
+tey = tey + 20\r
+\r
+CASE 290\r
+pal4 254, 20, 20, 63\r
+prin 70, tey, 7, 254, "TEST"\r
+tey = tey + 60\r
+\r
+CASE 350\r
+pal4 254, 20, 20, 63\r
+prin 100, tey, 2, 254, "www.12345.com"\r
+tey = tey + 20\r
+\r
+CASE 400\r
+pal4 254, 20, 20, 63\r
+prin 100, tey, 2, 254, CHR$(16) + "Subject 1"\r
+tey = tey + 10\r
+\r
+END SELECT\r
+\r
+FOR a = 2 TO (xs - 5) / 8\r
+LOCATE 23, a\r
+PRINT CHR$(RND * 1 + 48)\r
+NEXT a\r
+\r
+FOR x = 3 TO xs - 3 STEP 8\r
+GET (x, 183 - ys + 14)-(x + 7, 183), buf4(1)\r
+PUT (x, 183 - ys + 6), buf4(1), PSET\r
+NEXT x\r
+\r
+inke a$\r
+\r
+IF a$ <> "" THEN GOTO 3\r
+wpr\r
+GOTO 4\r
+\r
+3\r
+END SUB\r
+\r
+SUB displayEffect5\r
+DIM buf(1 TO 5000)\r
+\r
+FOR a = 1 TO 1000\r
+x = RND * 298 + 1\r
+y = RND * 178 + 1\r
+GET (x, y)-(x + 19, y + 19), buf(1)\r
+IF RND * 100 < 50 THEN x = x + 1 ELSE x = x - 1\r
+IF RND * 100 < 50 THEN y = y + 1\r
+PUT (x, y), buf(1), PSET\r
+SOUND 0, .05\r
+NEXT a\r
+\r
+FOR a = 0 TO 100\r
+LINE (0, a)-(319, a), 0\r
+LINE (0, 200 - a)-(319, 200 - a), 0\r
+SOUND 0, .4\r
+NEXT a\r
+\r
+END SUB\r
+\r
+SUB displayEffect7\r
+pal 4\r
+mkback\r
+\r
+pal2 0, 0, 32\r
+box1 3, 3, 300, 50, 1\r
+\r
+pal4 255, 50, 50, 0\r
+prin 10, 10, 2, 255, "Et dolore magna"\r
+prin 50, 30, 1, 255, "www.utenimadminim.org"\r
+\r
+pal3 20, 32, 63\r
+box1 20, 40, 290, 180, 2\r
+\r
+pal4 254, 63, 45, 0\r
+b = 25\r
+prin 40, 60, 1, 254, CHR$(254) + " Ut enim ad minim veniam"\r
+a = b\r
+prin 40, 60 + a, 1, 254, CHR$(254) + " Quis nostrud exercitation"\r
+a = a + b\r
+prin 40, 60 + a, 1, 254, CHR$(254) + " Laboris nisi ut aliquip ex"\r
+a = a + b\r
+prin 40, 60 + a, 1, 254, CHR$(254) + " Sed ut perspiciatis unde"\r
+\r
+inpur\r
+\r
+END SUB\r
+\r
+SUB displaySlide1\r
+\r
+pal 2\r
+LOCATE 1, 1\r
+COLOR 1\r
+PRINT "HEADER"\r
+\r
+FOR x = 0 TO 80\r
+FOR y = 0 TO 16\r
+c = POINT(x, y)\r
+IF c > 0 THEN c1 = 50 ELSE c1 = 0\r
+LINE (x * 5 + 35, y * 3 + 50)-(x * 5 + 4 + 35, y * 3 + 2 + 50), c1, BF\r
+NEXT y\r
+NEXT x\r
+\r
+LOCATE 1, 1\r
+PRINT "      "\r
+\r
+FOR y = 30 TO 80\r
+FOR x = 0 TO 319\r
+c = POINT(x, y)\r
+c1 = (c1 * 1 + c) / 2\r
+PSET (x, y), c1\r
+NEXT x\r
+NEXT y\r
+\r
+FOR x = 0 TO 319\r
+FOR y = 30 TO 80\r
+c = POINT(x, y)\r
+c1 = (c1 * 1 + c) / 2\r
+PSET (x, y), c1\r
+NEXT y\r
+NEXT x\r
+\r
+FOR y = 30 TO 80\r
+FOR x = 319 TO 0 STEP -1\r
+c = POINT(x, y)\r
+c1 = (c1 * 1 + c) / 2\r
+PSET (x, y), c1\r
+NEXT x\r
+NEXT y\r
+\r
+FOR x = 0 TO 319\r
+FOR y = 80 TO 30 STEP -1\r
+c = POINT(x, y)\r
+c1 = (c1 * 1 + c) / 2\r
+PSET (x, y), c1\r
+NEXT y\r
+NEXT x\r
+\r
+END SUB\r
+\r
+SUB displaySlide2\r
+\r
+CLS\r
+pal 4\r
+mkback\r
+\r
+pal2 40, 64, 63\r
+pal3 0, 0, 0\r
+\r
+box1 30, 30, 290, 170, 1\r
+\r
+prin 65, 50, 3, 0, "Goal:"\r
+\r
+prin 40, 100, 1, 0, CHR$(254) + " Random text"\r
+prin 40, 108, 1, 0, "  goes here to test"\r
+prin 40, 116, 1, 0, "  text layout."\r
+prin 40, 130, 1, 0, CHR$(254) + " Testing 123."\r
+\r
+inpur\r
+\r
+END SUB\r
+\r
+SUB displaySlide3\r
+mkback\r
+\r
+pal2 64, 64, 0\r
+box1 30, 30, 290, 150, 1\r
+\r
+prin 57, 50, 3, 0, "Thank you"\r
+prin 45, 74, 3, 0, "   for"\r
+prin 45, 98, 3, 0, "attention"\r
+inpur\r
+\r
+END SUB\r
+\r
+SUB displaySlide4\r
+\r
+pal 4\r
+mkback\r
+\r
+pal2 0, 0, 32\r
+box1 3, 3, 260, 50, 1\r
+\r
+pal4 255, 50, 50, 0\r
+prin 10, 10, 2, 255, "Random header"\r
+prin 50, 30, 1, 255, "www.randomsite.org"\r
+\r
+pal3 10, 20, 0\r
+box1 20, 40, 290, 180, 2\r
+\r
+pal4 254, 63, 45, 0\r
+\r
+b = 25\r
+prin 40, 60, 1, 254, CHR$(254) + " Lorem ipsum dolor sit amet,"\r
+a = b\r
+prin 40, 60 + a, 1, 254, CHR$(254) + " consectetur adipiscing elit,"\r
+a = a + b\r
+prin 40, 60 + a, 1, 254, CHR$(254) + " sed do eiusmod"\r
+a = a + b\r
+prin 40, 60 + a, 1, 254, CHR$(254) + " tempor incididunt ut labore"\r
+\r
+inpur\r
+\r
+END SUB\r
+\r
+SUB displaySlide5\r
+pal 4\r
+mkback\r
+\r
+pal2 0, 0, 32\r
+box1 3, 3, 300, 50, 1\r
+\r
+pal4 255, 50, 50, 0\r
+prin 10, 10, 2, 255, "Totam rem aperiam"\r
+prin 50, 30, 1, 255, "www.randomurl.org"\r
+\r
+pal3 20, 32, 63\r
+box1 20, 40, 290, 180, 2\r
+\r
+pal4 254, 63, 45, 0\r
+b = 25\r
+prin 40, 60, 1, 254, CHR$(254) + " Nemo enim ipsam voluptatem"\r
+a = b\r
+prin 40, 60 + a, 1, 254, CHR$(254) + " Sed quia consequuntur"\r
+a = a + b\r
+prin 40, 60 + a, 1, 254, CHR$(254) + " Magni dolores eos"\r
+a = a + b\r
+prin 40, 60 + a, 1, 254, CHR$(254) + " Qui ratione voluptatem"\r
+\r
+inpur\r
+\r
+END SUB\r
+\r
+SUB displaySlide6\r
+pal 4\r
+mkback\r
+\r
+pal2 0, 0, 32\r
+box1 3, 3, 300, 50, 1\r
+\r
+pal4 255, 50, 50, 0\r
+prin 10, 10, 2, 255, "H E L L O !"\r
+prin 50, 30, 1, 255, "www.hello.net"\r
+\r
+pal3 30, 20, 10\r
+box1 20, 40, 290, 180, 2\r
+\r
+pal4 254, 63, 45, 0\r
+b = 25\r
+prin 40, 60, 1, 254, CHR$(254) + " Quis autem vel eum"\r
+a = b\r
+prin 40, 60 + a, 1, 254, CHR$(254) + " Iure reprehenderit qui"\r
+a = a + b\r
+prin 40, 60 + a, 1, 254, CHR$(254) + " In ea voluptate velit"\r
+a = a + b\r
+prin 40, 60 + a, 1, 254, CHR$(254) + " Esse quam nihil molestiae"\r
+\r
+inpur\r
+\r
+END SUB\r
+\r
+SUB inke (a$)\r
+IF tim$ <> TIME$ THEN\r
+ink = ink - 1\r
+tim$ = TIME$\r
+END IF\r
+IF (ink <= 0) AND (tmr = 1) THEN a$ = " " ELSE a$ = ""\r
+IF INKEY$ <> "" THEN a$ = " "\r
+END SUB\r
+\r
+SUB inpur\r
+setink 10\r
+11\r
+inke a$\r
+IF a$ = "" THEN GOTO 11\r
+END SUB\r
+\r
+DEFINT A-Z\r
+SUB mkback\r
+CLS\r
+lm1 = 0\r
+lm2 = 50\r
+\r
+s = 2 ^ 7\r
+\r
+7\r
+s = s \ 2\r
+\r
+FOR y = 0 TO 199 STEP s\r
+FOR x = 0 TO 319 STEP s\r
+\r
+c1 = POINT(x, y)\r
+c2 = POINT(x + s, y)\r
+c3 = POINT(x, y + s)\r
+c4 = POINT(x + s, y + s)\r
+\r
+sp = s \ 2\r
+\r
+c5 = (c1 + c2 + c3 + c4) / 4 + RND * s - sp\r
+IF c5 > lm2 THEN c5 = lm2\r
+IF c5 < lm1 THEN c5 = lm1\r
+\r
+c6 = (c2 + c4) / 2 + RND * s - sp\r
+IF c6 > lm2 THEN c6 = lm2\r
+IF c6 < lm1 THEN c6 = lm1\r
+\r
+c7 = (c3 + c4) / 2 + RND * s - sp\r
+IF c7 > lm2 THEN c7 = lm2\r
+IF c7 < lm1 THEN c7 = lm1\r
+\r
+IF INT(RND * 30) = 2 THEN c5 = 50\r
+PSET (x + sp, y + sp), c5\r
+PSET (x + s, y + sp), c6\r
+PSET (x + sp, y + s), c7\r
+\r
+NEXT x\r
+NEXT y\r
+IF s > 2 THEN GOTO 7\r
+END SUB\r
+\r
+DEFSNG A-Z\r
+SUB mkfont\r
+SCREEN 13\r
+FOR a = 0 TO 255\r
+LOCATE 1, 1\r
+IF a <> 7 THEN PRINT CHR$(a)\r
+\r
+FOR y = 0 TO 7\r
+FOR x = 0 TO 7\r
+fontt(x, y, a) = POINT(x, y)\r
+NEXT x\r
+NEXT y\r
+NEXT a\r
+\r
+END SUB\r
+\r
+SUB mkjuku (x, y, a, c)\r
+jas(a) = jas(a) + .08\r
+IF jas(a) > 30000 THEN jas(a) = 0\r
+b = jas(a)\r
+IF c = 0 THEN b = jas(a) - .08\r
+x1 = x + COS(b) * 10\r
+y1 = y + SIN(b) * 5 + 20\r
+\r
+x2 = x + COS(b) * 5 + 2\r
+y2 = y + SIN(b) * 3 + 10\r
+\r
+x3 = x + COS(b + 1) * 2\r
+y3 = y + SIN(b + 1) * 2 + 2\r
+\r
+LINE (x2, y2)-(x1, y1), c\r
+LINE (x2, y2)-(x3, y3), c\r
+\r
+x1 = x + COS(b + pii) * 10\r
+y1 = y + SIN(b + pii) * 5 + 20\r
+\r
+x2 = x + COS(b + pii) * 5 + 2\r
+y2 = y + SIN(b + pii) * 3 + 10\r
+\r
+LINE (x2, y2)-(x1, y1), c\r
+LINE (x2, y2)-(x3, y3), c\r
+\r
+x4 = x + COS(b + 1.2) * 3 - 1\r
+y4 = y + SIN(b + 1.2) * 1 - 10\r
+\r
+LINE (x4, y4)-(x3, y3), c\r
+\r
+x5 = x + COS(b + .5) * 13 - 3\r
+y5 = y + SIN(b + .5) * 2 + 1\r
+\r
+x6 = x + COS(b + .5) * 15 - 1\r
+y6 = y + SIN(b + .5) * 3 + 4\r
+\r
+LINE (x5, y5)-(x4, y4), c\r
+LINE (x5, y5)-(x6, y6), c\r
+\r
+x5 = x + COS(b + pii) * 13 - 3\r
+y5 = y + SIN(b + pii) * 2 + 1\r
+\r
+x6 = x + COS(b + pii) * 15 - 1\r
+y6 = y + SIN(b + pii) * 3 + 4\r
+\r
+LINE (x5, y5)-(x4, y4), c\r
+LINE (x5, y5)-(x6, y6), c\r
+\r
+x7 = x + COS(b + 1.2) * 2\r
+y7 = y + SIN(b + 1.2) * 1 - 14\r
+\r
+LINE (x7, y7 + 2)-(x4, y4), c\r
+\r
+CIRCLE (x7, y7), 3, c\r
+\r
+\r
+\r
+END SUB\r
+\r
+SUB pal (x)\r
+SELECT CASE x\r
+CASE 1\r
+\r
+FOR f = 0 TO 25\r
+OUT &H3C8, f\r
+OUT &H3C9, f * 4.1\r
+OUT &H3C9, f * 4.1\r
+OUT &H3C9, f * 4.1\r
+NEXT f\r
+\r
+CASE 2\r
+e = 0\r
+FOR f = 0 TO 50\r
+IF f < 25 THEN e = e + 4 ELSE e = e - 3.8\r
+OUT &H3C8, f\r
+OUT &H3C9, e / 4\r
+OUT &H3C9, e / 1.9\r
+OUT &H3C9, e / 3\r
+NEXT f\r
+CASE 3\r
+\r
+FOR f = 51 TO 60\r
+OUT &H3C8, f\r
+OUT &H3C9, SIN(f) * 30 + 30\r
+OUT &H3C9, SIN(f * 2) * 30 + 30\r
+OUT &H3C9, SIN(f * 3) * 30 + 30\r
+NEXT f\r
+\r
+CASE 4\r
+FOR f = 0 TO 25\r
+OUT &H3C8, f\r
+OUT &H3C9, f * 2.5\r
+OUT &H3C9, f * 2.5\r
+OUT &H3C9, f * 1.5\r
+NEXT f\r
+FOR f = 26 TO 50\r
+OUT &H3C8, f\r
+OUT &H3C9, (50 - f) * 2.5\r
+OUT &H3C9, (50 - f) * 2.5\r
+OUT &H3C9, (50 - f) * 1.5\r
+NEXT f\r
+\r
+END SELECT\r
+\r
+END SUB\r
+\r
+SUB pal2 (r, g, b)\r
+FOR f = 0 TO 25\r
+OUT &H3C8, f + 51\r
+OUT &H3C9, (f * 2.5 + r * 1) / 2\r
+OUT &H3C9, (f * 2.5 + g * 1) / 2\r
+OUT &H3C9, (f * 1.5 + b * 1) / 2\r
+NEXT f\r
+FOR f = 26 TO 50\r
+OUT &H3C8, f + 51\r
+OUT &H3C9, ((50 - f) * 2.5 + r * 1) / 2\r
+OUT &H3C9, ((50 - f) * 2.5 + g * 1) / 2\r
+OUT &H3C9, ((50 - f) * 1.5 + b * 1) / 2\r
+NEXT f\r
+END SUB\r
+\r
+SUB pal3 (r, g, b)\r
+FOR f = 0 TO 25\r
+OUT &H3C8, f + 102\r
+OUT &H3C9, (f * 2.5 + r * 1) / 2\r
+OUT &H3C9, (f * 2.5 + g * 1) / 2\r
+OUT &H3C9, (f * 1.5 + b * 1) / 2\r
+NEXT f\r
+FOR f = 26 TO 50\r
+OUT &H3C8, f + 102\r
+OUT &H3C9, ((50 - f) * 2.5 + r * 1) / 2\r
+OUT &H3C9, ((50 - f) * 2.5 + g * 1) / 2\r
+OUT &H3C9, ((50 - f) * 1.5 + b * 1) / 2\r
+NEXT f\r
+END SUB\r
+\r
+SUB pal4 (c, r!, g!, b!)\r
+OUT &H3C8, c\r
+OUT &H3C9, r\r
+OUT &H3C9, g\r
+OUT &H3C9, b\r
+END SUB\r
+\r
+SUB pr (x, y, s, c, n, a$)\r
+IF n > LEN(a$) THEN GOTO 10\r
+a$ = RIGHT$(LEFT$(a$, n), 1)\r
+x1 = n * 8 * s + x\r
+prin x1, y, s, c, a$\r
+10\r
+END SUB\r
+\r
+SUB pri (x, y, a$, c)\r
+COLOR c\r
+FOR a = 1 TO LEN(a$)\r
+b$ = RIGHT$(LEFT$(a$, a), 1)\r
+LOCATE y, x + a\r
+PRINT b$\r
+SOUND 0, 1\r
+NEXT a\r
+\r
+END SUB\r
+\r
+SUB prin (x1, y1, s, c1, a$)\r
+\r
+FOR a = 1 TO LEN(a$)\r
+b = ASC(RIGHT$(LEFT$(a$, a), 1))\r
+c = (a - 1) * 8 * s + x1\r
+FOR y = 0 TO 7\r
+FOR x = 0 TO 7\r
+IF fontt(x, y, b) > 0 THEN\r
+LINE (x * s + c, y * s + y1)-(x * s + s - 1 + c, y * s + s - 1 + y1), c1, BF\r
+END IF\r
+NEXT x\r
+NEXT y\r
+\r
+NEXT a\r
+\r
+END SUB\r
+\r
+SUB resiz\r
+\r
+FOR a = 1 TO 10\r
+CIRCLE (160, 100), a, a * 2 + 5\r
+NEXT a\r
+PSET (160, 100), 0\r
+\r
+DIM buff1(1 TO 10000)\r
+DIM buff2(1 TO 10000)\r
+\r
+a = 10\r
+GET (160 - a, 90)-(160, 110), buff1(1)\r
+GET (160, 90)-(160 + a, 110), buff2(1)\r
+5\r
+PUT (159 - a, 90), buff1(1), PSET\r
+PUT (150 + a, 90), buff2(1), PSET\r
+a = a + 1\r
+SOUND 0, .2\r
+IF a < 140 THEN GOTO 5\r
+\r
+a = 1\r
+\r
+GET (20, 90)-(300, 100), buff1(1)\r
+GET (20, 100)-(300, 110), buff2(1)\r
+6\r
+PUT (20, 90 - a), buff1(1), PSET\r
+PUT (20, 100 + a), buff2(1), PSET\r
+\r
+a = a + 1\r
+SOUND 0, .2\r
+IF a < 60 THEN GOTO 6\r
+END SUB\r
+\r
+SUB setink (a!)\r
+ink = a\r
+tim$ = TIME$\r
+END SUB\r
+\r
+SUB start\r
+SCREEN 13\r
+RANDOMIZE TIMER\r
+\r
+mkfont\r
+tim = 0\r
+tim2 = 0\r
+\r
+FOR a = 1 TO 500\r
+jas(a) = RND * 10\r
+NEXT a\r
+\r
+pii = 3.14\r
+IF COMMAND$ = "t" OR COMMAND$ = "T" THEN\r
+tmr = 1\r
+PRINT "timer is on"\r
+SLEEP 1\r
+ELSE\r
+tmr = 0\r
+END IF\r
+END SUB\r
+\r
+SUB wpr\r
+tim = tim + 1\r
+IF tim \ 10 = tim / 10 THEN\r
+a = tim / 10\r
+SELECT CASE tim2\r
+CASE 0\r
+IF a = 10 THEN tim2 = 1: tim = 0: pal4 255, 63, 45, 0\r
+CASE 1\r
+pr 10, 10, 2, 255, a, "Sources:"\r
+\r
+END SELECT\r
+END IF\r
+END SUB\r
+\r
diff --git a/2D GFX/People.webm b/2D GFX/People.webm
new file mode 100644 (file)
index 0000000..a86b52f
Binary files /dev/null and b/2D GFX/People.webm differ
diff --git a/2D GFX/Spirals/index.html b/2D GFX/Spirals/index.html
new file mode 100644 (file)
index 0000000..15c9c96
--- /dev/null
@@ -0,0 +1,944 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<!-- 2025-07-28 ma 03:32 -->
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+<meta name="viewport" content="width=device-width, initial-scale=1" />
+<title>Spiral series</title>
+<meta name="generator" content="Org Mode" />
+<style>
+  #content { max-width: 60em; margin: auto; }
+  .title  { text-align: center;
+             margin-bottom: .2em; }
+  .subtitle { text-align: center;
+              font-size: medium;
+              font-weight: bold;
+              margin-top:0; }
+  .todo   { font-family: monospace; color: red; }
+  .done   { font-family: monospace; color: green; }
+  .priority { font-family: monospace; color: orange; }
+  .tag    { background-color: #eee; font-family: monospace;
+            padding: 2px; font-size: 80%; font-weight: normal; }
+  .timestamp { color: #bebebe; }
+  .timestamp-kwd { color: #5f9ea0; }
+  .org-right  { margin-left: auto; margin-right: 0px;  text-align: right; }
+  .org-left   { margin-left: 0px;  margin-right: auto; text-align: left; }
+  .org-center { margin-left: auto; margin-right: auto; text-align: center; }
+  .underline { text-decoration: underline; }
+  #postamble p, #preamble p { font-size: 90%; margin: .2em; }
+  p.verse { margin-left: 3%; }
+  pre {
+    border: 1px solid #e6e6e6;
+    border-radius: 3px;
+    background-color: #f2f2f2;
+    padding: 8pt;
+    font-family: monospace;
+    overflow: auto;
+    margin: 1.2em;
+  }
+  pre.src {
+    position: relative;
+    overflow: auto;
+  }
+  pre.src:before {
+    display: none;
+    position: absolute;
+    top: -8px;
+    right: 12px;
+    padding: 3px;
+    color: #555;
+    background-color: #f2f2f299;
+  }
+  pre.src:hover:before { display: inline; margin-top: 14px;}
+  /* Languages per Org manual */
+  pre.src-asymptote:before { content: 'Asymptote'; }
+  pre.src-awk:before { content: 'Awk'; }
+  pre.src-authinfo::before { content: 'Authinfo'; }
+  pre.src-C:before { content: 'C'; }
+  /* pre.src-C++ doesn't work in CSS */
+  pre.src-clojure:before { content: 'Clojure'; }
+  pre.src-css:before { content: 'CSS'; }
+  pre.src-D:before { content: 'D'; }
+  pre.src-ditaa:before { content: 'ditaa'; }
+  pre.src-dot:before { content: 'Graphviz'; }
+  pre.src-calc:before { content: 'Emacs Calc'; }
+  pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
+  pre.src-fortran:before { content: 'Fortran'; }
+  pre.src-gnuplot:before { content: 'gnuplot'; }
+  pre.src-haskell:before { content: 'Haskell'; }
+  pre.src-hledger:before { content: 'hledger'; }
+  pre.src-java:before { content: 'Java'; }
+  pre.src-js:before { content: 'Javascript'; }
+  pre.src-latex:before { content: 'LaTeX'; }
+  pre.src-ledger:before { content: 'Ledger'; }
+  pre.src-lisp:before { content: 'Lisp'; }
+  pre.src-lilypond:before { content: 'Lilypond'; }
+  pre.src-lua:before { content: 'Lua'; }
+  pre.src-matlab:before { content: 'MATLAB'; }
+  pre.src-mscgen:before { content: 'Mscgen'; }
+  pre.src-ocaml:before { content: 'Objective Caml'; }
+  pre.src-octave:before { content: 'Octave'; }
+  pre.src-org:before { content: 'Org mode'; }
+  pre.src-oz:before { content: 'OZ'; }
+  pre.src-plantuml:before { content: 'Plantuml'; }
+  pre.src-processing:before { content: 'Processing.js'; }
+  pre.src-python:before { content: 'Python'; }
+  pre.src-R:before { content: 'R'; }
+  pre.src-ruby:before { content: 'Ruby'; }
+  pre.src-sass:before { content: 'Sass'; }
+  pre.src-scheme:before { content: 'Scheme'; }
+  pre.src-screen:before { content: 'Gnu Screen'; }
+  pre.src-sed:before { content: 'Sed'; }
+  pre.src-sh:before { content: 'shell'; }
+  pre.src-sql:before { content: 'SQL'; }
+  pre.src-sqlite:before { content: 'SQLite'; }
+  /* additional languages in org.el's org-babel-load-languages alist */
+  pre.src-forth:before { content: 'Forth'; }
+  pre.src-io:before { content: 'IO'; }
+  pre.src-J:before { content: 'J'; }
+  pre.src-makefile:before { content: 'Makefile'; }
+  pre.src-maxima:before { content: 'Maxima'; }
+  pre.src-perl:before { content: 'Perl'; }
+  pre.src-picolisp:before { content: 'Pico Lisp'; }
+  pre.src-scala:before { content: 'Scala'; }
+  pre.src-shell:before { content: 'Shell Script'; }
+  pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
+  /* additional language identifiers per "defun org-babel-execute"
+       in ob-*.el */
+  pre.src-cpp:before  { content: 'C++'; }
+  pre.src-abc:before  { content: 'ABC'; }
+  pre.src-coq:before  { content: 'Coq'; }
+  pre.src-groovy:before  { content: 'Groovy'; }
+  /* additional language identifiers from org-babel-shell-names in
+     ob-shell.el: ob-shell is the only babel language using a lambda to put
+     the execution function name together. */
+  pre.src-bash:before  { content: 'bash'; }
+  pre.src-csh:before  { content: 'csh'; }
+  pre.src-ash:before  { content: 'ash'; }
+  pre.src-dash:before  { content: 'dash'; }
+  pre.src-ksh:before  { content: 'ksh'; }
+  pre.src-mksh:before  { content: 'mksh'; }
+  pre.src-posh:before  { content: 'posh'; }
+  /* Additional Emacs modes also supported by the LaTeX listings package */
+  pre.src-ada:before { content: 'Ada'; }
+  pre.src-asm:before { content: 'Assembler'; }
+  pre.src-caml:before { content: 'Caml'; }
+  pre.src-delphi:before { content: 'Delphi'; }
+  pre.src-html:before { content: 'HTML'; }
+  pre.src-idl:before { content: 'IDL'; }
+  pre.src-mercury:before { content: 'Mercury'; }
+  pre.src-metapost:before { content: 'MetaPost'; }
+  pre.src-modula-2:before { content: 'Modula-2'; }
+  pre.src-pascal:before { content: 'Pascal'; }
+  pre.src-ps:before { content: 'PostScript'; }
+  pre.src-prolog:before { content: 'Prolog'; }
+  pre.src-simula:before { content: 'Simula'; }
+  pre.src-tcl:before { content: 'tcl'; }
+  pre.src-tex:before { content: 'TeX'; }
+  pre.src-plain-tex:before { content: 'Plain TeX'; }
+  pre.src-verilog:before { content: 'Verilog'; }
+  pre.src-vhdl:before { content: 'VHDL'; }
+  pre.src-xml:before { content: 'XML'; }
+  pre.src-nxml:before { content: 'XML'; }
+  /* add a generic configuration mode; LaTeX export needs an additional
+     (add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
+  pre.src-conf:before { content: 'Configuration File'; }
+
+  table { border-collapse:collapse; }
+  caption.t-above { caption-side: top; }
+  caption.t-bottom { caption-side: bottom; }
+  td, th { vertical-align:top;  }
+  th.org-right  { text-align: center;  }
+  th.org-left   { text-align: center;   }
+  th.org-center { text-align: center; }
+  td.org-right  { text-align: right;  }
+  td.org-left   { text-align: left;   }
+  td.org-center { text-align: center; }
+  dt { font-weight: bold; }
+  .footpara { display: inline; }
+  .footdef  { margin-bottom: 1em; }
+  .figure { padding: 1em; }
+  .figure p { text-align: center; }
+  .equation-container {
+    display: table;
+    text-align: center;
+    width: 100%;
+  }
+  .equation {
+    vertical-align: middle;
+  }
+  .equation-label {
+    display: table-cell;
+    text-align: right;
+    vertical-align: middle;
+  }
+  .inlinetask {
+    padding: 10px;
+    border: 2px solid gray;
+    margin: 10px;
+    background: #ffffcc;
+  }
+  #org-div-home-and-up
+   { text-align: right; font-size: 70%; white-space: nowrap; }
+  textarea { overflow-x: auto; }
+  .linenr { font-size: smaller }
+  .code-highlighted { background-color: #ffff00; }
+  .org-info-js_info-navigation { border-style: none; }
+  #org-info-js_console-label
+    { font-size: 10px; font-weight: bold; white-space: nowrap; }
+  .org-info-js_search-highlight
+    { background-color: #ffff00; color: #000000; font-weight: bold; }
+  .org-svg { }
+</style>
+<style type="text/css">
+               body {
+                 max-width: 35cm !important;
+               }
+               #content {
+                 max-width: 80em !important;
+                 width: 90%;
+               }
+               </style>
+<link rel="stylesheet" type="text/css" href="https://thomasf.github.io/solarized-css/solarized-dark.min.css" />
+</head>
+<body>
+<div id="content" class="content">
+<h1 class="title">Spiral series</h1>
+<div id="table-of-contents" role="doc-toc">
+<h2>Table of Contents</h2>
+<div id="text-table-of-contents" role="doc-toc">
+<ul>
+<li><a href="#orga69a35d">1. Spiral with increasing density</a></li>
+<li><a href="#org48ee846">2. Spiral with varying height</a></li>
+<li><a href="#org4bb74ce">3. Shaded spiral</a></li>
+<li><a href="#orge767640">4. Sphere forming spiral</a></li>
+<li><a href="#org0c1d6ba">5. Textured spherical spiral</a></li>
+<li><a href="#org41561dd">6. Textured and shaded spherical spiral</a></li>
+</ul>
+</div>
+</div>
+<style>
+  .flex-center {
+    display: flex;            /* activate flexbox */
+    justify-content: center;  /* horizontally center anything inside   */
+  }
+
+  .flex-center video {
+    width: min(90%, 1000px); /* whichever is smaller wins */
+    height: auto;            /* preserve aspect ratio */
+  }
+
+  .responsive-img {
+    width: min(100%, 1000px);
+    height: auto;
+  }
+</style>
+
+<div id="outline-container-orga69a35d" class="outline-2">
+<h2 id="orga69a35d"><span class="section-number-2">1.</span> Spiral with increasing density</h2>
+<div class="outline-text-2" id="text-1">
+
+<div id="org9f588cc" class="figure">
+<p><img src="spiral.png" alt="spiral.png" class="responsive-img" />
+</p>
+</div>
+
+<p>
+From every point in the spiral, subdivided line is traced. Line
+segments are connected between the neighbors. Line segment count
+progressively increases towards the center.
+</p>
+
+<p>
+<a href="spiral.bas">spiral.bas</a>
+</p>
+
+<div class="org-src-container">
+<pre class="src src-basic-qb45"><span style="color: #bb99ee;">DECLARE</span> <span style="color: #bb99ee;">SUB</span> DrawLine (startX <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">DOUBLE</span>, startY <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">DOUBLE</span>, endX <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">DOUBLE</span>, endY <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">DOUBLE</span>, col <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>)
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Program to render fancy looking spiral.</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">This program is free software: released under Creative Commons Zero (CC0) license</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">by Svjatoslav Agejenko.</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Email: svjatoslav@svjatoslav.eu</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Homepage: http://www.svjatoslav.eu</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Changelog:</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2003.12, Initial version</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2024.08, Improved program readability</span>
+
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> lineVertexX(1 <span style="color: #bb99ee;">TO</span> 100) <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">DOUBLE</span>
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> lineVertexY(1 <span style="color: #bb99ee;">TO</span> 100) <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">DOUBLE</span>
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> depth <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> tempDepth <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>
+<span style="color: #ee8899;">SCREEN</span> 12
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Initialize the scale factor for the spiral</span>
+spiralScaleFactor = 200
+depth = 0
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Generate the spiral by iterating through angles and scaling appropriately</span>
+<span style="color: #bb99ee;">FOR</span> angle = 1 <span style="color: #bb99ee;">TO</span> 30 <span style="color: #bb99ee;">STEP</span> .1
+    <span style="color: #666677;">' </span><span style="color: #666677;">Calculate the current scale based on the remaining distance to the center</span>
+    spiralScaleFactor = (30 - angle) * 7
+    <span style="color: #666677;">' </span><span style="color: #666677;">Convert polar coordinates to cartesian for the current point</span>
+    xPosition = <span style="color: #88aaee;">SIN</span>(angle) * spiralScaleFactor + 200
+    yPosition = <span style="color: #88aaee;">COS</span>(angle) * spiralScaleFactor + 200
+    <span style="color: #666677;">' </span><span style="color: #666677;">Store the current depth (z-axis value)</span>
+    tempDepth = angle
+    <span style="color: #666677;">' </span><span style="color: #666677;">Draw a line from the previous point to the current point with a color based on depth</span>
+    DrawLine xPosition + (xPosition / 2) + (angle * 3), (yPosition - (xPosition / 3)) + (angle * 3), xPosition + 25, yPosition + 25 - (angle * 3), depth
+    <span style="color: #666677;">' </span><span style="color: #666677;">Set the color for the next segment</span>
+    depth = 15
+<span style="color: #bb99ee;">NEXT</span> angle
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Wait for user input to close the program</span>
+userInput$ = <span style="color: #88aaee;">INPUT$</span>(1)
+
+<span style="color: #bb99ee;">SUB</span> DrawLine (startX <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">DOUBLE</span>, startY <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">DOUBLE</span>, endX <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">DOUBLE</span>, endY <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">DOUBLE</span>, col <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>)
+    <span style="color: #666677;">' </span><span style="color: #666677;">Calculate the step increments for x and y based on the depth</span>
+    deltaX = (endX - startX) / tempDepth
+    deltaY = (endY - startY) / tempDepth
+
+    <span style="color: #bb99ee;">FOR</span> segmentIndex = 1 <span style="color: #bb99ee;">TO</span> tempDepth
+        <span style="color: #666677;">' </span><span style="color: #666677;">If there is a previous vertex, draw a line to the new starting point</span>
+        <span style="color: #bb99ee;">IF</span> lineVertexX(segmentIndex) &gt; 0 <span style="color: #bb99ee;">THEN</span> <span style="color: #ee8899;">LINE</span> (lineVertexX(segmentIndex), lineVertexY(segmentIndex))-(startX, startY), col
+        <span style="color: #666677;">' </span><span style="color: #666677;">Store the current starting point as the next vertex</span>
+        lineVertexX(segmentIndex) = startX
+        lineVertexY(segmentIndex) = startY
+        <span style="color: #666677;">' </span><span style="color: #666677;">Increment the starting point by the calculated deltas</span>
+        startX = startX + deltaX
+        startY = startY + deltaY
+        <span style="color: #666677;">' </span><span style="color: #666677;">Draw a line from the stored vertex to the new starting point</span>
+        <span style="color: #ee8899;">LINE</span> (lineVertexX(segmentIndex), lineVertexY(segmentIndex))-(startX, startY), col
+    <span style="color: #bb99ee;">NEXT</span> segmentIndex
+<span style="color: #bb99ee;">END</span> <span style="color: #bb99ee;">SUB</span>
+</pre>
+</div>
+</div>
+</div>
+
+<div id="outline-container-org48ee846" class="outline-2">
+<h2 id="org48ee846"><span class="section-number-2">2.</span> Spiral with varying height</h2>
+<div class="outline-text-2" id="text-2">
+
+<div id="orgcabbf76" class="figure">
+<p><img src="spiral, 2.png" alt="spiral, 2.png" class="responsive-img" />
+</p>
+</div>
+
+<p>
+From every point in the spiral, subdivided line is traced. Line
+segments are connected between the neighbors. This creates effect
+where lines run from edges towards the center. Center is vertically
+displaced by sinus function where input is the distance to the center.
+</p>
+
+<p>
+<a href="spiral, 2.bas">spiral, 2.bas</a>
+</p>
+
+<div class="org-src-container">
+<pre class="src src-basic-qb45"><span style="color: #666677;">' </span><span style="color: #666677;">Program to render fancy looking spiral.</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">This program is free software: released under Creative Commons Zero (CC0) license</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">by Svjatoslav Agejenko.</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Email: svjatoslav@svjatoslav.eu</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Homepage: http://www.svjatoslav.eu</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Changelog:</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2003.12, Initial version</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2024.08, Improved program readability</span>
+
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> spiralX(1 <span style="color: #bb99ee;">TO</span> 10000) <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">SINGLE</span> <span style="color: #666677;">' </span><span style="color: #666677;">X coordinates of the spiral points</span>
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> spiralY(1 <span style="color: #bb99ee;">TO</span> 10000) <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">SINGLE</span> <span style="color: #666677;">' </span><span style="color: #666677;">Y coordinates of the spiral points</span>
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> pointCount <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span> <span style="color: #666677;">' </span><span style="color: #666677;">Total number of points plotted</span>
+<span style="color: #ee8899;">SCREEN</span> 12 <span style="color: #666677;">' </span><span style="color: #666677;">Set screen resolution to 640x480 with 16 colors</span>
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Initialize the scale factor for the spiral</span>
+scaleFactor = 200
+pointCount = 0
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Calculate and plot each point on the spiral</span>
+<span style="color: #bb99ee;">FOR</span> angle = 1 <span style="color: #bb99ee;">TO</span> 100 <span style="color: #bb99ee;">STEP</span> .05
+    pointCount = pointCount + 1
+    scaleFactor = 100 - angle <span style="color: #666677;">' </span><span style="color: #666677;">Update the scaling factor as the loop progresses</span>
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Calculate the X and Y coordinates based on the sine and cosine of the angle</span>
+    spiralX(pointCount) = <span style="color: #88aaee;">SIN</span>(angle) * scaleFactor * 3 + 320
+    spiralY(pointCount) = <span style="color: #88aaee;">COS</span>(angle) * scaleFactor + 300
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Apply a vertical displacement to create a more dynamic effect</span>
+    spiralY(pointCount) = spiralY(pointCount) + (<span style="color: #88aaee;">SIN</span>((angle + 20) / 10) * angle)
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Plot the point on the screen</span>
+    <span style="color: #ee8899;">PSET</span> (spiralX(pointCount), spiralY(pointCount)), 15
+<span style="color: #bb99ee;">NEXT</span> angle
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Draw lines between points to create the spiral effect</span>
+<span style="color: #bb99ee;">FOR</span> segmentStart = 1 <span style="color: #bb99ee;">TO</span> pointCount - 125
+    <span style="color: #ee8899;">LINE</span> (spiralX(segmentStart), spiralY(segmentStart)) - _
+         (spiralX(segmentStart + 125), spiralY(segmentStart + 125)), 15
+<span style="color: #bb99ee;">NEXT</span> segmentStart
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Wait for user input before exiting</span>
+a$ = <span style="color: #88aaee;">INPUT$</span>(1)
+<span style="color: #bb99ee;">END</span> <span style="color: #666677;">' </span><span style="color: #666677;">Exit the program</span>
+</pre>
+</div>
+</div>
+</div>
+
+<div id="outline-container-org4bb74ce" class="outline-2">
+<h2 id="org4bb74ce"><span class="section-number-2">3.</span> Shaded spiral</h2>
+<div class="outline-text-2" id="text-3">
+
+<div id="orga4b5761" class="figure">
+<p><img src="spiral, 3.png" alt="spiral, 3.png" class="responsive-img" />
+</p>
+</div>
+
+<p>
+Similar to previous spiral, Line segments are connected between the
+neighbors and sinus from the center decides vertical
+displacement. Attempt of shading is made where brighter areas have
+more detail.
+</p>
+
+<p>
+<a href="spiral, 3.bas">spiral, 3.bas</a>
+</p>
+
+<div class="org-src-container">
+<pre class="src src-basic-qb45"><span style="color: #666677;">' </span><span style="color: #666677;">Program to render fancy looking spiral with shaded surface.</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">This program is free software: released under Creative Commons Zero (CC0) license</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">by Svjatoslav Agejenko.</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Email: svjatoslav@svjatoslav.eu</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Homepage: http://www.svjatoslav.eu</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Changelog:</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2003.12, Initial version</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2024.08, Improved program readability</span>
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Declare shared arrays for storing coordinates and sine values</span>
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> spiralX(1 <span style="color: #bb99ee;">TO</span> 10000)
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> spiralY(1 <span style="color: #bb99ee;">TO</span> 10000)
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> sineValue1(1 <span style="color: #bb99ee;">TO</span> 10000)
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> sineValue2(1 <span style="color: #bb99ee;">TO</span> 10000)
+
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Set the screen mode to 640x480 with 16 colors</span>
+<span style="color: #ee8899;">SCREEN</span> 12
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Initialize the spiral rotation parameter</span>
+<span style="color: #bb99ee;">DIM</span> spiralRotation <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">SINGLE</span>
+spiralRotation = 0
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Generate and draw the spiral points</span>
+<span style="color: #bb99ee;">FOR</span> angle = 0 <span style="color: #bb99ee;">TO</span> 150 <span style="color: #bb99ee;">STEP</span> .05
+    spiralRotation = spiralRotation + 1
+    scaleFactor = 150 - angle
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Calculate the X and Y coordinates for the current point</span>
+    spiralX(spiralRotation) = <span style="color: #88aaee;">SIN</span>(angle) * scaleFactor * 3 + 320
+    spiralY(spiralRotation) = <span style="color: #88aaee;">COS</span>(angle) * scaleFactor + 300
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Apply additional vertical displacement based on a secondary sine function</span>
+    spiralY(spiralRotation) = spiralY(spiralRotation) + (<span style="color: #88aaee;">SIN</span>((angle + 20) / 10) * (angle / 5 + 1))
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Store the current sine values for later use</span>
+    sineValue1(spiralRotation) = <span style="color: #88aaee;">SIN</span>(angle)
+    sineValue2(spiralRotation) = <span style="color: #88aaee;">SIN</span>((angle + 20) / 10)
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Draw the current point on the screen</span>
+    <span style="color: #ee8899;">PSET</span> (spiralX(spiralRotation), spiralY(spiralRotation)), 15
+<span style="color: #bb99ee;">NEXT</span> angle
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Connect the points to form a continuous line</span>
+<span style="color: #bb99ee;">FOR</span> index = 1 <span style="color: #bb99ee;">TO</span> spiralRotation - 127
+    <span style="color: #666677;">' </span><span style="color: #666677;">Draw a line segment between points 126 steps apart</span>
+    <span style="color: #ee8899;">LINE</span> (spiralX(index), spiralY(index))-(spiralX(index + 126), spiralY(index + 126)), 15
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Initialize the line drawing flag</span>
+    <span style="color: #bb99ee;">DIM</span> drawLine <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>
+    drawLine = 1
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Check conditions to determine if a line segment should be drawn</span>
+    <span style="color: #bb99ee;">IF</span> sineValue1(index) &gt; .8 <span style="color: #88aaee;">AND</span> sineValue2(index) &lt; sineValue2(index + 125) <span style="color: #bb99ee;">THEN</span> drawLine = 0
+    <span style="color: #bb99ee;">IF</span> sineValue1(index) &lt; -.2 <span style="color: #88aaee;">AND</span> (sineValue2(index) - .4) &gt; sineValue2(index + 125) <span style="color: #bb99ee;">THEN</span> drawLine = 0
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Draw a line segment if the conditions are met</span>
+    <span style="color: #bb99ee;">IF</span> drawLine = 1 <span style="color: #bb99ee;">THEN</span> <span style="color: #ee8899;">LINE</span> (spiralX(index), spiralY(index))-(spiralX(index + 1), spiralY(index + 1)), 15
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Reset the line drawing flag and check for different conditions</span>
+    drawLine = 0
+    <span style="color: #bb99ee;">IF</span> sineValue1(index) &gt; .8 <span style="color: #88aaee;">AND</span> sineValue2(index) &gt; sineValue2(index + 125) <span style="color: #bb99ee;">THEN</span> drawLine = 1
+    <span style="color: #bb99ee;">IF</span> sineValue1(index) &lt; -.2 <span style="color: #88aaee;">AND</span> sineValue2(index) &lt; sineValue2(index + 125) <span style="color: #bb99ee;">THEN</span> drawLine = 1
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Draw a line segment if the conditions are met</span>
+    <span style="color: #bb99ee;">IF</span> drawLine = 1 <span style="color: #bb99ee;">THEN</span> <span style="color: #ee8899;">LINE</span> (spiralX(index), spiralY(index))-(spiralX(index + 127), spiralY(index + 127)), 15
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Reset the line drawing flag and check for another set of conditions</span>
+    drawLine = 0
+    <span style="color: #bb99ee;">IF</span> sineValue1(index) &gt; .9 <span style="color: #88aaee;">AND</span> sineValue2(index) &gt; sineValue2(index + 125) <span style="color: #bb99ee;">THEN</span> drawLine = 1
+    <span style="color: #bb99ee;">IF</span> sineValue1(index) &lt; -.5 <span style="color: #88aaee;">AND</span> sineValue2(index) &lt; sineValue2(index + 125) <span style="color: #bb99ee;">THEN</span> drawLine = 1
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Draw a line segment if the conditions are met</span>
+    <span style="color: #bb99ee;">IF</span> drawLine = 1 <span style="color: #bb99ee;">THEN</span> <span style="color: #ee8899;">LINE</span> (spiralX(index), spiralY(index))-(spiralX(index + 125), spiralY(index + 125)), 15
+<span style="color: #bb99ee;">NEXT</span> index
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Wait for a key press before exiting</span>
+a$ = <span style="color: #88aaee;">INPUT$</span>(1)
+</pre>
+</div>
+</div>
+</div>
+
+<div id="outline-container-orge767640" class="outline-2">
+<h2 id="orge767640"><span class="section-number-2">4.</span> Sphere forming spiral</h2>
+<div class="outline-text-2" id="text-4">
+<p>
+Similar to previous spiral, Line segments are connected between the
+neighbors. Spiral height and width are calculated such that they form
+multiple linked spherical shapes. Initially point cloud in shown:
+</p>
+
+
+<div id="org912e61d" class="figure">
+<p><img src="spiral, 4, 1.png" alt="spiral, 4, 1.png" class="responsive-img" />
+</p>
+</div>
+
+<p>
+In the next step, points are connected using lines:
+</p>
+
+
+<div id="org827f8e8" class="figure">
+<p><img src="spiral, 4, 2.png" alt="spiral, 4, 2.png" class="responsive-img" />
+</p>
+</div>
+
+
+<p>
+<a href="spiral, 4.bas">spiral, 4.bas</a>
+</p>
+
+<div class="org-src-container">
+<pre class="src src-basic-qb45"><span style="color: #666677;">' </span><span style="color: #666677;">Program to render fancy looking spiral.</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">This program is free software: released under Creative Commons Zero (CC0) license</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">by Svjatoslav Agejenko.</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Email: svjatoslav@svjatoslav.eu</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Homepage: http://www.svjatoslav.eu</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Changelog:</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2003.12, Initial version</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2024.08, Improved program readability</span>
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Declare shared arrays to hold the x and y coordinates of the spiral</span>
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> spiralX(1 <span style="color: #bb99ee;">TO</span> 10000)
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> spiralY(1 <span style="color: #bb99ee;">TO</span> 10000)
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Initialize the screen to a graphics mode with 640x480 resolution and 16 colors</span>
+<span style="color: #ee8899;">SCREEN</span> 12
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Constants for the initial size and the starting value of the index</span>
+<span style="color: #ee8899;">CONST</span> InitialSize = 100
+<span style="color: #ee8899;">CONST</span> StartIndex = 0
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Variable to keep track of the current position in the spiral arrays</span>
+<span style="color: #bb99ee;">DIM</span> torusIndex <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">DOUBLE</span>
+torusIndex = StartIndex
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Loop parameters</span>
+<span style="color: #bb99ee;">DIM</span> angle <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">DOUBLE</span>
+<span style="color: #bb99ee;">DIM</span> scaleFactor <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">DOUBLE</span>
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Generate the first arm of the spiral</span>
+<span style="color: #bb99ee;">FOR</span> angle = 0 <span style="color: #bb99ee;">TO</span> 97.35 <span style="color: #bb99ee;">STEP</span> .15
+    torusIndex = torusIndex + 1
+    scaleFactor = <span style="color: #88aaee;">SIN</span>(angle / 31) * InitialSize
+    spiralX(torusIndex) = <span style="color: #88aaee;">SIN</span>(angle) * scaleFactor * 3 + 320
+    spiralY(torusIndex) = <span style="color: #88aaee;">COS</span>(angle) * scaleFactor + 250
+    spiralY(torusIndex) = spiralY(torusIndex) - (<span style="color: #88aaee;">COS</span>(angle / 31) * 200)
+    <span style="color: #ee8899;">PSET</span> (spiralX(torusIndex), spiralY(torusIndex)), 15
+<span style="color: #bb99ee;">NEXT</span> angle
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Generate the second arm of the spiral</span>
+<span style="color: #bb99ee;">FOR</span> angle = 97.35 <span style="color: #bb99ee;">TO</span> 0 <span style="color: #bb99ee;">STEP</span> -.15
+    torusIndex = torusIndex + 1
+    scaleFactor = <span style="color: #88aaee;">SIN</span>(angle / 31) * (InitialSize / 2)
+    spiralX(torusIndex) = <span style="color: #88aaee;">SIN</span>(angle) * scaleFactor * 3 + 320
+    spiralY(torusIndex) = <span style="color: #88aaee;">COS</span>(angle) * scaleFactor + 350
+    spiralY(torusIndex) = spiralY(torusIndex) - (<span style="color: #88aaee;">COS</span>(angle / 31) * 100)
+    <span style="color: #ee8899;">PSET</span> (spiralX(torusIndex), spiralY(torusIndex)), 15
+<span style="color: #bb99ee;">NEXT</span> angle
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Generate the third arm of the spiral</span>
+<span style="color: #bb99ee;">FOR</span> angle = 0 <span style="color: #bb99ee;">TO</span> 97.35 <span style="color: #bb99ee;">STEP</span> .15
+    torusIndex = torusIndex + 1
+    scaleFactor = <span style="color: #88aaee;">SIN</span>(angle / 31) * (InitialSize / 4)
+    spiralX(torusIndex) = <span style="color: #88aaee;">SIN</span>(angle) * scaleFactor * 3 + 320
+    spiralY(torusIndex) = <span style="color: #88aaee;">COS</span>(angle) * scaleFactor + 300
+    spiralY(torusIndex) = spiralY(torusIndex) - (<span style="color: #88aaee;">COS</span>(angle / 31) * 50)
+    <span style="color: #ee8899;">PSET</span> (spiralX(torusIndex), spiralY(torusIndex)), 15
+<span style="color: #bb99ee;">NEXT</span> angle
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Generate the fourth arm of the spiral</span>
+<span style="color: #bb99ee;">FOR</span> angle = 97.35 <span style="color: #bb99ee;">TO</span> 0 <span style="color: #bb99ee;">STEP</span> -.15
+    torusIndex = torusIndex + 1
+    scaleFactor = <span style="color: #88aaee;">SIN</span>(angle / 31) * (InitialSize / 8)
+    spiralX(torusIndex) = <span style="color: #88aaee;">SIN</span>(angle) * scaleFactor * 3 + 320
+    spiralY(torusIndex) = <span style="color: #88aaee;">COS</span>(angle) * scaleFactor + 325
+    spiralY(torusIndex) = spiralY(torusIndex) - (<span style="color: #88aaee;">COS</span>(angle / 31) * 25)
+    <span style="color: #ee8899;">PSET</span> (spiralX(torusIndex), spiralY(torusIndex)), 15
+<span style="color: #bb99ee;">NEXT</span> angle
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Calculate the number of lines to draw based on the current index</span>
+<span style="color: #bb99ee;">DIM</span> totalSegments <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">DOUBLE</span>
+totalSegments = (torusIndex - 42) / 4
+
+a$ = <span style="color: #88aaee;">INPUT$</span>(1)
+<span style="color: #666677;">' </span><span style="color: #666677;">Clear the screen before drawing the lines</span>
+<span style="color: #ee8899;">CLS</span>
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Draw the lines between points in the spiral</span>
+<span style="color: #bb99ee;">FOR</span> angle = 1 <span style="color: #bb99ee;">TO</span> totalSegments * 4
+    <span style="color: #ee8899;">LINE</span> (spiralX(angle), spiralY(angle))-(spiralX(angle + 42), spiralY(angle + 42)), 15
+    <span style="color: #ee8899;">LINE</span> (spiralX(angle), spiralY(angle))-(spiralX(angle + 1), spiralY(angle + 1)), 15
+<span style="color: #bb99ee;">NEXT</span> angle
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Wait for the user to press a key before exiting</span>
+a$ = <span style="color: #88aaee;">INPUT$</span>(1)
+
+<span style="color: #666677;">' </span><span style="color: #666677;">End of program</span>
+<span style="color: #bb99ee;">SYSTEM</span>
+</pre>
+</div>
+</div>
+</div>
+
+<div id="outline-container-org0c1d6ba" class="outline-2">
+<h2 id="org0c1d6ba"><span class="section-number-2">5.</span> Textured spherical spiral</h2>
+<div class="outline-text-2" id="text-5">
+
+<div id="org2090eeb" class="figure">
+<p><img src="spiral, 5.png" alt="spiral, 5.png" class="responsive-img" />
+</p>
+</div>
+
+<p>
+Similar to previous spiral, Line segments are connected between the
+neighbors. Spiral height and width are calculated such that sphere is
+formed. Sphere is textured. Texture is loaded from file:
+<a href="texture.dat">texture.dat</a> .Invisible surface detection and removal is
+attempted.
+</p>
+
+<p>
+<a href="spiral, 5.bas">spiral, 5.bas</a>
+</p>
+
+<div class="org-src-container">
+<pre class="src src-basic-qb45"><span style="color: #666677;">' </span><span style="color: #666677;">Program to render fancy looking spiral.</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">This program is free software: released under Creative Commons Zero (CC0) license</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">by Svjatoslav Agejenko.</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Email: svjatoslav@svjatoslav.eu</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Homepage: http://www.svjatoslav.eu</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Changelog:</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2003.12, Initial version</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2024.08, Improved program readability</span>
+
+<span style="color: #bb99ee;">DECLARE</span> <span style="color: #bb99ee;">SUB</span> FillSegment (x1, y1, x2, y2, xx1, yy1, xx2, yy2)
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> spiralX(1 <span style="color: #bb99ee;">TO</span> 10000)
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> spiralY(1 <span style="color: #bb99ee;">TO</span> 10000)
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> angles(1 <span style="color: #bb99ee;">TO</span> 10000)
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> phaseAngles(1 <span style="color: #bb99ee;">TO</span> 10000)
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> spiralLength
+<span style="color: #ee8899;">SCREEN</span> 12
+stepUnit = 200
+spiralLength = 0
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Generate the spiral points</span>
+<span style="color: #bb99ee;">FOR</span> angleIndex = 1 <span style="color: #bb99ee;">TO</span> 97 <span style="color: #bb99ee;">STEP</span> .15
+    spiralLength = spiralLength + 1
+    stepUnit = <span style="color: #88aaee;">SIN</span>(angleIndex / 31) * 100
+    xPos = <span style="color: #88aaee;">SIN</span>(angleIndex) * stepUnit * 3 + 320
+    yPos = <span style="color: #88aaee;">COS</span>(angleIndex) * stepUnit + 250
+    yPos = yPos - (<span style="color: #88aaee;">COS</span>(angleIndex / 31) * 200)
+    angles(spiralLength) = angleIndex
+    phaseAngles(spiralLength) = angleIndex / 31
+    spiralX(spiralLength) = xPos
+    spiralY(spiralLength) = yPos
+    <span style="color: #ee8899;">PSET</span> (xPos, yPos), 15
+<span style="color: #bb99ee;">NEXT</span> angleIndex
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Load texture data from file</span>
+<span style="color: #ee8899;">OPEN</span> <span style="color: #99dd99;">"texture.dat"</span> <span style="color: #bb99ee;">FOR</span> <span style="color: #ee8899;">INPUT</span> <span style="color: #bb99ee;">AS</span> #1
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> textureData$(1 <span style="color: #bb99ee;">TO</span> 1000)
+textureIndex = 0
+<span style="color: #eeaa77;">1</span>
+    <span style="color: #ee8899;">LINE</span> <span style="color: #ee8899;">INPUT</span> #1, textureLine$
+    <span style="color: #bb99ee;">IF</span> <span style="color: #88aaee;">LEFT$</span>(textureLine$, 3) = <span style="color: #99dd99;">"END"</span> <span style="color: #bb99ee;">THEN</span> <span style="color: #bb99ee;">GOTO</span> <span style="color: #eeaa77;">2</span>
+    textureIndex = textureIndex + 1
+    textureData$(textureIndex) = textureLine$
+<span style="color: #bb99ee;">GOTO</span> <span style="color: #eeaa77;">1</span>
+<span style="color: #eeaa77;">2</span>
+<span style="color: #ee8899;">CLS</span>
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Apply texture to the spiral</span>
+textureIndex = 1
+<span style="color: #bb99ee;">FOR</span> charIndex = 1 <span style="color: #bb99ee;">TO</span> 20
+    <span style="color: #bb99ee;">FOR</span> textCharIndex = 1 <span style="color: #bb99ee;">TO</span> <span style="color: #88aaee;">LEN</span>(textureData$(charIndex))
+        textureChar$ = <span style="color: #88aaee;">RIGHT$</span>(<span style="color: #88aaee;">LEFT$</span>(textureData$(charIndex), textCharIndex), 1)
+        textureIndex = textureIndex + 1
+        <span style="color: #bb99ee;">IF</span> textureIndex &gt; spiralLength - 43 <span style="color: #bb99ee;">THEN</span> <span style="color: #bb99ee;">GOTO</span> DONE
+        teeVal = <span style="color: #88aaee;">SIN</span>(angles(textureIndex + 32)) - <span style="color: #88aaee;">COS</span>(phaseAngles(textureIndex))
+
+        <span style="color: #666677;">' </span><span style="color: #666677;">Draw lines if the condition is met</span>
+        <span style="color: #bb99ee;">IF</span> teeVal &lt;= 0 <span style="color: #bb99ee;">THEN</span>
+            <span style="color: #ee8899;">LINE</span> (spiralX(textureIndex), spiralY(textureIndex))-(spiralX(textureIndex + 1), spiralY(textureIndex + 1)), 15
+            <span style="color: #ee8899;">LINE</span> (spiralX(textureIndex), spiralY(textureIndex))-(spiralX(textureIndex + 42), spiralY(textureIndex + 42)), 15
+            <span style="color: #666677;">' </span><span style="color: #666677;">Fill the segment if the character matches</span>
+            <span style="color: #bb99ee;">IF</span> textureChar$ = <span style="color: #99dd99;">"M"</span> <span style="color: #bb99ee;">THEN</span>
+                <span style="color: #bb99ee;">CALL</span> FillSegment(spiralX(textureIndex), spiralY(textureIndex), spiralX(textureIndex + 1), spiralY(textureIndex + 1), spiralX(textureIndex + 42), spiralY(textureIndex + 42), spiralX(textureIndex + 43), spiralY(textureIndex + 43))
+            <span style="color: #bb99ee;">END</span> <span style="color: #bb99ee;">IF</span>
+        <span style="color: #bb99ee;">END</span> <span style="color: #bb99ee;">IF</span>
+    <span style="color: #bb99ee;">NEXT</span> textCharIndex
+<span style="color: #bb99ee;">NEXT</span> charIndex
+<span style="color: #eeaa77;">DONE:</span>
+a$ = <span style="color: #88aaee;">INPUT$</span>(1)
+<span style="color: #bb99ee;">SYSTEM</span>
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Subroutine to fill a segment with lines</span>
+<span style="color: #bb99ee;">SUB</span> FillSegment (x1, y1, x2, y2, xx1, yy1, xx2, yy2)
+    <span style="color: #666677;">' </span><span style="color: #666677;">Assign input parameters to local variables</span>
+    xStart = x1
+    yStart = y1
+    xEnd = x2
+    yEnd = y2
+    xxStart = xx1
+    yyStart = yy1
+    xxEnd = xx2
+    yyEnd = yy2
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Calculate step increments</span>
+    j = 10
+    xStep = (xEnd - xStart) / j
+    yStep = (yEnd - yStart) / j
+    xxStep = (xxEnd - xxStart) / j
+    yyStep = (yyEnd - yyStart) / j
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Draw lines between the points</span>
+    <span style="color: #bb99ee;">FOR</span> a = 1 <span style="color: #bb99ee;">TO</span> j
+        xStart = xStart + xStep
+        yStart = yStart + yStep
+        xxStart = xxStart + xxStep
+        yyStart = yyStart + yyStep
+        <span style="color: #ee8899;">LINE</span> (xStart, yStart)-(xxStart, yyStart), 15
+    <span style="color: #bb99ee;">NEXT</span> a
+<span style="color: #bb99ee;">END</span> <span style="color: #bb99ee;">SUB</span>
+</pre>
+</div>
+</div>
+</div>
+
+<div id="outline-container-org41561dd" class="outline-2">
+<h2 id="org41561dd"><span class="section-number-2">6.</span> Textured and shaded spherical spiral</h2>
+<div class="outline-text-2" id="text-6">
+
+<div id="org2163199" class="figure">
+<p><img src="spiral, 6.png" alt="spiral, 6.png" class="responsive-img" />
+</p>
+</div>
+
+<p>
+Similar to previous spiral, Line segments are connected between the
+neighbors. Spiral height and width are calculated such that sphere is
+formed. Sphere is textured. Texture is loaded from file:
+<a href="texture1.dat">texture1.dat</a> . Invisible surface detection and removal is
+attempted. Sphere is shaded.
+</p>
+
+<p>
+<a href="spiral, 6.bas">spiral, 6.bas</a>
+</p>
+
+<div class="org-src-container">
+<pre class="src src-basic-qb45"><span style="color: #666677;">' </span><span style="color: #666677;">Program to render fancy looking textured and shaded spiral.</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Texture is loaded from file.</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">This program is free software: released under Creative Commons Zero (CC0) license</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">by Svjatoslav Agejenko.</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Email: svjatoslav@svjatoslav.eu</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Homepage: http://www.svjatoslav.eu</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Changelog:</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2003.12, Initial version</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2024 - 2025, Improved program readability</span>
+
+<span style="color: #bb99ee;">DECLARE</span> <span style="color: #bb99ee;">SUB</span> fill(x1, y1, x2, y2, xx1, yy1, xx2, yy2, hel)
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> torux(1 <span style="color: #bb99ee;">TO</span> 10000)
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> toruy(1 <span style="color: #bb99ee;">TO</span> 10000)
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> sin1(1 <span style="color: #bb99ee;">TO</span> 10000)
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> cos1(1 <span style="color: #bb99ee;">TO</span> 10000)
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> tor
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Set the screen mode to 12</span>
+<span style="color: #ee8899;">SCREEN</span> 12
+su = 200
+tor = 0
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Calculate points for the spiral</span>
+<span style="color: #bb99ee;">FOR</span> a = 1 <span style="color: #bb99ee;">TO</span> 97 <span style="color: #bb99ee;">STEP</span> .15
+    tor = tor + 1
+    su = <span style="color: #88aaee;">SIN</span>(a / 31) * 100
+    x = <span style="color: #88aaee;">SIN</span>(a) * su * 3 + 320
+    y = <span style="color: #88aaee;">COS</span>(a) * su + 250
+    y = y - (<span style="color: #88aaee;">COS</span>(a / 31) * 200)
+    sin1(tor) = a
+    cos1(tor) = a / 31
+    torux(tor) = x
+    toruy(tor) = y
+    <span style="color: #666677;">' </span><span style="color: #666677;">Set the pixel at (x, y) to color 15</span>
+    <span style="color: #ee8899;">PSET</span> (x, y), 15
+<span style="color: #bb99ee;">NEXT</span> a
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Open the text file for input</span>
+<span style="color: #ee8899;">OPEN</span> <span style="color: #99dd99;">"texture1.dat"</span> <span style="color: #bb99ee;">FOR</span> <span style="color: #ee8899;">INPUT</span> <span style="color: #bb99ee;">AS</span> #1
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> text$(1 <span style="color: #bb99ee;">TO</span> 1000)
+
+a = 0
+<span style="color: #eeaa77;">1</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Read a line from the file</span>
+<span style="color: #ee8899;">LINE</span> <span style="color: #ee8899;">INPUT</span> #1, a$
+<span style="color: #666677;">' </span><span style="color: #666677;">Check if the line is the end marker</span>
+<span style="color: #bb99ee;">IF</span> <span style="color: #88aaee;">LEFT$</span>(a$, 3) = <span style="color: #99dd99;">"END"</span> <span style="color: #bb99ee;">THEN</span> <span style="color: #bb99ee;">GOTO</span> <span style="color: #eeaa77;">2</span>
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Increment the counter and store the line in the text array</span>
+a = a + 1
+text$(a) = a$
+<span style="color: #bb99ee;">GOTO</span> <span style="color: #eeaa77;">1</span>
+<span style="color: #eeaa77;">2</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Close the file</span>
+<span style="color: #ee8899;">CLOSE</span> #1
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Clear the screen</span>
+<span style="color: #ee8899;">CLS</span>
+a = 1
+<span style="color: #666677;">' </span><span style="color: #666677;">Loop through each character in the text</span>
+<span style="color: #bb99ee;">FOR</span> c = 1 <span style="color: #bb99ee;">TO</span> 20
+    <span style="color: #bb99ee;">FOR</span> b = 1 <span style="color: #bb99ee;">TO</span> <span style="color: #88aaee;">LEN</span>(text$(c))
+        <span style="color: #666677;">' </span><span style="color: #666677;">Get the current character</span>
+        a$ = <span style="color: #88aaee;">RIGHT$</span>(<span style="color: #88aaee;">LEFT$</span>(text$(c), b), 1)
+
+        <span style="color: #666677;">' </span><span style="color: #666677;">Increment the counter</span>
+        a = a + 1
+        <span style="color: #666677;">' </span><span style="color: #666677;">Check if we have reached the end of the points array</span>
+        <span style="color: #bb99ee;">IF</span> a &gt; tor - 43 <span style="color: #bb99ee;">THEN</span> <span style="color: #bb99ee;">GOTO</span> <span style="color: #eeaa77;">3</span>
+
+        <span style="color: #666677;">' </span><span style="color: #666677;">Calculate the angle for the current point</span>
+        tee = <span style="color: #88aaee;">SIN</span>(sin1(a + 32))
+        tee = tee - <span style="color: #88aaee;">COS</span>(cos1(a))
+
+        <span style="color: #666677;">' </span><span style="color: #666677;">Draw lines based on the calculated angle</span>
+        <span style="color: #bb99ee;">IF</span> tee &lt;= 0 <span style="color: #bb99ee;">THEN</span>
+            <span style="color: #ee8899;">LINE</span> (torux(a), toruy(a))-(torux(a + 1), toruy(a + 1)), 15
+            <span style="color: #ee8899;">LINE</span> (torux(a), toruy(a))-(torux(a + 42), toruy(a + 42)), 15
+            hel = 10
+            hel1 = <span style="color: #88aaee;">COS</span>(cos1(a) - 1) + .5
+            hel2 = <span style="color: #88aaee;">SIN</span>(sin1(a) + 1) + 1
+            <span style="color: #666677;">' </span><span style="color: #666677;">Adjust brightness based on the angles</span>
+            <span style="color: #bb99ee;">IF</span> hel2 &gt; 1 <span style="color: #88aaee;">AND</span> hel1 &gt; 1 <span style="color: #bb99ee;">THEN</span>
+                hel3 = (hel2 - 1) * (hel1 - 1) * 8
+                hel = hel / (hel3 + 1)
+            <span style="color: #bb99ee;">END</span> <span style="color: #bb99ee;">IF</span>
+
+            <span style="color: #666677;">' </span><span style="color: #666677;">Adjust brightness if the character is "M"</span>
+            <span style="color: #bb99ee;">IF</span> a$ = <span style="color: #99dd99;">"M"</span> <span style="color: #bb99ee;">THEN</span> hel = hel / 3
+
+            <span style="color: #666677;">' </span><span style="color: #666677;">Fill the shape with the calculated brightness</span>
+            fillQuadrilateralWithShading torux(a), toruy(a), torux(a + 1), toruy(a + 1), torux(a + 42), toruy(a + 42), torux(a + 43), toruy(a + 43), hel
+        <span style="color: #bb99ee;">END</span> <span style="color: #bb99ee;">IF</span>
+    <span style="color: #bb99ee;">NEXT</span> b
+<span style="color: #bb99ee;">NEXT</span> c
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Wait for user input</span>
+<span style="color: #eeaa77;">3</span>
+a$ = <span style="color: #88aaee;">INPUT$</span>(1)
+<span style="color: #bb99ee;">SYSTEM</span>
+
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Fills a quadrilateral area using scanline algorithm with variable density</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Creates shaded surface effect by interpolating between opposite edges</span>
+<span style="color: #666677;">'</span>
+<span style="color: #bb99ee;">SUB</span> fillQuadrilateralWithShading (startEdgePointX1, startEdgePointY1, endEdgePointX1, endEdgePointY1, shiftedStartEdgeX1, shiftedStarEdgeY1, shiftedEndEdgeX1, shiftEndEdgeY1, brightnessFactor)
+
+<span style="color: #666677;">' </span><span style="color: #666677;">This subroutine creates the illusion of a shaded surface by drawing multiple lines</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">between two opposite edges of a quadrilateral. The density of these lines is</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">controlled by the brightnessFactor parameter - higher values produce sparser lines.</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Parameters:</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">startEdgePointX1/Y1 and endEdgePointX1/Y1 define one pair of points forming an edge</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">shiftedStartEdgeX1/Y1 and shiftedEndEdgeX1/Y1 define the opposite edge</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">brightnessFactor controls how densely packed the lines will be drawn</span>
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Local variables for working with point coordinates</span>
+edgePointX1 = startEdgePointX1
+edgePointY1 = startEdgePointY1
+edgePointX2 = endEdgePointX1
+edgePointY2 = endEdgePointY1
+oppositePointX1 = shiftedStartEdgeX1
+oppositePointY1 = shiftedStarEdgeY1
+oppositePointX2 = shiftedEndEdgeX1
+oppositePointY2 = shiftEndEdgeY1
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Calculate distance differences along first edge</span>
+deltaX1 = edgePointX1 - edgePointX2
+deltaY1 = edgePointY1 - edgePointY2
+length1 = <span style="color: #88aaee;">SQR</span>((deltaX1 * deltaX1) + (deltaY1 * deltaY1))
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Calculate distance differences along second edge</span>
+deltaX2 = oppositePointX1 - oppositePointX2
+deltaY2 = oppositePointY1 - oppositePointY2
+length2 = <span style="color: #88aaee;">SQR</span>((deltaX2 * deltaX2) + (deltaY2 * deltaY2))
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Average length determines number of steps based on brightness factor</span>
+averageLength = (length1 + length2) / 2
+stepCount = averageLength / brightnessFactor
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Calculate step increments for each axis</span>
+xStep1 = (edgePointX2 - edgePointX1) / stepCount
+yStep1 = (edgePointY2 - edgePointY1) / stepCount
+xStep2 = (oppositePointX2 - oppositePointX1) / stepCount
+yStep2 = (oppositePointY2 - oppositePointY1) / stepCount
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Draw intermediate connecting lines across the shape</span>
+<span style="color: #bb99ee;">FOR</span> stepIndex = 1 <span style="color: #bb99ee;">TO</span> stepCount
+    edgePointX1 = edgePointX1 + xStep1
+    edgePointY1 = edgePointY1 + yStep1
+    oppositePointX1 = oppositePointX1 + xStep2
+    oppositePointY1 = oppositePointY1 + yStep2
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Draw line between current interpolated points</span>
+    <span style="color: #ee8899;">LINE</span> (edgePointX1, edgePointY1)-(oppositePointX1, oppositePointY1), 15
+<span style="color: #bb99ee;">NEXT</span> stepIndex
+
+<span style="color: #bb99ee;">END</span> <span style="color: #bb99ee;">SUB</span>
+</pre>
+</div>
+</div>
+</div>
+</div>
+<div id="postamble" class="status">
+<p class="date">Created: 2025-07-28 ma 03:32</p>
+<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
+</div>
+</body>
+</html>
diff --git a/2D GFX/Spirals/index.org b/2D GFX/Spirals/index.org
new file mode 100644 (file)
index 0000000..cffa9dd
--- /dev/null
@@ -0,0 +1,124 @@
+#+TITLE: Spiral series
+#+LANGUAGE: en
+#+LATEX_HEADER: \usepackage[margin=1.0in]{geometry}
+#+LATEX_HEADER: \usepackage{parskip}
+#+LATEX_HEADER: \usepackage[none]{hyphenat}
+
+#+OPTIONS: H:20 num:20
+#+OPTIONS: author:nil
+
+#+begin_export html
+<style>
+  .flex-center {
+    display: flex;            /* activate flexbox */
+    justify-content: center;  /* horizontally center anything inside   */
+  }
+
+  .flex-center video {
+    width: min(90%, 1000px); /* whichever is smaller wins */
+    height: auto;            /* preserve aspect ratio */
+  }
+
+  .responsive-img {
+    width: min(100%, 1000px);
+    height: auto;
+  }
+</style>
+#+end_export
+
+* Spiral with increasing density
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:spiral.png]]
+
+From every point in the spiral, subdivided line is traced. Line
+segments are connected between the neighbors. Line segment count
+progressively increases towards the center.
+
+[[file:spiral.bas]]
+
+#+INCLUDE: "spiral.bas" src basic-qb45
+
+* Spiral with varying height
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:spiral, 2.png]]
+
+From every point in the spiral, subdivided line is traced. Line
+segments are connected between the neighbors. This creates effect
+where lines run from edges towards the center. Center is vertically
+displaced by sinus function where input is the distance to the center.
+
+[[file:spiral, 2.bas]]
+
+#+INCLUDE: "spiral, 2.bas" src basic-qb45
+
+* Shaded spiral
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 800px
+[[file:spiral, 3.png]]
+
+Similar to previous spiral, Line segments are connected between the
+neighbors and sinus from the center decides vertical
+displacement. Attempt of shading is made where brighter areas have
+more detail.
+
+[[file:spiral, 3.bas]]
+
+#+INCLUDE: "spiral, 3.bas" src basic-qb45
+
+* Sphere forming spiral
+
+Similar to previous spiral, Line segments are connected between the
+neighbors. Spiral height and width are calculated such that they form
+multiple linked spherical shapes. Initially point cloud in shown:
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:spiral, 4, 1.png]]
+
+In the next step, points are connected using lines:
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:spiral, 4, 2.png]]
+
+
+[[file:spiral, 4.bas]]
+
+#+INCLUDE: "spiral, 4.bas" src basic-qb45
+
+* Textured spherical spiral
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:spiral, 5.png]]
+
+Similar to previous spiral, Line segments are connected between the
+neighbors. Spiral height and width are calculated such that sphere is
+formed. Sphere is textured. Texture is loaded from file:
+[[file:texture.dat]] .Invisible surface detection and removal is
+attempted.
+
+[[file:spiral, 5.bas]]
+
+#+INCLUDE: "spiral, 5.bas" src basic-qb45
+
+* Textured and shaded spherical spiral
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:spiral, 6.png]]
+
+Similar to previous spiral, Line segments are connected between the
+neighbors. Spiral height and width are calculated such that sphere is
+formed. Sphere is textured. Texture is loaded from file:
+[[file:texture1.dat]] . Invisible surface detection and removal is
+attempted. Sphere is shaded.
+
+[[file:spiral, 6.bas]]
+
+#+INCLUDE: "spiral, 6.bas" src basic-qb45
diff --git a/2D GFX/Spirals/logo.png b/2D GFX/Spirals/logo.png
new file mode 100644 (file)
index 0000000..a82b2e1
Binary files /dev/null and b/2D GFX/Spirals/logo.png differ
diff --git a/2D GFX/Spirals/spiral, 2.bas b/2D GFX/Spirals/spiral, 2.bas
new file mode 100644 (file)
index 0000000..3c1be67
--- /dev/null
@@ -0,0 +1,45 @@
+' Program to render fancy looking spiral.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.12, Initial version\r
+' 2024.08, Improved program readability\r
+\r
+DIM SHARED spiralX(1 TO 10000) AS SINGLE ' X coordinates of the spiral points\r
+DIM SHARED spiralY(1 TO 10000) AS SINGLE ' Y coordinates of the spiral points\r
+DIM SHARED pointCount AS INTEGER ' Total number of points plotted\r
+SCREEN 12 ' Set screen resolution to 640x480 with 16 colors\r
+\r
+' Initialize the scale factor for the spiral\r
+scaleFactor = 200\r
+pointCount = 0\r
+\r
+' Calculate and plot each point on the spiral\r
+FOR angle = 1 TO 100 STEP .05\r
+    pointCount = pointCount + 1\r
+    scaleFactor = 100 - angle ' Update the scaling factor as the loop progresses\r
+\r
+    ' Calculate the X and Y coordinates based on the sine and cosine of the angle\r
+    spiralX(pointCount) = SIN(angle) * scaleFactor * 3 + 320\r
+    spiralY(pointCount) = COS(angle) * scaleFactor + 300\r
+\r
+    ' Apply a vertical displacement to create a more dynamic effect\r
+    spiralY(pointCount) = spiralY(pointCount) + (SIN((angle + 20) / 10) * angle)\r
+\r
+    ' Plot the point on the screen\r
+    PSET (spiralX(pointCount), spiralY(pointCount)), 15\r
+NEXT angle\r
+\r
+' Draw lines between points to create the spiral effect\r
+FOR segmentStart = 1 TO pointCount - 125\r
+    LINE (spiralX(segmentStart), spiralY(segmentStart)) - _\r
+         (spiralX(segmentStart + 125), spiralY(segmentStart + 125)), 15\r
+NEXT segmentStart\r
+\r
+' Wait for user input before exiting\r
+a$ = INPUT$(1)\r
+END ' Exit the program\r
diff --git a/2D GFX/Spirals/spiral, 2.png b/2D GFX/Spirals/spiral, 2.png
new file mode 100644 (file)
index 0000000..2534319
Binary files /dev/null and b/2D GFX/Spirals/spiral, 2.png differ
diff --git a/2D GFX/Spirals/spiral, 3.bas b/2D GFX/Spirals/spiral, 3.bas
new file mode 100644 (file)
index 0000000..8c875a8
--- /dev/null
@@ -0,0 +1,81 @@
+' Program to render fancy looking spiral with shaded surface.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.12, Initial version\r
+' 2024.08, Improved program readability\r
+\r
+' Declare shared arrays for storing coordinates and sine values\r
+DIM SHARED spiralX(1 TO 10000)\r
+DIM SHARED spiralY(1 TO 10000)\r
+DIM SHARED sineValue1(1 TO 10000)\r
+DIM SHARED sineValue2(1 TO 10000)\r
+\r
+\r
+' Set the screen mode to 640x480 with 16 colors\r
+SCREEN 12\r
+\r
+' Initialize the spiral rotation parameter\r
+DIM spiralRotation AS SINGLE\r
+spiralRotation = 0\r
+\r
+' Generate and draw the spiral points\r
+FOR angle = 0 TO 150 STEP .05\r
+    spiralRotation = spiralRotation + 1\r
+    scaleFactor = 150 - angle\r
+\r
+    ' Calculate the X and Y coordinates for the current point\r
+    spiralX(spiralRotation) = SIN(angle) * scaleFactor * 3 + 320\r
+    spiralY(spiralRotation) = COS(angle) * scaleFactor + 300\r
+\r
+    ' Apply additional vertical displacement based on a secondary sine function\r
+    spiralY(spiralRotation) = spiralY(spiralRotation) + (SIN((angle + 20) / 10) * (angle / 5 + 1))\r
+\r
+    ' Store the current sine values for later use\r
+    sineValue1(spiralRotation) = SIN(angle)\r
+    sineValue2(spiralRotation) = SIN((angle + 20) / 10)\r
+\r
+    ' Draw the current point on the screen\r
+    PSET (spiralX(spiralRotation), spiralY(spiralRotation)), 15\r
+NEXT angle\r
+\r
+' Connect the points to form a continuous line\r
+FOR index = 1 TO spiralRotation - 127\r
+    ' Draw a line segment between points 126 steps apart\r
+    LINE (spiralX(index), spiralY(index))-(spiralX(index + 126), spiralY(index + 126)), 15\r
+\r
+    ' Initialize the line drawing flag\r
+    DIM drawLine AS INTEGER\r
+    drawLine = 1\r
+\r
+    ' Check conditions to determine if a line segment should be drawn\r
+    IF sineValue1(index) > .8 AND sineValue2(index) < sineValue2(index + 125) THEN drawLine = 0\r
+    IF sineValue1(index) < -.2 AND (sineValue2(index) - .4) > sineValue2(index + 125) THEN drawLine = 0\r
+\r
+    ' Draw a line segment if the conditions are met\r
+    IF drawLine = 1 THEN LINE (spiralX(index), spiralY(index))-(spiralX(index + 1), spiralY(index + 1)), 15\r
+\r
+    ' Reset the line drawing flag and check for different conditions\r
+    drawLine = 0\r
+    IF sineValue1(index) > .8 AND sineValue2(index) > sineValue2(index + 125) THEN drawLine = 1\r
+    IF sineValue1(index) < -.2 AND sineValue2(index) < sineValue2(index + 125) THEN drawLine = 1\r
+\r
+    ' Draw a line segment if the conditions are met\r
+    IF drawLine = 1 THEN LINE (spiralX(index), spiralY(index))-(spiralX(index + 127), spiralY(index + 127)), 15\r
+\r
+    ' Reset the line drawing flag and check for another set of conditions\r
+    drawLine = 0\r
+    IF sineValue1(index) > .9 AND sineValue2(index) > sineValue2(index + 125) THEN drawLine = 1\r
+    IF sineValue1(index) < -.5 AND sineValue2(index) < sineValue2(index + 125) THEN drawLine = 1\r
+\r
+    ' Draw a line segment if the conditions are met\r
+    IF drawLine = 1 THEN LINE (spiralX(index), spiralY(index))-(spiralX(index + 125), spiralY(index + 125)), 15\r
+NEXT index\r
+\r
+' Wait for a key press before exiting\r
+a$ = INPUT$(1)\r
+\r
diff --git a/2D GFX/Spirals/spiral, 3.png b/2D GFX/Spirals/spiral, 3.png
new file mode 100644 (file)
index 0000000..fba0323
Binary files /dev/null and b/2D GFX/Spirals/spiral, 3.png differ
diff --git a/2D GFX/Spirals/spiral, 4, 1.png b/2D GFX/Spirals/spiral, 4, 1.png
new file mode 100644 (file)
index 0000000..caa29b1
Binary files /dev/null and b/2D GFX/Spirals/spiral, 4, 1.png differ
diff --git a/2D GFX/Spirals/spiral, 4, 2.png b/2D GFX/Spirals/spiral, 4, 2.png
new file mode 100644 (file)
index 0000000..76ff118
Binary files /dev/null and b/2D GFX/Spirals/spiral, 4, 2.png differ
diff --git a/2D GFX/Spirals/spiral, 4.bas b/2D GFX/Spirals/spiral, 4.bas
new file mode 100644 (file)
index 0000000..5101083
--- /dev/null
@@ -0,0 +1,90 @@
+' Program to render fancy looking spiral.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.12, Initial version\r
+' 2024.08, Improved program readability\r
+\r
+' Declare shared arrays to hold the x and y coordinates of the spiral\r
+DIM SHARED spiralX(1 TO 10000)\r
+DIM SHARED spiralY(1 TO 10000)\r
+\r
+' Initialize the screen to a graphics mode with 640x480 resolution and 16 colors\r
+SCREEN 12\r
+\r
+' Constants for the initial size and the starting value of the index\r
+CONST InitialSize = 100\r
+CONST StartIndex = 0\r
+\r
+' Variable to keep track of the current position in the spiral arrays\r
+DIM torusIndex AS DOUBLE\r
+torusIndex = StartIndex\r
+\r
+' Loop parameters\r
+DIM angle AS DOUBLE\r
+DIM scaleFactor AS DOUBLE\r
+\r
+' Generate the first arm of the spiral\r
+FOR angle = 0 TO 97.35 STEP .15\r
+    torusIndex = torusIndex + 1\r
+    scaleFactor = SIN(angle / 31) * InitialSize\r
+    spiralX(torusIndex) = SIN(angle) * scaleFactor * 3 + 320\r
+    spiralY(torusIndex) = COS(angle) * scaleFactor + 250\r
+    spiralY(torusIndex) = spiralY(torusIndex) - (COS(angle / 31) * 200)\r
+    PSET (spiralX(torusIndex), spiralY(torusIndex)), 15\r
+NEXT angle\r
+\r
+' Generate the second arm of the spiral\r
+FOR angle = 97.35 TO 0 STEP -.15\r
+    torusIndex = torusIndex + 1\r
+    scaleFactor = SIN(angle / 31) * (InitialSize / 2)\r
+    spiralX(torusIndex) = SIN(angle) * scaleFactor * 3 + 320\r
+    spiralY(torusIndex) = COS(angle) * scaleFactor + 350\r
+    spiralY(torusIndex) = spiralY(torusIndex) - (COS(angle / 31) * 100)\r
+    PSET (spiralX(torusIndex), spiralY(torusIndex)), 15\r
+NEXT angle\r
+\r
+' Generate the third arm of the spiral\r
+FOR angle = 0 TO 97.35 STEP .15\r
+    torusIndex = torusIndex + 1\r
+    scaleFactor = SIN(angle / 31) * (InitialSize / 4)\r
+    spiralX(torusIndex) = SIN(angle) * scaleFactor * 3 + 320\r
+    spiralY(torusIndex) = COS(angle) * scaleFactor + 300\r
+    spiralY(torusIndex) = spiralY(torusIndex) - (COS(angle / 31) * 50)\r
+    PSET (spiralX(torusIndex), spiralY(torusIndex)), 15\r
+NEXT angle\r
+\r
+' Generate the fourth arm of the spiral\r
+FOR angle = 97.35 TO 0 STEP -.15\r
+    torusIndex = torusIndex + 1\r
+    scaleFactor = SIN(angle / 31) * (InitialSize / 8)\r
+    spiralX(torusIndex) = SIN(angle) * scaleFactor * 3 + 320\r
+    spiralY(torusIndex) = COS(angle) * scaleFactor + 325\r
+    spiralY(torusIndex) = spiralY(torusIndex) - (COS(angle / 31) * 25)\r
+    PSET (spiralX(torusIndex), spiralY(torusIndex)), 15\r
+NEXT angle\r
+\r
+' Calculate the number of lines to draw based on the current index\r
+DIM totalSegments AS DOUBLE\r
+totalSegments = (torusIndex - 42) / 4\r
+\r
+a$ = INPUT$(1)\r
+' Clear the screen before drawing the lines\r
+CLS\r
+\r
+' Draw the lines between points in the spiral\r
+FOR angle = 1 TO totalSegments * 4\r
+    LINE (spiralX(angle), spiralY(angle))-(spiralX(angle + 42), spiralY(angle + 42)), 15\r
+    LINE (spiralX(angle), spiralY(angle))-(spiralX(angle + 1), spiralY(angle + 1)), 15\r
+NEXT angle\r
+\r
+' Wait for the user to press a key before exiting\r
+a$ = INPUT$(1)\r
+\r
+' End of program\r
+SYSTEM\r
+\r
diff --git a/2D GFX/Spirals/spiral, 5.bas b/2D GFX/Spirals/spiral, 5.bas
new file mode 100644 (file)
index 0000000..80b03e5
--- /dev/null
@@ -0,0 +1,101 @@
+' Program to render fancy looking spiral.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.12, Initial version\r
+' 2024.08, Improved program readability\r
+\r
+DECLARE SUB FillSegment (x1, y1, x2, y2, xx1, yy1, xx2, yy2)\r
+DIM SHARED spiralX(1 TO 10000)\r
+DIM SHARED spiralY(1 TO 10000)\r
+DIM SHARED angles(1 TO 10000)\r
+DIM SHARED phaseAngles(1 TO 10000)\r
+DIM SHARED spiralLength\r
+SCREEN 12\r
+stepUnit = 200\r
+spiralLength = 0\r
+\r
+' Generate the spiral points\r
+FOR angleIndex = 1 TO 97 STEP .15\r
+    spiralLength = spiralLength + 1\r
+    stepUnit = SIN(angleIndex / 31) * 100\r
+    xPos = SIN(angleIndex) * stepUnit * 3 + 320\r
+    yPos = COS(angleIndex) * stepUnit + 250\r
+    yPos = yPos - (COS(angleIndex / 31) * 200)\r
+    angles(spiralLength) = angleIndex\r
+    phaseAngles(spiralLength) = angleIndex / 31\r
+    spiralX(spiralLength) = xPos\r
+    spiralY(spiralLength) = yPos\r
+    PSET (xPos, yPos), 15\r
+NEXT angleIndex\r
+\r
+' Load texture data from file\r
+OPEN "texture.dat" FOR INPUT AS #1\r
+DIM SHARED textureData$(1 TO 1000)\r
+textureIndex = 0\r
+1\r
+    LINE INPUT #1, textureLine$\r
+    IF LEFT$(textureLine$, 3) = "END" THEN GOTO 2\r
+    textureIndex = textureIndex + 1\r
+    textureData$(textureIndex) = textureLine$\r
+GOTO 1\r
+2\r
+CLS\r
+\r
+' Apply texture to the spiral\r
+textureIndex = 1\r
+FOR charIndex = 1 TO 20\r
+    FOR textCharIndex = 1 TO LEN(textureData$(charIndex))\r
+        textureChar$ = RIGHT$(LEFT$(textureData$(charIndex), textCharIndex), 1)\r
+        textureIndex = textureIndex + 1\r
+        IF textureIndex > spiralLength - 43 THEN GOTO DONE\r
+        teeVal = SIN(angles(textureIndex + 32)) - COS(phaseAngles(textureIndex))\r
+\r
+        ' Draw lines if the condition is met\r
+        IF teeVal <= 0 THEN\r
+            LINE (spiralX(textureIndex), spiralY(textureIndex))-(spiralX(textureIndex + 1), spiralY(textureIndex + 1)), 15\r
+            LINE (spiralX(textureIndex), spiralY(textureIndex))-(spiralX(textureIndex + 42), spiralY(textureIndex + 42)), 15\r
+            ' Fill the segment if the character matches\r
+            IF textureChar$ = "M" THEN\r
+                CALL FillSegment(spiralX(textureIndex), spiralY(textureIndex), spiralX(textureIndex + 1), spiralY(textureIndex + 1), spiralX(textureIndex + 42), spiralY(textureIndex + 42), spiralX(textureIndex + 43), spiralY(textureIndex + 43))\r
+            END IF\r
+        END IF\r
+    NEXT textCharIndex\r
+NEXT charIndex\r
+DONE:\r
+a$ = INPUT$(1)\r
+SYSTEM\r
+\r
+' Subroutine to fill a segment with lines\r
+SUB FillSegment (x1, y1, x2, y2, xx1, yy1, xx2, yy2)\r
+    ' Assign input parameters to local variables\r
+    xStart = x1\r
+    yStart = y1\r
+    xEnd = x2\r
+    yEnd = y2\r
+    xxStart = xx1\r
+    yyStart = yy1\r
+    xxEnd = xx2\r
+    yyEnd = yy2\r
+\r
+    ' Calculate step increments\r
+    j = 10\r
+    xStep = (xEnd - xStart) / j\r
+    yStep = (yEnd - yStart) / j\r
+    xxStep = (xxEnd - xxStart) / j\r
+    yyStep = (yyEnd - yyStart) / j\r
+\r
+    ' Draw lines between the points\r
+    FOR a = 1 TO j\r
+        xStart = xStart + xStep\r
+        yStart = yStart + yStep\r
+        xxStart = xxStart + xxStep\r
+        yyStart = yyStart + yyStep\r
+        LINE (xStart, yStart)-(xxStart, yyStart), 15\r
+    NEXT a\r
+END SUB\r
+\r
diff --git a/2D GFX/Spirals/spiral, 5.png b/2D GFX/Spirals/spiral, 5.png
new file mode 100644 (file)
index 0000000..552f480
Binary files /dev/null and b/2D GFX/Spirals/spiral, 5.png differ
diff --git a/2D GFX/Spirals/spiral, 6.bas b/2D GFX/Spirals/spiral, 6.bas
new file mode 100644 (file)
index 0000000..03190e0
--- /dev/null
@@ -0,0 +1,160 @@
+' Program to render fancy looking textured and shaded spiral.\r
+' Texture is loaded from file.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.12, Initial version\r
+' 2024 - 2025, Improved program readability\r
+\r
+DECLARE SUB fill(x1, y1, x2, y2, xx1, yy1, xx2, yy2, hel)\r
+DIM SHARED torux(1 TO 10000)\r
+DIM SHARED toruy(1 TO 10000)\r
+DIM SHARED sin1(1 TO 10000)\r
+DIM SHARED cos1(1 TO 10000)\r
+DIM SHARED tor\r
+\r
+' Set the screen mode to 12\r
+SCREEN 12\r
+su = 200\r
+tor = 0\r
+\r
+' Calculate points for the spiral\r
+FOR a = 1 TO 97 STEP .15\r
+    tor = tor + 1\r
+    su = SIN(a / 31) * 100\r
+    x = SIN(a) * su * 3 + 320\r
+    y = COS(a) * su + 250\r
+    y = y - (COS(a / 31) * 200)\r
+    sin1(tor) = a\r
+    cos1(tor) = a / 31\r
+    torux(tor) = x\r
+    toruy(tor) = y\r
+    ' Set the pixel at (x, y) to color 15\r
+    PSET (x, y), 15\r
+NEXT a\r
+\r
+' Open the text file for input\r
+OPEN "texture1.dat" FOR INPUT AS #1\r
+DIM SHARED text$(1 TO 1000)\r
+\r
+a = 0\r
+1\r
+' Read a line from the file\r
+LINE INPUT #1, a$\r
+' Check if the line is the end marker\r
+IF LEFT$(a$, 3) = "END" THEN GOTO 2\r
+\r
+' Increment the counter and store the line in the text array\r
+a = a + 1\r
+text$(a) = a$\r
+GOTO 1\r
+2\r
+' Close the file\r
+CLOSE #1\r
+\r
+' Clear the screen\r
+CLS\r
+a = 1\r
+' Loop through each character in the text\r
+FOR c = 1 TO 20\r
+    FOR b = 1 TO LEN(text$(c))\r
+        ' Get the current character\r
+        a$ = RIGHT$(LEFT$(text$(c), b), 1)\r
+\r
+        ' Increment the counter\r
+        a = a + 1\r
+        ' Check if we have reached the end of the points array\r
+        IF a > tor - 43 THEN GOTO 3\r
+\r
+        ' Calculate the angle for the current point\r
+        tee = SIN(sin1(a + 32))\r
+        tee = tee - COS(cos1(a))\r
+\r
+        ' Draw lines based on the calculated angle\r
+        IF tee <= 0 THEN\r
+            LINE (torux(a), toruy(a))-(torux(a + 1), toruy(a + 1)), 15\r
+            LINE (torux(a), toruy(a))-(torux(a + 42), toruy(a + 42)), 15\r
+            hel = 10\r
+            hel1 = COS(cos1(a) - 1) + .5\r
+            hel2 = SIN(sin1(a) + 1) + 1\r
+            ' Adjust brightness based on the angles\r
+            IF hel2 > 1 AND hel1 > 1 THEN\r
+                hel3 = (hel2 - 1) * (hel1 - 1) * 8\r
+                hel = hel / (hel3 + 1)\r
+            END IF\r
+\r
+            ' Adjust brightness if the character is "M"\r
+            IF a$ = "M" THEN hel = hel / 3\r
+\r
+            ' Fill the shape with the calculated brightness\r
+            fillQuadrilateralWithShading torux(a), toruy(a), torux(a + 1), toruy(a + 1), torux(a + 42), toruy(a + 42), torux(a + 43), toruy(a + 43), hel\r
+        END IF\r
+    NEXT b\r
+NEXT c\r
+\r
+' Wait for user input\r
+3\r
+a$ = INPUT$(1)\r
+SYSTEM\r
+\r
+'\r
+' Fills a quadrilateral area using scanline algorithm with variable density\r
+' Creates shaded surface effect by interpolating between opposite edges\r
+'\r
+SUB fillQuadrilateralWithShading (startEdgePointX1, startEdgePointY1, endEdgePointX1, endEdgePointY1, shiftedStartEdgeX1, shiftedStarEdgeY1, shiftedEndEdgeX1, shiftEndEdgeY1, brightnessFactor)\r
+\r
+' This subroutine creates the illusion of a shaded surface by drawing multiple lines\r
+' between two opposite edges of a quadrilateral. The density of these lines is\r
+' controlled by the brightnessFactor parameter - higher values produce sparser lines.\r
+'\r
+' Parameters:\r
+' startEdgePointX1/Y1 and endEdgePointX1/Y1 define one pair of points forming an edge\r
+' shiftedStartEdgeX1/Y1 and shiftedEndEdgeX1/Y1 define the opposite edge\r
+' brightnessFactor controls how densely packed the lines will be drawn\r
+\r
+' Local variables for working with point coordinates\r
+edgePointX1 = startEdgePointX1\r
+edgePointY1 = startEdgePointY1\r
+edgePointX2 = endEdgePointX1\r
+edgePointY2 = endEdgePointY1\r
+oppositePointX1 = shiftedStartEdgeX1\r
+oppositePointY1 = shiftedStarEdgeY1\r
+oppositePointX2 = shiftedEndEdgeX1\r
+oppositePointY2 = shiftEndEdgeY1\r
+\r
+' Calculate distance differences along first edge\r
+deltaX1 = edgePointX1 - edgePointX2\r
+deltaY1 = edgePointY1 - edgePointY2\r
+length1 = SQR((deltaX1 * deltaX1) + (deltaY1 * deltaY1))\r
+\r
+' Calculate distance differences along second edge\r
+deltaX2 = oppositePointX1 - oppositePointX2\r
+deltaY2 = oppositePointY1 - oppositePointY2\r
+length2 = SQR((deltaX2 * deltaX2) + (deltaY2 * deltaY2))\r
+\r
+' Average length determines number of steps based on brightness factor\r
+averageLength = (length1 + length2) / 2\r
+stepCount = averageLength / brightnessFactor\r
+\r
+' Calculate step increments for each axis\r
+xStep1 = (edgePointX2 - edgePointX1) / stepCount\r
+yStep1 = (edgePointY2 - edgePointY1) / stepCount\r
+xStep2 = (oppositePointX2 - oppositePointX1) / stepCount\r
+yStep2 = (oppositePointY2 - oppositePointY1) / stepCount\r
+\r
+' Draw intermediate connecting lines across the shape\r
+FOR stepIndex = 1 TO stepCount\r
+    edgePointX1 = edgePointX1 + xStep1\r
+    edgePointY1 = edgePointY1 + yStep1\r
+    oppositePointX1 = oppositePointX1 + xStep2\r
+    oppositePointY1 = oppositePointY1 + yStep2\r
+\r
+    ' Draw line between current interpolated points\r
+    LINE (edgePointX1, edgePointY1)-(oppositePointX1, oppositePointY1), 15\r
+NEXT stepIndex\r
+\r
+END SUB
\ No newline at end of file
diff --git a/2D GFX/Spirals/spiral, 6.png b/2D GFX/Spirals/spiral, 6.png
new file mode 100644 (file)
index 0000000..887f850
Binary files /dev/null and b/2D GFX/Spirals/spiral, 6.png differ
diff --git a/2D GFX/Spirals/spiral.bas b/2D GFX/Spirals/spiral.bas
new file mode 100644 (file)
index 0000000..bcf2d26
--- /dev/null
@@ -0,0 +1,59 @@
+DECLARE SUB DrawLine (startX AS DOUBLE, startY AS DOUBLE, endX AS DOUBLE, endY AS DOUBLE, col AS INTEGER)\r
+\r
+' Program to render fancy looking spiral.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.12, Initial version\r
+' 2024.08, Improved program readability\r
+\r
+DIM SHARED lineVertexX(1 TO 100) AS DOUBLE\r
+DIM SHARED lineVertexY(1 TO 100) AS DOUBLE\r
+DIM SHARED depth AS INTEGER\r
+DIM SHARED tempDepth AS INTEGER\r
+SCREEN 12\r
+\r
+' Initialize the scale factor for the spiral\r
+spiralScaleFactor = 200\r
+depth = 0\r
+\r
+' Generate the spiral by iterating through angles and scaling appropriately\r
+FOR angle = 1 TO 30 STEP .1\r
+    ' Calculate the current scale based on the remaining distance to the center\r
+    spiralScaleFactor = (30 - angle) * 7\r
+    ' Convert polar coordinates to cartesian for the current point\r
+    xPosition = SIN(angle) * spiralScaleFactor + 200\r
+    yPosition = COS(angle) * spiralScaleFactor + 200\r
+    ' Store the current depth (z-axis value)\r
+    tempDepth = angle\r
+    ' Draw a line from the previous point to the current point with a color based on depth\r
+    DrawLine xPosition + (xPosition / 2) + (angle * 3), (yPosition - (xPosition / 3)) + (angle * 3), xPosition + 25, yPosition + 25 - (angle * 3), depth\r
+    ' Set the color for the next segment\r
+    depth = 15\r
+NEXT angle\r
+\r
+' Wait for user input to close the program\r
+userInput$ = INPUT$(1)\r
+\r
+SUB DrawLine (startX AS DOUBLE, startY AS DOUBLE, endX AS DOUBLE, endY AS DOUBLE, col AS INTEGER)\r
+    ' Calculate the step increments for x and y based on the depth\r
+    deltaX = (endX - startX) / tempDepth\r
+    deltaY = (endY - startY) / tempDepth\r
+\r
+    FOR segmentIndex = 1 TO tempDepth\r
+        ' If there is a previous vertex, draw a line to the new starting point\r
+        IF lineVertexX(segmentIndex) > 0 THEN LINE (lineVertexX(segmentIndex), lineVertexY(segmentIndex))-(startX, startY), col\r
+        ' Store the current starting point as the next vertex\r
+        lineVertexX(segmentIndex) = startX\r
+        lineVertexY(segmentIndex) = startY\r
+        ' Increment the starting point by the calculated deltas\r
+        startX = startX + deltaX\r
+        startY = startY + deltaY\r
+        ' Draw a line from the stored vertex to the new starting point\r
+        LINE (lineVertexX(segmentIndex), lineVertexY(segmentIndex))-(startX, startY), col\r
+    NEXT segmentIndex\r
+END SUB\r
diff --git a/2D GFX/Spirals/spiral.png b/2D GFX/Spirals/spiral.png
new file mode 100644 (file)
index 0000000..4c26bec
Binary files /dev/null and b/2D GFX/Spirals/spiral.png differ
diff --git a/2D GFX/Spirals/texture.dat b/2D GFX/Spirals/texture.dat
new file mode 100644 (file)
index 0000000..646d9b0
--- /dev/null
@@ -0,0 +1,54 @@
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.\r
+.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M\r
+END\r
+                                         \r
diff --git a/2D GFX/Spirals/texture1.dat b/2D GFX/Spirals/texture1.dat
new file mode 100644 (file)
index 0000000..3f591e5
--- /dev/null
@@ -0,0 +1,35 @@
+..........................................\r
+...........................MMM.M.M.MM.....\r
+............................M..MMM.M......\r
+............................M..M.M.MM.....\r
+...................................M......\r
+............................MM.....MM.....\r
+............................M.............\r
+............................MM.MM..MM.....\r
+............................M..M.M.M.M....\r
+............................MM.M.M.MM.....\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+..........................................\r
+END\r
+                                         \r
diff --git a/2D GFX/Stroboscope.bas b/2D GFX/Stroboscope.bas
new file mode 100644 (file)
index 0000000..e988ef1
--- /dev/null
@@ -0,0 +1,514 @@
+' Presentation about how to build stroboscope.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2002, Initial version\r
+' 2024 - 2025, Improved program readability\r
+\r
+DECLARE SUB InitializePresentation ()\r
+DECLARE SUB WaitForKeyPress (keyInput$)\r
+DECLARE SUB MoveModel ()\r
+DEFINT A-Z\r
+DECLARE SUB DrawLines ()\r
+DECLARE SUB Load3DModel ()\r
+DECLARE SUB Animate3DModel ()\r
+DECLARE SUB ClearScreen ()\r
+DECLARE SUB LoadFontPalette ()\r
+DECLARE SUB PrintText (x2%, y%, s%, c%, t$)\r
+DECLARE SUB DisplayClosingPage ()\r
+\r
+DECLARE SUB ProgramStart ()\r
+\r
+DIM SHARED font(0 TO 7, 0 TO 15, 0 TO 207)\r
+DIM SHARED paletteData(1 TO 100)\r
+DIM SHARED originalX1(1 TO 1000)\r
+DIM SHARED originalY1(1 TO 1000)\r
+DIM SHARED originalX2(1 TO 1000)\r
+DIM SHARED originalY2(1 TO 1000)\r
+DIM SHARED previousX1(1 TO 1000)\r
+DIM SHARED previousY1(1 TO 1000)\r
+DIM SHARED previousX2(1 TO 1000)\r
+DIM SHARED previousY2(1 TO 1000)\r
+DIM SHARED lineColor(1 TO 1000)\r
+\r
+DIM SHARED movementX, movementY, zoomLevel\r
+DIM SHARED startX, startY, startZoom\r
+DIM SHARED endX, endY, endZoom\r
+DIM SHARED totalFrames\r
+\r
+DIM SHARED lineCount\r
+\r
+ProgramStart\r
+\r
+InitializePresentation\r
+ClearScreen\r
+Animate3DModel\r
+DisplayClosingPage\r
+END\r
+\r
+DATA 0,0,5,-2\r
+DATA 0,0,5,2\r
+DATA 0, 0, 15, 0\r
+\r
+DATA 15,-2,15,2\r
+DATA 25,-2,25,2\r
+DATA 15,-2,25,-2\r
+DATA 15,2,25,2\r
+\r
+DATA 25,0,35,0\r
+DATA 35,-2,35,2\r
+DATA 35,-2,40,0\r
+DATA 35,2,40,0\r
+DATA 40,-2,40,2\r
+\r
+DATA 40,0,80,0\r
+DATA 50,0,50,19\r
+DATA 48,19,52,19\r
+DATA 48,21,52,21\r
+DATA 50,21,50,35\r
+\r
+DATA 0,35,125,35\r
+DATA 0,35,5,33\r
+DATA 0,35,5,37\r
+\r
+DATA 70,0,70,15\r
+DATA 70,35,70,20\r
+DATA 69,16,71,19\r
+DATA 69,19,71,16\r
+DATA 67,10,73,10\r
+DATA 67,25,73,25\r
+DATA 67,10,67,25\r
+DATA 73,10,73,25\r
+\r
+DATA 75,15,75,25\r
+DATA 75,20,90,20\r
+DATA 90,20,91,21\r
+DATA 91,21,90,22\r
+DATA 90,22,91,23\r
+DATA 91,23,90,24\r
+DATA 90,24,91,25\r
+DATA 91,25,90,26\r
+DATA 90,26,90,35\r
+\r
+DATA 93,18,93,28\r
+DATA 92,18,92,28\r
+\r
+DATA 95,20,94,21\r
+DATA 94,21,95,22\r
+DATA 95,22,94,23\r
+DATA 94,23,95,24\r
+DATA 95,24,94,25\r
+DATA 94,25,95,26\r
+DATA 95,26,95,35\r
+\r
+DATA 95, 20, 115, 20\r
+DATA 115,20,115,15\r
+DATA 115,7,115,0\r
+DATA 125,35,125,26\r
+DATA 123,26,127,26\r
+DATA 123,24,127,24\r
+DATA 125,24,125,0\r
+DATA 125,0,110,0\r
+DATA 110,-2,110,2\r
+DATA 100,-2,100,2\r
+DATA 100,-2,110,-2\r
+DATA 100,2,110,2\r
+\r
+DATA 100,0,90,0\r
+DATA 90,-2,90,2\r
+DATA 80,-2,80,2\r
+DATA 80,-2,90,-2\r
+DATA 80,2,90,2\r
+\r
+DATA 113,5,117,5\r
+DATA 113,17,117,17\r
+DATA 113,5,113,17\r
+DATA 117,5,117,17\r
+DATA 115,11,125,11\r
+\r
+DATA 105,-2,105,-5\r
+DATA 105,-5,113,-5\r
+DATA 113,-5,113,0\r
+DATA 105,-2,104,-4\r
+DATA 105,-2,106,-4\r
+\r
+DATA 999,999,999,999\r
+\r
+SUB Animate3DModel\r
+    ' Set up first animation parameters\r
+    startX = 20\r
+    startY = 15\r
+    startZoom = 100\r
+    endX = 20\r
+    endY = 15\r
+    endZoom = 10\r
+    totalFrames = 20\r
+\r
+    MoveModel\r
+\r
+    ' Print technical information\r
+    PrintText 147, 66, 1, 3, "100   D336B             180k    680k"\r
+    PrintText 180, 120, 1, 3, "50m 450V                          1m"\r
+    PrintText 180, 400, 2, 14, "Principal schematic"\r
+\r
+    WaitForKeyPress keyInput$\r
+\r
+    ' Clear screen for next animation\r
+    LINE (0, 0)-(639, 390), 0, BF\r
+\r
+    ' Set up second animation parameters\r
+    startX = 20\r
+    startY = 15\r
+    startZoom = 10\r
+    endX = 80\r
+    endY = 5\r
+    endZoom = 4\r
+    totalFrames = 20\r
+    MoveModel\r
+    WaitForKeyPress keyInput$\r
+\r
+    ' Set up third animation parameters\r
+    startX = 80\r
+    startY = 5\r
+    startZoom = 4\r
+    endX = 40\r
+    endY = 5\r
+    endZoom = 4\r
+    totalFrames = 20\r
+    MoveModel\r
+    WaitForKeyPress keyInput$\r
+\r
+    ' Set up fourth animation parameters\r
+    startX = 40\r
+    startY = 5\r
+    startZoom = 4\r
+    endX = 20\r
+    endY = 15\r
+    endZoom = 10\r
+    totalFrames = 10\r
+    MoveModel\r
+\r
+    ' Redraw technical information\r
+    PrintText 147, 66, 1, 3, "100   D336B             180k    680k"\r
+    PrintText 180, 120, 1, 3, "50m 450V                          1m"\r
+    WaitForKeyPress keyInput$\r
+END SUB\r
+\r
+SUB ClearScreen\r
+    ' change screen resolution. This also resets color palette.\r
+    SCREEN 13\r
+    SCREEN 12\r
+END SUB\r
+\r
+SUB DisplayClosingPage\r
+    CLS\r
+    SCREEN 13\r
+    PrintText 35, 100, 2, 14, "   Thank you"\r
+    PrintText 35, 140, 2, 14, " for attention!"\r
+\r
+    ' Create closing animation effect\r
+    DIM buffer(1 TO 30000)\r
+    GET (0, 100)-(319, 199), buffer(1)\r
+\r
+    ' Move text down with delay\r
+    FOR y = 100 TO 50 STEP -1\r
+        PUT (0, y), buffer(1), PSET\r
+        SOUND 0, .5\r
+    NEXT y\r
+\r
+    WaitForKeyPress keyInput$\r
+    SYSTEM\r
+END SUB\r
+\r
+SUB DrawLines\r
+    ' Draw all lines in the schematic with current transformation parameters.\r
+    ' First calculate new screen coordinates based on movement and zoom.\r
+    ' Then draw lines by erasing previous positions and drawing new ones.\r
+\r
+    FOR a = 1 TO lineCount\r
+        ' Calculate relative coordinates from original positions\r
+        x1 = originalX1(a) - movementX\r
+        y1 = originalY1(a) - movementY\r
+        x2 = originalX2(a) - movementX\r
+        y2 = originalY2(a) - movementY\r
+\r
+        ' Apply zoom scaling and centering (320x200 screen)\r
+        x1 = x1 * 30 / zoomLevel + 160\r
+        y1 = y1 * 30 / zoomLevel + 100\r
+        x2 = x2 * 30 / zoomLevel + 160\r
+        y2 = y2 * 30 / zoomLevel + 100\r
+\r
+        ' Erase previous line by drawing in black (color 0)\r
+        LINE (previousX1(a), previousY1(a))-(previousX2(a), previousY2(a)), 0\r
+\r
+        ' Draw new line with appropriate color\r
+        LINE (x1, y1)-(x2, y2), lineColor(a)\r
+\r
+        ' Update previous positions for next frame\r
+        previousX1(a) = x1\r
+        previousY1(a) = y1\r
+        previousX2(a) = x2\r
+        previousY2(a) = y2\r
+    NEXT a\r
+END SUB\r
+\r
+SUB InitializePresentation\r
+    ' Set up screen and create title animation\r
+    SCREEN 13\r
+\r
+    ' Configure palette for title animation\r
+    a = 0\r
+    FOR c = 16 TO 31\r
+        OUT &H3C8, c\r
+        OUT &H3C9, a * 3\r
+        OUT &H3C9, a * 4.5\r
+        OUT &H3C9, a * 0\r
+        a = a + 1\r
+    NEXT c\r
+\r
+    ' Set special colors for title effects\r
+    OUT &H3C8, 101\r
+    OUT &H3C9, 63\r
+    OUT &H3C9, 63\r
+    OUT &H3C9, 0\r
+\r
+    OUT &H3C8, 102\r
+    OUT &H3C9, 63\r
+    OUT &H3C9, 10\r
+    OUT &H3C9, 10\r
+\r
+    OUT &H3C8, 103\r
+    OUT &H3C9, 60\r
+    OUT &H3C9, 60\r
+    OUT &H3C9, 0\r
+\r
+    ' Configure palette for background text\r
+    a = 0\r
+    FOR c = 50 TO 65\r
+        OUT &H3C8, c\r
+        OUT &H3C9, a * 4.5\r
+        OUT &H3C9, a * 0\r
+        OUT &H3C9, (15 - a) * 4.5\r
+        a = a + 1\r
+    NEXT c\r
+\r
+    ' Create scrolling title animation\r
+    titleText$ = " Esitlus teemal:"\r
+\r
+    FOR t = 0 TO 400\r
+        ' Scroll title text across screen\r
+        IF t < 320 THEN\r
+            FOR y = 0 TO 199\r
+                c = POINT(319 - t, y)\r
+                IF c < 100 THEN c = c + 34\r
+                PSET (319 - t, y), c\r
+            NEXT y\r
+\r
+            x = 319 - t\r
+            ' Add text to scrolling animation\r
+            IF x / 16 = x \ 16 THEN\r
+                segment = x / 16\r
+                IF segment <= LEN(titleText$) THEN\r
+                    char$ = RIGHT$(LEFT$(titleText$, segment), 1)\r
+                    PrintText x, 20, 2, 101, char$\r
+                END IF\r
+            END IF\r
+        END IF\r
+\r
+        ' Create second animation phase\r
+        IF (t < 360) AND (t > 39) THEN\r
+            FOR y = 0 TO 13\r
+                c = POINT(359 - t, y)\r
+                IF c < 100 THEN c = c - 34\r
+                PSET (359 - t, y), c\r
+            NEXT y\r
+\r
+            FOR y = 55 TO 199\r
+                c = POINT(359 - t, y)\r
+                IF c < 100 THEN c = c - 34\r
+                PSET (359 - t, y), c\r
+            NEXT y\r
+        END IF\r
+\r
+        ' Frame delay using sound command\r
+        SOUND 0, .2\r
+    NEXT t\r
+\r
+    ' Draw final title text\r
+    PrintText 31, 101, 3, 102, "STROBOSKOOP"\r
+    PrintText 29, 99, 3, 102, "STROBOSKOOP"\r
+    PrintText 30, 100, 3, 103, "STROBOSKOOP"\r
+\r
+    ' Create color flipping effect for title\r
+    FOR x = 0 TO 160\r
+        FOR y = 100 TO 150\r
+            c = POINT(x, y)\r
+            IF c = 102 THEN c = 103: GOTO 2\r
+            IF c = 103 THEN c = 102: GOTO 2\r
+2\r
+            PSET (x, y), c\r
+        NEXT y\r
+        SOUND 0, .1\r
+    NEXT x\r
+\r
+    ' Continue color flipping effect\r
+    FOR y = 199 TO 120 STEP -1\r
+        FOR x = 0 TO 319\r
+            c = POINT(x, y)\r
+            IF c = 102 THEN c = 103: GOTO 3\r
+            IF c = 103 THEN c = 102: GOTO 3\r
+3\r
+            PSET (x, y), c\r
+        NEXT x\r
+        SOUND 0, .1\r
+    NEXT y\r
+\r
+    ' Print author information\r
+    PrintText 49, 179, 1, 0, "autor: Svjatoslav Agejenko"\r
+    PrintText 51, 181, 1, 0, "autor: Svjatoslav Agejenko"\r
+    PrintText 50, 180, 1, 15, "autor: Svjatoslav Agejenko"\r
+\r
+    ' Wait for user input before continuing\r
+    WaitForKeyPress keyInput$\r
+\r
+    ' Create screen border effect\r
+    DIM buffer(1 TO 30000)\r
+    FOR a = 1 TO 320 / 5\r
+        ' Capture and move screen sections\r
+        GET (0, 0)-(314, 100), buffer(1)\r
+        PUT (5, 0), buffer(1), PSET\r
+        LINE (0, 0)-(4, 100), 0, BF\r
+\r
+        GET (5, 101)-(319, 199), buffer(1)\r
+        PUT (0, 101), buffer(1), PSET\r
+        LINE (315, 101)-(319, 199), 0, BF\r
+    NEXT a\r
+END SUB\r
+\r
+SUB LoadFontPalette\r
+    ' Capture pixel data for each character in font array.\r
+    ' Make colors invisible for the human while doing so.\r
+\r
+    FOR c = 0 TO 15\r
+        OUT &H3C8, c\r
+        OUT &H3C9, 0\r
+        OUT &H3C9, 0\r
+        OUT &H3C9, 0\r
+    NEXT c\r
+\r
+    ' Load character pixel patterns into font array\r
+    FOR a = 0 TO 207\r
+        LOCATE 1, 1\r
+        IF (a > 5) AND (a < 14) THEN GOTO 1\r
+        PRINT CHR$(a)\r
+1\r
+        FOR y = 0 TO 15\r
+            FOR x = 0 TO 7\r
+                font(x, y, a) = POINT(x, y)\r
+            NEXT x\r
+        NEXT y\r
+    NEXT a\r
+END SUB\r
+\r
+SUB LoadSchematic\r
+    ' Load 3D model line data from DATA statements\r
+    ' Each line has two endpoints (x1,y1)-(x2,y2) and color\r
+\r
+    lineCount = 0\r
+5\r
+    READ x1, y1, x2, y2\r
+    IF x1 = 999 THEN GOTO 6\r
+    lineCount = lineCount + 1\r
+    originalX1(lineCount) = x1\r
+    originalY1(lineCount) = y1\r
+    originalX2(lineCount) = x2\r
+    originalY2(lineCount) = y2\r
+    lineColor(lineCount) = 11\r
+    GOTO 5\r
+6\r
+END SUB\r
+\r
+SUB MoveModel\r
+    ' Calculate model movement over time frames\r
+    ' Interpolate between start and end positions\r
+\r
+    movementXVelocity = endX - startX\r
+    movementYVelocity = endY - startY\r
+    zoomVelocity = endZoom - startZoom\r
+\r
+    ' Animate model by gradually changing position and zoom\r
+    FOR a = 1 TO totalFrames\r
+        movementX = startX + (movementXVelocity * a / totalFrames)\r
+        movementY = startY + (movementYVelocity * a / totalFrames)\r
+        zoomLevel = startZoom + (zoomVelocity * a / totalFrames)\r
+        DrawLines\r
+        ' Use sound command for sub-second delay (QBasic workaround)\r
+        SOUND 0, 1\r
+    NEXT a\r
+\r
+    ' Draw final position\r
+    DrawLines\r
+END SUB\r
+\r
+SUB PrintText (x2%, y%, s%, c%, t$)\r
+    ' Print text using custom font\r
+    ' Parameters:\r
+    ' x2% - starting x position\r
+    ' y% - starting y position\r
+    ' s% - character size multiplier\r
+    ' c% - color to use\r
+    ' t$ - text string to print\r
+\r
+    currentX = x2\r
+\r
+    ' Process each character in the string\r
+    FOR a = 1 TO LEN(t$)\r
+        charCode = ASC(RIGHT$(LEFT$(t$, a), 1))\r
+\r
+        ' Draw character using font data\r
+        FOR y1 = 0 TO 15\r
+            FOR x1 = 0 TO 7\r
+                IF font(x1, y1, charCode) > 0 THEN\r
+                    ' Draw filled rectangle for each pixel in character\r
+                    LINE (x1 * s + currentX, y1 * s + y)-(x1 * s + s - 1 + currentX, y1 * s + s - 1 + y), c, BF\r
+                END IF\r
+            NEXT x1\r
+        NEXT y1\r
+\r
+        ' Move to next character position\r
+        currentX = currentX + (8 * s)\r
+    NEXT a\r
+END SUB\r
+\r
+SUB ProgramStart\r
+    ' Initialize program with appropriate screen mode\r
+    SCREEN 12\r
+    LoadSchematic\r
+    LoadFontPalette\r
+\r
+    ' Set initial model parameters\r
+    movementX = 30\r
+    movementY = 15\r
+    zoomLevel = 10\r
+END SUB\r
+\r
+SUB WaitForKeyPress (keyInput$)\r
+    ' Clear keyboard buffer to avoid ghost keys\r
+    FOR a = 1 TO 50\r
+        keyInput$ = INKEY$\r
+    NEXT a\r
+\r
+7\r
+    keyInput$ = INKEY$\r
+    IF keyInput$ = "" THEN GOTO 7\r
+\r
+    ' Wait for another key press after initial one\r
+    FOR a = 1 TO 50\r
+        keyInput$ = INKEY$\r
+    NEXT a\r
+END SUB\r
+\r
diff --git a/2D GFX/Stroboscope.png b/2D GFX/Stroboscope.png
new file mode 100644 (file)
index 0000000..0baee1c
Binary files /dev/null and b/2D GFX/Stroboscope.png differ
diff --git a/2D GFX/Textures/Circular waves.bas b/2D GFX/Textures/Circular waves.bas
new file mode 100755 (executable)
index 0000000..7ef6fa8
--- /dev/null
@@ -0,0 +1,36 @@
+' Program to render circular wave patterns.\r
+' Algorithm was accidentally discovered while experimenting with sine function.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003, Initial version\r
+' 2025, Improved program readability\r
+\r
+SCREEN 13\r
+\r
+' Initialize the screen mode to 320x200 with 16 colors\r
+\r
+' Outer loop for the vertical axis (y-coordinate)\r
+FOR ycoordinate = 1 TO 199\r
+    ' Inner loop for the horizontal axis (x-coordinate)\r
+    FOR xcoordinate = 1 TO 319\r
+        ' Calculate the sine value based on the squared distances from the origin\r
+        colorvalue = SIN((xcoordinate ^ 2 + ycoordinate ^ 2) / 10) * 10\r
+\r
+        ' Clamp the color value to the range [0, 15]\r
+        IF colorvalue < 0 THEN colorvalue = 0\r
+        IF colorvalue > 15 THEN colorvalue = 15\r
+\r
+        ' Set the pixel color at (xcoordinate, ycoordinate) with an offset to use the full 16-color palette\r
+        PSET (xcoordinate, ycoordinate), colorvalue + 16\r
+    NEXT xcoordinate\r
+NEXT ycoordinate\r
+\r
+' Wait for user key press\r
+WHILE INKEY$ = "": WEND\r
+CLS\r
+END\r
diff --git a/2D GFX/Textures/Circular waves.png b/2D GFX/Textures/Circular waves.png
new file mode 100644 (file)
index 0000000..fbb5233
Binary files /dev/null and b/2D GFX/Textures/Circular waves.png differ
diff --git a/2D GFX/Textures/Diamond square clouds.bas b/2D GFX/Textures/Diamond square clouds.bas
new file mode 100755 (executable)
index 0000000..1662586
--- /dev/null
@@ -0,0 +1,96 @@
+DECLARE SUB DrawPixels (x1 AS INTEGER, y1 AS INTEGER, s AS INTEGER)\r
+' Program to render cloud surface using diamond square algorithm.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.12, Initial version\r
+' 2024.08, Improved program readability\r
+\r
+DECLARE SUB DrawBox (x1 AS INTEGER, y1 AS INTEGER, s AS INTEGER)\r
+DECLARE SUB SetPalette ()\r
+DECLARE SUB InitializeProgram ()\r
+DEFINT A-Z\r
+InitializeProgram\r
+\r
+DIM SHARED maxLightness AS INTEGER\r
+maxLightness = 127\r
+\r
+DIM scale AS INTEGER\r
+scale = 2 ^ 8\r
+\r
+1 :\r
+scale = scale \ 2\r
+x1 = (319 \ scale) - 1\r
+y1 = (199 \ scale) - 1\r
+\r
+FOR y = 0 TO y1\r
+    FOR x = 0 TO x1\r
+        DrawPixels x * scale, y * scale, scale\r
+    NEXT x\r
+NEXT y\r
+\r
+IF scale > 2 THEN GOTO 1\r
+WAITa$ = INPUT$(1)\r
+\r
+SUB DrawPixels (x1 AS INTEGER, y1 AS INTEGER, s AS INTEGER)\r
+    ' Get the lightness values for the corners of the box\r
+    c1 = POINT(x1, y1)\r
+    c2 = POINT(x1 + s, y1)\r
+    c3 = POINT(x1, y1 + s)\r
+    c4 = POINT(x1 + s, y1 + s)\r
+\r
+    ' Calculate the midpoint lightness values\r
+    sp = s \ 2\r
+    k = s * 2\r
+    kp = k / 2\r
+\r
+    cc2 = ((c1 + c2) / 2) + (RND * k) - kp\r
+    IF cc2 > maxLightness THEN cc2 = maxLightness\r
+    IF cc2 < 0 THEN cc2 = 0\r
+\r
+    cc3 = ((c1 + c3) / 2) + (RND * k) - kp\r
+    IF cc3 > maxLightness THEN cc3 = maxLightness\r
+    IF cc3 < 0 THEN cc3 = 0\r
+\r
+    cc4 = ((c2 + c4) / 2) + (RND * k) - kp\r
+    IF cc4 > maxLightness THEN cc4 = maxLightness\r
+    IF cc4 < 0 THEN cc4 = 0\r
+\r
+    cc5 = ((c3 + c4) / 2) + (RND * k) - kp\r
+    IF cc5 > maxLightness THEN cc5 = maxLightness\r
+    IF cc5 < 0 THEN cc5 = 0\r
+\r
+    ' Calculate the central lightness value\r
+    cc1 = ((cc2 + cc3 + cc4 + cc5) / 4) + (RND * k) - kp\r
+    IF cc1 > maxLightness THEN cc1 = maxLightness\r
+    IF cc1 < 0 THEN cc1 = 0\r
+\r
+    ' Set the calculated lightness values for the box\r
+    PSET (x1 + sp, y1 + sp), cc1\r
+    PSET (x1 + sp, y1), cc2\r
+    PSET (x1, y1 + sp), cc3\r
+    PSET (x1 + s, y1 + sp), cc4\r
+    PSET (x1 + sp, y1 + s), cc5\r
+END SUB\r
+\r
+SUB InitializeProgram\r
+    ' Set the screen mode and initialize the color palette\r
+    SCREEN 13\r
+    SetPalette\r
+    RANDOMIZE TIMER\r
+END SUB\r
+\r
+SUB SetPalette\r
+    ' Set the color palette for lightness levels\r
+    FOR a = 0 TO 255\r
+        OUT &H3C8, a\r
+        OUT &H3C9, a / 4\r
+        OUT &H3C9, a / 3\r
+        OUT &H3C9, a / 2.3\r
+    NEXT a\r
+END SUB\r
+\r
diff --git a/2D GFX/Textures/Diamond square clouds.png b/2D GFX/Textures/Diamond square clouds.png
new file mode 100644 (file)
index 0000000..b596db6
Binary files /dev/null and b/2D GFX/Textures/Diamond square clouds.png differ
diff --git a/2D GFX/Textures/Old paper.bas b/2D GFX/Textures/Old paper.bas
new file mode 100755 (executable)
index 0000000..bc012e5
--- /dev/null
@@ -0,0 +1,64 @@
+' Program to render surface resembling old paper.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003, Initial version\r
+' 2025, Improved program readability\r
+\r
+DEFINT A-Z\r
+SCREEN 13\r
+RANDOMIZE TIMER\r
+\r
+' Initialize the color palette to grayscale. Each color index from 0 to 63 has R, G, B values equal to the index,\r
+' creating a smooth grayscale gradient for the 256-color mode.\r
+FOR paletteIndex = 0 TO 63\r
+    OUT &H3C8, paletteIndex\r
+    OUT &H3C9, paletteIndex  ' Set red component\r
+    OUT &H3C9, paletteIndex  ' Set green component\r
+    OUT &H3C9, paletteIndex  ' Set blue component\r
+NEXT paletteIndex\r
+\r
+noiseOffset = 0\r
+\r
+' Generate a paper-like surface by averaging the color of the pixel above with some randomness.\r
+' This creates a procedural texture that mimics the roughness of paper.\r
+FOR y = 1 TO 190\r
+    FOR x = 1 TO 310\r
+        stepCounter = stepCounter + 1\r
+\r
+        ' Approximately every 10 steps, introduce a new random noise offset to create variation in the pattern.\r
+        ' This prevents the surface from becoming too uniform.\r
+        IF stepCounter > 10 THEN\r
+            noiseOffset = RND * currentColor / 20\r
+            stepCounter = stepCounter - (RND * 20 + 10)\r
+        END IF\r
+\r
+        ' Get the color of the pixel directly above the current position.\r
+        topColor = POINT(x, y - 1)\r
+\r
+        ' Calculate the current color as the average of the top color and the previous current color,\r
+        ' plus a small random noise and minus the noise offset. This creates a smooth transition with\r
+        ' controlled randomness.\r
+        currentColor = (topColor + currentColor) \ 2 + ((RND * 2) - noiseOffset)\r
+\r
+        ' Clamp the color value to stay within the valid palette range (0 to 63).\r
+        IF currentColor < 0 THEN currentColor = 0\r
+        IF currentColor > 63 THEN currentColor = 63\r
+\r
+        ' Plot the current pixel at (x-1, y) using the calculated color.\r
+        PSET (x - 1, y), currentColor\r
+    NEXT x\r
+\r
+    ' Set the starting color for the next row to the last calculated color of the current row.\r
+    ' This ensures continuity between rows.\r
+    PSET (0, y + 1), currentColor\r
+NEXT y\r
+\r
+' Wait for a single key press before exiting the program.\r
+inputKey$ = INPUT$(1)\r
+\r
+SYSTEM\r
diff --git a/2D GFX/Textures/Old paper.png b/2D GFX/Textures/Old paper.png
new file mode 100644 (file)
index 0000000..d9c900b
Binary files /dev/null and b/2D GFX/Textures/Old paper.png differ
diff --git a/2D GFX/Textures/Wood.bas b/2D GFX/Textures/Wood.bas
new file mode 100755 (executable)
index 0000000..c3251f7
--- /dev/null
@@ -0,0 +1,75 @@
+' Program to render surface resembling wood.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.12, Initial version\r
+' 2024 - 2025, Improved program readability\r
+\r
+DECLARE SUB DrawWoodSurface (woodX%, woodY%)\r
+DECLARE SUB DrawPaper (xPos%, y1Pos%)\r
+DEFINT A-Z\r
+SCREEN 12\r
+RANDOMIZE TIMER\r
+\r
+' Set palette colors\r
+FOR colorIndex = 0 TO 15\r
+    OUT &H3C8, colorIndex\r
+    OUT &H3C9, colorIndex * 4\r
+    OUT &H3C9, colorIndex * 3\r
+    OUT &H3C9, colorIndex * 0\r
+NEXT colorIndex\r
+\r
+' Main loop to draw wood at random positions\r
+100:\r
+woodX = RND * 400 + 200\r
+woodY = RND * 100 + 200\r
+CALL DrawWoodSurface(woodX, woodY)\r
+GOTO 100\r
+\r
+' Wait for user input to exit\r
+exitKey$ = INPUT$(1)\r
+\r
+SUB DrawWoodSurface (woodX, woodY)\r
+    DIM lowerY AS INTEGER\r
+    DIM phaseOffset AS INTEGER\r
+    DIM xStepCounter AS INTEGER\r
+    DIM randomOffset AS INTEGER\r
+    DIM newColor AS INTEGER\r
+    DIM upperColor AS INTEGER\r
+    DIM currentColor AS INTEGER\r
+\r
+    ' Draw the outline of the wood\r
+    lowerY = woodY + 1\r
+    LINE (0, 0)-(woodX, woodY), 0, BF  ' Black background\r
+    LINE (5, 5)-(woodX - 5, lowerY - 5), 8, BF  ' Gray wood outline\r
+    LINE (10, 10)-(woodX - 10, lowerY - 10), 15, BF  ' White inner highlight\r
+\r
+    ' Initialize random phase offset for color variation\r
+    phaseOffset = RND * 300\r
+\r
+    ' Draw the wood texture\r
+    FOR y = woodY - 1 TO 0 STEP -1\r
+        FOR x = woodX - 1 TO 0 STEP -1\r
+            xStepCounter = xStepCounter + 1\r
+            IF xStepCounter > woodX THEN\r
+                randomOffset = RND * 13  ' Small random noise for texture variation\r
+                xStepCounter = SIN((y + phaseOffset) / 100) * woodX  ' Sine wave to create wavy grain pattern\r
+            END IF\r
+            upperColor = POINT(x, y + 1)  ' Get color from upper pixel\r
+            currentColor = POINT(x, y)    ' Get color from current pixel\r
+            newColor = (upperColor * 2 + currentColor + newColor * 3 + randomOffset) / 7 + RND * 1\r
+\r
+            ' Ensure color value is within the valid range (0-15)\r
+            IF newColor < 0 THEN newColor = 0\r
+            IF newColor > 15 THEN newColor = 15\r
+\r
+            ' Set the pixel color for the wood texture\r
+            PSET (x + 1, y), newColor\r
+        NEXT x\r
+    NEXT y\r
+\r
+END SUB\r
diff --git a/2D GFX/Textures/Wood.png b/2D GFX/Textures/Wood.png
new file mode 100644 (file)
index 0000000..00726c3
Binary files /dev/null and b/2D GFX/Textures/Wood.png differ
diff --git a/2D GFX/Textures/Yellow flame.bas b/2D GFX/Textures/Yellow flame.bas
new file mode 100755 (executable)
index 0000000..a60c235
--- /dev/null
@@ -0,0 +1,47 @@
+' Yellow flame.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.12, Initial version\r
+' 2024.08, Improved program readability\r
+\r
+\r
+DEFINT A-Z ' Define all variables as integers\r
+SCREEN 13 ' Set graphics mode to 320x200 with 256 colors\r
+RANDOMIZE TIMER ' Seed the random number generator\r
+\r
+' Initialize palette registers with sine wave colors\r
+FOR paletteIndex = 0 TO 255\r
+    OUT &H3C8, paletteIndex\r
+    OUT &H3C9, INT(SIN(paletteIndex / 21) * 30 + 30)\r
+    OUT &H3C9, INT(SIN(paletteIndex / 34) * 30 + 30)\r
+    OUT &H3C9, INT(SIN(paletteIndex / 10) * 30 + 30)\r
+NEXT paletteIndex\r
+\r
+' Generate the surface pattern\r
+FOR y = 1 TO 199\r
+    FOR x = 1 TO 319\r
+        prevPixel = POINT(x, y - 1)\r
+        leftPixel = POINT(x - 1, y)\r
+        diagPixel = POINT(x - 1, y - 1)\r
+        left2Pixel = POINT(x - 2, y)\r
+\r
+        ' Calculate the average of surrounding pixels and add some randomness\r
+        newColor = (prevPixel + leftPixel + diagPixel + left2Pixel) \ 4 + (RND * 5 - 2)\r
+\r
+        ' Clamp the color value within the valid range\r
+        IF newColor < 0 THEN newColor = 0\r
+        IF newColor > 63 THEN newColor = 63\r
+\r
+        ' Set the pixel with the calculated color\r
+        PSET (x, y), newColor\r
+    NEXT x\r
+NEXT y\r
+\r
+' Wait for user input to exit\r
+userInput$ = INPUT$(1)\r
+\r
diff --git a/2D GFX/Textures/Yellow flame.png b/2D GFX/Textures/Yellow flame.png
new file mode 100644 (file)
index 0000000..762a97b
Binary files /dev/null and b/2D GFX/Textures/Yellow flame.png differ
diff --git a/2D GFX/Textures/index.html b/2D GFX/Textures/index.html
new file mode 100644 (file)
index 0000000..dc6dbcc
--- /dev/null
@@ -0,0 +1,627 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<!-- 2025-07-28 ma 03:32 -->
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+<meta name="viewport" content="width=device-width, initial-scale=1" />
+<title>Fractals</title>
+<meta name="generator" content="Org Mode" />
+<style>
+  #content { max-width: 60em; margin: auto; }
+  .title  { text-align: center;
+             margin-bottom: .2em; }
+  .subtitle { text-align: center;
+              font-size: medium;
+              font-weight: bold;
+              margin-top:0; }
+  .todo   { font-family: monospace; color: red; }
+  .done   { font-family: monospace; color: green; }
+  .priority { font-family: monospace; color: orange; }
+  .tag    { background-color: #eee; font-family: monospace;
+            padding: 2px; font-size: 80%; font-weight: normal; }
+  .timestamp { color: #bebebe; }
+  .timestamp-kwd { color: #5f9ea0; }
+  .org-right  { margin-left: auto; margin-right: 0px;  text-align: right; }
+  .org-left   { margin-left: 0px;  margin-right: auto; text-align: left; }
+  .org-center { margin-left: auto; margin-right: auto; text-align: center; }
+  .underline { text-decoration: underline; }
+  #postamble p, #preamble p { font-size: 90%; margin: .2em; }
+  p.verse { margin-left: 3%; }
+  pre {
+    border: 1px solid #e6e6e6;
+    border-radius: 3px;
+    background-color: #f2f2f2;
+    padding: 8pt;
+    font-family: monospace;
+    overflow: auto;
+    margin: 1.2em;
+  }
+  pre.src {
+    position: relative;
+    overflow: auto;
+  }
+  pre.src:before {
+    display: none;
+    position: absolute;
+    top: -8px;
+    right: 12px;
+    padding: 3px;
+    color: #555;
+    background-color: #f2f2f299;
+  }
+  pre.src:hover:before { display: inline; margin-top: 14px;}
+  /* Languages per Org manual */
+  pre.src-asymptote:before { content: 'Asymptote'; }
+  pre.src-awk:before { content: 'Awk'; }
+  pre.src-authinfo::before { content: 'Authinfo'; }
+  pre.src-C:before { content: 'C'; }
+  /* pre.src-C++ doesn't work in CSS */
+  pre.src-clojure:before { content: 'Clojure'; }
+  pre.src-css:before { content: 'CSS'; }
+  pre.src-D:before { content: 'D'; }
+  pre.src-ditaa:before { content: 'ditaa'; }
+  pre.src-dot:before { content: 'Graphviz'; }
+  pre.src-calc:before { content: 'Emacs Calc'; }
+  pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
+  pre.src-fortran:before { content: 'Fortran'; }
+  pre.src-gnuplot:before { content: 'gnuplot'; }
+  pre.src-haskell:before { content: 'Haskell'; }
+  pre.src-hledger:before { content: 'hledger'; }
+  pre.src-java:before { content: 'Java'; }
+  pre.src-js:before { content: 'Javascript'; }
+  pre.src-latex:before { content: 'LaTeX'; }
+  pre.src-ledger:before { content: 'Ledger'; }
+  pre.src-lisp:before { content: 'Lisp'; }
+  pre.src-lilypond:before { content: 'Lilypond'; }
+  pre.src-lua:before { content: 'Lua'; }
+  pre.src-matlab:before { content: 'MATLAB'; }
+  pre.src-mscgen:before { content: 'Mscgen'; }
+  pre.src-ocaml:before { content: 'Objective Caml'; }
+  pre.src-octave:before { content: 'Octave'; }
+  pre.src-org:before { content: 'Org mode'; }
+  pre.src-oz:before { content: 'OZ'; }
+  pre.src-plantuml:before { content: 'Plantuml'; }
+  pre.src-processing:before { content: 'Processing.js'; }
+  pre.src-python:before { content: 'Python'; }
+  pre.src-R:before { content: 'R'; }
+  pre.src-ruby:before { content: 'Ruby'; }
+  pre.src-sass:before { content: 'Sass'; }
+  pre.src-scheme:before { content: 'Scheme'; }
+  pre.src-screen:before { content: 'Gnu Screen'; }
+  pre.src-sed:before { content: 'Sed'; }
+  pre.src-sh:before { content: 'shell'; }
+  pre.src-sql:before { content: 'SQL'; }
+  pre.src-sqlite:before { content: 'SQLite'; }
+  /* additional languages in org.el's org-babel-load-languages alist */
+  pre.src-forth:before { content: 'Forth'; }
+  pre.src-io:before { content: 'IO'; }
+  pre.src-J:before { content: 'J'; }
+  pre.src-makefile:before { content: 'Makefile'; }
+  pre.src-maxima:before { content: 'Maxima'; }
+  pre.src-perl:before { content: 'Perl'; }
+  pre.src-picolisp:before { content: 'Pico Lisp'; }
+  pre.src-scala:before { content: 'Scala'; }
+  pre.src-shell:before { content: 'Shell Script'; }
+  pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
+  /* additional language identifiers per "defun org-babel-execute"
+       in ob-*.el */
+  pre.src-cpp:before  { content: 'C++'; }
+  pre.src-abc:before  { content: 'ABC'; }
+  pre.src-coq:before  { content: 'Coq'; }
+  pre.src-groovy:before  { content: 'Groovy'; }
+  /* additional language identifiers from org-babel-shell-names in
+     ob-shell.el: ob-shell is the only babel language using a lambda to put
+     the execution function name together. */
+  pre.src-bash:before  { content: 'bash'; }
+  pre.src-csh:before  { content: 'csh'; }
+  pre.src-ash:before  { content: 'ash'; }
+  pre.src-dash:before  { content: 'dash'; }
+  pre.src-ksh:before  { content: 'ksh'; }
+  pre.src-mksh:before  { content: 'mksh'; }
+  pre.src-posh:before  { content: 'posh'; }
+  /* Additional Emacs modes also supported by the LaTeX listings package */
+  pre.src-ada:before { content: 'Ada'; }
+  pre.src-asm:before { content: 'Assembler'; }
+  pre.src-caml:before { content: 'Caml'; }
+  pre.src-delphi:before { content: 'Delphi'; }
+  pre.src-html:before { content: 'HTML'; }
+  pre.src-idl:before { content: 'IDL'; }
+  pre.src-mercury:before { content: 'Mercury'; }
+  pre.src-metapost:before { content: 'MetaPost'; }
+  pre.src-modula-2:before { content: 'Modula-2'; }
+  pre.src-pascal:before { content: 'Pascal'; }
+  pre.src-ps:before { content: 'PostScript'; }
+  pre.src-prolog:before { content: 'Prolog'; }
+  pre.src-simula:before { content: 'Simula'; }
+  pre.src-tcl:before { content: 'tcl'; }
+  pre.src-tex:before { content: 'TeX'; }
+  pre.src-plain-tex:before { content: 'Plain TeX'; }
+  pre.src-verilog:before { content: 'Verilog'; }
+  pre.src-vhdl:before { content: 'VHDL'; }
+  pre.src-xml:before { content: 'XML'; }
+  pre.src-nxml:before { content: 'XML'; }
+  /* add a generic configuration mode; LaTeX export needs an additional
+     (add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
+  pre.src-conf:before { content: 'Configuration File'; }
+
+  table { border-collapse:collapse; }
+  caption.t-above { caption-side: top; }
+  caption.t-bottom { caption-side: bottom; }
+  td, th { vertical-align:top;  }
+  th.org-right  { text-align: center;  }
+  th.org-left   { text-align: center;   }
+  th.org-center { text-align: center; }
+  td.org-right  { text-align: right;  }
+  td.org-left   { text-align: left;   }
+  td.org-center { text-align: center; }
+  dt { font-weight: bold; }
+  .footpara { display: inline; }
+  .footdef  { margin-bottom: 1em; }
+  .figure { padding: 1em; }
+  .figure p { text-align: center; }
+  .equation-container {
+    display: table;
+    text-align: center;
+    width: 100%;
+  }
+  .equation {
+    vertical-align: middle;
+  }
+  .equation-label {
+    display: table-cell;
+    text-align: right;
+    vertical-align: middle;
+  }
+  .inlinetask {
+    padding: 10px;
+    border: 2px solid gray;
+    margin: 10px;
+    background: #ffffcc;
+  }
+  #org-div-home-and-up
+   { text-align: right; font-size: 70%; white-space: nowrap; }
+  textarea { overflow-x: auto; }
+  .linenr { font-size: smaller }
+  .code-highlighted { background-color: #ffff00; }
+  .org-info-js_info-navigation { border-style: none; }
+  #org-info-js_console-label
+    { font-size: 10px; font-weight: bold; white-space: nowrap; }
+  .org-info-js_search-highlight
+    { background-color: #ffff00; color: #000000; font-weight: bold; }
+  .org-svg { }
+</style>
+<style type="text/css">
+               body {
+                 max-width: 35cm !important;
+               }
+               #content {
+                 max-width: 80em !important;
+                 width: 90%;
+               }
+               </style>
+<link rel="stylesheet" type="text/css" href="https://thomasf.github.io/solarized-css/solarized-dark.min.css" />
+</head>
+<body>
+<div id="content" class="content">
+<h1 class="title">Fractals</h1>
+<div id="table-of-contents" role="doc-toc">
+<h2>Table of Contents</h2>
+<div id="text-table-of-contents" role="doc-toc">
+<ul>
+<li><a href="#orge4e7ce1">1. Circular waves</a></li>
+<li><a href="#org99c6cfa">2. Diamond square clouds</a></li>
+<li><a href="#orgbf537cb">3. Old paper</a></li>
+<li><a href="#org0540284">4. Wood</a></li>
+<li><a href="#org4685bf9">5. Yellow flame</a></li>
+</ul>
+</div>
+</div>
+<style>
+  .flex-center {
+    display: flex;            /* activate flexbox */
+    justify-content: center;  /* horizontally center anything inside   */
+  }
+  .flex-center video {
+    width: min(90%, 1000px); /* whichever is smaller wins */
+    height: auto;            /* preserve aspect ratio */
+  }
+  .responsive-img {
+    width: min(100%, 1000px);
+    height: auto;
+  }
+</style>
+
+<div id="outline-container-orge4e7ce1" class="outline-2">
+<h2 id="orge4e7ce1"><span class="section-number-2">1.</span> Circular waves</h2>
+<div class="outline-text-2" id="text-1">
+<p class="responsive-img">
+<img src="Circular waves.png" alt="Circular waves.png" class="responsive-img" />
+<a href="Circular waves.bas">Source code</a>
+</p>
+
+<div class="org-src-container">
+<pre class="src src-basic-qb45"><span style="color: #666677;">' </span><span style="color: #666677;">Program to render circular wave patterns.</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Algorithm was accidentally discovered while experimenting with sine function.</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">This program is free software: released under Creative Commons Zero (CC0) license</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">by Svjatoslav Agejenko.</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Email: svjatoslav@svjatoslav.eu</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Homepage: http://www.svjatoslav.eu</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Changelog:</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2003, Initial version</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2025, Improved program readability</span>
+
+<span style="color: #ee8899;">SCREEN</span> 13
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Initialize the screen mode to 320x200 with 16 colors</span>
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Outer loop for the vertical axis (y-coordinate)</span>
+<span style="color: #bb99ee;">FOR</span> ycoordinate = 1 <span style="color: #bb99ee;">TO</span> 199
+    <span style="color: #666677;">' </span><span style="color: #666677;">Inner loop for the horizontal axis (x-coordinate)</span>
+    <span style="color: #bb99ee;">FOR</span> xcoordinate = 1 <span style="color: #bb99ee;">TO</span> 319
+        <span style="color: #666677;">' </span><span style="color: #666677;">Calculate the sine value based on the squared distances from the origin</span>
+        colorvalue = <span style="color: #88aaee;">SIN</span>((xcoordinate ^ 2 + ycoordinate ^ 2) / 10) * 10
+
+        <span style="color: #666677;">' </span><span style="color: #666677;">Clamp the color value to the range [0, 15]</span>
+        <span style="color: #bb99ee;">IF</span> colorvalue &lt; 0 <span style="color: #bb99ee;">THEN</span> colorvalue = 0
+        <span style="color: #bb99ee;">IF</span> colorvalue &gt; 15 <span style="color: #bb99ee;">THEN</span> colorvalue = 15
+
+        <span style="color: #666677;">' </span><span style="color: #666677;">Set the pixel color at (xcoordinate, ycoordinate) with an offset to use the full 16-color palette</span>
+        <span style="color: #ee8899;">PSET</span> (xcoordinate, ycoordinate), colorvalue + 16
+    <span style="color: #bb99ee;">NEXT</span> xcoordinate
+<span style="color: #bb99ee;">NEXT</span> ycoordinate
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Wait for user key press</span>
+<span style="color: #bb99ee;">WHILE</span> <span style="color: #88aaee;">INKEY$</span> = <span style="color: #99dd99;">""</span>: <span style="color: #bb99ee;">WEND</span>
+<span style="color: #ee8899;">CLS</span>
+<span style="color: #bb99ee;">END</span>
+</pre>
+</div>
+</div>
+</div>
+
+<div id="outline-container-org99c6cfa" class="outline-2">
+<h2 id="org99c6cfa"><span class="section-number-2">2.</span> Diamond square clouds</h2>
+<div class="outline-text-2" id="text-2">
+<p class="responsive-img">
+<img src="Diamond square clouds.png" alt="Diamond square clouds.png" class="responsive-img" />
+<a href="Diamond square clouds.bas">Source code</a>
+</p>
+
+<div class="org-src-container">
+<pre class="src src-basic-qb45"><span style="color: #bb99ee;">DECLARE</span> <span style="color: #bb99ee;">SUB</span> DrawPixels (x1 <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>, y1 <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>, s <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>)
+<span style="color: #666677;">' </span><span style="color: #666677;">Program to render cloud surface using diamond square algorithm.</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">This program is free software: released under Creative Commons Zero (CC0) license</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">by Svjatoslav Agejenko.</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Email: svjatoslav@svjatoslav.eu</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Homepage: http://www.svjatoslav.eu</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Changelog:</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2003.12, Initial version</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2024.08, Improved program readability</span>
+
+<span style="color: #bb99ee;">DECLARE</span> <span style="color: #bb99ee;">SUB</span> DrawBox (x1 <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>, y1 <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>, s <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>)
+<span style="color: #bb99ee;">DECLARE</span> <span style="color: #bb99ee;">SUB</span> SetPalette ()
+<span style="color: #bb99ee;">DECLARE</span> <span style="color: #bb99ee;">SUB</span> InitializeProgram ()
+<span style="color: #bb99ee;">DEFINT</span> A-Z
+InitializeProgram
+
+<span style="color: #bb99ee;">DIM</span> <span style="color: #ee8899;">SHARED</span> maxLightness <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>
+maxLightness = 127
+
+<span style="color: #bb99ee;">DIM</span> scale <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>
+scale = 2 ^ 8
+
+<span style="color: #eeaa77;">1</span> :
+scale = scale \ 2
+x1 = (319 \ scale) - 1
+y1 = (199 \ scale) - 1
+
+<span style="color: #bb99ee;">FOR</span> y = 0 <span style="color: #bb99ee;">TO</span> y1
+    <span style="color: #bb99ee;">FOR</span> x = 0 <span style="color: #bb99ee;">TO</span> x1
+        DrawPixels x * scale, y * scale, scale
+    <span style="color: #bb99ee;">NEXT</span> x
+<span style="color: #bb99ee;">NEXT</span> y
+
+<span style="color: #bb99ee;">IF</span> scale &gt; 2 <span style="color: #bb99ee;">THEN</span> <span style="color: #bb99ee;">GOTO</span> <span style="color: #eeaa77;">1</span>
+WAITa$ = <span style="color: #88aaee;">INPUT$</span>(1)
+
+<span style="color: #bb99ee;">SUB</span> DrawPixels (x1 <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>, y1 <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>, s <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>)
+    <span style="color: #666677;">' </span><span style="color: #666677;">Get the lightness values for the corners of the box</span>
+    c1 = <span style="color: #88aaee;">POINT</span>(x1, y1)
+    c2 = <span style="color: #88aaee;">POINT</span>(x1 + s, y1)
+    c3 = <span style="color: #88aaee;">POINT</span>(x1, y1 + s)
+    c4 = <span style="color: #88aaee;">POINT</span>(x1 + s, y1 + s)
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Calculate the midpoint lightness values</span>
+    sp = s \ 2
+    k = s * 2
+    kp = k / 2
+
+    cc2 = ((c1 + c2) / 2) + (<span style="color: #88aaee;">RND</span> * k) - kp
+    <span style="color: #bb99ee;">IF</span> cc2 &gt; maxLightness <span style="color: #bb99ee;">THEN</span> cc2 = maxLightness
+    <span style="color: #bb99ee;">IF</span> cc2 &lt; 0 <span style="color: #bb99ee;">THEN</span> cc2 = 0
+
+    cc3 = ((c1 + c3) / 2) + (<span style="color: #88aaee;">RND</span> * k) - kp
+    <span style="color: #bb99ee;">IF</span> cc3 &gt; maxLightness <span style="color: #bb99ee;">THEN</span> cc3 = maxLightness
+    <span style="color: #bb99ee;">IF</span> cc3 &lt; 0 <span style="color: #bb99ee;">THEN</span> cc3 = 0
+
+    cc4 = ((c2 + c4) / 2) + (<span style="color: #88aaee;">RND</span> * k) - kp
+    <span style="color: #bb99ee;">IF</span> cc4 &gt; maxLightness <span style="color: #bb99ee;">THEN</span> cc4 = maxLightness
+    <span style="color: #bb99ee;">IF</span> cc4 &lt; 0 <span style="color: #bb99ee;">THEN</span> cc4 = 0
+
+    cc5 = ((c3 + c4) / 2) + (<span style="color: #88aaee;">RND</span> * k) - kp
+    <span style="color: #bb99ee;">IF</span> cc5 &gt; maxLightness <span style="color: #bb99ee;">THEN</span> cc5 = maxLightness
+    <span style="color: #bb99ee;">IF</span> cc5 &lt; 0 <span style="color: #bb99ee;">THEN</span> cc5 = 0
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Calculate the central lightness value</span>
+    cc1 = ((cc2 + cc3 + cc4 + cc5) / 4) + (<span style="color: #88aaee;">RND</span> * k) - kp
+    <span style="color: #bb99ee;">IF</span> cc1 &gt; maxLightness <span style="color: #bb99ee;">THEN</span> cc1 = maxLightness
+    <span style="color: #bb99ee;">IF</span> cc1 &lt; 0 <span style="color: #bb99ee;">THEN</span> cc1 = 0
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Set the calculated lightness values for the box</span>
+    <span style="color: #ee8899;">PSET</span> (x1 + sp, y1 + sp), cc1
+    <span style="color: #ee8899;">PSET</span> (x1 + sp, y1), cc2
+    <span style="color: #ee8899;">PSET</span> (x1, y1 + sp), cc3
+    <span style="color: #ee8899;">PSET</span> (x1 + s, y1 + sp), cc4
+    <span style="color: #ee8899;">PSET</span> (x1 + sp, y1 + s), cc5
+<span style="color: #bb99ee;">END</span> <span style="color: #bb99ee;">SUB</span>
+
+<span style="color: #bb99ee;">SUB</span> InitializeProgram
+    <span style="color: #666677;">' </span><span style="color: #666677;">Set the screen mode and initialize the color palette</span>
+    <span style="color: #ee8899;">SCREEN</span> 13
+    SetPalette
+    <span style="color: #ee8899;">RANDOMIZE</span> <span style="color: #ee8899;">TIMER</span>
+<span style="color: #bb99ee;">END</span> <span style="color: #bb99ee;">SUB</span>
+
+<span style="color: #bb99ee;">SUB</span> SetPalette
+    <span style="color: #666677;">' </span><span style="color: #666677;">Set the color palette for lightness levels</span>
+    <span style="color: #bb99ee;">FOR</span> a = 0 <span style="color: #bb99ee;">TO</span> 255
+        <span style="color: #ee8899;">OUT</span> &amp;H3C8, a
+        <span style="color: #ee8899;">OUT</span> &amp;H3C9, a / 4
+        <span style="color: #ee8899;">OUT</span> &amp;H3C9, a / 3
+        <span style="color: #ee8899;">OUT</span> &amp;H3C9, a / 2.3
+    <span style="color: #bb99ee;">NEXT</span> a
+<span style="color: #bb99ee;">END</span> <span style="color: #bb99ee;">SUB</span>
+</pre>
+</div>
+</div>
+</div>
+
+<div id="outline-container-orgbf537cb" class="outline-2">
+<h2 id="orgbf537cb"><span class="section-number-2">3.</span> Old paper</h2>
+<div class="outline-text-2" id="text-3">
+<p class="responsive-img">
+<img src="Old paper.png" alt="Old paper.png" class="responsive-img" />
+<a href="Old paper.bas">Source code</a>
+</p>
+
+<div class="org-src-container">
+<pre class="src src-basic-qb45"><span style="color: #666677;">' </span><span style="color: #666677;">Program to render surface resembling old paper.</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">This program is free software: released under Creative Commons Zero (CC0) license</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">by Svjatoslav Agejenko.</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Email: svjatoslav@svjatoslav.eu</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Homepage: http://www.svjatoslav.eu</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Changelog:</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2003, Initial version</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2025, Improved program readability</span>
+
+<span style="color: #bb99ee;">DEFINT</span> A-Z
+<span style="color: #ee8899;">SCREEN</span> 13
+<span style="color: #ee8899;">RANDOMIZE</span> <span style="color: #ee8899;">TIMER</span>
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Initialize the color palette to grayscale. Each color index from 0 to 63 has R, G, B values equal to the index,</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">creating a smooth grayscale gradient for the 256-color mode.</span>
+<span style="color: #bb99ee;">FOR</span> paletteIndex = 0 <span style="color: #bb99ee;">TO</span> 63
+    <span style="color: #ee8899;">OUT</span> &amp;H3C8, paletteIndex
+    <span style="color: #ee8899;">OUT</span> &amp;H3C9, paletteIndex  <span style="color: #666677;">' </span><span style="color: #666677;">Set red component</span>
+    <span style="color: #ee8899;">OUT</span> &amp;H3C9, paletteIndex  <span style="color: #666677;">' </span><span style="color: #666677;">Set green component</span>
+    <span style="color: #ee8899;">OUT</span> &amp;H3C9, paletteIndex  <span style="color: #666677;">' </span><span style="color: #666677;">Set blue component</span>
+<span style="color: #bb99ee;">NEXT</span> paletteIndex
+
+noiseOffset = 0
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Generate a paper-like surface by averaging the color of the pixel above with some randomness.</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">This creates a procedural texture that mimics the roughness of paper.</span>
+<span style="color: #bb99ee;">FOR</span> y = 1 <span style="color: #bb99ee;">TO</span> 190
+    <span style="color: #bb99ee;">FOR</span> x = 1 <span style="color: #bb99ee;">TO</span> 310
+        stepCounter = stepCounter + 1
+
+        <span style="color: #666677;">' </span><span style="color: #666677;">Approximately every 10 steps, introduce a new random noise offset to create variation in the pattern.</span>
+        <span style="color: #666677;">' </span><span style="color: #666677;">This prevents the surface from becoming too uniform.</span>
+        <span style="color: #bb99ee;">IF</span> stepCounter &gt; 10 <span style="color: #bb99ee;">THEN</span>
+            noiseOffset = <span style="color: #88aaee;">RND</span> * currentColor / 20
+            stepCounter = stepCounter - (<span style="color: #88aaee;">RND</span> * 20 + 10)
+        <span style="color: #bb99ee;">END</span> <span style="color: #bb99ee;">IF</span>
+
+        <span style="color: #666677;">' </span><span style="color: #666677;">Get the color of the pixel directly above the current position.</span>
+        topColor = <span style="color: #88aaee;">POINT</span>(x, y - 1)
+
+        <span style="color: #666677;">' </span><span style="color: #666677;">Calculate the current color as the average of the top color and the previous current color,</span>
+        <span style="color: #666677;">' </span><span style="color: #666677;">plus a small random noise and minus the noise offset. This creates a smooth transition with</span>
+        <span style="color: #666677;">' </span><span style="color: #666677;">controlled randomness.</span>
+        currentColor = (topColor + currentColor) \ 2 + ((<span style="color: #88aaee;">RND</span> * 2) - noiseOffset)
+
+        <span style="color: #666677;">' </span><span style="color: #666677;">Clamp the color value to stay within the valid palette range (0 to 63).</span>
+        <span style="color: #bb99ee;">IF</span> currentColor &lt; 0 <span style="color: #bb99ee;">THEN</span> currentColor = 0
+        <span style="color: #bb99ee;">IF</span> currentColor &gt; 63 <span style="color: #bb99ee;">THEN</span> currentColor = 63
+
+        <span style="color: #666677;">' </span><span style="color: #666677;">Plot the current pixel at (x-1, y) using the calculated color.</span>
+        <span style="color: #ee8899;">PSET</span> (x - 1, y), currentColor
+    <span style="color: #bb99ee;">NEXT</span> x
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Set the starting color for the next row to the last calculated color of the current row.</span>
+    <span style="color: #666677;">' </span><span style="color: #666677;">This ensures continuity between rows.</span>
+    <span style="color: #ee8899;">PSET</span> (0, y + 1), currentColor
+<span style="color: #bb99ee;">NEXT</span> y
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Wait for a single key press before exiting the program.</span>
+inputKey$ = <span style="color: #88aaee;">INPUT$</span>(1)
+
+<span style="color: #bb99ee;">SYSTEM</span>
+</pre>
+</div>
+</div>
+</div>
+
+<div id="outline-container-org0540284" class="outline-2">
+<h2 id="org0540284"><span class="section-number-2">4.</span> Wood</h2>
+<div class="outline-text-2" id="text-4">
+<p class="responsive-img">
+<img src="Wood.png" alt="Wood.png" class="responsive-img" />
+<a href="Wood.bas">Source code</a>
+</p>
+
+<div class="org-src-container">
+<pre class="src src-basic-qb45"><span style="color: #666677;">' </span><span style="color: #666677;">Program to render surface resembling wood.</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">This program is free software: released under Creative Commons Zero (CC0) license</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">by Svjatoslav Agejenko.</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Email: svjatoslav@svjatoslav.eu</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Homepage: http://www.svjatoslav.eu</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Changelog:</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2003.12, Initial version</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2024 - 2025, Improved program readability</span>
+
+<span style="color: #bb99ee;">DECLARE</span> <span style="color: #bb99ee;">SUB</span> DrawWoodSurface (woodX%, woodY%)
+<span style="color: #bb99ee;">DECLARE</span> <span style="color: #bb99ee;">SUB</span> DrawPaper (xPos%, y1Pos%)
+<span style="color: #bb99ee;">DEFINT</span> A-Z
+<span style="color: #ee8899;">SCREEN</span> 12
+<span style="color: #ee8899;">RANDOMIZE</span> <span style="color: #ee8899;">TIMER</span>
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Set palette colors</span>
+<span style="color: #bb99ee;">FOR</span> colorIndex = 0 <span style="color: #bb99ee;">TO</span> 15
+    <span style="color: #ee8899;">OUT</span> &amp;H3C8, colorIndex
+    <span style="color: #ee8899;">OUT</span> &amp;H3C9, colorIndex * 4
+    <span style="color: #ee8899;">OUT</span> &amp;H3C9, colorIndex * 3
+    <span style="color: #ee8899;">OUT</span> &amp;H3C9, colorIndex * 0
+<span style="color: #bb99ee;">NEXT</span> colorIndex
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Main loop to draw wood at random positions</span>
+<span style="color: #eeaa77;">100</span>:
+woodX = <span style="color: #88aaee;">RND</span> * 400 + 200
+woodY = <span style="color: #88aaee;">RND</span> * 100 + 200
+<span style="color: #bb99ee;">CALL</span> DrawWoodSurface(woodX, woodY)
+<span style="color: #bb99ee;">GOTO</span> <span style="color: #eeaa77;">100</span>
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Wait for user input to exit</span>
+exitKey$ = <span style="color: #88aaee;">INPUT$</span>(1)
+
+<span style="color: #bb99ee;">SUB</span> DrawWoodSurface (woodX, woodY)
+    <span style="color: #bb99ee;">DIM</span> lowerY <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>
+    <span style="color: #bb99ee;">DIM</span> phaseOffset <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>
+    <span style="color: #bb99ee;">DIM</span> xStepCounter <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>
+    <span style="color: #bb99ee;">DIM</span> randomOffset <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>
+    <span style="color: #bb99ee;">DIM</span> newColor <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>
+    <span style="color: #bb99ee;">DIM</span> upperColor <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>
+    <span style="color: #bb99ee;">DIM</span> currentColor <span style="color: #bb99ee;">AS</span> <span style="color: #eeddaa;">INTEGER</span>
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Draw the outline of the wood</span>
+    lowerY = woodY + 1
+    <span style="color: #ee8899;">LINE</span> (0, 0)-(woodX, woodY), 0, BF  <span style="color: #666677;">' </span><span style="color: #666677;">Black background</span>
+    <span style="color: #ee8899;">LINE</span> (5, 5)-(woodX - 5, lowerY - 5), 8, BF  <span style="color: #666677;">' </span><span style="color: #666677;">Gray wood outline</span>
+    <span style="color: #ee8899;">LINE</span> (10, 10)-(woodX - 10, lowerY - 10), 15, BF  <span style="color: #666677;">' </span><span style="color: #666677;">White inner highlight</span>
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Initialize random phase offset for color variation</span>
+    phaseOffset = <span style="color: #88aaee;">RND</span> * 300
+
+    <span style="color: #666677;">' </span><span style="color: #666677;">Draw the wood texture</span>
+    <span style="color: #bb99ee;">FOR</span> y = woodY - 1 <span style="color: #bb99ee;">TO</span> 0 <span style="color: #bb99ee;">STEP</span> -1
+        <span style="color: #bb99ee;">FOR</span> x = woodX - 1 <span style="color: #bb99ee;">TO</span> 0 <span style="color: #bb99ee;">STEP</span> -1
+            xStepCounter = xStepCounter + 1
+            <span style="color: #bb99ee;">IF</span> xStepCounter &gt; woodX <span style="color: #bb99ee;">THEN</span>
+                randomOffset = <span style="color: #88aaee;">RND</span> * 13  <span style="color: #666677;">' </span><span style="color: #666677;">Small random noise for texture variation</span>
+                xStepCounter = <span style="color: #88aaee;">SIN</span>((y + phaseOffset) / 100) * woodX  <span style="color: #666677;">' </span><span style="color: #666677;">Sine wave to create wavy grain pattern</span>
+            <span style="color: #bb99ee;">END</span> <span style="color: #bb99ee;">IF</span>
+            upperColor = <span style="color: #88aaee;">POINT</span>(x, y + 1)  <span style="color: #666677;">' </span><span style="color: #666677;">Get color from upper pixel</span>
+            currentColor = <span style="color: #88aaee;">POINT</span>(x, y)    <span style="color: #666677;">' </span><span style="color: #666677;">Get color from current pixel</span>
+            newColor = (upperColor * 2 + currentColor + newColor * 3 + randomOffset) / 7 + <span style="color: #88aaee;">RND</span> * 1
+
+            <span style="color: #666677;">' </span><span style="color: #666677;">Ensure color value is within the valid range (0-15)</span>
+            <span style="color: #bb99ee;">IF</span> newColor &lt; 0 <span style="color: #bb99ee;">THEN</span> newColor = 0
+            <span style="color: #bb99ee;">IF</span> newColor &gt; 15 <span style="color: #bb99ee;">THEN</span> newColor = 15
+
+            <span style="color: #666677;">' </span><span style="color: #666677;">Set the pixel color for the wood texture</span>
+            <span style="color: #ee8899;">PSET</span> (x + 1, y), newColor
+        <span style="color: #bb99ee;">NEXT</span> x
+    <span style="color: #bb99ee;">NEXT</span> y
+
+<span style="color: #bb99ee;">END</span> <span style="color: #bb99ee;">SUB</span>
+</pre>
+</div>
+</div>
+</div>
+
+<div id="outline-container-org4685bf9" class="outline-2">
+<h2 id="org4685bf9"><span class="section-number-2">5.</span> Yellow flame</h2>
+<div class="outline-text-2" id="text-5">
+<p class="responsive-img">
+<img src="Yellow flame.png" alt="Yellow flame.png" class="responsive-img" />
+<a href="Yellow flame.bas">Source code</a>
+</p>
+
+<div class="org-src-container">
+<pre class="src src-basic-qb45"><span style="color: #666677;">' </span><span style="color: #666677;">Yellow flame.</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">This program is free software: released under Creative Commons Zero (CC0) license</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">by Svjatoslav Agejenko.</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Email: svjatoslav@svjatoslav.eu</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Homepage: http://www.svjatoslav.eu</span>
+<span style="color: #666677;">'</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">Changelog:</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2003.12, Initial version</span>
+<span style="color: #666677;">' </span><span style="color: #666677;">2024.08, Improved program readability</span>
+
+
+<span style="color: #bb99ee;">DEFINT</span> A-Z <span style="color: #666677;">' </span><span style="color: #666677;">Define all variables as integers</span>
+<span style="color: #ee8899;">SCREEN</span> 13 <span style="color: #666677;">' </span><span style="color: #666677;">Set graphics mode to 320x200 with 256 colors</span>
+<span style="color: #ee8899;">RANDOMIZE</span> <span style="color: #ee8899;">TIMER</span> <span style="color: #666677;">' </span><span style="color: #666677;">Seed the random number generator</span>
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Initialize palette registers with sine wave colors</span>
+<span style="color: #bb99ee;">FOR</span> paletteIndex = 0 <span style="color: #bb99ee;">TO</span> 255
+    <span style="color: #ee8899;">OUT</span> &amp;H3C8, paletteIndex
+    <span style="color: #ee8899;">OUT</span> &amp;H3C9, <span style="color: #88aaee;">INT</span>(<span style="color: #88aaee;">SIN</span>(paletteIndex / 21) * 30 + 30)
+    <span style="color: #ee8899;">OUT</span> &amp;H3C9, <span style="color: #88aaee;">INT</span>(<span style="color: #88aaee;">SIN</span>(paletteIndex / 34) * 30 + 30)
+    <span style="color: #ee8899;">OUT</span> &amp;H3C9, <span style="color: #88aaee;">INT</span>(<span style="color: #88aaee;">SIN</span>(paletteIndex / 10) * 30 + 30)
+<span style="color: #bb99ee;">NEXT</span> paletteIndex
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Generate the surface pattern</span>
+<span style="color: #bb99ee;">FOR</span> y = 1 <span style="color: #bb99ee;">TO</span> 199
+    <span style="color: #bb99ee;">FOR</span> x = 1 <span style="color: #bb99ee;">TO</span> 319
+        prevPixel = <span style="color: #88aaee;">POINT</span>(x, y - 1)
+        leftPixel = <span style="color: #88aaee;">POINT</span>(x - 1, y)
+        diagPixel = <span style="color: #88aaee;">POINT</span>(x - 1, y - 1)
+        left2Pixel = <span style="color: #88aaee;">POINT</span>(x - 2, y)
+
+        <span style="color: #666677;">' </span><span style="color: #666677;">Calculate the average of surrounding pixels and add some randomness</span>
+        newColor = (prevPixel + leftPixel + diagPixel + left2Pixel) \ 4 + (<span style="color: #88aaee;">RND</span> * 5 - 2)
+
+        <span style="color: #666677;">' </span><span style="color: #666677;">Clamp the color value within the valid range</span>
+        <span style="color: #bb99ee;">IF</span> newColor &lt; 0 <span style="color: #bb99ee;">THEN</span> newColor = 0
+        <span style="color: #bb99ee;">IF</span> newColor &gt; 63 <span style="color: #bb99ee;">THEN</span> newColor = 63
+
+        <span style="color: #666677;">' </span><span style="color: #666677;">Set the pixel with the calculated color</span>
+        <span style="color: #ee8899;">PSET</span> (x, y), newColor
+    <span style="color: #bb99ee;">NEXT</span> x
+<span style="color: #bb99ee;">NEXT</span> y
+
+<span style="color: #666677;">' </span><span style="color: #666677;">Wait for user input to exit</span>
+userInput$ = <span style="color: #88aaee;">INPUT$</span>(1)
+</pre>
+</div>
+</div>
+</div>
+</div>
+<div id="postamble" class="status">
+<p class="date">Created: 2025-07-28 ma 03:32</p>
+<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
+</div>
+</body>
+</html>
diff --git a/2D GFX/Textures/index.org b/2D GFX/Textures/index.org
new file mode 100644 (file)
index 0000000..46e4c6c
--- /dev/null
@@ -0,0 +1,64 @@
+#+TITLE: Fractals
+#+LANGUAGE: en
+#+LATEX_HEADER: \usepackage[margin=1.0in]{geometry}
+#+LATEX_HEADER: \usepackage{parskip}
+#+LATEX_HEADER: \usepackage[none]{hyphenat}
+#+OPTIONS: H:20 num:20
+#+OPTIONS: author:nil
+
+#+begin_export html
+<style>
+  .flex-center {
+    display: flex;            /* activate flexbox */
+    justify-content: center;  /* horizontally center anything inside   */
+  }
+  .flex-center video {
+    width: min(90%, 1000px); /* whichever is smaller wins */
+    height: auto;            /* preserve aspect ratio */
+  }
+  .responsive-img {
+    width: min(100%, 1000px);
+    height: auto;
+  }
+</style>
+#+end_export
+
+* Circular waves
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:Circular waves.png]]
+[[file:Circular waves.bas][Source code]]
+
+#+INCLUDE: "Circular waves.bas" src basic-qb45
+
+* Diamond square clouds
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:Diamond square clouds.png]]
+[[file:Diamond square clouds.bas][Source code]]
+
+#+INCLUDE: "Diamond square clouds.bas" src basic-qb45
+
+* Old paper
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:Old paper.png]]
+[[file:Old paper.bas][Source code]]
+
+#+INCLUDE: "Old paper.bas" src basic-qb45
+
+* Wood
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:Wood.png]]
+[[file:Wood.bas][Source code]]
+
+#+INCLUDE: "Wood.bas" src basic-qb45
+
+* Yellow flame
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:Yellow flame.png]]
+[[file:Yellow flame.bas][Source code]]
+
+#+INCLUDE: "Yellow flame.bas" src basic-qb45
diff --git a/2D GFX/Textures/logo.png b/2D GFX/Textures/logo.png
new file mode 100644 (file)
index 0000000..0d41afb
Binary files /dev/null and b/2D GFX/Textures/logo.png differ
diff --git a/2D GFX/Truncated cone.bas b/2D GFX/Truncated cone.bas
new file mode 100755 (executable)
index 0000000..aafae4f
--- /dev/null
@@ -0,0 +1,73 @@
+' Program that draws truncated cone:\r
+' - Top Part: A cylinder (with diagonal hatching).\r
+' - Middle Part: A frustum (truncated cone) – it widens from the bottom cylinder to the top cylinder.\r
+' - Bottom Part: A smaller cylinder.\r
+'\r
+' Goal of this program is to test viability of programming/code to generate images of 3D shapes.\r
+'\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2000, Initial version\r
+' 2024 - 2025, Improved program readability\r
+\r
+\r
+DECLARE SUB DrawLine (x%, y%, l%, clr%)\r
+\r
+DEFINT A-Z\r
+SCREEN 12\r
+\r
+' Set up the palette\r
+FOR a = 0 TO 16\r
+    OUT &H3C8, a\r
+    OUT &H3C9, a * 4\r
+    OUT &H3C9, a * 4\r
+    OUT &H3C9, a * 4\r
+NEXT\r
+\r
+' Draw the pattern\r
+FOR x = 0 TO 200\r
+    y = SQR((200 - x) * x) / 2\r
+    DrawLine x + 200, y + 200, y * 2, t\r
+    LINE (x + 200, y + 202)-(x + 200, y + 250), t\r
+    IF x < 195 THEN\r
+        LINE (300 + ((x - 100) / 2), y / 2 + 328)-(x + 200, y + 252), t\r
+    END IF\r
+    LINE (300 + ((x - 100) / 2), y / 2 + 330)-(300 + ((x - 100) / 2), y / 2 + 370), t\r
+NEXT x\r
+\r
+SUB DrawLine (x, y, l, clr)\r
+    ' Calculate the initial color value\r
+    c = 650 - y - x\r
+\r
+    ' Adjust color to be within a specific range\r
+1   IF c > 30 THEN\r
+        c = c - 30\r
+        GOTO 1\r
+    END IF\r
+\r
+    clr = c\r
+    IF clr > 15 THEN\r
+        clr = 30 - clr\r
+    END IF\r
+\r
+    ' Draw a vertical line with varying colors\r
+    FOR y1 = y TO y - l STEP -1\r
+        c1 = c\r
+        IF c1 > 15 THEN\r
+            c1 = 30 - c1\r
+        END IF\r
+\r
+        PSET (x, y1), c1\r
+\r
+        ' Increment the color and wrap around if necessary\r
+        c = c + 1\r
+        IF c > 30 THEN\r
+            c = c - 30\r
+        END IF\r
+    NEXT y1\r
+END SUB\r
diff --git a/2D GFX/Truncated cone.png b/2D GFX/Truncated cone.png
new file mode 100644 (file)
index 0000000..d2df067
Binary files /dev/null and b/2D GFX/Truncated cone.png differ
diff --git a/3D GFX/3D Synthezier/.project b/3D GFX/3D Synthezier/.project
new file mode 100644 (file)
index 0000000..969bddf
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>3dSynthezier</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+       </buildSpec>
+       <natures>
+       </natures>
+</projectDescription>
diff --git a/3D GFX/3D Synthezier/bin/3dparse.bas b/3D GFX/3D Synthezier/bin/3dparse.bas
new file mode 100755 (executable)
index 0000000..ad6f74c
--- /dev/null
@@ -0,0 +1,614 @@
+' Program that parses special programmable 3D scene description language\r
+' and generates from it 3D objects in Wavefront .obj format.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' ?, Initial version\r
+' 2024, Improved program readability\r
+\r
+' Before running, make sure include path is correct. See below.\r
+\r
+DECLARE SUB parsel (a$)\r
+DECLARE SUB stat2 (b!)\r
+DECLARE SUB stat ()\r
+DECLARE SUB getchc (a$, b!)\r
+DECLARE SUB start ()\r
+DECLARE SUB qui ()\r
+DECLARE SUB flushpoly (a!)\r
+DECLARE SUB usemtl (a$)\r
+DECLARE SUB flushp ()\r
+DECLARE SUB parse (a$)\r
+DECLARE SUB geth (b!)\r
+DECLARE SUB cmd (a$)\r
+DECLARE SUB getson (a$)\r
+\r
+DIM SHARED px(1 TO 1000)\r
+DIM SHARED py(1 TO 1000)\r
+DIM SHARED pz(1 TO 1000)\r
+DIM SHARED nump\r
+DIM SHARED numpa\r
+DIM SHARED numpo\r
+\r
+DIM SHARED fil(1 TO 100)\r
+DIM SHARED mitus\r
+DIM SHARED sona$(1 TO 20)\r
+DIM SHARED res\r
+\r
+DIM SHARED mtlm\r
+DIM SHARED mtl$(1 TO 50)\r
+DIM SHARED mtlp1(1 TO 50, 1 TO 100)\r
+DIM SHARED mtlp2(1 TO 50, 1 TO 100)\r
+DIM SHARED mtlp3(1 TO 50, 1 TO 100)\r
+DIM SHARED mtlp4(1 TO 50, 1 TO 100)\r
+DIM SHARED mtll(1 TO 50)\r
+DIM SHARED cmtl\r
+\r
+DIM SHARED stkf(1 TO 500)\r
+DIM SHARED stks(1 TO 500)\r
+DIM SHARED stkp\r
+DIM SHARED fc\r
+DIM SHARED ipath$\r
+\r
+DIM SHARED chc$(1 TO 10, 1 TO 500)\r
+DIM SHARED chcl(1 TO 10)\r
+DIM SHARED chcf$(1 TO 10)\r
+DIM SHARED chct(1 TO 10)\r
+DIM SHARED chctim\r
+DIM SHARED mtmprs\r
+DIM SHARED tmr\r
+\r
+DIM SHARED var$(0 TO 100)\r
+DIM SHARED flag(1 TO 50, 0 TO 9)\r
+DIM SHARED cstatt\r
+DIM SHARED cstatm\r
+\r
+' Path to include resources from. Adjust according to your installation!\r
+ipath$ = "C:\GRAPHICS\3D\3DSYNT~1\INCLUDE\"\r
+\r
+start\r
+\r
+IF COMMAND$ = "" THEN END\r
+CLS\r
+\r
+cmd "obj ~" + COMMAND$\r
+qui\r
+CLOSE #res\r
+fil(res) = 0\r
+\r
+PRINT "done"\r
+SYSTEM\r
+\r
+SUB cmd (z$)\r
+    a$ = z$\r
+    IF LEFT$(a$, 1) = "?" THEN\r
+        IF flag(mtmprs, VAL(RIGHT$(LEFT$(a$, 2), 1))) = 1 THEN\r
+            a$ = RIGHT$(a$, LEN(a$) - 3)\r
+        ELSE\r
+            GOTO 10\r
+        END IF\r
+    END IF\r
+\r
+    getson a$\r
+\r
+    SELECT CASE sona$(1)\r
+        CASE "end"\r
+            qui\r
+            PRINT "terminated from file"\r
+            SYSTEM\r
+\r
+        CASE "warn"\r
+            COLOR 12\r
+            PRINT sona$(2)\r
+            COLOR 7\r
+            b$ = INPUT$(1)\r
+\r
+        CASE "p"\r
+            nump = nump + 1\r
+            numpa = numpa + 1\r
+            x = VAL(sona$(2))\r
+            y = VAL(sona$(3))\r
+            z = VAL(sona$(4))\r
+\r
+            ' Transform the coordinates based on the stack\r
+            FOR b = stkp TO 1 STEP -1\r
+                SELECT CASE stkf(b)\r
+                    CASE 1\r
+                        c1 = SIN(stks(b) / fc)\r
+                        s1 = COS(stks(b) / fc)\r
+                        z1 = x * c1 + z * s1\r
+                        x1 = x * s1 - z * c1\r
+                        x = x1\r
+                        z = z1\r
+\r
+                    CASE 2\r
+                        c1 = SIN(stks(b) / fc)\r
+                        s1 = COS(stks(b) / fc)\r
+                        z1 = y * c1 + z * s1\r
+                        y1 = y * s1 - z * c1\r
+                        y = y1\r
+                        z = z1\r
+\r
+                    CASE 3\r
+                        s1 = SIN(stks(b) / fc)\r
+                        c1 = COS(stks(b) / fc)\r
+                        y1 = y * c1 + x * s1\r
+                        x1 = y * s1 - x * c1\r
+                        x = x1\r
+                        y = y1\r
+\r
+                    CASE 10\r
+                        x = x + stks(b)\r
+\r
+                    CASE 11\r
+                        y = y + stks(b)\r
+\r
+                    CASE 12\r
+                        z = z + stks(b)\r
+\r
+                    CASE 20\r
+                        x = x - stks(b)\r
+\r
+                    CASE 21\r
+                        y = y - stks(b)\r
+\r
+                    CASE 22\r
+                        z = z - stks(b)\r
+\r
+                    CASE 30\r
+                        x = x * stks(b)\r
+\r
+                    CASE 31\r
+                        y = y * stks(b)\r
+\r
+                    CASE 32\r
+                        z = z * stks(b)\r
+                END SELECT\r
+            NEXT b\r
+\r
+            ' Store the transformed coordinates\r
+            px(nump) = x\r
+            py(nump) = y\r
+            pz(nump) = z\r
+\r
+            IF nump > 900 THEN flushp\r
+\r
+        CASE "here"\r
+            numpo = numpa\r
+\r
+        CASE "mtl"\r
+            usemtl sona$(2)\r
+\r
+        CASE "mtlrnd"\r
+            b = INT(RND * (mitus - 1)) + 2\r
+            usemtl sona$(b)\r
+\r
+        CASE "f"\r
+            IF mtll(cmtl) > 90 THEN flushpoly cmtl\r
+            b = mtll(cmtl)\r
+            b = b + 1\r
+            mtll(cmtl) = b\r
+            mtlp1(cmtl, b) = VAL(sona$(2)) + numpo\r
+            mtlp2(cmtl, b) = VAL(sona$(3)) + numpo\r
+            mtlp3(cmtl, b) = VAL(sona$(4)) + numpo\r
+\r
+            ' Handle the optional fourth vertex\r
+            IF sona$(5) = "" THEN\r
+                mtlp4(cmtl, b) = -32000\r
+            ELSE\r
+                mtlp4(cmtl, b) = VAL(sona$(5)) + numpo\r
+            END IF\r
+\r
+        CASE "obj"\r
+            d = stkp\r
+\r
+            ' Parse the transformation stack\r
+            FOR a = mitus TO 3 STEP -1\r
+                b$ = LEFT$(sona$(a), 2)\r
+                c = VAL(RIGHT$(sona$(a), LEN(sona$(a)) - 2))\r
+                stkp = stkp + 1\r
+                stks(stkp) = c\r
+\r
+                SELECT CASE b$\r
+                    CASE "xz"\r
+                        stkf(stkp) = 1\r
+\r
+                    CASE "yz"\r
+                        stkf(stkp) = 2\r
+\r
+                    CASE "xy"\r
+                        stkf(stkp) = 3\r
+\r
+                    CASE "x+"\r
+                        stkf(stkp) = 10\r
+\r
+                    CASE "y+"\r
+                        stkf(stkp) = 11\r
+\r
+                    CASE "z+"\r
+                        stkf(stkp) = 12\r
+\r
+                    CASE "x-"\r
+                        stkf(stkp) = 20\r
+\r
+                    CASE "y-"\r
+                        stkf(stkp) = 21\r
+\r
+                    CASE "z-"\r
+                        stkf(stkp) = 22\r
+\r
+                    CASE "x*"\r
+                        stkf(stkp) = 30\r
+\r
+                    CASE "y*"\r
+                        stkf(stkp) = 31\r
+\r
+                    CASE "z*"\r
+                        stkf(stkp) = 32\r
+                END SELECT\r
+            NEXT a\r
+\r
+            ' Process the object command\r
+            a$ = sona$(2)\r
+            mtmprs = mtmprs + 1\r
+            cstatt = cstatt + 1\r
+\r
+            LOCATE 10 + mtmprs, 1\r
+            PRINT a$\r
+\r
+            ' Read and execute the next command\r
+            getchc a$, b\r
+            c = 1\r
+\r
+2\r
+                d$ = chc$(b, c)\r
+                cmd d$\r
+\r
+                ' Check if the current command matches the expected one\r
+                IF chcf$(b) <> a$ THEN\r
+                    getchc a$, b\r
+                END IF\r
+\r
+                c = c + 1\r
+\r
+                ' Continue reading and executing commands until the stack is empty\r
+                IF c <= chcl(b) THEN GOTO 2\r
+\r
+            tmr = tmr + 1\r
+\r
+            ' If more than 20 commands have been processed, update statistics\r
+            IF tmr > 20 THEN\r
+                tmr = 0\r
+                stat\r
+            END IF\r
+\r
+            LOCATE 10 + mtmprs, 1\r
+            PRINT SPACE$(LEN(a$))\r
+\r
+            ' Decrement the command parser stack\r
+            mtmprs = mtmprs - 1\r
+\r
+            stkp = d\r
+\r
+        CASE "#"\r
+\r
+        CASE "out"\r
+            geth res\r
+            OPEN sona$(2) + ".obj" FOR OUTPUT AS #res\r
+            PRINT #res, "mtllib result.mtl"\r
+\r
+        CASE "rnd"\r
+            b = INT(RND * (mitus - 1)) + 2\r
+            c$ = sona$(b)\r
+\r
+            ' Replace caret characters with spaces\r
+            f$ = ""\r
+            FOR d = 1 TO LEN(c$)\r
+                e$ = RIGHT$(LEFT$(c$, d), 1)\r
+                IF e$ = "^" THEN\r
+                    e$ = " "\r
+                END IF\r
+                f$ = f$ + e$\r
+            NEXT d\r
+\r
+            cmd f$\r
+\r
+        CASE "set"\r
+            var$(VAL(sona$(2))) = sona$(3)\r
+\r
+        CASE "cmp"\r
+            ' Compare two strings\r
+            IF sona$(3) = sona$(4) THEN\r
+                b = 1\r
+            ELSE\r
+                b = 0\r
+            END IF\r
+\r
+            ' Store the comparison result in the flag array\r
+            flag(mtmprs, VAL(sona$(2))) = b\r
+\r
+    END SELECT\r
+\r
+10\r
+END SUB\r
+\r
+SUB flushp\r
+\r
+    FOR a = 1 TO nump\r
+        PRINT #res, "v " + STR$(px(a)) + " " + STR$(py(a)) + " " + STR$(-pz(a))\r
+    NEXT a\r
+\r
+    nump = 0\r
+\r
+END SUB\r
+\r
+SUB flushpoly (a)\r
+\r
+    IF mtll(a) = 0 THEN GOTO 5\r
+\r
+    ' Write the material usage line\r
+    PRINT #res, "usemtl " + mtl$(a)\r
+\r
+    ' Write the face definitions\r
+    FOR b = 1 TO mtll(a)\r
+        c$ = "f " + STR$(mtlp1(a, b) + 1) + STR$(mtlp2(a, b) + 1) + STR$(mtlp3(a, b) + 1)\r
+\r
+        ' Handle the optional fourth vertex\r
+        IF mtlp4(a, b) <> -32000 THEN\r
+            c$ = c$ + STR$(mtlp4(a, b) + 1)\r
+        END IF\r
+\r
+        PRINT #res, c$\r
+    NEXT b\r
+    mtll(a) = 0\r
+\r
+5\r
+END SUB\r
+\r
+SUB getchc (a$, b!)\r
+\r
+    ' Search for the command in the cache\r
+    FOR c = 1 TO 10\r
+        IF chcf$(c) = a$ THEN\r
+            b = c\r
+            GOTO 6\r
+        END IF\r
+    NEXT c\r
+\r
+    ' Find the least recently used entry in the cache\r
+    d = 32000\r
+    FOR c = 1 TO 10\r
+        IF chct(c) < d THEN\r
+            d = chct(c)\r
+            e = c\r
+        END IF\r
+    NEXT c\r
+\r
+    ' Load the command file\r
+    g = 0\r
+    geth f\r
+\r
+    cstatm = cstatm + 1\r
+    b$ = a$\r
+\r
+    ' Remove leading tilde if present\r
+    IF LEFT$(b$, 1) = "~" THEN\r
+        b$ = RIGHT$(b$, LEN(b$) - 1)\r
+    ELSE\r
+        b$ = ipath$ + b$\r
+    END IF\r
+\r
+   \r
+    PRINT "File:" + b$\r
+    OPEN b$ + ".3d" FOR INPUT AS #f\r
+\r
+8\r
+\r
+    ' Read commands from the file until EOF\r
+    IF EOF(f) <> 0 THEN GOTO 7\r
+\r
+    LINE INPUT #f, c$\r
+\r
+    ' Skip empty lines\r
+    IF (LEFT$(c$, 1) <> "#") AND (c$ <> SPACE$(LEN(c$))) THEN\r
+        g = g + 1\r
+        chc$(e, g) = c$\r
+    END IF\r
+\r
+    GOTO 8\r
+\r
+7\r
+\r
+    ' Close the file and update statistics\r
+    CLOSE #f\r
+    fil(f) = 0\r
+    chcl(e) = g\r
+\r
+    b = e\r
+    chcf$(e) = a$\r
+\r
+    stat\r
+\r
+6\r
+\r
+    ' Update the cache timestamps\r
+    chctim = chctim + 1\r
+    chct(b) = chctim\r
+\r
+    ' If the cache is full, halve all timestamps\r
+    IF chctim > 10000 THEN\r
+        FOR c = 1 TO 10\r
+            chct(c) = chct(c) / 2\r
+        NEXT c\r
+\r
+        chctim = chctim / 2\r
+    END IF\r
+END SUB\r
+\r
+SUB geth (b!)\r
+\r
+    ' Find an unused file handle\r
+    FOR a = 1 TO 100\r
+        IF fil(a) = 0 THEN\r
+            fil(a) = 1\r
+            b = a\r
+            GOTO 1\r
+        END IF\r
+    NEXT a\r
+\r
+1\r
+END SUB\r
+\r
+SUB getson (a$)\r
+\r
+    ' Prepare the sona array for parsing\r
+    b$ = a$ + " "\r
+\r
+    FOR a = 1 TO 20\r
+        sona$(a) = ""\r
+    NEXT a\r
+\r
+    mitus = 0\r
+\r
+    e = 1\r
+\r
+    ' Parse the input string\r
+    FOR c = 1 TO LEN(b$)\r
+        d$ = RIGHT$(LEFT$(b$, c), 1)\r
+\r
+        IF d$ = " " OR d$ = CHR$(9) THEN\r
+            e = 1\r
+        ELSE\r
+            IF e = 1 THEN\r
+                mitus = mitus + 1\r
+            END IF\r
+\r
+            sona$(mitus) = sona$(mitus) + d$\r
+            e = 0\r
+        END IF\r
+    NEXT c\r
+\r
+    ' Replace variable names with their values\r
+    FOR c = 1 TO mitus\r
+        IF LEFT$(sona$(c), 1) = "%" THEN\r
+            sona$(c) = var$(VAL(RIGHT$(sona$(c), LEN(sona$(c)) - 1)))\r
+        END IF\r
+    NEXT c\r
+END SUB\r
+\r
+SUB qui\r
+\r
+    ' Flush the vertex buffer and write all polygons\r
+    flushp\r
+\r
+    FOR a = 1 TO mtlm\r
+        flushpoly a\r
+    NEXT a\r
+\r
+    stat\r
+END SUB\r
+\r
+SUB start\r
+\r
+    RANDOMIZE TIMER\r
+\r
+    ' Initialize arrays\r
+    FOR a = 1 TO 50\r
+        FOR b = 0 TO 9\r
+            flag(a, b) = 0\r
+        NEXT b\r
+    NEXT a\r
+\r
+    FOR a = 0 TO 100\r
+        var$(a) = ""\r
+    NEXT a\r
+\r
+    ' Initialize command cache\r
+    FOR a = 1 TO 10\r
+        FOR b = 1 TO 500\r
+            chc$(a, b) = ""\r
+        NEXT b\r
+\r
+        chcl(a) = 0\r
+        chcf$(a) = ""\r
+        chct(a) = 0\r
+    NEXT a\r
+\r
+    ' Initialize material lists\r
+    FOR a = 1 TO 50\r
+        mtll(a) = 0\r
+    NEXT a\r
+\r
+    ' Initialize file handles\r
+    FOR a = 1 TO 100\r
+        fil(a) = 0\r
+    NEXT a\r
+\r
+    nump = 0\r
+    numpa = 0\r
+    numpo = 0\r
+    mtlm = 0\r
+    stkp = 0\r
+    fc = 180 / 3.141285\r
+    chctim = 0\r
+    mtmprs = 0\r
+    cstatt = 0\r
+    cstatm = 0\r
+END SUB\r
+\r
+SUB stat\r
+\r
+    ' Display statistics\r
+    LOCATE 1, 1\r
+\r
+    FOR a = 1 TO 10\r
+        PRINT a, chcf$(a), chct(a), chcl(a)\r
+    NEXT a\r
+\r
+    COLOR 10\r
+\r
+    LOCATE 1, 50\r
+    PRINT cstatt; "parsed"\r
+\r
+    LOCATE 2, 50\r
+    PRINT cstatm; "cache miss"\r
+\r
+    LOCATE 3, 50\r
+    PRINT INT(cstatm / cstatt * 100); "% cache miss  "\r
+\r
+    COLOR 7\r
+END SUB\r
+\r
+SUB stat2 (b!)\r
+\r
+    ' Display the contents of a specific command cache\r
+    CLS\r
+\r
+    FOR a = 1 TO chcl(b)\r
+        PRINT chc$(b, a)\r
+    NEXT a\r
+\r
+    c$ = INPUT$(1)\r
+END SUB\r
+\r
+SUB usemtl (a$)\r
+\r
+    ' Find the material in the list\r
+    FOR b = 1 TO mtlm\r
+        IF mtl$(b) = a$ THEN\r
+            cmtl = b\r
+            GOTO 4\r
+        END IF\r
+    NEXT b\r
+\r
+    ' If not found, add it to the list\r
+    mtlm = mtlm + 1\r
+    mtl$(mtlm) = a$\r
+    cmtl = mtlm\r
+\r
+4\r
+END SUB\r
+\r
diff --git a/3D GFX/3D Synthezier/bin/city1.3d b/3D GFX/3D Synthezier/bin/city1.3d
new file mode 100644 (file)
index 0000000..04279fa
--- /dev/null
@@ -0,0 +1,46 @@
+# small city block\r
+\r
+out city1\r
+\r
+obj maja xz90\r
+obj maja xz90 x+48\r
+obj maja xz90 x+96\r
+obj maja x+36 z-84\r
+\r
+# korgel olevad autod\r
+obj cars x+25\r
+obj cars x+27 z-50\r
+obj cars x+26 z-25 y-10\r
+obj cars x+25 z-40 y-20\r
+\r
+obj cars x+73 z-25 y+1\r
+obj cars x+75 z-50 y-2\r
+obj cars xz-90 z-60\r
+obj cars xz-90 z-62 x+50\r
+obj cars xz-90 z+60 x+1\r
+obj cars xz-90 z+61 x+52\r
+\r
+obj cars x+121 z-100 y+1\r
+obj cars x+122 z-70 y-5\r
+obj cars x+123 y+2\r
+obj cars x+122 z-38 y-2\r
+\r
+# allpool olevad autod\r
+obj cars x+25 y-30\r
+obj cars x+27 z-50 y-50\r
+obj cars x+26 z-25 y-40\r
+obj cars x+25 z-40 y-50\r
+\r
+obj cars x+73 z-25 y-34\r
+obj cars x+75 z-50 y-36\r
+obj cars xz-90 z-60 y-43\r
+obj cars xz-90 z-62 x+50 y-29\r
+obj cars xz-90 z+60 x+1 y-37\r
+obj cars xz-90 z+61 x+52 y-33\r
+\r
+obj cars x+121 z-100 y-41\r
+obj cars x+122 z-70 y-45\r
+obj cars x+123 y-32\r
+obj cars x+122 z-38 y-34\r
+\r
+\r
diff --git a/3D GFX/3D Synthezier/bin/city1.bat b/3D GFX/3D Synthezier/bin/city1.bat
new file mode 100755 (executable)
index 0000000..d4fb06e
--- /dev/null
@@ -0,0 +1,6 @@
+@echo off\r
+\r
+rem  This script will instruct generator to make "city1".\r
+rem  Note: When specifying source file, avoid extension. \r
+\r
+qb /RUN 3dparse.bas /CMD city1
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/bin/city2.3d b/3D GFX/3D Synthezier/bin/city2.3d
new file mode 100644 (file)
index 0000000..8215a3e
--- /dev/null
@@ -0,0 +1,45 @@
+# Big city, be prepared to wait ~10 min, on P133.\r
+\r
+out city2\r
+obj blk4 y-145\r
+obj blk4 y-116\r
+obj blk4 y-87\r
+obj blk4 y-58\r
+obj blk4 y-29\r
+obj blk4\r
+\r
+mtl kivi\r
+obj ring x*20 z*20 y+26\r
+mtl glass_transp\r
+obj kuppel x*20 z*20 y*10 y+26\r
+\r
+mtl kivi\r
+obj ring x*20 z*20 y+26 z+64.6412\r
+mtl glass_transp\r
+obj kuppel x*20 z*20 y*10 y+26 z+64.6412\r
+\r
+mtl kivi\r
+obj ring x*20 z*20 y+26 x+55.9809 z+32.3206\r
+mtl glass_transp\r
+obj kuppel x*20 z*20 y*10 y+26 x+55.9809 z+32.3206\r
+\r
+mtl kivi\r
+obj ring x*20 z*20 y+26 x+55.9809 z-32.3206\r
+mtl glass_transp\r
+obj kuppel x*20 z*20 y*10 y+26 x+55.9809 z-32.3206\r
+\r
+mtl kivi\r
+obj ring x*20 z*20 y+26 z-64.6412\r
+mtl glass_transp\r
+obj kuppel x*20 z*20 y*10 y+26 z-64.6412\r
+\r
+mtl kivi\r
+obj ring x*20 z*20 y+26 x-55.9809 z-32.3206\r
+mtl glass_transp\r
+obj kuppel x*20 z*20 y*10 y+26 x-55.9809 z-32.3206\r
+\r
+mtl kivi\r
+obj ring x*20 z*20 y+26 x-55.9809 z+32.3206\r
+mtl glass_transp\r
+obj kuppel x*20 z*20 y*10 y+26 x-55.9809 z+32.3206\r
+\r
diff --git a/3D GFX/3D Synthezier/bin/city2.bat b/3D GFX/3D Synthezier/bin/city2.bat
new file mode 100755 (executable)
index 0000000..6aa7f5a
--- /dev/null
@@ -0,0 +1,6 @@
+@echo off\r
+\r
+rem  This script will instruct generator to make "city2".\r
+rem  Note: When specifying source file, avoid extension. \r
+\r
+qb /RUN 3dparse.bas /CMD city2
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/bin/result.mtl b/3D GFX/3D Synthezier/bin/result.mtl
new file mode 100644 (file)
index 0000000..9d689f1
--- /dev/null
@@ -0,0 +1,108 @@
+# Wavefront material file\r
+# Must be in the same directory with parsed modules.\r
+\r
+newmtl default\r
+       Ns 32\r
+       d 1\r
+       illum 2\r
+       Kd 0.4 0.4 0.4\r
+       Ks 0.7 0.7 0.7\r
+       Ka 0.3 0.3 0.3\r
+\r
+newmtl muld\r
+       Ns 32\r
+       d 1\r
+       illum 2\r
+       Kd 0.247843 0.17098 0.158431\r
+       Ks 0 0 0\r
+       Ka 0.185882 0.128235 0.118824\r
+\r
+newmtl kivi\r
+       Ns 32\r
+       d 1\r
+       illum 2\r
+       Kd 0.24935 0.216378 0.24935\r
+       Ks 0 0 0\r
+       Ka 0.128955 0.111903 0.128955\r
+\r
+newmtl klaastume\r
+       Ns 32\r
+       d 1\r
+       illum 2\r
+       Kd 0.139608 0.0313726 0.108235\r
+       Ks 1.6633 0.373775 1.28952\r
+       Ka 0.104706 0.0235294 0.0811765\r
+\r
+newmtl klaashele\r
+       Ns 32\r
+       d 1\r
+       illum 2\r
+       Kd 0.0925798 0.104637 0.109804\r
+       Ks 3.54381 4.00533 4.20313\r
+       Ka 0.737332 0.833356 0.87451\r
+\r
+newmtl seintellis\r
+       Ns 32\r
+       d 1\r
+       illum 2\r
+       Kd 0.476309 0.432511 0.0875971\r
+       Ks 0 0 0\r
+       Ka 0.0642215 0.058316 0.0118108\r
+\r
+newmtl pronks\r
+       Ns 4\r
+       d 1\r
+       illum 2\r
+       Kd 0.238431 0.148435 0.0584391\r
+       Ks 0.636863 0.396478 0.156094\r
+       Ka 0.0627451 0.0390619 0.0153787\r
+\r
+newmtl solar\r
+       Ns 32\r
+       d 1\r
+       illum 2\r
+       Kd 0.189927 0.10519 0.745098\r
+       Ks 1.27451 0.705882 5\r
+       Ka 0.0609766 0.0337716 0.239216\r
+\r
+newmtl metal_yellow\r
+       Ns 32\r
+       d 1\r
+       illum 2\r
+       Kd 0.619608 0.619608 0\r
+       Ks 3.01563 3.01563 0\r
+       Ka 0.3 0.3 0\r
+\r
+newmtl metal_blue\r
+       Ns 32\r
+       d 1\r
+       illum 2\r
+       Kd 0.243137 0.243137 0.666667\r
+       Ks 0.695221 0.695221 1.90625\r
+       Ka 0.109412 0.109412 0.3\r
+\r
+newmtl light_red\r
+       Ns 32\r
+       d 1\r
+       illum 2\r
+       Kd 0.443137 0 0\r
+       Ks 3.8125 0 0\r
+       Ka 0.3 0 0\r
+\r
+\r
+newmtl light_white\r
+       Ns 32\r
+       d 1\r
+       illum 2\r
+       Kd 0.497347 0.528135 0.603922\r
+       Ks 2.35478 2.50055 2.85938\r
+       Ka 0.247059 0.262353 0.3\r
+\r
+newmtl glass_transp\r
+       Ns 39\r
+       d 0.572549\r
+       illum 2\r
+       Kd 0.129412 0.427451 0.776471\r
+       Ks 0.129412 0.427451 0.776471\r
+       Ka 0.000985995 0.00325677 0.00591597\r
+\r
diff --git a/3D GFX/3D Synthezier/doc/hexagonal city, 1.jpeg b/3D GFX/3D Synthezier/doc/hexagonal city, 1.jpeg
new file mode 100644 (file)
index 0000000..7d724be
Binary files /dev/null and b/3D GFX/3D Synthezier/doc/hexagonal city, 1.jpeg differ
diff --git a/3D GFX/3D Synthezier/doc/hexagonal city, 2.jpeg b/3D GFX/3D Synthezier/doc/hexagonal city, 2.jpeg
new file mode 100644 (file)
index 0000000..16d56a5
Binary files /dev/null and b/3D GFX/3D Synthezier/doc/hexagonal city, 2.jpeg differ
diff --git a/3D GFX/3D Synthezier/doc/hexagonal city, 3.jpeg b/3D GFX/3D Synthezier/doc/hexagonal city, 3.jpeg
new file mode 100644 (file)
index 0000000..0d7fb88
Binary files /dev/null and b/3D GFX/3D Synthezier/doc/hexagonal city, 3.jpeg differ
diff --git a/3D GFX/3D Synthezier/doc/hexagonal city.blend b/3D GFX/3D Synthezier/doc/hexagonal city.blend
new file mode 100644 (file)
index 0000000..6ab7003
Binary files /dev/null and b/3D GFX/3D Synthezier/doc/hexagonal city.blend differ
diff --git a/3D GFX/3D Synthezier/doc/index.html b/3D GFX/3D Synthezier/doc/index.html
new file mode 100644 (file)
index 0000000..8066d7a
--- /dev/null
@@ -0,0 +1,1573 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<!-- 2025-07-28 ma 03:33 -->
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+<meta name="viewport" content="width=device-width, initial-scale=1" />
+<title>3D Synthezier</title>
+<meta name="generator" content="Org Mode" />
+<style>
+  #content { max-width: 60em; margin: auto; }
+  .title  { text-align: center;
+             margin-bottom: .2em; }
+  .subtitle { text-align: center;
+              font-size: medium;
+              font-weight: bold;
+              margin-top:0; }
+  .todo   { font-family: monospace; color: red; }
+  .done   { font-family: monospace; color: green; }
+  .priority { font-family: monospace; color: orange; }
+  .tag    { background-color: #eee; font-family: monospace;
+            padding: 2px; font-size: 80%; font-weight: normal; }
+  .timestamp { color: #bebebe; }
+  .timestamp-kwd { color: #5f9ea0; }
+  .org-right  { margin-left: auto; margin-right: 0px;  text-align: right; }
+  .org-left   { margin-left: 0px;  margin-right: auto; text-align: left; }
+  .org-center { margin-left: auto; margin-right: auto; text-align: center; }
+  .underline { text-decoration: underline; }
+  #postamble p, #preamble p { font-size: 90%; margin: .2em; }
+  p.verse { margin-left: 3%; }
+  pre {
+    border: 1px solid #e6e6e6;
+    border-radius: 3px;
+    background-color: #f2f2f2;
+    padding: 8pt;
+    font-family: monospace;
+    overflow: auto;
+    margin: 1.2em;
+  }
+  pre.src {
+    position: relative;
+    overflow: auto;
+  }
+  pre.src:before {
+    display: none;
+    position: absolute;
+    top: -8px;
+    right: 12px;
+    padding: 3px;
+    color: #555;
+    background-color: #f2f2f299;
+  }
+  pre.src:hover:before { display: inline; margin-top: 14px;}
+  /* Languages per Org manual */
+  pre.src-asymptote:before { content: 'Asymptote'; }
+  pre.src-awk:before { content: 'Awk'; }
+  pre.src-authinfo::before { content: 'Authinfo'; }
+  pre.src-C:before { content: 'C'; }
+  /* pre.src-C++ doesn't work in CSS */
+  pre.src-clojure:before { content: 'Clojure'; }
+  pre.src-css:before { content: 'CSS'; }
+  pre.src-D:before { content: 'D'; }
+  pre.src-ditaa:before { content: 'ditaa'; }
+  pre.src-dot:before { content: 'Graphviz'; }
+  pre.src-calc:before { content: 'Emacs Calc'; }
+  pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
+  pre.src-fortran:before { content: 'Fortran'; }
+  pre.src-gnuplot:before { content: 'gnuplot'; }
+  pre.src-haskell:before { content: 'Haskell'; }
+  pre.src-hledger:before { content: 'hledger'; }
+  pre.src-java:before { content: 'Java'; }
+  pre.src-js:before { content: 'Javascript'; }
+  pre.src-latex:before { content: 'LaTeX'; }
+  pre.src-ledger:before { content: 'Ledger'; }
+  pre.src-lisp:before { content: 'Lisp'; }
+  pre.src-lilypond:before { content: 'Lilypond'; }
+  pre.src-lua:before { content: 'Lua'; }
+  pre.src-matlab:before { content: 'MATLAB'; }
+  pre.src-mscgen:before { content: 'Mscgen'; }
+  pre.src-ocaml:before { content: 'Objective Caml'; }
+  pre.src-octave:before { content: 'Octave'; }
+  pre.src-org:before { content: 'Org mode'; }
+  pre.src-oz:before { content: 'OZ'; }
+  pre.src-plantuml:before { content: 'Plantuml'; }
+  pre.src-processing:before { content: 'Processing.js'; }
+  pre.src-python:before { content: 'Python'; }
+  pre.src-R:before { content: 'R'; }
+  pre.src-ruby:before { content: 'Ruby'; }
+  pre.src-sass:before { content: 'Sass'; }
+  pre.src-scheme:before { content: 'Scheme'; }
+  pre.src-screen:before { content: 'Gnu Screen'; }
+  pre.src-sed:before { content: 'Sed'; }
+  pre.src-sh:before { content: 'shell'; }
+  pre.src-sql:before { content: 'SQL'; }
+  pre.src-sqlite:before { content: 'SQLite'; }
+  /* additional languages in org.el's org-babel-load-languages alist */
+  pre.src-forth:before { content: 'Forth'; }
+  pre.src-io:before { content: 'IO'; }
+  pre.src-J:before { content: 'J'; }
+  pre.src-makefile:before { content: 'Makefile'; }
+  pre.src-maxima:before { content: 'Maxima'; }
+  pre.src-perl:before { content: 'Perl'; }
+  pre.src-picolisp:before { content: 'Pico Lisp'; }
+  pre.src-scala:before { content: 'Scala'; }
+  pre.src-shell:before { content: 'Shell Script'; }
+  pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
+  /* additional language identifiers per "defun org-babel-execute"
+       in ob-*.el */
+  pre.src-cpp:before  { content: 'C++'; }
+  pre.src-abc:before  { content: 'ABC'; }
+  pre.src-coq:before  { content: 'Coq'; }
+  pre.src-groovy:before  { content: 'Groovy'; }
+  /* additional language identifiers from org-babel-shell-names in
+     ob-shell.el: ob-shell is the only babel language using a lambda to put
+     the execution function name together. */
+  pre.src-bash:before  { content: 'bash'; }
+  pre.src-csh:before  { content: 'csh'; }
+  pre.src-ash:before  { content: 'ash'; }
+  pre.src-dash:before  { content: 'dash'; }
+  pre.src-ksh:before  { content: 'ksh'; }
+  pre.src-mksh:before  { content: 'mksh'; }
+  pre.src-posh:before  { content: 'posh'; }
+  /* Additional Emacs modes also supported by the LaTeX listings package */
+  pre.src-ada:before { content: 'Ada'; }
+  pre.src-asm:before { content: 'Assembler'; }
+  pre.src-caml:before { content: 'Caml'; }
+  pre.src-delphi:before { content: 'Delphi'; }
+  pre.src-html:before { content: 'HTML'; }
+  pre.src-idl:before { content: 'IDL'; }
+  pre.src-mercury:before { content: 'Mercury'; }
+  pre.src-metapost:before { content: 'MetaPost'; }
+  pre.src-modula-2:before { content: 'Modula-2'; }
+  pre.src-pascal:before { content: 'Pascal'; }
+  pre.src-ps:before { content: 'PostScript'; }
+  pre.src-prolog:before { content: 'Prolog'; }
+  pre.src-simula:before { content: 'Simula'; }
+  pre.src-tcl:before { content: 'tcl'; }
+  pre.src-tex:before { content: 'TeX'; }
+  pre.src-plain-tex:before { content: 'Plain TeX'; }
+  pre.src-verilog:before { content: 'Verilog'; }
+  pre.src-vhdl:before { content: 'VHDL'; }
+  pre.src-xml:before { content: 'XML'; }
+  pre.src-nxml:before { content: 'XML'; }
+  /* add a generic configuration mode; LaTeX export needs an additional
+     (add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
+  pre.src-conf:before { content: 'Configuration File'; }
+
+  table { border-collapse:collapse; }
+  caption.t-above { caption-side: top; }
+  caption.t-bottom { caption-side: bottom; }
+  td, th { vertical-align:top;  }
+  th.org-right  { text-align: center;  }
+  th.org-left   { text-align: center;   }
+  th.org-center { text-align: center; }
+  td.org-right  { text-align: right;  }
+  td.org-left   { text-align: left;   }
+  td.org-center { text-align: center; }
+  dt { font-weight: bold; }
+  .footpara { display: inline; }
+  .footdef  { margin-bottom: 1em; }
+  .figure { padding: 1em; }
+  .figure p { text-align: center; }
+  .equation-container {
+    display: table;
+    text-align: center;
+    width: 100%;
+  }
+  .equation {
+    vertical-align: middle;
+  }
+  .equation-label {
+    display: table-cell;
+    text-align: right;
+    vertical-align: middle;
+  }
+  .inlinetask {
+    padding: 10px;
+    border: 2px solid gray;
+    margin: 10px;
+    background: #ffffcc;
+  }
+  #org-div-home-and-up
+   { text-align: right; font-size: 70%; white-space: nowrap; }
+  textarea { overflow-x: auto; }
+  .linenr { font-size: smaller }
+  .code-highlighted { background-color: #ffff00; }
+  .org-info-js_info-navigation { border-style: none; }
+  #org-info-js_console-label
+    { font-size: 10px; font-weight: bold; white-space: nowrap; }
+  .org-info-js_search-highlight
+    { background-color: #ffff00; color: #000000; font-weight: bold; }
+  .org-svg { }
+</style>
+<style type="text/css">
+* {    border-color: #657b83;}a {    color: #268bd2 !important;}a:visited {    color: #6c71c4 !important;}body {    background-color: #002b36 !important;    color: #839496 !important;    font-family: Libre Baskerville, serif;}html {    background-color: #002b36 !important;}input,textarea {    background-color: #073642 !important;    color: #839496 !important;}blockquote,code,pre {    background-color: #073642 !important;    border: 1px solid #094352 !important;    border-radius: 2px;    box-shadow: none;    color: #839496 !important;}code {    font-size: 1.2em;}img {    margin: 0.5em;}.buttons {    background-color: #073642 !important;    color: #93a1a1 !important;    font-family: sans-serif;    font-size: 1.5rem;}.hsReviewPanel {    display: none;}.title {    border: 0;}#postamble {    display: none;}#banner {    text-align: center;}#tabs {    background-color: #073642 !important;    float: left;    margin: 0px 0px 20px 0px;    padding: 0;    width: 100%;    font-family: sans-serif;}#tabs ul {    margin: 0;    padding: 0;}#tabs li {    float: left;    list-style-type: none;    margin: 0px 2px 0px 0px;    padding: 0px 0px 0px 0px;    white-space: nowrap;}#tabs li a {    display: block;    font-size: 120%;    font-weight: bold;    margin: 0;    padding: 4px 10px 4px 10px;    text-decoration: none;}#tabs li a:hover {    color: #90c5eb !important;}#tabs li.ui-tabs-active a {    background-color: #094352 !important;    color: #59a9e1 !important;}#content {    clear: both;    width: 80%;}#content > p {    margin: 1em;}#content > div > h2 {    margin: 0.25rem;}#postamble {    text-align: right;}blockquote {    background-color: #073642 !important;    padding-left: 0.75em;    padding-right: 0.75em;    padding-top: 0.01em;    padding-bottom: 0.01em;    overflow: hidden;    margin-left: 0;}.outline-text-2,.outline-text-3,.outline-text-4,.outline-text-5,.outline-text-6 {    padding-left: 4%;}.outline-3 {    padding-left: 4%;}.outline-4 {    padding-left: 4%;}.outline-5 {    padding-left: 4%;}.outline-6 {    padding-left: 4%;}h1,h2,h3,h4,h5,h6 {    font-family: sans-serif;    border-bottom: 2px solid;    border-color: #094352 !important;}a:hover {    text-decoration: underline;}#search {    display: block;    float: right;}.tag {    background-color: #002b36 !important;    color: #93a1a1 !important;    border: 0px;}.tag span {    background-color: #094352 !important;    margin: 0.25em;    padding: 0.25em;}#table-of-contents {    display: table;    float: right;}#table-of-contents h2 {    display: none;}#table-of-contents li {    list-style-type: none;}#table-of-contents a:hover {    text-decoration: underline;}#minitoc {    background-color: #073642 !important;    position: fixed;    top: 0px;    right: -5px;    padding: 0.5em;    z-index: 200;    width: 18%;    word-wrap: normal;    overflow: hidden;}#minitoc ul {    margin: 0.5em;    padding-left: 1em;}#minitoc h2 {    margin-top: 0;    margin-bottom: 0;    font-size: 110%;}#minitoc a {    display: block;    font-family: sans-serif;    text-decoration: none;}#minitoc a:hover {    text-decoration: underline;}/* #minitoc a { *//*   display: none; *//* } */#minitoc:hover a {    display: block;}#toTop {    top: -100px;    position: fixed;    text-align: center;    z-index: 999;    display: none;}#toTop:hover {    text-decoration: underline;}#left-panel-wrapper {    display: none;    position: fixed;    z-index: 200;}#left-panel-contents {    display: none;    position: fixed;    text-align: left;    top: 0;    z-index: 200;}#left-panel-button {    transform: rotate(90deg);    left: -23px;    position: fixed;    top: 50%;    z-index: 200;}#right-panel-wrapper {    position: fixed;    z-index: 200;}#right-panel-contents {    display: none;    z-index: 200;    position: fixed;    text-align: left;    top: 0;}.snippet-copy-to-clipboard {    display: none;    position: absolute;    left: 50px;    top: 50px;}.org-ol > li,.org-dl > dt {    margin-top: 0.5em;}.org-ul {    margin-top: 1em;    margin-bottom: 1em;}.org-ul li {    margin-top: 0.5em;}.org-ul > li > a {    font-family: sans-serif;}
+</style>
+<style type="text/css">
+/* hideshow.css --- HideShow CSS file *//* Copyright (C) 2014 All Right Reserved, Fabrice Niessen *//* This file is free software: you can redistribute it and/or *//* modify it under the terms of the GNU General Public License as *//* published by the Free Software Foundation, either version 3 of *//* the License, or (at your option) any later version. *//* This file is distributed in the hope that it will be useful, *//* but WITHOUT ANY WARRANTY; without even the implied warranty of *//* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *//* GNU General Public License for more details. *//* Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> *//* URL: https://github.com/fniessen/hide-show/ *//* Version: 20140912.1722 */.hsExpanded.hsAnchor {background: #EE7700;}.buttons {    padding: 0px 7px 13px 0px;    background: #0A3F69;}.hsButton {    color: white;    float: right;    font-size: 70%;    margin-left: 10px;}    .hsButton:hover {        text-decoration: underline;        cursor: pointer;    }.ellipsis {    color: #999999;    /* background-color: #FFF8C0; */    /* float: right; */    margin-left: 0.6em;}.hsReview {    border: 1px solid #A4A4A4;    background-color: white;    z-index: 500; /* must be greater then z-index of hsOverlay */    position: relative; /* required for z-index to work */}#hsOverlay {    width: 100%;    height: 100%;    position: fixed;    left: 0px;    top: 0px;    background-color: #000;    opacity: .70;    z-index: 250; /* must be greater than any other z-index (except the one for .hsReview */}.hsReviewPanel {    background-color: #757176;    color: white;    line-height: 1.1em;    margin: 10px 0px;    padding: 10px;    position: fixed;    width: auto;    bottom: 0px;    right: 0px;    z-index: 501;    text-align: center;}    .hsReviewPanel.hsReviewing {        display: none;    }    .hsReviewPanel:hover {        cursor: pointer;    }.hsReviewingPanel {    background-color: white;    color: #757176;    line-height: 1.1em;    margin: 10px 0px;    padding: 10px;    position: fixed;    width: auto;    bottom: 0px;    right: 0px;    z-index: 501;    text-align: center;}.hsReviewButton:hover {    cursor: pointer;}.hsUnselectable {    -webkit-touch-callout: none;    -webkit-user-select: none;    -khtml-user-select: none;    -moz-user-select: none;    -ms-user-select: none;    user-select: none;}
+</style>
+<style type="text/css">
+.org-bold { /* bold */ font-weight: bold; }.org-bold-italic { /* bold-italic */ font-weight: bold; font-style: italic; }.org-buffer-menu-buffer { /* buffer-menu-buffer */ font-weight: bold; }.org-builtin { /* font-lock-builtin-face */ color: #7a378b; }.org-button { /* button */ text-decoration: underline; }.org-calendar-today { /* calendar-today */ text-decoration: underline; }.org-change-log-acknowledgement { /* change-log-acknowledgement */ color: #b22222; }.org-change-log-conditionals { /* change-log-conditionals */ color: #a0522d; }.org-change-log-date { /* change-log-date */ color: #8b2252; }.org-change-log-email { /* change-log-email */ color: #a0522d; }.org-change-log-file { /* change-log-file */ color: #0000ff; }.org-change-log-function { /* change-log-function */ color: #a0522d; }.org-change-log-list { /* change-log-list */ color: #a020f0; }.org-change-log-name { /* change-log-name */ color: #008b8b; }.org-comint-highlight-input { /* comint-highlight-input */ font-weight: bold; }.org-comint-highlight-prompt { /* comint-highlight-prompt */ color: #00008b; }.org-comment { /* font-lock-comment-face */ color: #b22222; }.org-comment-delimiter { /* font-lock-comment-delimiter-face */ color: #b22222; }.org-completions-annotations { /* completions-annotations */ font-style: italic; }.org-completions-common-part { /* completions-common-part */ color: #000000; background-color: #ffffff; }.org-completions-first-difference { /* completions-first-difference */ font-weight: bold; }.org-constant { /* font-lock-constant-face */ color: #008b8b; }.org-diary { /* diary */ color: #ff0000; }.org-diff-context { /* diff-context */ color: #7f7f7f; }.org-diff-file-header { /* diff-file-header */ background-color: #b3b3b3; font-weight: bold; }.org-diff-function { /* diff-function */ background-color: #cccccc; }.org-diff-header { /* diff-header */ background-color: #cccccc; }.org-diff-hunk-header { /* diff-hunk-header */ background-color: #cccccc; }.org-diff-index { /* diff-index */ background-color: #b3b3b3; font-weight: bold; }.org-diff-nonexistent { /* diff-nonexistent */ background-color: #b3b3b3; font-weight: bold; }.org-diff-refine-change { /* diff-refine-change */ background-color: #d9d9d9; }.org-dired-directory { /* dired-directory */ color: #0000ff; }.org-dired-flagged { /* dired-flagged */ color: #ff0000; font-weight: bold; }.org-dired-header { /* dired-header */ color: #228b22; }.org-dired-ignored { /* dired-ignored */ color: #7f7f7f; }.org-dired-mark { /* dired-mark */ color: #008b8b; }.org-dired-marked { /* dired-marked */ color: #ff0000; font-weight: bold; }.org-dired-perm-write { /* dired-perm-write */ color: #b22222; }.org-dired-symlink { /* dired-symlink */ color: #a020f0; }.org-dired-warning { /* dired-warning */ color: #ff0000; font-weight: bold; }.org-doc { /* font-lock-doc-face */ color: #8b2252; }.org-escape-glyph { /* escape-glyph */ color: #a52a2a; }.org-file-name-shadow { /* file-name-shadow */ color: #7f7f7f; }.org-flyspell-duplicate { /* flyspell-duplicate */ color: #cdad00; font-weight: bold; text-decoration: underline; }.org-flyspell-incorrect { /* flyspell-incorrect */ color: #ff4500; font-weight: bold; text-decoration: underline; }.org-fringe { /* fringe */ background-color: #f2f2f2; }.org-function-name { /* font-lock-function-name-face */ color: #0000ff; }.org-header-line { /* header-line */ color: #333333; background-color: #e5e5e5; }.org-help-argument-name { /* help-argument-name */ font-style: italic; }.org-highlight { /* highlight */ background-color: #b4eeb4; }.org-holiday { /* holiday */ background-color: #ffc0cb; }.org-isearch { /* isearch */ color: #b0e2ff; background-color: #cd00cd; }.org-isearch-fail { /* isearch-fail */ background-color: #ffc1c1; }.org-italic { /* italic */ font-style: italic; }.org-keyword { /* font-lock-keyword-face */ color: #a020f0; }.org-lazy-highlight { /* lazy-highlight */ background-color: #afeeee; }.org-link { /* link */ color: #0000ff; text-decoration: underline; }.org-link-visited { /* link-visited */ color: #8b008b; text-decoration: underline; }.org-log-edit-header { /* log-edit-header */ color: #a020f0; }.org-log-edit-summary { /* log-edit-summary */ color: #0000ff; }.org-log-edit-unknown-header { /* log-edit-unknown-header */ color: #b22222; }.org-match { /* match */ background-color: #ffff00; }.org-next-error { /* next-error */ background-color: #eedc82; }.org-nobreak-space { /* nobreak-space */ color: #a52a2a; text-decoration: underline; }.org-org-archived { /* org-archived */ color: #7f7f7f; }.org-org-block { /* org-block */ color: #7f7f7f; }.org-org-block-begin-line { /* org-block-begin-line */ color: #b22222; }.org-org-block-end-line { /* org-block-end-line */ color: #b22222; }.org-org-checkbox { /* org-checkbox */ font-weight: bold; }.org-org-checkbox-statistics-done { /* org-checkbox-statistics-done */ color: #228b22; font-weight: bold; }.org-org-checkbox-statistics-todo { /* org-checkbox-statistics-todo */ color: #ff0000; font-weight: bold; }.org-org-clock-overlay { /* org-clock-overlay */ background-color: #ffff00; }.org-org-code { /* org-code */ color: #7f7f7f; }.org-org-column { /* org-column */ background-color: #e5e5e5; }.org-org-column-title { /* org-column-title */ background-color: #e5e5e5; font-weight: bold; text-decoration: underline; }.org-org-date { /* org-date */ color: #a020f0; text-decoration: underline; }.org-org-document-info { /* org-document-info */ color: #191970; }.org-org-document-info-keyword { /* org-document-info-keyword */ color: #7f7f7f; }.org-org-document-title { /* org-document-title */ color: #191970; font-size: 144%; font-weight: bold; }.org-org-done { /* org-done */ color: #228b22; font-weight: bold; }.org-org-drawer { /* org-drawer */ color: #0000ff; }.org-org-ellipsis { /* org-ellipsis */ color: #b8860b; text-decoration: underline; }.org-org-footnote { /* org-footnote */ color: #a020f0; text-decoration: underline; }.org-org-formula { /* org-formula */ color: #b22222; }.org-org-headline-done { /* org-headline-done */ color: #bc8f8f; }.org-org-hide { /* org-hide */ color: #ffffff; }.org-org-latex-and-export-specials { /* org-latex-and-export-specials */ color: #8b4513; }.org-org-level-1 { /* org-level-1 */ color: #0000ff; }.org-org-level-2 { /* org-level-2 */ color: #a0522d; }.org-org-level-3 { /* org-level-3 */ color: #a020f0; }.org-org-level-4 { /* org-level-4 */ color: #b22222; }.org-org-level-5 { /* org-level-5 */ color: #228b22; }.org-org-level-6 { /* org-level-6 */ color: #008b8b; }.org-org-level-7 { /* org-level-7 */ color: #7a378b; }.org-org-level-8 { /* org-level-8 */ color: #8b2252; }.org-org-link { /* org-link */ color: #0000ff; text-decoration: underline; }.org-org-meta-line { /* org-meta-line */ color: #b22222; }.org-org-mode-line-clock { /* org-mode-line-clock */ color: #000000; background-color: #bfbfbf; }.org-org-mode-line-clock-overrun { /* org-mode-line-clock-overrun */ color: #000000; background-color: #ff0000; }.org-org-quote { /* org-quote */ color: #7f7f7f; }.org-org-scheduled { /* org-scheduled */ color: #006400; }.org-org-scheduled-previously { /* org-scheduled-previously */ color: #b22222; }.org-org-scheduled-today { /* org-scheduled-today */ color: #006400; }.org-org-sexp-date { /* org-sexp-date */ color: #a020f0; }.org-org-special-keyword { /* org-special-keyword */ color: #a020f0; }.org-org-table { /* org-table */ color: #0000ff; }.org-org-tag { /* org-tag */ font-weight: bold; }.org-org-target { /* org-target */ text-decoration: underline; }.org-org-time-grid { /* org-time-grid */ color: #b8860b; }.org-org-todo { /* org-todo */ color: #ff0000; font-weight: bold; }.org-org-upcoming-deadline { /* org-upcoming-deadline */ color: #b22222; }.org-org-verbatim { /* org-verbatim */ color: #7f7f7f; }.org-org-verse { /* org-verse */ color: #7f7f7f; }.org-org-warning { /* org-warning */ color: #ff0000; font-weight: bold; }.org-outline-1 { /* outline-1 */ color: #0000ff; }.org-outline-2 { /* outline-2 */ color: #a0522d; }.org-outline-3 { /* outline-3 */ color: #a020f0; }.org-outline-4 { /* outline-4 */ color: #b22222; }.org-outline-5 { /* outline-5 */ color: #228b22; }.org-outline-6 { /* outline-6 */ color: #008b8b; }.org-outline-7 { /* outline-7 */ color: #7a378b; }.org-outline-8 { /* outline-8 */ color: #8b2252; }.org-preprocessor { /* font-lock-preprocessor-face */ color: #7a378b; }.org-query-replace { /* query-replace */ color: #b0e2ff; background-color: #cd00cd; }.org-regexp-grouping-backslash { /* font-lock-regexp-grouping-backslash */ font-weight: bold; }.org-regexp-grouping-construct { /* font-lock-regexp-grouping-construct */ font-weight: bold; }.org-region { /* region */ background-color: #eedc82; }.org-secondary-selection { /* secondary-selection */ background-color: #ffff00; }.org-shadow { /* shadow */ color: #7f7f7f; }.org-show-paren-match { /* show-paren-match */ background-color: #40e0d0; }.org-show-paren-mismatch { /* show-paren-mismatch */ color: #ffffff; background-color: #a020f0; }.org-string { /* font-lock-string-face */ color: #8b2252; }.org-tool-bar { /* tool-bar */ color: #000000; background-color: #bfbfbf; }.org-tooltip { /* tooltip */ color: #000000; background-color: #ffffe0; }.org-trailing-whitespace { /* trailing-whitespace */ background-color: #ff0000; }.org-type { /* font-lock-type-face */ color: #228b22; }.org-underline { /* underline */ text-decoration: underline; }.org-variable-name { /* font-lock-variable-name-face */ color: #a0522d; }.org-warning { /* font-lock-warning-face */ color: #ff0000; font-weight: bold; }.org-widget-button { /* widget-button */ font-weight: bold; }.org-widget-button-pressed { /* widget-button-pressed */ color: #ff0000; }.org-widget-documentation { /* widget-documentation */ color: #006400; }.org-widget-field { /* widget-field */ background-color: #d9d9d9; }.org-widget-inactive { /* widget-inactive */ color: #7f7f7f; }.org-widget-single-line-field { /* widget-single-line-field */ background-color: #d9d9d9; }
+</style>
+<script type="text/javascript">
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML="  <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n});
+</script>
+<script type="text/javascript">
+(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="<a name='"+x+"'></a><div name='"+x+"'></div>",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&&gt(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Nt=/^(?:checkbox|radio)$/i,Ct=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l)}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=ln(e,t),Pt.detach()),Gt[e]=n),n}function ln(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}b.each(["height","width"],function(e,n){b.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(b.css(e,"display"))?b.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,i),i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=b.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===b.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,n){return n?b.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,n){b.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?b(e).position()[n]+"px":r):t}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!b.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||b.css(e,"display"))},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(b.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Nt.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],o=function(e,t){t=b.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==b.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}b.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,yn,vn=b.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Cn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=b.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=a.href}catch(Ln){yn=o.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(b.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(u){var l;return o[u]=!0,b.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||a||o[c]?a?!(l=c):t:(n.dataTypes.unshift(c),s(c),!1)}),l}return s(n.dataTypes[0])||!o["*"]&&s("*")}function Mn(e,n){var r,i,o=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}b.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),b.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&b.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?b("<div>").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{},y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.done,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader("Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(jn,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}});function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);while("*"===l[0])l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"!==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.noop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.text=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Qn[t]||[]).concat(Qn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;for(;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.cssHooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};return r.duration=b.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in b.fx.speeds?b.fx.speeds[r.duration]:b.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){b.isFunction(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},b.timers=[],b.fx=rr.prototype.init,b.fx.tick=function(){var e,n=b.timers,r=0;for(Xn=b.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||b.fx.stop(),Xn=t},b.fx.timer=function(e){e()&&b.timers.push(e)&&b.fx.start()},b.fx.interval=13,b.fx.start=function(){Un||(Un=setInterval(b.fx.tick,b.fx.interval))},b.fx.stop=function(){clearInterval(Un),Un=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fx.step={},b.expr&&b.expr.filters&&(b.expr.filters.animated=function(e){return b.grep(b.timers,function(t){return e===t.elem}).length}),b.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){b.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,b.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},b.offset={setOffset:function(e,t,n){var r=b.css(e,"position");"static"===r&&(e.style.position="relative");var i=b(e),o=i.offset(),a=b.css(e,"top"),s=b.css(e,"left"),u=("absolute"===r||"fixed"===r)&&b.inArray("auto",[a,s])>-1,l={},c={},p,f;u?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),b.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(l.top=t.top-o.top+p),null!=t.left&&(l.left=t.left-o.left+f),"using"in t?t.using.call(e,l):i.css(l)}},b.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===b.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),b.nodeName(e[0],"html")||(n=e.offset()),n.top+=b.css(e[0],"borderTopWidth",!0),n.left+=b.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-b.css(r,"marginTop",!0),left:t.left-n.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||o.documentElement;while(e&&!b.nodeName(e,"html")&&"static"===b.css(e,"position"))e=e.offsetParent;return e||o.documentElement})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);b.fn[e]=function(i){return b.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?b(a).scrollLeft():o,r?o:b(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return b.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}b.each({Height:"height",Width:"width"},function(e,n){b.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){b.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return b.access(this,function(n,r,i){var o;return b.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?b.css(n,r,s):b.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=b,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return b})})(window);
+</script>
+<script type="text/javascript">
+;(function($){var l=location.href.replace(/#.*/,'');var g=$.localScroll=function(a){$('body').localScroll(a)};g.defaults={duration:1e3,axis:'y',event:'click',stop:true,target:window,reset:true};g.hash=function(a){if(location.hash){a=$.extend({},g.defaults,a);a.hash=false;if(a.reset){var e=a.duration;delete a.duration;$(a.target).scrollTo(0,a);a.duration=e}i(0,location,a)}};$.fn.localScroll=function(b){b=$.extend({},g.defaults,b);return b.lazy?this.bind(b.event,function(a){var e=$([a.target,a.target.parentNode]).filter(d)[0];if(e)i(a,e,b)}):this.find('a,area').filter(d).bind(b.event,function(a){i(a,this,b)}).end().end();function d(){return!!this.href&&!!this.hash&&this.href.replace(this.hash,'')==l&&(!b.filter||$(this).is(b.filter))}};function i(a,e,b){var d=e.hash.slice(1),f=document.getElementById(d)||document.getElementsByName(d)[0];if(!f)return;if(a)a.preventDefault();var h=$(b.target);if(b.lock&&h.is(':animated')||b.onBefore&&b.onBefore.call(b,a,f,h)===false)return;if(b.stop)h.stop(true);if(b.hash){var j=f.id==d?'id':'name',k=$('<a> </a>').attr(j,d).css({position:'absolute',top:$(window).scrollTop(),left:$(window).scrollLeft()});f[j]='';$('body').prepend(k);location=e.hash;k.remove();f[j]=d}h.scrollTo(f,b).trigger('notify.serialScroll',[f])}})(jQuery);
+</script>
+<script type="text/javascript">
+;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
+</script>
+<script type="text/javascript">
+(function(a){a.fn.zclip=function(c){if(typeof c=="object"&&!c.length){var b=a.extend({path:"ZeroClipboard.swf",copy:null,beforeCopy:null,afterCopy:null,clickAfter:true,setHandCursor:true,setCSSEffects:true},c);return this.each(function(){var e=a(this);if(e.is(":visible")&&(typeof b.copy=="string"||a.isFunction(b.copy))){ZeroClipboard.setMoviePath(b.path);var d=new ZeroClipboard.Client();if(a.isFunction(b.copy)){e.bind("zClip_copy",b.copy)}if(a.isFunction(b.beforeCopy)){e.bind("zClip_beforeCopy",b.beforeCopy)}if(a.isFunction(b.afterCopy)){e.bind("zClip_afterCopy",b.afterCopy)}d.setHandCursor(b.setHandCursor);d.setCSSEffects(b.setCSSEffects);d.addEventListener("mouseOver",function(f){e.trigger("mouseenter")});d.addEventListener("mouseOut",function(f){e.trigger("mouseleave")});d.addEventListener("mouseDown",function(f){e.trigger("mousedown");if(!a.isFunction(b.copy)){d.setText(b.copy)}else{d.setText(e.triggerHandler("zClip_copy"))}if(a.isFunction(b.beforeCopy)){e.trigger("zClip_beforeCopy")}});d.addEventListener("complete",function(f,g){if(a.isFunction(b.afterCopy)){e.trigger("zClip_afterCopy")}else{if(g.length>500){g=g.substr(0,500)+"...\n\n("+(g.length-500)+" characters not shown)"}e.removeClass("hover");alert("Copied text to clipboard:\n\n "+g)}if(b.clickAfter){e.trigger("click")}});d.glue(e[0],e.parent()[0]);a(window).bind("load resize",function(){d.reposition()})}})}else{if(typeof c=="string"){return this.each(function(){var f=a(this);c=c.toLowerCase();var e=f.data("zclipId");var d=a("#"+e+".zclip");if(c=="remove"){d.remove();f.removeClass("active hover")}else{if(c=="hide"){d.hide();f.removeClass("active hover")}else{if(c=="show"){d.show()}}}})}}}})(jQuery);var ZeroClipboard={version:"1.0.7",clients:{},moviePath:"ZeroClipboard.swf",nextId:1,$:function(a){if(typeof(a)=="string"){a=document.getElementById(a)}if(!a.addClass){a.hide=function(){this.style.display="none"};a.show=function(){this.style.display=""};a.addClass=function(b){this.removeClass(b);this.className+=" "+b};a.removeClass=function(d){var e=this.className.split(/\s+/);var b=-1;for(var c=0;c<e.length;c++){if(e[c]==d){b=c;c=e.length}}if(b>-1){e.splice(b,1);this.className=e.join(" ")}return this};a.hasClass=function(b){return !!this.className.match(new RegExp("\\s*"+b+"\\s*"))}}return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(d,b,c){var a=this.clients[d];if(a){a.receiveEvent(b,c)}},register:function(b,a){this.clients[b]=a},getDOMObjectPosition:function(c,a){var b={left:0,top:0,width:c.width?c.width:c.offsetWidth,height:c.height?c.height:c.offsetHeight};if(c&&(c!=a)){b.left+=c.offsetLeft;b.top+=c.offsetTop}return b},Client:function(a){this.handlers={};this.id=ZeroClipboard.nextId++;this.movieId="ZeroClipboardMovie_"+this.id;ZeroClipboard.register(this.id,this);if(a){this.glue(a)}}};ZeroClipboard.Client.prototype={id:0,ready:false,movie:null,clipText:"",handCursorEnabled:true,cssEffects:true,handlers:null,glue:function(d,b,e){this.domElement=ZeroClipboard.$(d);var f=99;if(this.domElement.style.zIndex){f=parseInt(this.domElement.style.zIndex,10)+1}if(typeof(b)=="string"){b=ZeroClipboard.$(b)}else{if(typeof(b)=="undefined"){b=document.getElementsByTagName("body")[0]}}var c=ZeroClipboard.getDOMObjectPosition(this.domElement,b);this.div=document.createElement("div");this.div.className="zclip";this.div.id="zclip-"+this.movieId;$(this.domElement).data("zclipId","zclip-"+this.movieId);var a=this.div.style;a.position="absolute";a.left=""+c.left+"px";a.top=""+c.top+"px";a.width=""+c.width+"px";a.height=""+c.height+"px";a.zIndex=f;if(typeof(e)=="object"){for(addedStyle in e){a[addedStyle]=e[addedStyle]}}b.appendChild(this.div);this.div.innerHTML=this.getHTML(c.width,c.height)},getHTML:function(d,a){var c="";var b="id="+this.id+"&width="+d+"&height="+a;if(navigator.userAgent.match(/MSIE/)){var e=location.href.match(/^https/i)?"https://":"http://";c+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+e+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+d+'" height="'+a+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+b+'"/><param name="wmode" value="transparent"/></object>'}else{c+='<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+d+'" height="'+a+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+b+'" wmode="transparent" />'}return c},hide:function(){if(this.div){this.div.style.left="-2000px"}},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.domElement=null;this.div=null}},reposition:function(c){if(c){this.domElement=ZeroClipboard.$(c);if(!this.domElement){this.hide()}}if(this.domElement&&this.div){var b=ZeroClipboard.getDOMObjectPosition(this.domElement);var a=this.div.style;a.left=""+b.left+"px";a.top=""+b.top+"px"}},setText:function(a){this.clipText=a;if(this.ready){this.movie.setText(a)}},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");if(!this.handlers[a]){this.handlers[a]=[]}this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a;if(this.ready){this.movie.setHandCursor(a)}},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(d,f){d=d.toString().toLowerCase().replace(/^on/,"");switch(d){case"load":this.movie=document.getElementById(this.movieId);if(!this.movie){var c=this;setTimeout(function(){c.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){var c=this;setTimeout(function(){c.receiveEvent("load",null)},100);this.ready=true;return}this.ready=true;try{this.movie.setText(this.clipText)}catch(h){}try{this.movie.setHandCursor(this.handCursorEnabled)}catch(h){}break;case"mouseover":if(this.domElement&&this.cssEffects){this.domElement.addClass("hover");if(this.recoverActive){this.domElement.addClass("active")}}break;case"mouseout":if(this.domElement&&this.cssEffects){this.recoverActive=false;if(this.domElement.hasClass("active")){this.domElement.removeClass("active");this.recoverActive=true}this.domElement.removeClass("hover")}break;case"mousedown":if(this.domElement&&this.cssEffects){this.domElement.addClass("active")}break;case"mouseup":if(this.domElement&&this.cssEffects){this.domElement.removeClass("active");this.recoverActive=false}break}if(this.handlers[d]){for(var b=0,a=this.handlers[d].length;b<a;b++){var g=this.handlers[d][b];if(typeof(g)=="function"){g(this,f)}else{if((typeof(g)=="object")&&(g.length==2)){g[0][g[1]](this,f)}else{if(typeof(g)=="string"){window[g](this,f)}}}}}}};
+</script>
+<script type="text/javascript">
+(function(t,e){function i(e,i){var n,o,a,r=e.nodeName.toLowerCase();return"area"===r?(n=e.parentNode,o=n.name,e.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap=#"+o+"]")[0],!!a&&s(a)):!1):(/input|select|textarea|button|object/.test(r)?!e.disabled:"a"===r?e.href||i:i)&&s(e)}function s(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var n=0,o=/^ui-id-\d+$/;t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({focus:function(e){return function(i,s){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),s&&s.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var s,n,o=t(this[0]);o.length&&o[0]!==document;){if(s=o.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(n=parseInt(o.css("zIndex"),10),!isNaN(n)&&0!==n))return n;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var s=t.attr(e,"tabindex"),n=isNaN(s);return(n||s>=0)&&i(e,!n)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(i,s){function n(e,i,s,n){return t.each(o,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),n&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===s?["Left","Right"]:["Top","Bottom"],a=s.toLowerCase(),r={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+s]=function(i){return i===e?r["inner"+s].call(this):this.each(function(){t(this).css(a,n(this,i)+"px")})},t.fn["outer"+s]=function(e,i){return"number"!=typeof e?r["outer"+s].call(this,e):this.each(function(){t(this).css(a,n(this,e,!0,i)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i){var s,n=t.plugins[e];if(n&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(s=0;n.length>s;s++)t.options[n[s][0]]&&n[s][1].apply(t.element,i)}},hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)}})})(jQuery),function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),s===e)return o[i]===e?null:o[i];o[i]=s}else{if(s===e)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})}(jQuery),function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,o="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!o&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),i.containment&&this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i,s=this,n=!1,o=!1;for(t.ui.ddmanager&&!this.options.dropBehaviour&&(o=t.ui.ddmanager.drop(this,e)),this.dropped&&(o=this.dropped,this.dropped=!1),i=this.element[0];i&&(i=i.parentNode);)i===document&&(n=!0);return n||"original"!==this.options.helper?("invalid"===this.options.revert&&!o||"valid"===this.options.revert&&o||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,o)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){s._trigger("stop",e)!==!1&&s._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;if("parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=["document"===n.containment?0:t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,"document"===n.containment?0:t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,("document"===n.containment?0:t(window).scrollLeft())+t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,("document"===n.containment?0:t(window).scrollTop())+(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||n.containment.constructor===Array)n.containment.constructor===Array&&(this.containment=n.containment);else{if(i=t(n.containment),s=i[0],!s)return;e="hidden"!==t(s).css("overflow"),this.containment=[(parseInt(t(s).css("borderLeftWidth"),10)||0)+(parseInt(t(s).css("paddingLeft"),10)||0),(parseInt(t(s).css("borderTopWidth"),10)||0)+(parseInt(t(s).css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(t(s).css("borderRightWidth"),10)||0)-(parseInt(t(s).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(t(s).css("borderBottomWidth"),10)||0)-(parseInt(t(s).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i}},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n,o,a=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName),l=e.pageX,c=e.pageY;return this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(c=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(c=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,c=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,o=t.extend({},i,{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,o))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var o=!1,a=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==a&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(a.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(document).scrollTop()<s.scrollSensitivity?n=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(n=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(document).scrollLeft()<s.scrollSensitivity?n=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(n=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=t(this),s=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(e,i){var s,n,o,a,r,h,l,c,u,d,p=t(this).data("ui-draggable"),f=p.options,g=f.snapTolerance,m=i.offset.left,v=m+p.helperProportions.width,_=i.offset.top,b=_+p.helperProportions.height;for(u=p.snapElements.length-1;u>=0;u--)r=p.snapElements[u].left,h=r+p.snapElements[u].width,l=p.snapElements[u].top,c=l+p.snapElements[u].height,m>r-g&&h+g>m&&_>l-g&&c+g>_||m>r-g&&h+g>m&&b>l-g&&c+g>b||v>r-g&&h+g>v&&_>l-g&&c+g>_||v>r-g&&h+g>v&&b>l-g&&c+g>b?("inner"!==f.snapMode&&(s=g>=Math.abs(l-b),n=g>=Math.abs(c-_),o=g>=Math.abs(r-v),a=g>=Math.abs(h-m),s&&(i.position.top=p._convertPositionTo("relative",{top:l-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||o||a,"outer"!==f.snapMode&&(s=g>=Math.abs(l-_),n=g>=Math.abs(c-b),o=g>=Math.abs(r-m),a=g>=Math.abs(h-v),s&&(i.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||n||o||a||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=s||n||o||a||d):(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"1.10.2",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(i)?i:function(t){return t.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},t.ui.ddmanager.droppables[e.scope]=t.ui.ddmanager.droppables[e.scope]||[],t.ui.ddmanager.droppables[e.scope].push(this),e.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,i,s){if(!i.offset)return!1;var n,o,a=(t.positionAbs||t.position.absolute).left,r=a+t.helperProportions.width,h=(t.positionAbs||t.position.absolute).top,l=h+t.helperProportions.height,c=i.offset.left,u=c+i.proportions.width,d=i.offset.top,p=d+i.proportions.height;switch(s){case"fit":return a>=c&&u>=r&&h>=d&&p>=l;case"intersect":return a+t.helperProportions.width/2>c&&u>r-t.helperProportions.width/2&&h+t.helperProportions.height/2>d&&p>l-t.helperProportions.height/2;case"pointer":return n=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,o=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,e(o,d,i.proportions.height)&&e(n,c,i.proportions.width);case"touch":return(h>=d&&p>=h||l>=d&&p>=l||d>h&&l>p)&&(a>=c&&u>=a||r>=c&&u>=r||c>a&&r>u);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions.height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions={width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight})}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=t.ui.intersect(e,this,this.options.tolerance),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n}),o.length&&(s=t.data(o[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}}(jQuery),function(t){function e(t){return parseInt(t,10)||0}function i(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,s,n,o,a=this,r=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),o="ui-resizable-"+s,n=t("<div class='ui-resizable-handle "+o+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeClass("ui-resizable-autohide"),a._handles.show())}).mouseleave(function(){r.disabled||a.resizing||(t(this).addClass("ui-resizable-autohide"),a._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,o,a=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=e(this.helper.css("left")),n=e(this.helper.css("top")),a.containment&&(s+=t(a.containment).scrollLeft()||0,n+=t(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var i,s=this.helper,n={},o=this.originalMousePosition,a=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,c=this.size.height,u=e.pageX-o.left||0,d=e.pageY-o.top||0,p=this._change[a];return p?(i=p.apply(this,[e,u,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==c&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,h=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,s,n,o,a,r=this.options;a={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=a.minHeight*this.aspectRatio,n=a.minWidth/this.aspectRatio,s=a.maxHeight*this.aspectRatio,o=a.maxWidth/this.aspectRatio,e>a.minWidth&&(a.minWidth=e),n>a.minHeight&&(a.minHeight=n),a.maxWidth>s&&(a.maxWidth=s),a.maxHeight>o&&(a.maxHeight=o)),this._vBoundaries=a},_updateCache:function(t){this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,s=this.size,n=this.axis;return i(t.height)?t.width=t.height*this.aspectRatio:i(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(s.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(s.height-t.height),t.left=e.left+(s.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,s=this.axis,n=i(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=i(t.height)&&e.maxHeight&&e.maxHeight<t.height,a=i(t.width)&&e.minWidth&&e.minWidth>t.width,r=i(t.height)&&e.minHeight&&e.minHeight>t.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(s),u=/nw|ne|n/.test(s);return a&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),a&&c&&(t.left=h-e.minWidth),n&&c&&(t.left=h-e.maxWidth),r&&u&&(t.top=l-e.minHeight),o&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,s,n,o=this.helper||this.element;for(t=0;this._proportionallyResizeElements.length>t;t++){if(n=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],e=0;i.length>e;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(s[e],10)||0);n.css({height:o.height()-this.borderDif[0]-this.borderDif[2]||0,width:o.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&t.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,o,a,r,h,l=t(this).data("ui-resizable"),c=l.options,u=l.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(l.containerElement=t(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(p),s=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){s[t]=e(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,o=l.containerSize.height,a=l.containerSize.width,r=t.ui.hasScroll(p,"left")?p.scrollWidth:a,h=t.ui.hasScroll(p)?p.scrollHeight:o,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(e){var i,s,n,o,a=t(this).data("ui-resizable"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio),a.position.top=a._helper?h.top:0),a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top,i=Math.abs((a._helper?a.offset.left-u.left:a.offset.left-u.left)+a.sizeDiff.width),s=Math.abs((a._helper?a.offset.top-u.top:a.offset.top-h.top)+a.sizeDiff.height),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o&&(i-=a.parentData.left),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):t.each(i.alsoResize,function(t){s(t)})},resize:function(e,i){var s=t(this).data("ui-resizable"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0},h=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),o={},a=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(a,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(o[e]=i||null)}),e.css(o)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):t.each(n.alsoResize,function(t,e){h(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,c=Math.round((s.width-n.width)/h)*h,u=Math.round((s.height-n.height)/l)*l,d=n.width+c,p=n.height+u,f=i.maxWidth&&d>i.maxWidth,g=i.maxHeight&&p>i.maxHeight,m=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=h),v&&(p+=l),f&&(d-=h),g&&(p-=l),/^(se|s|e)$/.test(a)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.top=o.top-u):/^(sw)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.left=o.left-c):(e.size.width=d,e.size.height=p,e.position.top=o.top-u,e.position.left=o.left-c)}})}(jQuery),function(t){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.2",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):undefined}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||o>i.right||i.top>h||a>i.bottom):"fit"===n.tolerance&&(l=i.left>o&&r>i.right&&i.top>a&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):undefined}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-t(document).scrollTop()<a.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-a.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<a.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+a.scrollSpeed)),e.pageX-t(document).scrollLeft()<a.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-a.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<a.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u=s+l>r&&h>s+l&&e+c>o&&a>e+c;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?u:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,o=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return n?this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&s||"left"===o&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,s,n,o,a=[],r=[],h=this._connectWith();if(h&&e)for(i=h.length-1;i>=0;i--)for(n=t(h[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&r.push([t.isFunction(o.options.items)?o.options.items.call(o.element):t(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(r.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=r.length-1;i>=0;i--)r[i][0].each(function(){a.push(this)});return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t(e.document[0].createElement(s)).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?n.append("<td colspan='99'>&#160;</td>"):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,o,a,r,h,l,c,u,d,p,f=null,g=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],g=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(a=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[o][l]-c)&&(d=!0,u+=this.items[o][l]),a>Math.abs(u-c)&&(a=Math.abs(u-c),r=this.items[o],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[g].element,!0),this._trigger("change",s,this._uiHash()),this.containers[g]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})}(jQuery),function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function s(e,i){var s,n,a={};for(s in i)n=i[s],e[s]!==n&&(o[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(a[s]=n));return a}var n=["add","remove","toggle"],o={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.map(function(){var e=t(this);return{el:e,start:i(this)}}),o=function(){t.each(n,function(t,i){e[i]&&a[i+"Class"](e[i])})},o(),l=l.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,o,a,r){return"boolean"==typeof n||n===e?o?t.effects.animateClass.call(this,n?{add:s}:{remove:s},o,a,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,o,a)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.2",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,o;for(o=0;s.length>o;o++)null!==s[o]&&(n=t.data(i+s[o]),n===e&&(n=""),t.css(s[o],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(o)&&o.call(n[0]),t.isFunction(e)&&e()}var n=t(this),o=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):a.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,o=i.queue,a=t.effects.effect[i.effect];return t.fx.off||!a?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):o===!1?this.each(e):this.queue(o||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()}(jQuery),function(t){var e=0,i={},s={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",s.height=s.paddingTop=s.paddingBottom=s.borderTopWidth=s.borderBottomWidth="show",t.widget("ui.accordion",{version:"1.10.2",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t(),content:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),undefined):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),"disabled"===t&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e),undefined)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),o.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),(e.active===!1&&e.collapsible===!0||!this.headers.length)&&(e.active=!1,this.active=t()),e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,s=this.options,n=s.heightStyle,o=this.element.parent(),a=this.accordionId="ui-accordion-"+(this.element.attr("id")||++e);this.active=this._findActive(s.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(e){var i=t(this),s=i.attr("id"),n=i.next(),o=n.attr("id");s||(s=a+"-header-"+e,i.attr("id",s)),o||(o=a+"-panel-"+e,n.attr("id",o)),i.attr("aria-controls",o),n.attr("aria-labelledby",s)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(s.event),"fill"===n?(i=o.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(i=0,this.headers.next().each(function(){i=Math.max(i,t(this).css("height","").height())}).height(i))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n[0]===s[0],a=o&&i.collapsible,r=a?t():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:a?t():n,newPanel:r};e.preventDefault(),o&&!i.collapsible||this._trigger("beforeActivate",e,l)===!1||(i.active=a?!1:this.headers.index(n),this.active=o?t():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),o||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-expanded":"false","aria-hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?s.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(t,e,n){var o,a,r,h=this,l=0,c=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},d=c&&u.down||u,p=function(){h._toggleComplete(n)};return"number"==typeof d&&(r=d),"string"==typeof d&&(a=d),a=a||d.easing||u.easing,r=r||d.duration||u.duration,e.length?t.length?(o=t.show().outerHeight(),e.animate(i,{duration:r,easing:a,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(s,{duration:r,easing:a,complete:p,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?l+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(o-e.outerHeight()-l),l=0)}}),undefined):e.animate(i,r,a,p):t.animate(s,r,a,p)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}})}(jQuery),function(t){var e=0;t.widget("ui.autocomplete",{version:"1.10.2",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o?!0:a?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,undefined;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:case o.NUMPAD_ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,s.preventDefault(),undefined;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),undefined):(this._searchTimeout(t),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(t),this._change(t),undefined)}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({input:t(),role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:s})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):undefined},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=this,i=++e;return function(s){i===e&&t.__response(s),t.pending--,t.pending||t.element.removeClass("ui-autocomplete-loading")}},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[t](e),undefined):(this.search(null,e),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})}(jQuery),function(t){var e,i,s,n,o="ui-button ui-widget ui-state-default ui-corner-all",a="ui-state-hover ui-state-active ",r="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",h=function(){var e=t(this).find(":ui-button");setTimeout(function(){e.button("refresh")},1)},l=function(e){var i=e.name,s=e.form,n=t([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?t(s).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),n};t.widget("ui.button",{version:"1.10.2",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var a=this,r=this.options,c="checkbox"===this.type||"radio"===this.type,u=c?"":"ui-state-active",d="ui-state-focus";null===r.label&&(r.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(o).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===e&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||t(this).removeClass(u)}).bind("click"+this.eventNamespace,function(t){r.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){a.buttonElement.addClass(d)}).bind("blur"+this.eventNamespace,function(){a.buttonElement.removeClass(d)}),c&&(this.element.bind("change"+this.eventNamespace,function(){n||a.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){r.disabled||(n=!1,i=t.pageX,s=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){r.disabled||(i!==t.pageX||s!==t.pageY)&&(n=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return r.disabled||n?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled||n)return!1;t(this).addClass("ui-state-active"),a.buttonElement.attr("aria-pressed","true");var e=a.element[0];l(e).not(e).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return r.disabled?!1:(t(this).addClass("ui-state-active"),e=this,a.document.one("mouseup",function(){e=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return r.disabled?!1:(t(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(e){return r.disabled?!1:((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",r.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(o+" "+a+" "+r).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(e?this.element.prop("disabled",!0):this.element.prop("disabled",!1),undefined):(this._resetButton(),undefined)},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?l(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var e=this.buttonElement.removeClass(r),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,o=[];s.primary||s.secondary?(this.options.text&&o.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(o.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):o.push("ui-button-text-only"),e.addClass(o.join(" "))}}),t.widget("ui.buttonset",{version:"1.10.2",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(t,e){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.dpDiv=s(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function s(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(o.inline?e.parent()[0]:o.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))})}function n(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}t.extend(t.ui,{datepicker:{version:"1.10.2"}});var o,a="datepicker",r=(new Date).getTime();t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return n(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,a,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,a,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,o,r){var h,l,c,u,d,p=this._dialogInst;return p||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},t.data(this._dialogInput[0],a,p)),n(p.settings,o||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],a,p),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,a);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,a),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,a);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,a);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,a)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,s,o){var a,r,h,l,c=this._getInst(i);return 2===arguments.length&&"string"==typeof s?"defaults"===s?t.extend({},t.datepicker._defaults):c?"all"===s?t.extend({},c.settings):this._get(c,s):null:(a=s||{},"string"==typeof s&&(a={},a[s]=o),c&&(this._curInst===c&&this._hideDatepicker(),r=this._getDateDatepicker(i,!0),h=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),n(c.settings,a),null!==h&&a.dateFormat!==e&&a.minDate===e&&(c.settings.minDate=this._formatDate(c,h)),null!==l&&a.dateFormat!==e&&a.maxDate===e&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in a&&(a.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),this._autoSize(c),this._setDate(c,r),this._updateAlternate(c),this._updateDatepicker(c)),e)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(i){var s,n,o=t.datepicker._getInst(i.target);return t.datepicker._get(o,"constrainInput")?(s=t.datepicker._possibleChars(t.datepicker._get(o,"dateFormat")),n=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">n||!s||s.indexOf(n)>-1):e},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,s,o,a,r,h,l;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),s=t.datepicker._get(i,"beforeShow"),o=s?s.apply(e,[e,i]):{},o!==!1&&(n(i.settings,o),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),a=!1,t(e).parents().each(function(){return a|="fixed"===t(this).css("position"),!a}),r={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),r=t.datepicker._checkOffset(i,r,a),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":a?"fixed":"absolute",display:"none",left:r.left+"px",top:r.top+"px"}),i.inline||(h=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?i.dpDiv.show(h,t.datepicker._get(i,"showOptions"),l):i.dpDiv[h||"show"](h?l:null),i.input.is(":visible")&&!i.input.is(":disabled")&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,o=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,s=this._getNumberOfMonths(e),n=s[1],a=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&e.input[0]!==document.activeElement&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_getBorders:function(t){var e=function(t){return{thin:1,medium:2,thick:3}[t]||t};return[parseFloat(e(t.css("border-left-width"))),parseFloat(e(t.css("border-top-width")))]},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,r=this._curInst;!r||e&&r!==t.data(e,a)||this._datepickerShowing&&(i=this._get(r,"showAnim"),s=this._get(r,"duration"),n=function(){t.datepicker._tidyDialog(r)},t.effects&&(t.effects.effect[i]||t.effects[i])?r.dpDiv.hide(i,t.datepicker._get(r,"showOptions"),s,n):r.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(r,"onClose"),o&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).each(function(){t(this).val(n)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(i,s,n){if(null==i||null==s)throw"Invalid arguments";if(s="object"==typeof s?""+s:s+"",""===s)return null;var o,a,r,h,l=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,p=(n?n.dayNames:null)||this._defaults.dayNames,f=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,g=(n?n.monthNames:null)||this._defaults.monthNames,m=-1,v=-1,_=-1,b=-1,y=!1,w=function(t){var e=i.length>o+1&&i.charAt(o+1)===t;return e&&o++,e},k=function(t){var e=w(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n=RegExp("^\\d{1,"+i+"}"),o=s.substring(l).match(n);if(!o)throw"Missing number at position "+l;return l+=o[0].length,parseInt(o[0],10)},x=function(i,n,o){var a=-1,r=t.map(w(i)?o:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(r,function(t,i){var n=i[1];return s.substr(l,n.length).toLowerCase()===n.toLowerCase()?(a=i[0],l+=n.length,!1):e}),-1!==a)return a+1;throw"Unknown name at position "+l},D=function(){if(s.charAt(l)!==i.charAt(o))throw"Unexpected literal at position "+l;l++};for(o=0;i.length>o;o++)if(y)"'"!==i.charAt(o)||w("'")?D():y=!1;else switch(i.charAt(o)){case"d":_=k("d");break;case"D":x("D",d,p);break;case"o":b=k("o");break;case"m":v=k("m");break;case"M":v=x("M",f,g);break;case"y":m=k("y");break;case"@":h=new Date(k("@")),m=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"!":h=new Date((k("!")-this._ticksTo1970)/1e4),m=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"'":w("'")?D():y=!0;break;default:D()}if(s.length>l&&(r=s.substr(l),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=m?0:-100)),b>-1)for(v=1,_=b;;){if(a=this._getDaysInMonth(m,v-1),a>=_)break;v++,_-=a}if(h=this._daylightSavingAdjust(new Date(m,v-1,_)),h.getFullYear()!==m||h.getMonth()+1!==v||h.getDate()!==_)throw"Invalid date";return h},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?e.getFullYear():(10>e.getYear()%100?"0":"")+e.getYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,i){return t.settings[i]!==e?t.settings[i]:this._defaults[i]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}l=h.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){window["DP_jQuery_"+r].datepicker._adjustDate(s,-i,"M")},next:function(){window["DP_jQuery_"+r].datepicker._adjustDate(s,+i,"M")},hide:function(){window["DP_jQuery_"+r].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+r].datepicker._gotoToday(s)},selectDay:function(){return window["DP_jQuery_"+r].datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return window["DP_jQuery_"+r].datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return window["DP_jQuery_"+r].datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,v,_,b,y,w,k,x,D,C,I,P,T,M,S,z,A,H,N,E,W,O,F,R,j=new Date,L=this._daylightSavingAdjust(new Date(j.getFullYear(),j.getMonth(),j.getDate())),Y=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),V=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),q=this._get(t,"showCurrentAtPos"),Q=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],$=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-q,te=t.drawYear;if(0>Z&&(Z+=12,te--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=G&&G>e?G:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-Q,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":V?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+Q,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":V?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?$:L,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),_=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,D=0;U[1]>D;D++){if(C=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),I=" ui-corner-all",P="",X){if(P+="<div class='ui-datepicker-group",U[1]>1)switch(D){case 0:P+=" ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case U[1]-1:P+=" ui-datepicker-group-last",I=" ui-corner-"+(Y?"left":"right");break;default:P+=" ui-datepicker-group-middle",I=""}P+="'>"}for(P+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,te,G,J,k>0||D>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",T=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)M=(w+c)%7,T+="<th"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[M]+"'>"+p[M]+"</span></th>";for(P+=T+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),z=(this._getFirstDayOfMonth(te,Z)-c+7)%7,A=Math.ceil((z+S)/7),H=X?this.maxRows>A?this.maxRows:A:A,this.maxRows=H,N=this._daylightSavingAdjust(new Date(te,Z,1-z)),E=0;H>E;E++){for(P+="<tr>",W=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(N)+"</td>":"",w=0;7>w;w++)O=m?m.apply(t.input?t.input[0]:null,[N]):[!0,""],F=N.getMonth()!==Z,R=F&&!_||!O[0]||G&&G>N||J&&N>J,W+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(N.getTime()===C.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===N.getTime()&&b.getTime()===C.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!v?"":" "+O[1]+(N.getTime()===$.getTime()?" "+this._currentClass:"")+(N.getTime()===L.getTime()?" ui-datepicker-today":""))+"'"+(F&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"&#39;")+"'")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+N.getMonth()+"' data-year='"+N.getFullYear()+"'")+">"+(F&&!v?"&#xa0;":R?"<span class='ui-state-default'>"+N.getDate()+"</span>":"<a class='ui-state-default"+(N.getTime()===L.getTime()?" ui-state-highlight":"")+(N.getTime()===$.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+N.getDate()+"</a>")+"</td>",N.setDate(N.getDate()+1),N=this._daylightSavingAdjust(N);P+=W+"</tr>"}Z++,Z>11&&(Z=0,te++),P+="</tbody></table>"+(X?"</div>"+(U[0]>0&&D===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=P}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(_||(b+=y+(!o&&m&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),_&&(b+=(!o&&m&&v?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.2",window["DP_jQuery_"+r]=t}(jQuery),function(t){var e={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.10.2",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||t(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),undefined;if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(n.focus(1),e.preventDefault()):(s.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(e.element[0],arguments)},o={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,t("<button></button>",s).button(o).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){s.position=[o.position.left-i.document.scrollLeft(),o.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){s.height=t(this).height(),s.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(s){var n=this,o=!1,a={};t.each(s,function(t,s){n._setOption(t,s),t in e&&(o=!0),t in i&&(a[t]=s)}),o&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",a)},_setOption:function(t,e){var i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=n.is(":data(ui-draggable)"),i&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(s=n.is(":data(ui-resizable)"),s&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(s){e._allowInteraction(s)||(s.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,s=[],n=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(s=i.split?i.split(" "):[i[0],i[1]],1===s.length&&(s[1]=s[0]),t.each(["left","top"],function(t,e){+s[t]===s[t]&&(n[t]=s[t],s[t]=e)}),i={my:s[0]+(0>n[0]?n[0]:"+"+n[0])+" "+s[1]+(0>n[1]?n[1]:"+"+n[1]),at:s.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})}(jQuery),function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var o,a,r,h=t(this),l=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(h,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",g=i.test(u),m={},v="show"===c;h.parent().is(".ui-effects-wrapper")?t.effects.save(h.parent(),l):t.effects.save(h,l),h.show(),o=t.effects.createWrapper(h).css({overflow:"hidden"}),a=o[p](),r=parseFloat(o.css(f))||0,m[p]=v?a:0,g||(h.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[f]=v?r:a+r),v&&(o.css(p,0),g||o.css(f,r+a)),o.animate(m,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&h.hide(),t.effects.restore(h,l),t.effects.removeWrapper(h),n()}})}}(jQuery),function(t){t.effects.effect.bounce=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(a,e.mode||"effect"),l="hide"===h,c="show"===h,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||l?1:0),g=e.duration/f,m=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=a.queue(),y=b.length;for((c||l)&&r.push("opacity"),t.effects.save(a,r),a.show(),t.effects.createWrapper(a),d||(d=a["top"===v?"outerHeight":"outerWidth"]()/3),c&&(o={opacity:1},o[v]=0,a.css("opacity",0).css(v,_?2*-d:2*d).animate(o,g,m)),l&&(d/=Math.pow(2,p-1)),o={},o[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,a.animate(n,g,m).animate(o,g,m),d=l?2*d:d/2;l&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,a.animate(n,g,m)),a.queue(function(){l&&a.hide(),t.effects.restore(a,r),t.effects.removeWrapper(a),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),a.dequeue()}}(jQuery),function(t){t.effects.effect.clip=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(a,e.mode||"hide"),l="show"===h,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(a,r),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n="IMG"===a[0].tagName?s:a,o=n[d](),l&&(n.css(d,0),n.css(p,o/2)),f[d]=l?o:0,f[p]=l?0:o/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){l||a.hide(),t.effects.restore(a,r),t.effects.removeWrapper(a),i()}})}}(jQuery),function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","opacity","height","width"],a=t.effects.setMode(n,e.mode||"hide"),r="show"===a,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,o),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===c?-s:s),u[l]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})}}(jQuery),function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),g||p.hide(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*_,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*v,l=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*v,top:-o*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(g?l*v:0),top:h+(g?c*_:0),opacity:g?0:1}).animate({left:r+(g?0:l*v),top:h+(g?0:c*_),opacity:g?1:0},e.duration||500,e.easing,s)}}(jQuery),function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}}(jQuery),function(t){t.effects.effect.fold=function(e,i){var s,n,o=t(this),a=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(o,e.mode||"hide"),h="show"===r,l="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=h!==d,f=p?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(o,a),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[l?0:1]),h&&s.css(d?{height:0,width:c}:{height:c,width:0}),m[f[0]]=h?n[0]:c,v[f[1]]=h?n[1]:0,s.animate(m,g,e.easing).animate(v,g,e.easing,function(){l&&o.hide(),t.effects.restore(o,a),t.effects.removeWrapper(o),i()})}}(jQuery),function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],o=t.effects.setMode(s,e.mode||"show"),a={backgroundColor:s.css("backgroundColor")};"hide"===o&&(a.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&s.hide(),t.effects.restore(s,n),i()}})}}(jQuery),function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),o=t.effects.setMode(n,e.mode||"show"),a="show"===o,r="hide"===o,h=a||"hide"===o,l=2*(e.times||5)+(h?1:0),c=e.duration/l,u=0,d=n.queue(),p=d.length;for((a||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;l>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,l+1))),n.dequeue()}}(jQuery),function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),o="hide"===n,a=parseInt(e.percent,10)||150,r=a/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:o?a:100,from:o?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),o=t.effects.setMode(s,e.mode||"effect"),a=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===o?0:100),r=e.direction||"both",h=e.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?a/100:1,x:"vertical"!==r?a/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==o&&(n.origin=h||["middle","center"],n.restore=!0),n.from=e.from||("show"===o?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*c.y,width:l.width*c.x,outerHeight:l.outerHeight*c.y,outerWidth:l.outerWidth*c.x},n.fade&&("show"===o&&(n.from.opacity=0,n.to.opacity=1),"hide"===o&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(a,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=a.css("position"),_=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&a.show(),s={height:a.height(),width:a.width(),outerHeight:a.outerHeight(),outerWidth:a.outerWidth()},"toggle"===e.mode&&"show"===p?(a.from=e.to||b,a.to=e.from||s):(a.from=e.from||("show"===p?b:s),a.to=e.to||("hide"===p?b:s)),o={from:{y:a.from.height/s.height,x:a.from.width/s.width},to:{y:a.to.height/s.height,x:a.to.width/s.width}},("box"===g||"both"===g)&&(o.from.y!==o.to.y&&(_=_.concat(u),a.from=t.effects.setTransition(a,u,o.from.y,a.from),a.to=t.effects.setTransition(a,u,o.to.y,a.to)),o.from.x!==o.to.x&&(_=_.concat(d),a.from=t.effects.setTransition(a,d,o.from.x,a.from),a.to=t.effects.setTransition(a,d,o.to.x,a.to))),("content"===g||"both"===g)&&o.from.y!==o.to.y&&(_=_.concat(c).concat(l),a.from=t.effects.setTransition(a,c,o.from.y,a.from),a.to=t.effects.setTransition(a,c,o.to.y,a.to)),t.effects.save(a,_),a.show(),t.effects.createWrapper(a),a.css("overflow","hidden").css(a.from),m&&(n=t.effects.getBaseline(m,s),a.from.top=(s.outerHeight-a.outerHeight())*n.y,a.from.left=(s.outerWidth-a.outerWidth())*n.x,a.to.top=(s.outerHeight-a.to.outerHeight)*n.y,a.to.left=(s.outerWidth-a.to.outerWidth)*n.x),a.css(a.from),("content"===g||"both"===g)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),l=r.concat(u).concat(d),a.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,l),i.from={height:s.height*o.from.y,width:s.width*o.from.x,outerHeight:s.outerHeight*o.from.y,outerWidth:s.outerWidth*o.from.x},i.to={height:s.height*o.to.y,width:s.width*o.to.x,outerHeight:s.height*o.to.y,outerWidth:s.width*o.to.x},o.from.y!==o.to.y&&(i.from=t.effects.setTransition(i,u,o.from.y,i.from),i.to=t.effects.setTransition(i,u,o.to.y,i.to)),o.from.x!==o.to.x&&(i.from=t.effects.setTransition(i,d,o.from.x,i.from),i.to=t.effects.setTransition(i,d,o.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,l)})})),a.animate(a.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===a.to.opacity&&a.css("opacity",a.from.opacity),"hide"===p&&a.hide(),t.effects.restore(a,_),f||("static"===v?a.css({position:"relative",top:a.to.top,left:a.to.left}):t.each(["top","left"],function(t,e){a.css(e,function(e,i){var s=parseInt(i,10),n=t?a.to.left:a.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(a),i()}})}}(jQuery),function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","height","width"],a=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",h=e.distance||20,l=e.times||3,c=2*l+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},g={},m={},v=n.queue(),_=v.length;for(t.effects.save(n,o),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+h,g[d]=(p?"+=":"-=")+2*h,m[d]=(p?"-=":"+=")+2*h,n.animate(f,u,e.easing),s=1;l>s;s++)n.animate(g,u,e.easing).animate(m,u,e.easing);n.animate(g,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}}(jQuery),function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","width","height"],a=t.effects.setMode(n,e.mode||"show"),r="show"===a,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u={};t.effects.save(n,o),n.show(),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,c?isNaN(s)?"-"+s:-s:s),u[l]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})}}(jQuery),function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}}(jQuery),function(t){t.widget("ui.menu",{version:"1.10.2",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(e),i.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,o,a,r,h=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:h=!1,n=this.previousFilter||"",o=String.fromCharCode(e.keyCode),a=!1,clearTimeout(this.filterTimer),o===n?a=!0:o=n+o,r=RegExp("^"+i(o),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=a&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(o=String.fromCharCode(e.keyCode),r=RegExp("^"+i(o),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})}(jQuery),function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var o,a=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(o!==e)return o;var i,s,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=n.children()[0];return t("body").append(n),i=a.offsetWidth,n.css("overflow","scroll"),s=a.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),o=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var o,p,g,m,v,_,b=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),k=(e.collision||"flip").split(" "),x={};return _=n(b),b[0].preventDefault&&(e.at="left top"),p=_.width,g=_.height,m=_.offset,v=t.extend({},m),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),x[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=g:"center"===e.at[1]&&(v.top+=g/2),o=i(x.at,p,g),v.left+=o[0],v.top+=o[1],this.each(function(){var n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),_=s(this,"marginTop"),D=u+f+s(this,"marginRight")+w.width,C=d+_+s(this,"marginBottom")+w.height,I=t.extend({},v),P=i(x.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?I.left-=u:"center"===e.my[0]&&(I.left-=u/2),"bottom"===e.my[1]?I.top-=d:"center"===e.my[1]&&(I.top-=d/2),I.left+=P[0],I.top+=P[1],t.support.offsetFractions||(I.left=h(I.left),I.top=h(I.top)),n={marginLeft:f,marginTop:_},t.each(["left","top"],function(i,s){t.ui.position[k[i]]&&t.ui.position[k[i]][s](I,{targetWidth:p,targetHeight:g,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:D,collisionHeight:C,offset:[o[0]+P[0],o[1]+P[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t){var i=m.left-I.left,s=i+p-u,n=m.top-I.top,o=n+g-d,h={target:{element:b,left:m.left,top:m.top,width:p,height:g},element:{element:c,left:I.left,top:I.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>o?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(h.horizontal="center"),d>g&&g>r(n+o)&&(h.vertical="middle"),h.important=a(r(i),r(s))>a(r(n),r(o))?"horizontal":"vertical",e.using.call(this,t,h)}),c.offset(t.extend(I,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-o-n;e.collisionWidth>o?h>0&&0>=l?(i=t.left+h+e.collisionWidth-o-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+o-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=a(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,o=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-o-n;e.collisionHeight>o?h>0&&0>=l?(i=t.top+h+e.collisionHeight-o-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+o-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=a(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,a=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-a-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-a-o,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,a=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-a-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-a-o,t.top+p+f+g>c&&(0>s||r(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-h,t.top+p+f+g>u&&(i>0||u>r(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,o,a=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(a?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)e.style[o]=s[o];e.appendChild(r),i=a||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()}(jQuery),function(t,e){t.widget("ui.progressbar",{version:"1.10.2",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})}(jQuery),function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.2",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=t([])},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,o.addClass("ui-state-active").focus(),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,o;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,o=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),o!==!1&&this.values(e,i,!0))):i!==this.value()&&(o=this._trigger("slide",t,{handle:this.handles[e],value:i}),o!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,o,a,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(a=this.options.step,n=o=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:o=this._valueMin();break;case t.ui.keyCode.END:o=this._valueMax();break;case t.ui.keyCode.PAGE_UP:o=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:o=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;o=this._trimAlignValue(n+a);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;o=this._trimAlignValue(n-a)}this._slide(i,r,o)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})}(jQuery),function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.2",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>&#9660;</span>"+"</a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}(jQuery),function(t,e){function i(){return++n}function s(t){return t.hash.length>1&&decodeURIComponent(t.href.replace(o,""))===decodeURIComponent(location.href.replace(o,""))}var n=0,o=/#.*$/;t.widget("ui.tabs",{version:"1.10.2",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,o){return t(o).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),o=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:o=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,o),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var o,a,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");s(n)?(o=n.hash,a=e.element.find(e._sanitizeSelector(o))):(r=e._tabId(l),o="#"+r,a=e.element.find(o),a.length||(a=e._createPanel(r),a.insertAfter(e.panels[i-1]||e.tablist)),a.attr("aria-live","polite")),a.length&&(e.panels=e.panels.add(a)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":o.substring(1),"aria-labelledby":h}),a.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,h=r?t():this._getPanelForTab(o),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():o,newPanel:h};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,o=this.tabs.eq(e),a=o.find(".ui-tabs-anchor"),r=this._getPanelForTab(o),h={tab:o,panel:r};s(a[0])||(this.xhr=t.ajax(this._ajaxSettings(a,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(o.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),o.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})}(jQuery),function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.2",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=o),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function o(t){l.of=t,a.is(":hidden")||a.position(l)}var a,r,h,l=t.extend({},this.options.position);if(n){if(a=this._find(s),a.length)return a.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),a=this._tooltip(s),e(s,a.attr("id")),a.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):a.position(t.extend({of:s},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){a.is(":visible")&&(o(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:a}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(a)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),o.stop(!0),this._hide(o,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:o}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})}(jQuery);
+</script>
+<script type="text/javascript">
+!function(a,b){"use strict";function c(c,g){var h=this;h.$el=a(c),h.el=c,h.id=e++,h.$window=a(b),h.$document=a(document),h.$el.bind("destroyed",a.proxy(h.teardown,h)),h.$clonedHeader=null,h.$originalHeader=null,h.isSticky=!1,h.hasBeenSticky=!1,h.leftOffset=null,h.topOffset=null,h.init=function(){h.$el.each(function(){var b=a(this);b.css("padding",0),h.$originalHeader=a("thead:first",this),h.$clonedHeader=h.$originalHeader.clone(),b.trigger("clonedHeader."+d,[h.$clonedHeader]),h.$clonedHeader.addClass("tableFloatingHeader"),h.$clonedHeader.css("display","none"),h.$originalHeader.addClass("tableFloatingHeaderOriginal"),h.$originalHeader.after(h.$clonedHeader),h.$printStyle=a('<style type="text/css" media="print">.tableFloatingHeader{display:none !important;}.tableFloatingHeaderOriginal{position:static !important;}</style>'),a("head").append(h.$printStyle)}),h.setOptions(g),h.updateWidth(),h.toggleHeaders(),h.bind()},h.destroy=function(){h.$el.unbind("destroyed",h.teardown),h.teardown()},h.teardown=function(){h.isSticky&&h.$originalHeader.css("position","static"),a.removeData(h.el,"plugin_"+d),h.unbind(),h.$clonedHeader.remove(),h.$originalHeader.removeClass("tableFloatingHeaderOriginal"),h.$originalHeader.css("visibility","visible"),h.$printStyle.remove(),h.el=null,h.$el=null},h.bind=function(){h.$scrollableArea.on("scroll."+d,h.toggleHeaders),h.isWindowScrolling||(h.$window.on("scroll."+d+h.id,h.setPositionValues),h.$window.on("resize."+d+h.id,h.toggleHeaders)),h.$scrollableArea.on("resize."+d,h.toggleHeaders),h.$scrollableArea.on("resize."+d,h.updateWidth)},h.unbind=function(){h.$scrollableArea.off("."+d,h.toggleHeaders),h.isWindowScrolling||(h.$window.off("."+d+h.id,h.setPositionValues),h.$window.off("."+d+h.id,h.toggleHeaders)),h.$scrollableArea.off("."+d,h.updateWidth)},h.toggleHeaders=function(){h.$el&&h.$el.each(function(){var b,c=a(this),d=h.isWindowScrolling?isNaN(h.options.fixedOffset)?h.options.fixedOffset.outerHeight():h.options.fixedOffset:h.$scrollableArea.offset().top+(isNaN(h.options.fixedOffset)?0:h.options.fixedOffset),e=c.offset(),f=h.$scrollableArea.scrollTop()+d,g=h.$scrollableArea.scrollLeft(),i=h.isWindowScrolling?f>e.top:d>e.top,j=(h.isWindowScrolling?f:0)<e.top+c.height()-h.$clonedHeader.height()-(h.isWindowScrolling?0:d);i&&j?(b=e.left-g+h.options.leftOffset,h.$originalHeader.css({position:"fixed","margin-top":h.options.marginTop,left:b,"z-index":3}),h.leftOffset=b,h.topOffset=d,h.$clonedHeader.css("display",""),h.isSticky||(h.isSticky=!0,h.updateWidth()),h.setPositionValues()):h.isSticky&&(h.$originalHeader.css("position","static"),h.$clonedHeader.css("display","none"),h.isSticky=!1,h.resetWidth(a("td,th",h.$clonedHeader),a("td,th",h.$originalHeader)))})},h.setPositionValues=function(){var a=h.$window.scrollTop(),b=h.$window.scrollLeft();!h.isSticky||0>a||a+h.$window.height()>h.$document.height()||0>b||b+h.$window.width()>h.$document.width()||h.$originalHeader.css({top:h.topOffset-(h.isWindowScrolling?0:a),left:h.leftOffset-(h.isWindowScrolling?0:b)})},h.updateWidth=function(){if(h.isSticky){h.$originalHeaderCells||(h.$originalHeaderCells=a("th,td",h.$originalHeader)),h.$clonedHeaderCells||(h.$clonedHeaderCells=a("th,td",h.$clonedHeader));var b=h.getWidth(h.$clonedHeaderCells);h.setWidth(b,h.$clonedHeaderCells,h.$originalHeaderCells),h.$originalHeader.css("width",h.$clonedHeader.width())}},h.getWidth=function(c){var d=[];return c.each(function(c){var e,f=a(this);if("border-box"===f.css("box-sizing"))e=f[0].getBoundingClientRect().width;else{var g=a("th",h.$originalHeader);if("collapse"===g.css("border-collapse"))if(b.getComputedStyle)e=parseFloat(b.getComputedStyle(this,null).width);else{var i=parseFloat(f.css("padding-left")),j=parseFloat(f.css("padding-right")),k=parseFloat(f.css("border-width"));e=f.outerWidth()-i-j-k}else e=f.width()}d[c]=e}),d},h.setWidth=function(a,b,c){b.each(function(b){var d=a[b];c.eq(b).css({"min-width":d,"max-width":d})})},h.resetWidth=function(b,c){b.each(function(b){var d=a(this);c.eq(b).css({"min-width":d.css("min-width"),"max-width":d.css("max-width")})})},h.setOptions=function(c){h.options=a.extend({},f,c),h.$scrollableArea=a(h.options.scrollableArea),h.isWindowScrolling=h.$scrollableArea[0]===b},h.updateOptions=function(a){h.setOptions(a),h.unbind(),h.bind(),h.updateWidth(),h.toggleHeaders()},h.init()}var d="stickyTableHeaders",e=0,f={fixedOffset:0,leftOffset:0,marginTop:0,scrollableArea:b};a.fn[d]=function(b){return this.each(function(){var e=a.data(this,"plugin_"+d);e?"string"==typeof b?e[b].apply(e):e.updateOptions(b):"destroy"!==b&&a.data(this,"plugin_"+d,new c(this,b))})}}(jQuery,window);
+</script>
+<script type="text/javascript">
+// darksun.js --- darksun JS file
+//
+// Copyright (C) 2011-2016 All Right Reserved, Fabrice Niessen
+//
+// This file is free software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation, either version 3 of
+// the License, or (at your option) any later version.
+//
+// This file is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")>
+// URL: https://github.com/fniessen/org-html-themes/
+// Version: 20140515.1841
+
+$(function() {
+$('p').
+html(function(index, old) {
+return old.replace('FIXME',
+'<span class="fixme">FIXME</span>');
+});
+$('p').
+html(function(index, old) {
+return old.replace('XXX',
+'<span class="fixme">XXX</span>');
+});
+});
+
+// Remove leading section number
+$(function() {
+$('.section-number-2').text("");
+for (var i = 3; i <= 5; i++) {
+$('.section-number-' + i).each(function() {
+$(this).text($(this).text().replace(/^[0-9]+\./g, ""));
+});
+}
+});
+
+$(function() {
+$('<div id="minitoc" class="dontprint"></div>').prependTo('body');
+});
+
+// generate contents of minitoc
+function generateMiniToc(divId) {
+$('#minitoc-content').empty().append('<h2>In this section</h2><ul></ul>');
+$('#' + divId).find('h3').each(function(i) {
+// [2018-09-03 Mon 03:48] Get text up to non-breaking space,
+// to omit the tags.  If there are no tags, there will be no
+// &nbsp;, so get all the text.  (This fixes a bug in the
+// original code.)
+let text = null;
+let pos = $(this).text().search(/ | ►/);
+if (pos > 0) {
+text = $(this).text().substring(0, pos);
+}
+else {
+text = $(this).text();
+}
+$("#minitoc-content>ul").append("<li><a href='#" + $(this).attr("id") + "'>"
++ text + "</a></li>");
+});
+// Ensure that the target is expanded (hideShow)
+$('#minitoc-content a[href^="#"]').click(function() {
+var href = $(this).attr('href');
+hsExpandAnchor(href);
+});
+}
+
+// display tabs
+function tabifySections() {
+
+// hide TOC (if present)
+$('#table-of-contents').hide();
+
+// grab the list of `h2' from the page
+var allSections = [];
+$('h2')
+.each(function() {
+// Remove TODO keywords and tags (contained in spans)
+var tabText = $(this).clone().find('span').remove().end()
+.text().trim();
+var tabId = $(this).parent().attr('id');
+if (tabText) {
+// - remove heading number (all leading digits)
+// - remove progress logging (between square brackets)
+// - remove leading and trailing spaces
+tabText = tabText.replace(/^\d+\s+/, '').replace(/\[[\d/%]+\]/, '').trim();
+
+allSections.push({
+text: tabText,
+id: tabId
+});
+}
+});
+
+// create the tab links
+var tabs = $('<ul id="tabs"></ul>');
+for (i = 0; i < allSections.length; i++) {
+var item = allSections[i];
+html = $('<li><a href="#' + item.id + '">' + item.text + '</a></li>');
+tabs.append(html);
+}
+
+// insert tabs menu after title (`h1'), or at the beginning of the content
+if($('.title').length !== 0) {
+$('.title').after(tabs);
+}
+else {
+$('#content').prepend(tabs);
+}
+}
+
+function selectTabAndScroll(href) {
+// At this point we assume that href is local (starts with #)
+// alert(href);
+
+// Find the tab to activate
+var targetTab = $(href).closest('.ui-tabs-panel');
+var targetTabId = targetTab.attr('id');
+var targetTabAriaLabel = targetTab.attr('aria-labelledby');
+
+var targetTabIndex = $("#content ul li")
+.index($('[aria-labelledby="' + targetTabAriaLabel + '"]'));
+
+// Activate target tab
+$('#content').tabs('option', 'active', targetTabIndex);
+
+// Rebuild minitoc
+generateMiniToc(targetTabId);
+
+// Set the location hash
+// document.location.hash = href;
+
+// Scroll to top if href was a tab
+if (href == '#' + targetTabId) {
+// alert(targetTabId);
+$.scrollTo(0);
+}
+// Scroll to href if href was not a tab
+else {
+$.scrollTo(href);
+}
+}
+
+$(document).ready(function() {
+$('#preamble').remove();
+$('#table-of-contents').remove();
+
+// Initialize hideShow
+hsInit();
+
+// Prepare for tabs
+tabifySections();
+
+// Build the tabs from the #content div
+$('#content').tabs();
+
+// Set default animation
+$('#content').tabs('option', 'show', true);
+
+// Rebuild minitoc when a tab is activated
+$('#content').tabs({
+activate: function(event, ui) {
+var divId = ui.newTab.attr('aria-controls');
+generateMiniToc(divId);
+}
+});
+
+// Required to get the link of the tab in URL
+$('#content ul').localScroll({
+target: '#content',
+duration: 0,
+hash: true
+});
+
+// Handle hash in URL
+if ($('#content') && document.location.hash) {
+hsExpandAnchor(document.location.hash);
+selectTabAndScroll(document.location.hash);
+}
+// If no hash, build the minitoc anyway for selected tab
+else {
+var divId = $('#content div[aria-expanded=true]').attr('id');
+generateMiniToc(divId);
+}
+
+// Handle click on internal links
+$('.ui-tabs-panel a[href^="#"]').click(function(e) {
+var href = $(this).attr('href');
+hsExpandAnchor(href);
+selectTabAndScroll(href);
+e.preventDefault();
+});
+
+// add sticky headers to tables
+$('table').stickyTableHeaders();
+});
+
+function copyToClipboard(text)
+{
+if (window.clipboardData && window.clipboardData.setData) { // Internet Explorer
+window.clipboardData.setData("Text", text);
+}
+else { // Fallback solution
+window.prompt("Copy to clipboard: Ctrl+C, Enter", text);
+}
+}
+
+$(document).ready(function() {
+// Assuming that the ZeroClipboard swf file is in the same folder than darksun,
+// get the path to it (it will be relative to the current page location).
+var bbScriptPath = $('script[src$="darksun.js"]').attr('src');  // the js file path
+var bbPathToZeroClipboardSwf = bbScriptPath.replace('darksun.js', 'ZeroClipboard.swf');
+
+// Add copy to clipboard snippets
+$('.org-src-container').prepend('<div class="snippet-copy-to-clipboard"><span class="copy-to-clipboard-button">[copy]</span></div>');
+
+// Display/hide snippets on source block mouseenter/mouseleave
+$(document).on('mouseenter', '.org-src-container', function () {
+$(this).find('.snippet-copy-to-clipboard').show();
+
+// Need to call zclip here, once the button is visible.
+// Beacause when the button is not visible, zclip does nothing.
+if ((window.location.protocol != 'file:') && ($(this).find('.zclip').length == 0)) {
+$(this).find('.copy-to-clipboard-button').zclip({
+//path: 'http://www.steamdev.com/zclip/js/ZeroClipboard.swf',
+//path: 'styles/darksun/js/ZeroClipboard.swf',
+path: bbPathToZeroClipboardSwf,
+copy: function() {
+return $(this).parent().parent().find('.src').text();
+}
+});
+}
+}).on('mouseleave', '.org-src-container', function () {
+$(this).find('.snippet-copy-to-clipboard').hide();
+});
+
+// Handle copy to clipboard (here, for a local file only 'file://...'
+if (window.location.protocol == 'file:') { // if local file use browser-specific code
+$('.copy-to-clipboard-button').click(function() {
+// Get the text to be copied
+var text = $(this).parent().parent().find('.src').text();
+text = text.replace(/\n/g, "\r\n");
+// alert(text);
+copyToClipboard(text);
+});
+}
+});
+
+$(function() {
+$('li > code :contains("[X]")')
+.parent()
+.addClass('checked')
+.end()
+.remove();
+$('li > code :contains("[-]")')
+.parent()
+.addClass('halfchecked')
+.end()
+.remove();
+$('li > code :contains("[ ]")')
+.parent()
+.addClass('unchecked')
+.end()
+.remove();
+});
+
+$(function() {
+$('i :contains("[#A]")')
+.replaceWith('<i><span style="color: #F67777;">[#A]</span></i>');
+$('i :contains("[#B]")')
+.replaceWith('<i><span style="color: #B6E864;">[#B]</span></i>');
+$('i :contains("[#C]")')
+.replaceWith('<i><span style="color: #C3DCFF;">[#C]</span></i>');
+});
+
+function togglePanel(e) {
+e.preventDefault();
+
+$("#left-panel-contents").toggleClass('active').toggle(200);
+$("#right-panel-contents").toggleClass('active').toggle(200);
+
+var slidePos =
+$("#left-panel-button").css("left") == "-23px"? '182px': '-23px';
+
+$("#left-panel-button").
+animate({"left": slidePos, "opacity": 0.9}, {duration: "200" });
+
+// if ($("#left-panel-contents").hasClass('active')) {
+//     hsHideTodoKeyword('done');
+// } else {
+//     hsShowTodoKeyword('done');
+// }
+
+// return false;
+}
+
+$(function() {
+$('<div id="left-panel-wrapper" class="dontprint"><div id="left-panel-contents" style="opacity: 0.9"></div><div id="left-panel-button" class="dontprint"><a href="#">Dashboard</a></div></div>')
+.appendTo('body');
+
+$('<div id="right-panel-wrapper" class="dontprint"><div id="right-panel-contents" style="opacity: 0.9"></div></div>')
+.appendTo('body');
+
+$('#left-panel-button').click(togglePanel);
+});
+
+$(function() {
+var ul = $('<ul id="listOfTodo"></ul>').appendTo('#left-panel-contents');
+var countOfTodo = {}, listOfTodo = [], totalOfTodo = 0;
+
+// assign the counts (avoid double-counting elements from the ToC)
+$('span.todo').not($('#table-of-contents span.todo')).each(function() {
+var $thisTodo = $(this).text().trim();
+
+if ($.inArray($thisTodo, listOfTodo) == -1) {
+countOfTodo[$thisTodo] = 1;
+listOfTodo.push($thisTodo);
+}
+else
+countOfTodo[$thisTodo] += 1;
+totalOfTodo += 1;
+});
+
+function scoreTodo(t) {
+switch (t) {
+case 'NEW': return 1;
+case 'TODO': return 2;
+case 'STRT': return 3;
+case 'WAIT': return 4;
+case 'DLGT': return 5;
+case 'SDAY': return 6;
+case 'DFRD': return 7;
+case 'DONE': return 8;
+case 'CANX': return 9;
+default: return 0;
+}
+}
+
+function compareTodo(a, b) {
+if (scoreTodo(a) < scoreTodo(b)) return -1;
+if (scoreTodo(a) > scoreTodo(b)) return 1;
+return 0;
+}
+
+listOfTodo.sort(compareTodo);
+
+// display
+for (i = 0; i < listOfTodo.length; i++) {
+var $thisTodo = listOfTodo[i];
+$(ul).append('<li><span class="todo ' + $thisTodo + '">'+ $thisTodo + '</span>'
++ ' <small>(' + countOfTodo[$thisTodo] + ')</small></li>');
+}
+
+$('#listOfTodo')
+.before('<b>Next Actions</b> <small>(' + totalOfTodo + ')</small>:<br>');
+});
+
+$(function() {
+var ul = $('<ul id="listOfDone"></ul>').appendTo('#left-panel-contents');
+var countOfDone = {}, listOfDone = [], totalOfDone = 0;
+
+// assign the counts (avoid double-counting elements from the ToC)
+$('span.done').not($('#table-of-contents span.done')).each(function() {
+var $thisDone = $(this).text().trim();
+
+if ($.inArray($thisDone, listOfDone) == -1) {
+countOfDone[$thisDone] = 1;
+listOfDone.push($thisDone);
+}
+else
+countOfDone[$thisDone] += 1;
+totalOfDone += 1;
+});
+
+// display
+for (i = 0; i < listOfDone.length; i++) {
+var $thisDone = listOfDone[i];
+$(ul).append('<li><span class="done ' + $thisDone + '">'+ $thisDone + '</span>'
++ ' <small>(' + countOfDone[$thisDone] + ')</small></li>');
+}
+
+$('#listOfDone')
+.before('<b>Done Actions</b> <small>(' + totalOfDone + '):</small><br>');
+});
+
+$(function() {
+var ul = $('<ul id="listOfTags"></ul>').appendTo('#right-panel-contents');
+var countOfTags = {}, listOfTags = [], totalOfTags = 0;
+
+// assign the counts (avoid double-counting elements from the ToC)
+$('span.tag').not($('#table-of-contents span.tag')).each(function() {
+var $thisTagGroup = $(this).text().trim().split(/\s/);
+// \s matches spaces, tabs, new lines, etc.
+
+for (tag in $thisTagGroup) {
+if ($.inArray($thisTagGroup[tag], listOfTags) == -1) {
+countOfTags[$thisTagGroup[tag]] = 1;
+listOfTags.push($thisTagGroup[tag]);
+}
+else
+countOfTags[$thisTagGroup[tag]] += 1;
+totalOfTags += 1;
+}
+});
+
+listOfTags.sort();
+
+// display
+for (i = 0; i < listOfTags.length; i++) {
+var $thisTag = listOfTags[i];
+// $(ul).append('<li><span class="tag ' + $thisTag + '">'+
+//                   $thisTag + '</span> <small>(' + countOfTags[$thisTag] + ')</small></li>');
+$(ul).append('<li><span class="tag"><span class="' + $thisTag + '">' + $thisTag
++ '</span></span>'
++ ' <small>(' + countOfTags[$thisTag] + ')</small></li>');
+}
+
+$('#listOfTags')
+.before('<b>Contexts</b> <small>(' + totalOfTags + '):</small><br>');
+});
+
+$(function() {
+$('.done').parent(':header').parent().find(':header').addClass('DONEheader');
+$('.done').parent(':header').parent().css({color: '#999999'});
+});
+
+$(function() {
+$('span.todo').click(function(e) {
+var orgKeyword = $(this).text().trim();
+$('.' + orgKeyword).toggleClass('selected');
+$('#content .' + orgKeyword).parent().parent()
+.toggleClass('match' + orgKeyword);
+$('#left-panel-wrapper .' + orgKeyword).parent()
+.toggleClass('match' + orgKeyword);
+e.preventDefault();
+})
+});
+
+$(function() {
+$('.tag span').click(function(e) {
+var orgTag = $(this).text().trim();
+$('.' + orgTag).toggleClass('selected');
+$('#content .' + orgTag).parent().parent().parent()
+.toggleClass('matchtag');
+$('#right-panel-wrapper .' + orgTag).parent().parent()
+.toggleClass('matchtag');
+e.preventDefault();
+})
+});
+
+function clickPreviousTab() {
+var active = $('#content').tabs('option', 'active');
+// Avoid going back to last tab
+if (active == 0) return;
+
+$('#content').tabs('option', 'active', active - 1);
+
+// Set the location href
+var href = $('#content div[aria-expanded=true]').attr('id');
+document.location.hash = href;
+$.scrollTo(0);
+}
+
+function clickNextTab() {
+var active = $('#content').tabs('option', 'active');
+$('#content').tabs('option', 'active', active + 1);
+
+// Set the location href
+var href = $('#content div[aria-expanded=true]').attr('id');
+document.location.hash = href;
+$.scrollTo(0);
+}
+
+function orgDefkey(e) {
+if (!e)
+var e = window.event;
+var keycode = (e.keyCode) ? e.keyCode : e.which;
+var actualkey = String.fromCharCode(keycode);
+switch (actualkey) {
+case "?": // help (dashboard)
+case "h":
+togglePanel(e);
+break;
+case "n": // next
+clickNextTab();
+break;
+case "p": // previous
+clickPreviousTab();
+break;
+// case "b": // scroll down - should be mapped to Shift-SPC
+//     $(window).scrollTop($(window).scrollTop()-$(window).height());
+//     break;
+case "<": // scroll to top
+$(window).scrollTop(0);
+break;
+case ">": // scroll to bottom
+$(window).scrollTop($(document).height());
+break;
+case "-": // collapse all
+hsCollapseAll();
+break;
+case "+": // expand all
+hsExpandAll();
+break;
+case "r": // go to next task
+hsReviewTaskNext();
+break;
+case "R": // go to previous task
+hsReviewTaskPrev();
+break;
+case "q": // quit reviewing
+hsReviewTaskQuit();
+break;
+case "g": // refresh the page (from the server, rather than the cache)
+location.reload(true);
+break;
+}
+}
+
+document.onkeypress = orgDefkey;
+</script>
+<script type="text/javascript">
+// hideshow.js --- HideShow JS file
+//
+// Copyright (C) 2014 All Right Reserved, Fabrice Niessen
+//
+// This file is free software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation, either version 3 of
+// the License, or (at your option) any later version.
+//
+// This file is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")>
+// URL: https://github.com/fniessen/hide-show/
+// Version: 20140912.1722
+
+// var HS_COLLAPSIBLE_HEADERS = $('h3, h4, h5'); // collapsible headers
+
+if (typeof HS_STARTUP_FOLDED === 'undefined') {
+var HS_STARTUP_FOLDED = false;      // Show just the overview, or show all.
+}
+
+if (typeof HS_SHOW_ALL_TEXT === 'undefined') {
+var HS_SHOW_ALL_TEXT = 'Expand';
+}
+if (typeof HS_HIDE_ALL_TEXT === 'undefined') {
+var HS_HIDE_ALL_TEXT = 'Collapse';
+}
+
+if (typeof HS_ALWAYS_DISPLAY_ICON === 'undefined') {
+var HS_ALWAYS_DISPLAY_ICON = false; // Display an icon for all states, or
+// just when closed.
+}
+
+if (typeof HS_ICON_CLOSED === 'undefined') {
+var HS_ICON_CLOSED = '&#x25BA;';    // black right-pointing pointer
+}
+if (typeof HS_ICON_OPEN === 'undefined') {
+var HS_ICON_OPEN = '&#x25BC;';      // black down-pointing triangle
+}
+if (typeof HS_ICON_EMPTY === 'undefined') {
+var HS_ICON_EMPTY = '&#x25A0;';     // black square
+}
+
+if (typeof HS_SHOW_ALL_OPEN_DONE_TREES === 'undefined') {
+var HS_SHOW_ALL_OPEN_DONE_TREES = false; // Expand all will open DONE trees.
+}
+
+if (typeof HS_CLASS === 'undefined') {
+var HS_CLASS = 'hsCollapsible';
+}
+
+// Expand a header
+function hsExpand(header) {
+hsExpand2(header, true);
+}
+
+// Expand a header
+function hsExpand2(header, expandDoneHeader) {
+// Ignore non collapsible entries
+if (!header.parent().hasClass(HS_CLASS)) return;
+
+// Do not expand DONE node if not required
+if (hsIsDoneHeader(header) && !expandDoneHeader) return;
+
+header.children('span[class="ellipsis"]').remove();
+if (HS_ALWAYS_DISPLAY_ICON == true) {
+header.append('<span class="ellipsis"> ' + HS_ICON_OPEN + '</span>');
+}
+header.parent().removeClass('hsCollapsed').addClass('hsExpanded');
+header.nextAll().show();
+}
+
+// Expand a header and all its parents
+function hsExpandParents(header) {
+hsExpand(header);
+header.parents('.hsCollapsed').each(function() {
+hsExpand($(this).children(':header'));
+});
+}
+
+// Collapse a header and all its parents
+function hsCollapseParents(header) {
+hsCollapse(header);
+header.parents('.hsExpanded').each(function() {
+hsCollapse($(this).children(':header'));
+});
+}
+
+// Collapse a header
+function hsCollapse(header) {
+// Ignore non collapsible entries
+if (!header.parent().hasClass(HS_CLASS)) return;
+
+header.children('span[class="ellipsis"]').remove();
+header.append('<span class="ellipsis"> ' + HS_ICON_CLOSED + '</span>');
+header.parent().removeClass('hsExpanded').addClass('hsCollapsed');
+// header.nextAll().hide('fast');
+header.nextAll().hide();
+}
+
+// Toggle a header
+function hsToggleCollapsing(header) {
+if (header.parent().hasClass('hsCollapsed'))
+hsExpand(header);
+else if (header.parent().hasClass('hsExpanded'))
+hsCollapse(header);
+}
+
+// Expand all headers
+function hsExpandAll() {
+$('#content .hsCollapsed').each(function() {
+hsExpand2($(this).children(':header'), HS_SHOW_ALL_OPEN_DONE_TREES);
+});
+}
+
+// Collapse all headers
+function hsCollapseAll() {
+$('#content .hsExpanded').each(function() {
+hsCollapse($(this).children(':header'));
+});
+}
+
+// Collapse all visible headers
+function hsCollapseAllVisible() {
+$('#content .hsExpanded:visible').each(function() {
+hsCollapse($(this).children(':header'));
+});
+}
+
+// Add click events to H3/H4/H5 headers which have contents.
+function hsInit() {
+for (var i = 3; i <= 5; i++) {
+$('#content .outline-' + i).each(function() {
+var header = $(this).children(':header');
+if (header.siblings().length > 0) {
+$(this).addClass(HS_CLASS);
+header.css({cursor: 'pointer'});
+header.click(function() {
+hsToggleCollapsing($(this)); });
+
+// Allow to override global Collapse/Expand default on an entry
+// basis (see property `:HTML_CONTAINER_CLASS:')
+if (header.parent().hasClass('hsCollapsed')) {
+hsCollapse(header);
+} else if (header.parent().hasClass('hsExpanded')) {
+hsExpand(header);
+} else {
+hsSetDefaultVisibility(header);
+}
+}
+else {
+if (HS_ALWAYS_DISPLAY_ICON == true) {
+header.append('<span class="ellipsis"> ' + HS_ICON_EMPTY
++ '</span>');
+}
+$(this).addClass('hsEmpty');
+}
+});
+}
+
+// Add div to hold minitoc content (so it can be cleared without deleting the buttons)
+$('#minitoc').append($('<div id="minitoc-content"></div>'));
+
+// Add buttons
+$('#minitoc').append($('<div class="buttons dontprint"></div>'));
+$('.buttons').append($('<span>' + HS_SHOW_ALL_TEXT + '</span>')
+.addClass('hsButton')
+.click(hsExpandAll));
+$('.buttons').append($('<span>' + HS_HIDE_ALL_TEXT + '</span>')
+.addClass('hsButton')
+.click(hsCollapseAll));
+}
+
+// Returns true if a header is a DONE header
+function hsIsDoneHeader(header) {
+return $('span.done', header).length;
+}
+
+// Sets the default visibility state to a header
+function hsSetDefaultVisibility(header) {
+if (HS_STARTUP_FOLDED) {
+hsCollapse(header);
+}
+else {
+if (!hsIsDoneHeader(header) | HS_SHOW_ALL_OPEN_DONE_TREES) {
+hsExpand(header);
+}
+else {
+hsCollapse(header);
+}
+}
+}
+
+// Expands an anchor, i.e. expand all parent headers
+function hsExpandAnchor(id) {
+// alert(id);
+if (id) {
+// alert($(id + '.hsNode').length);
+$(id).parents('.hsCollapsed').each(function() {
+hsExpand2($(this).children(':header'), true);
+});
+}
+}
+
+// Search for next task to review, starting from beginning of current tab.
+// If BACKWARD is true, search in the reverse direction.
+function hsReviewTaskNext(backward) {
+// If no tasks to review at all, do nothing.
+if ($('.outline-2 span.todo').length == 0) return;
+
+if ($('.hsReviewing').length == 0) { // reviewing is starting
+$('body').addClass('hsReviewing');
+$('.hsReviewPanel').addClass('hsReviewing');
+$('body').prepend('<div id="hsOverlay"></div>');
+hsAddReviewingPanels();
+
+hsCollapseAll();
+// Get first task to review on each tab and expand it
+$('.outline-2').each(function(){
+var firstTodo = $(this).find('span.todo:first').parent().parent();
+firstTodo.addClass('hsReview');
+hsExpandParents($(firstTodo).children(':header'));
+});
+}
+else {
+// Get all todos
+var todosElements = $('.outline-2:visible span.todo').parent().parent();
+// alert(todosElements.length);
+var todos = jQuery.makeArray(todosElements);
+if (backward) {
+todos = todos.reverse();
+}
+
+// Find current review item and review the next one
+var foundReview = false;
+var index;
+for (index = 0; index < todos.length; ++index) {
+var todo = todos[index];
+if (foundReview) {
+$(todo).addClass('hsReview');
+hsExpandParents($(todo).children(':header'));
+break;
+}
+if ($(todo).hasClass('hsReview')) {
+foundReview = true;
+if (index < todos.length - 1) {
+$(todo).removeClass('hsReview');
+hsCollapseParents($(todo).children(':header'));
+}
+}
+}
+
+// Update reviewing panel
+if (index < todos.length) {
+var reviewItem = index + 1;
+if (backward) {
+reviewItem = todos.length - index;
+}
+
+$('.outline-2:visible .hsReviewingPanel .hsReviewItem').text(reviewItem);
+}
+}
+
+// Scroll to the current review item
+$('html, body').animate({
+scrollTop: $(".hsReview:visible").offset().top
+}, 200);
+}
+
+// go to previous task to review
+function hsReviewTaskPrev() {
+hsReviewTaskNext(true);
+}
+
+// stop reviewing tasks
+function hsReviewTaskQuit() {
+$('body').removeClass('hsReviewing');
+$('.hsReviewPanel').removeClass('hsReviewing');
+$('.hsReview').removeClass('hsReview');
+$('#hsOverlay').remove();
+$('.hsReviewingPanel').remove();
+}
+
+function hsHideTodoKeyword(kw) {
+$('span.' + kw).addClass('hsHidden').parent().parent().hide();
+}
+
+function hsShowTodoKeyword(kw) {
+$('span.' + kw).removeClass('hsHidden').parent().parent().show();
+// XXX Show if parent is not collapsed!
+}
+
+function hsAddReviewPanels() {
+$('.outline-2').each(function(e) {
+var nbItems = $(this).find('span.todo').length;
+if (nbItems > 0) {
+$(this).prepend('<div class="hsReviewPanel hsUnselectable" onclick="hsReviewTaskNext()">'
++ 'Press r or click here<br>'
++ 'to review ' + nbItems + ' tasks<br>'
++ '(out of ' +  nbReviewTotalTasks + ' tasks)</div>');
+}
+});
+}
+
+function hsAddReviewingPanels() {
+$('.outline-2').each(function(e) {
+var nbItems = $(this).find('span.todo').length;
+if (nbItems > 0) {
+$(this).prepend('<div class="hsReviewingPanel hsUnselectable">Reviewing task <span class="hsReviewItem">1</span> / ' + nbItems + '<br>'
++ '(out of ' +  nbReviewTotalTasks + ' tasks)<br>'
++ 'Shortcuts: '
++ '<span class="hsReviewButton" onclick="hsReviewTaskNext()">r (next)</span> - '
++ '<span class="hsReviewButton" onclick="hsReviewTaskPrev()">R (previous)</span>'
++ '</div>');
+}
+else {
+$(this).prepend('<div class="hsReviewingPanel hsUnselectable">No task to review<br>'
++ '(out of ' +  nbReviewTotalTasks + ' tasks)<br>'
++ 'Shortcuts: '
++ '<span class="hsReviewButton" onclick="hsReviewTaskNext()">r (next)</span> - '
++ '<span class="hsReviewButton" onclick="hsReviewTaskPrev()">R (previous)</span>'
++ '</div>');
+}
+});
+}
+
+var nbReviewTotalTasks;
+
+$(document).ready(function() {
+nbReviewTotalTasks = $('.outline-2 span.todo').length;
+hsAddReviewPanels();
+});
+</script>
+<style type="text/css">
+               body {
+                 max-width: 35cm !important;
+               }
+               #content {
+                 max-width: 80em !important;
+                 width: 90%;
+               }
+               </style>
+<link rel="stylesheet" type="text/css" href="https://thomasf.github.io/solarized-css/solarized-dark.min.css" />
+</head>
+<body>
+<div id="content" class="content">
+<h1 class="title">3D Synthezier</h1>
+<div id="table-of-contents" role="doc-toc">
+<h2>Table of Contents</h2>
+<div id="text-table-of-contents" role="doc-toc">
+<ul>
+<li><a href="#org8abad43">1. Operating principle</a>
+<ul>
+<li><a href="#org8dd1c07">1.1. Rectangular city</a></li>
+<li><a href="#org5cf25b3">1.2. Hexagonal city</a></li>
+</ul>
+</li>
+<li><a href="#orgc7907d1">2. Scene description language</a>
+<ul>
+<li><a href="#org5148d75">2.1. here</a></li>
+<li><a href="#orgbec57b2">2.2. p</a></li>
+<li><a href="#orgfc6c719">2.3. f</a></li>
+<li><a href="#org52097d3">2.4. warn</a></li>
+<li><a href="#org5a8e41b">2.5. end</a></li>
+<li><a href="#orgde495ab">2.6. mtl</a></li>
+<li><a href="#org7cb3699">2.7. mtlrnd</a></li>
+<li><a href="#orgd335276">2.8. obj</a></li>
+<li><a href="#org9abf1f6">2.9. rnd</a></li>
+<li><a href="#org8d1f106">2.10. #</a></li>
+<li><a href="#org01937d0">2.11. out</a></li>
+<li><a href="#org26af06c">2.12. set</a></li>
+<li><a href="#org126d947">2.13. variables usage</a></li>
+<li><a href="#orgb154baa">2.14. cmp</a></li>
+<li><a href="#orgf6e6283">2.15. ?</a></li>
+<li><a href="#org36815a1">2.16. dum</a></li>
+</ul>
+</li>
+<li><a href="#org45443e3">3. Installation</a>
+<ul>
+<li><a href="#org7a64d30">3.1. System requirements</a></li>
+<li><a href="#org7344c27">3.2. Directory layout</a></li>
+</ul>
+</li>
+<li><a href="#org772bf80">4. Usage</a></li>
+</ul>
+</div>
+</div>
+<style>
+  .flex-center {
+    display: flex;            /* activate flexbox */
+    justify-content: center;  /* horizontally center anything inside   */
+  }
+
+  .flex-center video {
+    width: min(90%, 1000px); /* whichever is smaller wins */
+    height: auto;            /* preserve aspect ratio */
+  }
+
+  .responsive-img {
+    width: min(100%, 1000px);
+    height: auto;
+  }
+</style>
+
+
+<div id="outline-container-org8abad43" class="outline-2">
+<h2 id="org8abad43"><span class="section-number-2">1.</span> Operating principle</h2>
+<div class="outline-text-2" id="text-1">
+<p>
+Parses scene definition language and creates 3D world based on
+it. Result will be in a <a href="https://en.wikipedia.org/wiki/Wavefront_.obj_file">wavefront obj file</a>, witch can be then
+visualized using external renderer.
+</p>
+
+<p>
+Basic concept of defining scene is:
+</p>
+<ul class="org-ul">
+<li>Simple and primitive objects are created on point and polygon level.</li>
+<li>More complex ones can be created my combinig already existing ones,
+while applying various transformations on them.</li>
+</ul>
+
+<p>
+Objects with all its subobjects can be rotated, mirrored or resized
+omong any axis. Generator has built in cache for data input and output
+to minimize file access.
+</p>
+
+<p>
+<b>Examples:</b>
+</p>
+
+<p>
+Download Blender files:
+</p>
+<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
+
+
+<colgroup>
+<col  class="org-left" />
+
+<col  class="org-left" />
+</colgroup>
+<thead>
+<tr>
+<th scope="col" class="org-left">file</th>
+<th scope="col" class="org-left">size</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="org-left"><a href="rectangular city.blend">rectangular city.blend</a></td>
+<td class="org-left">3.6 MB</td>
+</tr>
+
+<tr>
+<td class="org-left"><a href="hexagonal city.blend">hexagonal city.blend</a></td>
+<td class="org-left">21 MB</td>
+</tr>
+</tbody>
+</table>
+
+<p>
+They were produced by importing generated <a href="https://en.wikipedia.org/wiki/Wavefront_.obj_file">wavefront obj files</a> into
+<a href="https://www.blender.org/">Blender</a>.
+</p>
+</div>
+
+<div id="outline-container-org8dd1c07" class="outline-3">
+<h3 id="org8dd1c07"><span class="section-number-3">1.1.</span> Rectangular city</h3>
+<div class="outline-text-3" id="text-1-1">
+
+<div id="orgcde8a63" class="figure">
+<p><img src="rectangular city, 1.jpeg" alt="rectangular city, 1.jpeg" class="responsive-img" />
+</p>
+</div>
+
+
+<div id="orgc7984ce" class="figure">
+<p><img src="rectangular city, 2.jpeg" alt="rectangular city, 2.jpeg" class="responsive-img" />
+</p>
+</div>
+
+
+<div id="org5957bcc" class="figure">
+<p><img src="rectangular city, 3.jpeg" alt="rectangular city, 3.jpeg" class="responsive-img" />
+</p>
+</div>
+</div>
+</div>
+<div id="outline-container-org5cf25b3" class="outline-3">
+<h3 id="org5cf25b3"><span class="section-number-3">1.2.</span> Hexagonal city</h3>
+<div class="outline-text-3" id="text-1-2">
+
+<div id="orgf72edb4" class="figure">
+<p><img src="hexagonal city, 1.jpeg" alt="hexagonal city, 1.jpeg" class="responsive-img" />
+</p>
+</div>
+
+
+<div id="orgeddbab1" class="figure">
+<p><img src="hexagonal city, 2.jpeg" alt="hexagonal city, 2.jpeg" class="responsive-img" />
+</p>
+</div>
+
+
+<div id="org8ae2b52" class="figure">
+<p><img src="hexagonal city, 3.jpeg" alt="hexagonal city, 3.jpeg" class="responsive-img" />
+</p>
+</div>
+</div>
+</div>
+</div>
+<div id="outline-container-orgc7907d1" class="outline-2">
+<h2 id="orgc7907d1"><span class="section-number-2">2.</span> Scene description language</h2>
+<div class="outline-text-2" id="text-2">
+<p>
+See also examples.
+</p>
+</div>
+<div id="outline-container-org5148d75" class="outline-3">
+<h3 id="org5148d75"><span class="section-number-3">2.1.</span> here</h3>
+<div class="outline-text-3" id="text-2-1">
+<pre class="example">
+here
+</pre>
+
+<p>
+defines new segment
+</p>
+</div>
+</div>
+<div id="outline-container-orgbec57b2" class="outline-3">
+<h3 id="orgbec57b2"><span class="section-number-3">2.2.</span> p</h3>
+<div class="outline-text-3" id="text-2-2">
+<pre class="example">
+p  x y z
+</pre>
+
+<p>
+defines new point
+</p>
+</div>
+</div>
+<div id="outline-container-orgfc6c719" class="outline-3">
+<h3 id="orgfc6c719"><span class="section-number-3">2.3.</span> f</h3>
+<div class="outline-text-3" id="text-2-3">
+<pre class="example">
+f  p1 p2 p3 p4
+</pre>
+
+<p>
+defines new polygon,  p4  may be unused
+</p>
+</div>
+</div>
+<div id="outline-container-org52097d3" class="outline-3">
+<h3 id="org52097d3"><span class="section-number-3">2.4.</span> warn</h3>
+<div class="outline-text-3" id="text-2-4">
+<pre class="example">
+warn  &lt;message&gt;
+</pre>
+
+<p>
+displays warning message, and wait for key
+</p>
+</div>
+</div>
+<div id="outline-container-org5a8e41b" class="outline-3">
+<h3 id="org5a8e41b"><span class="section-number-3">2.5.</span> end</h3>
+<div class="outline-text-3" id="text-2-5">
+<pre class="example">
+end
+</pre>
+
+<p>
+terminates parser
+</p>
+</div>
+</div>
+<div id="outline-container-orgde495ab" class="outline-3">
+<h3 id="orgde495ab"><span class="section-number-3">2.6.</span> mtl</h3>
+<div class="outline-text-3" id="text-2-6">
+<pre class="example">
+mtl  material
+</pre>
+
+<p>
+selects material
+</p>
+</div>
+</div>
+<div id="outline-container-org7cb3699" class="outline-3">
+<h3 id="org7cb3699"><span class="section-number-3">2.7.</span> mtlrnd</h3>
+<div class="outline-text-3" id="text-2-7">
+<pre class="example">
+mtlrnd  material ...
+</pre>
+
+<p>
+selects random material from list
+</p>
+</div>
+</div>
+<div id="outline-container-orgd335276" class="outline-3">
+<h3 id="orgd335276"><span class="section-number-3">2.8.</span> obj</h3>
+<div class="outline-text-3" id="text-2-8">
+<pre class="example">
+obj  object xz45 xy20 x+3 y*2
+</pre>
+
+<p>
+includes sub object, can be rotated moved or resized, across X Y Z. If
+object name begin vith ~ then it will be loaded from current
+directory.  if object name ends with ~ then object will be parsed
+directly from file, and not chached, to allow loading of greater than
+500 lines files.
+</p>
+
+
+<div id="org2c85b00" class="figure">
+<p><img src="rotation.png" alt="rotation.png" />
+</p>
+</div>
+</div>
+</div>
+<div id="outline-container-org9abf1f6" class="outline-3">
+<h3 id="org9abf1f6"><span class="section-number-3">2.9.</span> rnd</h3>
+<div class="outline-text-3" id="text-2-9">
+<pre class="example">
+rnd  p^1^2^3 p^7^2^1
+</pre>
+
+<p>
+select random command to execute, ^ will be converted to spaces.
+</p>
+</div>
+</div>
+<div id="outline-container-org8d1f106" class="outline-3">
+<h3 id="org8d1f106"><span class="section-number-3">2.10.</span> #</h3>
+<div class="outline-text-3" id="text-2-10">
+<pre class="example">
+# whatever text
+</pre>
+
+<p>
+comment
+</p>
+</div>
+</div>
+<div id="outline-container-org01937d0" class="outline-3">
+<h3 id="org01937d0"><span class="section-number-3">2.11.</span> out</h3>
+<div class="outline-text-3" id="text-2-11">
+<pre class="example">
+out  file
+</pre>
+
+<p>
+specify output file name, must be first command
+</p>
+</div>
+</div>
+<div id="outline-container-org26af06c" class="outline-3">
+<h3 id="org26af06c"><span class="section-number-3">2.12.</span> set</h3>
+<div class="outline-text-3" id="text-2-12">
+<pre class="example">
+set  variable  contents
+</pre>
+
+<p>
+set variable contents, variable must be number, contents can be
+string. max variables is 100. first is 0.
+</p>
+</div>
+</div>
+<div id="outline-container-org126d947" class="outline-3">
+<h3 id="org126d947"><span class="section-number-3">2.13.</span> variables usage</h3>
+<div class="outline-text-3" id="text-2-13">
+<pre class="example">
+anycommand %1 anything
+</pre>
+
+<p>
+inserts variable 1 contents info line
+</p>
+</div>
+</div>
+<div id="outline-container-orgb154baa" class="outline-3">
+<h3 id="orgb154baa"><span class="section-number-3">2.14.</span> cmp</h3>
+<div class="outline-text-3" id="text-2-14">
+<pre class="example">
+cmp  flag string1 string2
+</pre>
+
+<p>
+compares strings, and inserts TRUE to flag, if they are equal, else inserts FALSE. max 9 falgs, 0 first. Each subobject has its own flags.
+</p>
+</div>
+</div>
+<div id="outline-container-orgf6e6283" class="outline-3">
+<h3 id="orgf6e6283"><span class="section-number-3">2.15.</span> ?</h3>
+<div class="outline-text-3" id="text-2-15">
+<pre class="example">
+?flag anycommand
+</pre>
+
+<p>
+executes command if flag is true.
+</p>
+
+<p>
+exapmle: ?3 obj car z*2 xy45
+</p>
+</div>
+</div>
+<div id="outline-container-org36815a1" class="outline-3">
+<h3 id="org36815a1"><span class="section-number-3">2.16.</span> dum</h3>
+<div class="outline-text-3" id="text-2-16">
+<pre class="example">
+dum
+</pre>
+
+<p>
+dummy function, does notheing
+</p>
+</div>
+</div>
+</div>
+
+<div id="outline-container-org45443e3" class="outline-2">
+<h2 id="org45443e3"><span class="section-number-2">3.</span> Installation</h2>
+<div class="outline-text-2" id="text-3">
+<p>
+Edit <b>bin/3dparse.bas</b> file and update include path in there.
+</p>
+</div>
+
+<div id="outline-container-org7a64d30" class="outline-3">
+<h3 id="org7a64d30"><span class="section-number-3">3.1.</span> System requirements</h3>
+<div class="outline-text-3" id="text-3-1">
+<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
+
+
+<colgroup>
+<col  class="org-left" />
+
+<col  class="org-right" />
+</colgroup>
+<thead>
+<tr>
+<th scope="col" class="org-left">software</th>
+<th scope="col" class="org-right">tested version</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="org-left">DOS</td>
+<td class="org-right">6.22</td>
+</tr>
+
+<tr>
+<td class="org-left">QBasic</td>
+<td class="org-right">4.5</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+
+<div id="outline-container-org7344c27" class="outline-3">
+<h3 id="org7344c27"><span class="section-number-3">3.2.</span> Directory layout</h3>
+<div class="outline-text-3" id="text-3-2">
+<dl class="org-dl">
+<dt>bin</dt><dd><dl class="org-dl">
+<dt>3dparse.bas</dt><dd>3D generator main executable</dd>
+<dt>city1.3d</dt><dd>city with square-like buildings</dd>
+<dt>city2.3d</dt><dd>city with hexangular buildings</dd>
+<dt>result.mtl</dt><dd>shared material library</dd>
+<dt>*.bat</dt><dd>quick launch scripts</dd>
+</dl></dd>
+
+<dt>include</dt><dd>3D objects used to compose the scene</dd>
+</dl>
+</div>
+</div>
+</div>
+
+<div id="outline-container-org772bf80" class="outline-2">
+<h2 id="org772bf80"><span class="section-number-2">4.</span> Usage</h2>
+<div class="outline-text-2" id="text-4">
+<p>
+Make sure you have QB binaries in your PATH.  Execute
+</p>
+<pre class="example">
+bin/city1.bat
+</pre>
+
+<p>
+or
+</p>
+<pre class="example">
+bin/city2.bat
+</pre>
+
+<p>
+to generate example cities. After parsing is finished, appropriate
+*.obj files will appear in the bin directory holding generated scene.
+Visualize scene with your favourite renderer.
+</p>
+</div>
+</div>
+</div>
+<div id="postamble" class="status">
+<p class="date">Created: 2025-07-28 ma 03:33</p>
+<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
+</div>
+</body>
+</html>
diff --git a/3D GFX/3D Synthezier/doc/index.org b/3D GFX/3D Synthezier/doc/index.org
new file mode 100644 (file)
index 0000000..1ecf34f
--- /dev/null
@@ -0,0 +1,172 @@
+#+SETUPFILE: ~/.emacs.d/org-styles/html/darksun.theme
+#+TITLE:  3D Synthezier
+#+LANGUAGE: en
+#+LATEX_HEADER: \usepackage[margin=1.0in]{geometry}
+#+LATEX_HEADER: \usepackage{parskip}
+#+LATEX_HEADER: \usepackage[none]{hyphenat}
+
+#+OPTIONS: H:20 num:20
+#+OPTIONS: author:nil
+
+#+begin_export html
+<style>
+  .flex-center {
+    display: flex;            /* activate flexbox */
+    justify-content: center;  /* horizontally center anything inside   */
+  }
+
+  .flex-center video {
+    width: min(90%, 1000px); /* whichever is smaller wins */
+    height: auto;            /* preserve aspect ratio */
+  }
+
+  .responsive-img {
+    width: min(100%, 1000px);
+    height: auto;
+  }
+</style>
+#+end_export
+
+
+* Operating principle
+
+Parses scene definition language and creates 3D world based on
+it. Result will be in a [[https://en.wikipedia.org/wiki/Wavefront_.obj_file][wavefront obj file]], witch can be then
+visualized using external renderer.
+
+Basic concept of defining scene is:
+- Simple and primitive objects are created on point and polygon level.
+- More complex ones can be created my combinig already existing ones,
+  while applying various transformations on them.
+
+Objects with all its subobjects can be rotated, mirrored or resized
+omong any axis. Generator has built in cache for data input and output
+to minimize file access.
+
+*Examples:*
+
+Download Blender files:
+| file                   | size   |
+|------------------------+--------|
+| [[file:rectangular city.blend][rectangular city.blend]] | 3.6 MB |
+| [[file:hexagonal city.blend][hexagonal city.blend]]   | 21 MB  |
+
+They were produced by importing generated [[https://en.wikipedia.org/wiki/Wavefront_.obj_file][wavefront obj files]] into
+[[https://www.blender.org/][Blender]].
+
+** Rectangular city
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:rectangular city, 1.jpeg]]
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:rectangular city, 2.jpeg]]
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:rectangular city, 3.jpeg]]
+** Hexagonal city
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:hexagonal city, 1.jpeg]]
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:hexagonal city, 2.jpeg]]
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:hexagonal city, 3.jpeg]]
+* Scene description language
+See also examples.
+** here
+ : here
+ defines new segment
+** p
+ : p  x y z
+ defines new point
+** f
+ : f  p1 p2 p3 p4
+ defines new polygon,  p4  may be unused
+** warn
+ : warn  <message>
+ displays warning message, and wait for key
+** end
+ : end
+ terminates parser
+** mtl
+ : mtl  material
+ selects material
+** mtlrnd
+ : mtlrnd  material ...
+ selects random material from list
+** obj
+ : obj  object xz45 xy20 x+3 y*2
+ includes sub object, can be rotated moved or resized, across X Y Z. If
+ object name begin vith ~ then it will be loaded from current
+ directory.  if object name ends with ~ then object will be parsed
+ directly from file, and not chached, to allow loading of greater than
+ 500 lines files.
+
+ [[file:rotation.png]]
+** rnd
+ : rnd  p^1^2^3 p^7^2^1
+ select random command to execute, ^ will be converted to spaces.
+** #
+ : # whatever text
+ comment
+** out
+ : out  file
+ specify output file name, must be first command
+** set
+ : set  variable  contents
+ set variable contents, variable must be number, contents can be
+ string. max variables is 100. first is 0.
+** variables usage
+ : anycommand %1 anything
+ inserts variable 1 contents info line
+** cmp
+ : cmp  flag string1 string2
+ compares strings, and inserts TRUE to flag, if they are equal, else inserts FALSE. max 9 falgs, 0 first. Each subobject has its own flags.
+** ?
+ : ?flag anycommand
+ executes command if flag is true.
+
+ exapmle: ?3 obj car z*2 xy45
+** dum
+ : dum
+ dummy function, does notheing
+
+* Installation
+Edit *bin/3dparse.bas* file and update include path in there.
+
+** System requirements
+
+| software | tested version |
+|----------+----------------|
+| DOS      |           6.22 |
+| QBasic   |            4.5 |
+
+** Directory layout
+
++ bin ::
+  + 3dparse.bas :: 3D generator main executable
+  + city1.3d :: city with square-like buildings
+  + city2.3d :: city with hexangular buildings
+  + result.mtl :: shared material library
+  + *.bat :: quick launch scripts
+
++ include :: 3D objects used to compose the scene
+
+* Usage
+
+Make sure you have QB binaries in your PATH.  Execute
+: bin/city1.bat
+or
+: bin/city2.bat
+to generate example cities. After parsing is finished, appropriate
+*.obj files will appear in the bin directory holding generated scene.
+Visualize scene with your favourite renderer.
diff --git a/3D GFX/3D Synthezier/doc/rectangular city, 1.jpeg b/3D GFX/3D Synthezier/doc/rectangular city, 1.jpeg
new file mode 100644 (file)
index 0000000..def4065
Binary files /dev/null and b/3D GFX/3D Synthezier/doc/rectangular city, 1.jpeg differ
diff --git a/3D GFX/3D Synthezier/doc/rectangular city, 2.jpeg b/3D GFX/3D Synthezier/doc/rectangular city, 2.jpeg
new file mode 100644 (file)
index 0000000..0173e47
Binary files /dev/null and b/3D GFX/3D Synthezier/doc/rectangular city, 2.jpeg differ
diff --git a/3D GFX/3D Synthezier/doc/rectangular city, 3.jpeg b/3D GFX/3D Synthezier/doc/rectangular city, 3.jpeg
new file mode 100644 (file)
index 0000000..20fc33c
Binary files /dev/null and b/3D GFX/3D Synthezier/doc/rectangular city, 3.jpeg differ
diff --git a/3D GFX/3D Synthezier/doc/rectangular city.blend b/3D GFX/3D Synthezier/doc/rectangular city.blend
new file mode 100644 (file)
index 0000000..a532224
Binary files /dev/null and b/3D GFX/3D Synthezier/doc/rectangular city.blend differ
diff --git a/3D GFX/3D Synthezier/doc/rotation.png b/3D GFX/3D Synthezier/doc/rotation.png
new file mode 100644 (file)
index 0000000..e6281ec
Binary files /dev/null and b/3D GFX/3D Synthezier/doc/rotation.png differ
diff --git a/3D GFX/3D Synthezier/include/6nrk0s.3d b/3D GFX/3D Synthezier/include/6nrk0s.3d
new file mode 100644 (file)
index 0000000..906ff9b
--- /dev/null
@@ -0,0 +1,6 @@
+# suur 6 nurkse maja kompleks koos korteritega\r
+\r
+obj blk3\r
+set 1 kivi\r
+set 2 0\r
+obj nrk6 x*20 y*5 z*20 y+21\r
diff --git a/3D GFX/3D Synthezier/include/6nrk2s.3d b/3D GFX/3D Synthezier/include/6nrk2s.3d
new file mode 100644 (file)
index 0000000..8a40ce1
--- /dev/null
@@ -0,0 +1,8 @@
+# suur 6 nurkse maja kompleks koos korterite ja 2. sillaga\r
+\r
+obj blk3\r
+set 1 kivi\r
+set 2 0\r
+obj nrk6 x*20 y*5 z*20 y+21\r
+obj bridgegl xz-90 y+22.5 x-1.5 z-17.3206\r
+obj bridgegl xz-30 y+22.5 x+14.25 z-9.9593
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/blk1.3d b/3D GFX/3D Synthezier/include/blk1.3d
new file mode 100644 (file)
index 0000000..661ff77
--- /dev/null
@@ -0,0 +1,15 @@
+# tavaline suur aken\r
+here\r
+p      0       0       0\r
+p      6       0       0\r
+p      6       -3      0\r
+p      0       -3      0\r
+\r
+p      0.5     -0.5    -0.01\r
+p      5.5     -0.5    -0.01\r
+p      5.5     -2      -0.01\r
+p      0.5     -2      -0.01\r
+mtl seintellis\r
+f 0 1 2 3\r
+mtlrnd klaashele klaastume\r
+f 4 5 6 7
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/blk2.3d b/3D GFX/3D Synthezier/include/blk2.3d
new file mode 100644 (file)
index 0000000..b2828bf
--- /dev/null
@@ -0,0 +1,33 @@
+# v2ike aken koosparkimisplatsiga\r
+\r
+# rnd obj^car^xz90^x+4.5^z-1.7^y-2.5 # #\r
+\r
+here\r
+p      0       0       0\r
+p      6       0       0\r
+p      6       -3      0\r
+p      0       -3      0\r
+\r
+p      0.5     -0.5    -0.01\r
+p      2       -0.5    -0.01\r
+p      2       -2      -0.01\r
+p      0.5     -2      -0.01\r
+\r
+p      2.5     -0.5    -0.01\r
+p      5.5     -0.5    -0.01\r
+p      5.5     -3      -0.01\r
+p      2.5     -3      -0.01\r
+\r
+p      0       -3      0\r
+p      6       -3      0\r
+p      6       -3      -3\r
+p      0       -3      -3\r
+\r
+mtl seintellis\r
+f 0 1 2 3\r
+mtlrnd klaashele klaastume\r
+f 4 5 6 7\r
+mtl pronks\r
+f 8 9 10 11\r
+mtl kivi\r
+f 12 13 14 15
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/blk3.3d b/3D GFX/3D Synthezier/include/blk3.3d
new file mode 100644 (file)
index 0000000..a62b82c
--- /dev/null
@@ -0,0 +1,34 @@
+# kuuenurkse maja korterite blokk\r
+\r
+obj krs2\r
+obj krs2 y+3\r
+obj krs2 y+6\r
+obj krs2 y+9\r
+\r
+obj krs2 y+12\r
+obj krs2 y+15\r
+obj krs2 y+18\r
+obj krs2 y+21\r
+\r
+here\r
+p      -12     -3      -20.7846\r
+p      12      -3      -20.7846\r
+p      24      -3      0       \r
+p      12      -3      20.7846\r
+p      -12     -3      20.7846\r
+p      -24     -3      0\r
+\r
+p       -12     21      -20.7846\r
+p       12      21      -20.7846\r
+p       24      21      0 \r
+p       12      21      20.7846\r
+p       -12     21      20.7846\r
+p       -24     21      0\r
+\r
+mtl seintellis\r
+f 0 1 2 3\r
+f 3 4 5 0\r
+f 6 7 8 9\r
+f 9 10 11 6\r
+\r
+\r
diff --git a/3D GFX/3D Synthezier/include/blk4.3d b/3D GFX/3D Synthezier/include/blk4.3d
new file mode 100644 (file)
index 0000000..924f68a
--- /dev/null
@@ -0,0 +1,8 @@
+# 1 kompleks 7st, 6 nurkselt sildadega uhendatud elamu moodulitest\r
+obj 6nrk0s\r
+obj 6nrk2s z+64.6412\r
+obj 6nrk2s xz-60 x+55.9809 z+32.3206\r
+obj 6nrk2s xz-120 x+55.9809 z-32.3206\r
+obj 6nrk2s xz-180 z-64.6412\r
+obj 6nrk2s xz-240 x-55.9809 z-32.3206\r
+obj 6nrk2s xz-300 x-55.9809 z+32.3206
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/bridge.3d b/3D GFX/3D Synthezier/include/bridge.3d
new file mode 100644 (file)
index 0000000..d6dc47f
--- /dev/null
@@ -0,0 +1,5 @@
+obj handrail\r
+obj handrail z+3\r
+set 1 kivi\r
+set 2 0\r
+obj nrk4 x*3.2 y*0.2 xz-90 z+1.5
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/bridge1.3d b/3D GFX/3D Synthezier/include/bridge1.3d
new file mode 100644 (file)
index 0000000..e8563ae
--- /dev/null
@@ -0,0 +1,36 @@
+obj bridge\r
+obj bridge x+1\r
+obj bridge x+2\r
+obj bridge x+3\r
+obj bridge x+4\r
+\r
+obj bridge x+5\r
+obj bridge x+6\r
+obj bridge x+7\r
+obj bridge x+8\r
+obj bridge x+9\r
+\r
+obj bridge x+10\r
+obj bridge x+11\r
+obj bridge x+12\r
+obj bridge x+13\r
+obj bridge x+14\r
+\r
+obj bridge x+15\r
+obj bridge x+16\r
+obj bridge x+17\r
+obj bridge x+18\r
+obj bridge x+19\r
+\r
+obj bridge x+20\r
+obj bridge x+21\r
+obj bridge x+22\r
+obj bridge x+23\r
+obj bridge x+24\r
+\r
+obj bridge x+25\r
+obj bridge x+26\r
+obj bridge x+27\r
+obj bridge x+28\r
+obj bridge x+29\r
+\r
diff --git a/3D GFX/3D Synthezier/include/bridgegl.3d b/3D GFX/3D Synthezier/include/bridgegl.3d
new file mode 100644 (file)
index 0000000..4bb43a5
--- /dev/null
@@ -0,0 +1,4 @@
+obj bridge1\r
+set 1 glass_transp\r
+set 2 0\r
+obj nrk8 xz-90 x*30 z*3 z+1.5 y*2 y+1
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/bus.3d b/3D GFX/3D Synthezier/include/bus.3d
new file mode 100644 (file)
index 0000000..21f5753
--- /dev/null
@@ -0,0 +1,52 @@
+obj bus_frnt\r
+obj bus_frnt xz180 z+9\r
+\r
+obj bus_wind x+2.5 y+1 z+2\r
+obj bus_wind x+2.5 y+1 z+3.5\r
+obj bus_wind x+2.5 y+1 z+5\r
+\r
+obj bus_wind x*-1 x-2.5 y+1 z+2\r
+obj bus_wind x*-1 x-2.5 y+1 z+3.5\r
+obj bus_wind x*-1 x-2.5 y+1 z+5\r
+\r
+obj flare_w x+1 z-0.01\r
+obj flare_w x*-1 x-1 z-0.01\r
+obj flare_r x+1 z+9.01\r
+obj flare_r x*-1 x-1 z+9.01\r
+here\r
+p -2.5 1 0.5\r
+p 2.5 1 0.5\r
+p 2.5 -1 0.5\r
+p -2.5 -1 0.5\r
+\r
+p -2.5 1 8.5\r
+p 2.5 1 8.5\r
+p 2.5 -1 8.5\r
+p -2.5 -1 8.5\r
+\r
+p -2.5 1 2\r
+p 2.5 1 2\r
+p -1.5 2 2\r
+p 1.5 2 2\r
+\r
+p -2.5 1 6.5\r
+p 2.5 1 6.5\r
+p -1.5 2 6.5\r
+p 1.5 2 6.5\r
+\r
+\r
+mtl metal_yellow\r
+# f 0 1 5 4\r
+f 1 2 6 5\r
+f 2 3 7 6\r
+f 3 0 4 7\r
+\r
+f 4 5 15 14\r
+f 4 12 14\r
+f 5 13 15\r
+\r
+mtl klaashele\r
+f 0 1 11 10\r
+f 0 8 10\r
+f 1 9 11\r
+\r
diff --git a/3D GFX/3D Synthezier/include/bus_frnt.3d b/3D GFX/3D Synthezier/include/bus_frnt.3d
new file mode 100644 (file)
index 0000000..62d4137
--- /dev/null
@@ -0,0 +1,17 @@
+here\r
+p -2 -0.5 0\r
+p 2 -0.5 0\r
+p 2 0.5 0\r
+p -2 0.5 0\r
+\r
+p -2.5 -1 0.5\r
+p 2.5 -1 0.5\r
+p 2.5 1 0.5\r
+p -2.5 1 0.5\r
+\r
+mtl metal_yellow\r
+f 0 1 2 3\r
+f 0 1 5 4\r
+f 1 2 6 5\r
+f 2 3 7 6\r
+f 0 3 7 4
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/bus_wind.3d b/3D GFX/3D Synthezier/include/bus_wind.3d
new file mode 100644 (file)
index 0000000..c0f63de
--- /dev/null
@@ -0,0 +1,17 @@
+here\r
+p 0 0 0\r
+p -1 1 0\r
+p -1 1 0.5\r
+p 0 0 0.5\r
+\r
+p -1 1 1.5\r
+p 0 0 1.5\r
+\r
+p -2.5 1 0\r
+p -2.5 1 1.5\r
+\r
+mtl metal_yellow\r
+f 0 1 2 3\r
+f 1 4 7 6\r
+mtl klaashele\r
+f 2 3 5 4
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/car.3d b/3D GFX/3D Synthezier/include/car.3d
new file mode 100644 (file)
index 0000000..4d6258b
--- /dev/null
@@ -0,0 +1,33 @@
+obj car_frnt\r
+obj car_frnt xz180 z+4\r
+obj flare_w x+0.25 z-0.01\r
+obj flare_w x*-1 x-0.25 z-0.01\r
+obj flare_r x+0.25 z+4.01\r
+obj flare_r x*-1 x-0.25 z+4.01\r
+\r
+here\r
+p      -1      0.5     1\r
+p      1       0.5     1\r
+p      1       -0.5    1\r
+p      -1      -0.5    1\r
+\r
+p      -1      0.5     3\r
+p      1       0.5     3\r
+p      1       -0.5    3\r
+p      -1      -0.5    3\r
+\r
+p      -0.5    1.5     2.5\r
+p      0.5     1.5     2.5\r
+\r
+\r
+\r
+mtl metal_yellow\r
+# f 0 4 5 1\r
+f 1 5 6 2\r
+f 2 6 7 3\r
+f 3 7 4 0\r
+mtl klaashele\r
+f 8 9 1 0\r
+f 8 0 4\r
+f 9 1 5\r
+f 8 9 5 4
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/car_frnt.3d b/3D GFX/3D Synthezier/include/car_frnt.3d
new file mode 100644 (file)
index 0000000..697b6f4
--- /dev/null
@@ -0,0 +1,17 @@
+here\r
+p      -0.5    0.25    0\r
+p      0.5     0.25    0\r
+p      0.5     -0.25   0\r
+p      -0.5    -0.25   0\r
+\r
+p      -1      0.5     1\r
+p      1       0.5     1\r
+p      1       -0.5    1\r
+p      -1      -0.5    1\r
+\r
+mtl metal_yellow\r
+f 0 1 2 3\r
+f 0 4 5 1\r
+f 1 5 6 2\r
+f 2 6 7 3\r
+f 3 7 4 0
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/cars.3d b/3D GFX/3D Synthezier/include/cars.3d
new file mode 100644 (file)
index 0000000..97e1482
--- /dev/null
@@ -0,0 +1,10 @@
+obj bus xz190 y+1\r
+obj car xz175 z+20 y-0.5\r
+obj car xz182 yz10 x+5 z+50 y-0.2\r
+obj car xz170 yz-5 xy10 x+1 z+60 y-1.3\r
+obj car xz188 yz-2 xy-5 x+3 z+34 y+0.6\r
+\r
+obj car xz5 yz1 xy15 x-5 z+55 y+0.23\r
+obj car xz-2 yz2 xy-3 x-10 z+32 y-1.1\r
+obj car xz-4 yz-8 xy-9 x-5 z+8 y+0.4\r
+rnd obj^car^xz3^yz-2^xy3^x-8^z+57^y+0.1 obj^pol^xz3^yz-2^xy3^x-8^z+57^y+0.1\r
diff --git a/3D GFX/3D Synthezier/include/flare_r.3d b/3D GFX/3D Synthezier/include/flare_r.3d
new file mode 100644 (file)
index 0000000..39a35f2
--- /dev/null
@@ -0,0 +1,9 @@
+here\r
+p 0 0.3 0\r
+p 0.3 0.3 0\r
+p 0.3 0 0\r
+p 0 0 0\r
+p 0.4 0.15 0\r
+mtl light_red\r
+f 0 1 2 3\r
+f 1 2 4
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/flare_w.3d b/3D GFX/3D Synthezier/include/flare_w.3d
new file mode 100644 (file)
index 0000000..65044d0
--- /dev/null
@@ -0,0 +1,9 @@
+here\r
+p 0 0.3 0\r
+p 0.3 0.3 0\r
+p 0.3 0 0\r
+p 0 0 0\r
+p 0.4 0.15 0\r
+mtl light_white\r
+f 0 1 2 3\r
+f 1 2 4
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/handrail.3d b/3D GFX/3D Synthezier/include/handrail.3d
new file mode 100644 (file)
index 0000000..91f80fe
--- /dev/null
@@ -0,0 +1,8 @@
+# size x=1 y=1 z=0.1\r
+\r
+set 1 pronks\r
+set 2 1\r
+obj nrk8 xz-90 y*0.1 z*0.1 y+1\r
+set 2 0\r
+obj nrk8 x*0.07 y*0.07 yz-90 \r
+obj nrk8 x*0.07 y*0.07 yz-90 x+0.5\r
diff --git a/3D GFX/3D Synthezier/include/katus.3d b/3D GFX/3D Synthezier/include/katus.3d
new file mode 100644 (file)
index 0000000..78547d1
--- /dev/null
@@ -0,0 +1,12 @@
+here\r
+p      0       0       0\r
+p      96      0       0\r
+p      96      0       24\r
+p      0       0       24\r
+\r
+mtl kivi\r
+f 0 1 2 3\r
+\r
+obj toru x+12 z+12\r
+obj toru x+36 z+12\r
+obj solar x+72 z+12
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/katus2.3d b/3D GFX/3D Synthezier/include/katus2.3d
new file mode 100644 (file)
index 0000000..7fb86bf
--- /dev/null
@@ -0,0 +1,19 @@
+here\r
+p      0       0       0\r
+p      96      0       0\r
+p      96      0       24\r
+p      0       0       24\r
+\r
+mtl kivi\r
+f 0 1 2 3\r
+\r
+obj toru x+12 z+12\r
+# obj toru x*0.2 z*0.2 y*0.5 x+36 z+12\r
+obj toru x*0.4 z*0.4 y*0.5 x+30 z+6\r
+obj toru x*0.4 z*0.4 y*0.5 x+30 z+18\r
+obj toru x*0.4 z*0.4 y*0.5 x+42 z+6\r
+obj toru x*0.4 z*0.4 y*0.5 x+42 z+18\r
+\r
+obj bus x+60 y+1 z+2\r
+obj bus x+70 y+1 z+2\r
+obj bus x+80 y+1 z+2
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/katus3.3d b/3D GFX/3D Synthezier/include/katus3.3d
new file mode 100644 (file)
index 0000000..c8d0676
--- /dev/null
@@ -0,0 +1,31 @@
+here\r
+p      0       0       0\r
+p      96      0       0\r
+p      96      0       24\r
+p      0       0       24\r
+\r
+mtl kivi\r
+f 0 1 2 3\r
+\r
+obj pol y+0.5 x+2 z+1\r
+obj pol y+0.5 x+9 z+1\r
+obj pol y+0.5 x+16 z+1\r
+obj pol y+0.5 x+23 z+1\r
+obj pol y+0.5 x+30 z+1\r
+obj pol y+0.5 x+37 z+1\r
+obj pol y+0.5 x+44 z+1\r
+obj pol y+0.5 x+51 z+1\r
+\r
+obj pol y+0.5 x+2 z+13\r
+obj pol y+0.5 x+9 z+13\r
+obj pol y+0.5 x+16 z+13\r
+obj pol y+0.5 x+23 z+13\r
+obj pol y+0.5 x+30 z+13\r
+obj pol y+0.5 x+37 z+13\r
+obj pol y+0.5 x+44 z+13\r
+obj pol y+0.5 x+51 z+13\r
+\r
+obj bus xz90 y+1 x+70 z+6\r
+obj bus xz90 y+1 x+85 z+6\r
+obj bus xz90 y+1 x+70 z+17\r
+obj bus xz90 y+1 x+85 z+17\r
diff --git a/3D GFX/3D Synthezier/include/krs1.3d b/3D GFX/3D Synthezier/include/krs1.3d
new file mode 100644 (file)
index 0000000..ffee343
--- /dev/null
@@ -0,0 +1,6 @@
+# neljanurkse maja korrus\r
+\r
+obj seinp1 x-48 z-12\r
+obj seinp1 xz180 x+48 z+12\r
+obj seinl1 xz270 x-48 z+12\r
+obj seinl1 xz90        x+48 z-12
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/krs2.3d b/3D GFX/3D Synthezier/include/krs2.3d
new file mode 100644 (file)
index 0000000..9cac787
--- /dev/null
@@ -0,0 +1,9 @@
+# kuuenurkse maja 1 korrus\r
+\r
+obj seinl1 x-12 z-20.7846\r
+obj seinl1 xz60 x+12 z-20.7846\r
+obj seinl1 xz120 x+24\r
+obj seinl1 xz180 x+12 z+20.7846\r
+obj seinl1 xz240 x-12 z+20.7846\r
+obj seinl1 xz300 x-24 \r
+\r
diff --git a/3D GFX/3D Synthezier/include/kuppel.3d b/3D GFX/3D Synthezier/include/kuppel.3d
new file mode 100644 (file)
index 0000000..b4b8771
--- /dev/null
@@ -0,0 +1,292 @@
+here\r
+p 0 0 0\r
+p  -1.0 0.0 0.0\r
+p -0.965926 0.0 -0.258819 \r
+p -0.965926 0.0 0.258819 \r
+p -0.965926 0.258819 0.0 \r
+p -0.933013 0.258819 -0.250000 \r
+p -0.933013 0.258819 0.250000 \r
+p -0.866025 0.0 -0.500000 \r
+p -0.866025 0.0 0.500000 \r
+p -0.866025 0.500000 0.0 \r
+p -0.836516 0.258819 -0.482963 \r
+p -0.836516 0.258819 0.482963 \r
+p -0.836516 0.500000 -0.224144 \r
+p -0.836516 0.500000 0.224144 \r
+p -0.750000 0.500000 -0.433013 \r
+p -0.750000 0.500000 0.433013 \r
+p -0.707107 0.0 -0.707107 \r
+p -0.707107 0.0 0.707107 \r
+p -0.707107 0.707107 0.0 \r
+p -0.683013 0.258819 -0.683013 \r
+p -0.683013 0.258819 0.683013 \r
+p -0.683013 0.707107 -0.183013 \r
+p -0.683013 0.707107 0.183013 \r
+p -0.612372 0.500000 -0.612372 \r
+p -0.612372 0.500000 0.612372 \r
+p -0.612372 0.707107 -0.353553 \r
+p -0.612372 0.707107 0.353553 \r
+p -0.500000 0.0 -0.866025 \r
+p -0.500000 0.0 0.866025 \r
+p -0.500000 0.866025 0.0 \r
+p -0.500000 0.707107 -0.500000 \r
+p -0.500000 0.707107 0.500000 \r
+p -0.482963 0.258819 -0.836516 \r
+p -0.482963 0.258819 0.836516 \r
+p -0.482963 0.866025 -0.129410 \r
+p -0.482963 0.866025 0.129410 \r
+p -0.433013 0.500000 -0.750000 \r
+p -0.433013 0.500000 0.750000 \r
+p -0.433013 0.866025 -0.250000 \r
+p -0.433013 0.866025 0.250000 \r
+p -0.353553 0.707107 -0.612372 \r
+p -0.353553 0.707107 0.612372 \r
+p -0.353553 0.866025 -0.353553 \r
+p -0.353553 0.866025 0.353553 \r
+p -0.258819 0.0 -0.965926 \r
+p -0.258819 0.0 0.965926 \r
+p -0.258819 0.965926 0.0 \r
+p -0.250000 0.258819 -0.933013 \r
+p -0.250000 0.258819 0.933013 \r
+p -0.250000 0.866025 -0.433013 \r
+p -0.250000 0.866025 0.433013 \r
+p -0.250000 0.965926 -0.066987 \r
+p -0.250000 0.965926 0.066987 \r
+p -0.224144 0.500000 -0.836516 \r
+p -0.224144 0.500000 0.836516 \r
+p -0.224144 0.965926 -0.129410 \r
+p -0.224144 0.965926 0.129410 \r
+p -0.183013 0.707107 -0.683013 \r
+p -0.183013 0.707107 0.683013 \r
+p -0.183013 0.965926 -0.183013 \r
+p -0.183013 0.965926 0.183013 \r
+p -0.129410 0.866025 -0.482963 \r
+p -0.129410 0.866025 0.482963 \r
+p -0.129410 0.965926 -0.224144 \r
+p -0.129410 0.965926 0.224144 \r
+p -0.066987 0.965926 -0.250000 \r
+p -0.066987 0.965926 0.250000 \r
+p 0.0 0.0 1.0 \r
+p 0.0 0.258819 0.965926 \r
+p 0.0 0.500000 0.866025 \r
+p 0.0 0.707107 0.707107 \r
+p 0.0 0.866025 0.500000 \r
+p 0.0 0.965926 0.258819 \r
+p 0.0 1.0 0.0 \r
+p 0.0 0.965926 -0.258819 \r
+p 0.0 0.866025 -0.500000 \r
+p 0.0 0.707107 -0.707107 \r
+p 0.0 0.500000 -0.866025 \r
+p 0.0 0.258819 -0.965926 \r
+p 0.0 0.0 -1.0 \r
+p 0.066987 0.965926 -0.250000 \r
+p 0.066987 0.965926 0.250000 \r
+p 0.129410 0.866025 -0.482963 \r
+p 0.129410 0.866025 0.482963 \r
+p 0.129410 0.965926 -0.224144 \r
+p 0.129410 0.965926 0.224144 \r
+p 0.183013 0.707107 -0.683013 \r
+p 0.183013 0.707107 0.683013 \r
+p 0.183013 0.965926 -0.183013 \r
+p 0.183013 0.965926 0.183013 \r
+p 0.224144 0.500000 -0.836516 \r
+p 0.224144 0.500000 0.836516 \r
+p 0.224144 0.965926 -0.129410 \r
+p 0.224144 0.965926 0.129410 \r
+p 0.250000 0.258819 -0.933013 \r
+p 0.250000 0.258819 0.933013 \r
+p 0.250000 0.866025 -0.433013 \r
+p 0.250000 0.866025 0.433013 \r
+p 0.250000 0.965926 -0.066987 \r
+p 0.250000 0.965926 0.066987 \r
+p 0.258819 0.0 -0.965926 \r
+p 0.258819 0.0 0.965926 \r
+p 0.258819 0.965926 0.0 \r
+p 0.353553 0.707107 -0.612372 \r
+p 0.353553 0.707107 0.612372 \r
+p 0.353553 0.866025 -0.353553 \r
+p 0.353553 0.866025 0.353553 \r
+p 0.433013 0.500000 -0.750000 \r
+p 0.433013 0.500000 0.750000 \r
+p 0.433013 0.866025 -0.250000 \r
+p 0.433013 0.866025 0.250000 \r
+p 0.482963 0.258819 -0.836516 \r
+p 0.482963 0.258819 0.836516 \r
+p 0.482963 0.866025 -0.129410 \r
+p 0.482963 0.866025 0.129410 \r
+p 0.500000 0.707107 -0.500000 \r
+p 0.500000 0.707107 0.500000 \r
+p 0.500000 0.0 -0.866025 \r
+p 0.500000 0.0 0.866025 \r
+p 0.500000 0.866025 0.0 \r
+p 0.612372 0.500000 -0.612372 \r
+p 0.612372 0.500000 0.612372 \r
+p 0.612372 0.707107 -0.353553 \r
+p 0.612372 0.707107 0.353553 \r
+p 0.683013 0.258819 -0.683013 \r
+p 0.683013 0.258819 0.683013 \r
+p 0.683013 0.707107 -0.183013 \r
+p 0.683013 0.707107 0.183013 \r
+p 0.707107 0.0 -0.707107 \r
+p 0.707107 0.0 0.707107 \r
+p 0.707107 0.707107 0.0 \r
+p 0.750000 0.500000 -0.433013 \r
+p 0.750000 0.500000 0.433013 \r
+p 0.836516 0.258819 -0.482963 \r
+p 0.836516 0.258819 0.482963 \r
+p 0.836516 0.500000 -0.224144 \r
+p 0.836516 0.500000 0.224144 \r
+p 0.866025 0.0 -0.500000 \r
+p 0.866025 0.0 0.500000 \r
+p 0.866025 0.500000 0.0 \r
+p 0.933013 0.258819 -0.250000 \r
+p 0.933013 0.258819 0.250000 \r
+p 0.965926 0.0 -0.258819 \r
+p 0.965926 0.0 0.258819 \r
+p 0.965926 0.258819 0.0 \r
+p 1.0 0.0 0.0 \r
+\r
+f 73 102 98\r
+f 102 119 113 98\r
+f 119 130 126 113\r
+f 130 139 135 126\r
+f 139 144 140 135\r
+f 144 145 142 140\r
+f 73 98 92\r
+f 98 113 109 92\r
+f 113 126 122 109\r
+f 126 135 131 122\r
+f 135 140 133 131\r
+f 140 142 137 133\r
+f 73 92 88\r
+f 92 109 105 88\r
+f 109 122 115 105\r
+f 122 131 120 115\r
+f 131 133 124 120\r
+f 133 137 128 124\r
+f 73 88 84\r
+f 88 105 96 84\r
+f 105 115 103 96\r
+f 115 120 107 103\r
+f 120 124 111 107\r
+f 124 128 117 111\r
+f 73 84 80\r
+f 84 96 82 80\r
+f 96 103 86 82\r
+f 103 107 90 86\r
+f 107 111 94 90\r
+f 111 117 100 94\r
+f 73 80 74\r
+f 80 82 75 74\r
+f 82 86 76 75\r
+f 86 90 77 76\r
+f 90 94 78 77\r
+f 94 100 79 78\r
+f 73 74 65\r
+f 74 75 61 65\r
+f 75 76 57 61\r
+f 76 77 53 57\r
+f 77 78 47 53\r
+f 78 79 44 47\r
+f 73 65 63\r
+f 65 61 49 63\r
+f 61 57 40 49\r
+f 57 53 36 40\r
+f 53 47 32 36\r
+f 47 44 27 32\r
+f 73 63 59\r
+f 63 49 42 59\r
+f 49 40 30 42\r
+f 40 36 23 30\r
+f 36 32 19 23\r
+f 32 27 16 19\r
+f 73 59 55\r
+f 59 42 38 55\r
+f 42 30 25 38\r
+f 30 23 14 25\r
+f 23 19 10 14\r
+f 19 16 7 10\r
+f 73 55 51\r
+f 55 38 34 51\r
+f 38 25 21 34\r
+f 25 14 12 21\r
+f 14 10 5 12\r
+f 10 7 2 5\r
+f 73 51 46\r
+f 51 34 29 46\r
+f 34 21 18 29\r
+f 21 12 9 18\r
+f 12 5 4 9\r
+f 5 2 1 4\r
+f 73 46 52\r
+f 46 29 35 52\r
+f 29 18 22 35\r
+f 18 9 13 22\r
+f 9 4 6 13\r
+f 4 1 3 6\r
+f 73 52 56\r
+f 52 35 39 56\r
+f 35 22 26 39\r
+f 22 13 15 26\r
+f 13 6 11 15\r
+f 6 3 8 11\r
+f 73 56 60\r
+f 56 39 43 60\r
+f 39 26 31 43\r
+f 26 15 24 31\r
+f 15 11 20 24\r
+f 11 8 17 20\r
+f 73 60 64\r
+f 60 43 50 64\r
+f 43 31 41 50\r
+f 31 24 37 41\r
+f 24 20 33 37\r
+f 20 17 28 33\r
+f 73 64 66\r
+f 64 50 62 66\r
+f 50 41 58 62\r
+f 41 37 54 58\r
+f 37 33 48 54\r
+f 33 28 45 48\r
+f 73 66 72\r
+f 66 62 71 72\r
+f 62 58 70 71\r
+f 58 54 69 70\r
+f 54 48 68 69\r
+f 48 45 67 68\r
+f 73 72 81\r
+f 72 71 83 81\r
+f 71 70 87 83\r
+f 70 69 91 87\r
+f 69 68 95 91\r
+f 68 67 101 95\r
+f 73 81 85\r
+f 81 83 97 85\r
+f 83 87 104 97\r
+f 87 91 108 104\r
+f 91 95 112 108\r
+f 95 101 118 112\r
+f 73 85 89\r
+f 85 97 106 89\r
+f 97 104 116 106\r
+f 104 108 121 116\r
+f 108 112 125 121\r
+f 112 118 129 125\r
+f 73 89 93\r
+f 89 106 110 93\r
+f 106 116 123 110\r
+f 116 121 132 123\r
+f 121 125 134 132\r
+f 125 129 138 134\r
+f 73 93 99\r
+f 93 110 114 99\r
+f 110 123 127 114\r
+f 123 132 136 127\r
+f 132 134 141 136\r
+f 134 138 143 141\r
+f 73 99 102\r
+f 99 114 119 102\r
+f 114 127 130 119\r
+f 127 136 139 130\r
+f 136 141 144 139\r
+f 141 143 145 144\r
diff --git a/3D GFX/3D Synthezier/include/maja.3d b/3D GFX/3D Synthezier/include/maja.3d
new file mode 100644 (file)
index 0000000..55c11e5
--- /dev/null
@@ -0,0 +1,33 @@
+obj krs1 y-90\r
+obj krs1 y-87\r
+obj krs1 y-84\r
+obj krs1 y-81\r
+obj krs1 y-78\r
+obj krs1 y-75\r
+obj krs1 y-72\r
+obj krs1 y-69\r
+obj krs1 y-66\r
+obj krs1 y-63\r
+obj krs1 y-60\r
+obj krs1 y-57\r
+obj krs1 y-54\r
+obj krs1 y-51\r
+obj krs1 y-48\r
+obj krs1 y-45\r
+obj krs1 y-42\r
+obj krs1 y-39\r
+obj krs1 y-36\r
+obj krs1 y-33\r
+obj krs1 y-30\r
+obj krs1 y-27\r
+obj krs1 y-24\r
+obj krs1 y-21\r
+obj krs1 y-18\r
+obj krs1 y-15\r
+obj krs1 y-12\r
+obj krs1 y-9\r
+obj krs1 y-6\r
+obj krs1 y-3\r
+obj krs1\r
+obj krs1 y+3\r
+rnd obj^katus^x-48^z-12^y+3 obj^katus2^x-48^z-12^y+3 obj^katus3^x-48^z-12^y+3\r
diff --git a/3D GFX/3D Synthezier/include/nrk4.3d b/3D GFX/3D Synthezier/include/nrk4.3d
new file mode 100644 (file)
index 0000000..296dc22
--- /dev/null
@@ -0,0 +1,29 @@
+# 1    -body material\r
+# 2 = 1        -ends filled\r
+#\r
+#   0--1\r
+#   |  | Y\r
+#   3--2\r
+#\r
+#    X\r
+\r
+here\r
+p -0.5 0.5 0\r
+p 0.5 0.5 0\r
+p 0.5 -0.5 0\r
+p -0.5 -0.5 0\r
+\r
+p -0.5 0.5 1\r
+p 0.5 0.5 1\r
+p 0.5 -0.5 1\r
+p -0.5 -0.5 1\r
+\r
+mtl %1\r
+f 0 1 5 4\r
+f 1 2 6 5\r
+f 2 3 7 6\r
+f 3 0 4 7\r
+\r
+cmp 0 %2 1\r
+?0 f 0 1 2 3\r
+?0 f 4 5 6 7\r
diff --git a/3D GFX/3D Synthezier/include/nrk6.3d b/3D GFX/3D Synthezier/include/nrk6.3d
new file mode 100644 (file)
index 0000000..d096deb
--- /dev/null
@@ -0,0 +1,33 @@
+# 1    -body material\r
+# 2 = 1        -ends filled\r
+\r
+here\r
+p       -0.5    0       0.866\r
+p       0.5     0       0.866\r
+p      1       0       0\r
+p       0.5     0       -0.866\r
+p       -0.5    0       -0.866\r
+p       -1      0       0\r
+\r
+p       -0.5    1       0.866\r
+p       0.5     1       0.866\r
+p      1       1       0\r
+p       0.5     1       -0.866\r
+p       -0.5    1       -0.866\r
+p      -1      1       0\r
+\r
+mtl %1\r
+f 0 1 7 6\r
+f 1 2 8 7\r
+f 2 3 9 8\r
+f 3 4 10 9\r
+f 4 5 11 10\r
+f 5 0 6 11\r
+\r
+cmp 0 %2 1\r
+?0 f 0 1 2 3\r
+?0 f 3 4 5 0\r
+?0 f 6 7 8 9\r
+?0 f 9 10 11 6\r
+\r
+\r
diff --git a/3D GFX/3D Synthezier/include/nrk8.3d b/3D GFX/3D Synthezier/include/nrk8.3d
new file mode 100644 (file)
index 0000000..5e7986a
--- /dev/null
@@ -0,0 +1,47 @@
+# 1    -body material\r
+# 2 = 1        -ends filled\r
+#\r
+#   0--1\r
+# 7/    \2\r
+# |  *   |  Y\r
+# 6\    /3\r
+#   5--4\r
+#\r
+#    X\r
+\r
+here\r
+p -0.333 1 0\r
+p 0.333 1 0\r
+p 1 0.333 0\r
+p 1 -0.333 0\r
+p 0.333 -1 0\r
+p -0.333 -1 0\r
+p -1 -0.333 0\r
+p -1 0.333 0\r
+\r
+p -0.333 1 1\r
+p 0.333 1 1\r
+p 1 0.333 1\r
+p 1 -0.333 1\r
+p 0.333 -1 1\r
+p -0.333 -1 1\r
+p -1 -0.333 1\r
+p -1 0.333 1\r
+\r
+mtl %1\r
+f 0 1 9 8\r
+f 1 2 10 9\r
+f 2 3 11 10\r
+f 3 4 12 11\r
+f 4 5 13 12\r
+f 5 6 14 13\r
+f 6 7 15 14\r
+f 7 0 8 15\r
+\r
+cmp 0 %2 1\r
+?0 f 0 1 4 5\r
+?0 f 1 2 3 4\r
+?0 f 0 5 6 7\r
+?0 f 8 9 12 13\r
+?0 f 9 10 11 12\r
+?0 f 8 13 14 15
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/plaat.3d b/3D GFX/3D Synthezier/include/plaat.3d
new file mode 100644 (file)
index 0000000..8255032
--- /dev/null
@@ -0,0 +1,19 @@
+here\r
+p      -0.1    -0.01   -0.1\r
+p      0.1     -0.01   -0.1\r
+p      0.1     -0.01   0.1\r
+p      -0.1    -0.01   0.1\r
+\r
+p      -0.1    0.01    -0.1\r
+p      0.1     0.01    -0.1\r
+p      0.1     0.01    0.1\r
+p      -0.1    0.01    0.1\r
+\r
+mtl kivi\r
+f 0 1 2 3\r
+f 4 5 6 7\r
+\r
+f 0 1 5 4\r
+f 1 2 6 5\r
+f 2 3 7 6\r
+f 3 0 4 7
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/pol.3d b/3D GFX/3D Synthezier/include/pol.3d
new file mode 100644 (file)
index 0000000..256589d
--- /dev/null
@@ -0,0 +1,37 @@
+obj pol_frnt\r
+obj pol_frnt z*-1 z+5\r
+obj pol_ceil x*1.5 z+1.5 y+0.5\r
+obj flare_w x+0.5 z-0.01 y-0.1\r
+obj flare_w x*-1 x-0.5 z-0.01 y-0.1\r
+obj flare_r x+0.5 z+5.01 y-0.1\r
+obj flare_r x*-1 x-0.5 z+5.01 y-0.1\r
+\r
+here\r
+p -1.25 0.5 0.5\r
+p 1.25 0.5 0.5\r
+p 1.5 0.25 0.5\r
+p 1.5 -0.25 0.5\r
+p 1.25 -0.5 0.5\r
+p -1.25 -0.5 0.5\r
+p -1.5 -0.25 0.5\r
+p -1.5 0.25 0.5\r
+\r
+p -1.25 0.5 4.5\r
+p 1.25 0.5 4.5\r
+p 1.5 0.25 4.5\r
+p 1.5 -0.25 4.5\r
+p 1.25 -0.5 4.5\r
+p -1.25 -0.5 4.5\r
+p -1.5 -0.25 4.5\r
+p -1.5 0.25 4.5\r
\r
+mtl metal_blue\r
+f 0 1 9 8\r
+f 1 2 10 9\r
+f 2 3 11 10\r
+f 3 4 12 11\r
+f 4 5 13 12\r
+f 5 6 14 13\r
+f 6 7 15 14\r
+f 7 0 8 15\r
+\r
diff --git a/3D GFX/3D Synthezier/include/pol_ceil.3d b/3D GFX/3D Synthezier/include/pol_ceil.3d
new file mode 100644 (file)
index 0000000..68cb41a
--- /dev/null
@@ -0,0 +1,21 @@
+here\r
+p -0.5 0.5 0.75\r
+p 0.5 0.5 0.75\r
+p 0.5 0 0\r
+p -0.5 0 0\r
+p -0.75 0 0.75\r
+p 0.75 0 0.75\r
+\r
+p -0.5 0.5 2.25\r
+p 0.5 0.5 2.25\r
+p 0.5 0 2.25\r
+p -0.5 0 2.25\r
+mtl klaashele\r
+f 0 1 2 3\r
+f 0 3 4\r
+f 1 2 5\r
+\r
+f 0 1 7 6\r
+f 1 5 8 7\r
+f 0 4 9 6\r
+f 6 7 8 9
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/pol_frnt.3d b/3D GFX/3D Synthezier/include/pol_frnt.3d
new file mode 100644 (file)
index 0000000..826e568
--- /dev/null
@@ -0,0 +1,24 @@
+here\r
+p -1.25 0.25 0\r
+p 1.25 0.25 0\r
+p 1.25 -0.25 0\r
+p -1.25 -0.25 0\r
+\r
+p -1.25 0.5 0.5\r
+p 1.25 0.5 0.5\r
+p 1.5 0.25 0.5\r
+p 1.5 -0.25 0.5\r
+p 1.25 -0.5 0.5\r
+p -1.25 -0.5 0.5\r
+p -1.5 -0.25 0.5\r
+p -1.5 0.25 0.5\r
+mtl metal_blue\r
+f 0 1 2 3\r
+f 0 4 5 1\r
+f 1 5 6\r
+f 1 6 7 2\r
+f 2 7 8\r
+f 2 8 9 3\r
+f 3 9 10\r
+f 3 10 11 0\r
+f 0 11 4
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/ring.3d b/3D GFX/3D Synthezier/include/ring.3d
new file mode 100644 (file)
index 0000000..7d19916
--- /dev/null
@@ -0,0 +1,52 @@
+here\r
+p 0 0 0\r
+p -1.0 0.0 0.0\r
+p -0.965926 0.0 -0.258819 \r
+p -0.965926 0.0 0.258819 \r
+p -0.866025 0.0 -0.500000 \r
+p -0.866025 0.0 0.500000 \r
+p -0.707107 0.0 -0.707107 \r
+p -0.707107 0.0 0.707107 \r
+p -0.500000 0.0 -0.866025 \r
+p -0.500000 0.0 0.866025 \r
+p -0.258819 0.0 -0.965926 \r
+p -0.258819 0.0 0.965926 \r
+p 0.0 0.0 -1.0 \r
+p 0.0 0.0 0.0 \r
+p 0.0 0.0 1.0 \r
+p 0.258819 0.0 0.965926 \r
+p 0.258819 0.0 -0.965926 \r
+p 0.500000 0.0 0.866025 \r
+p 0.500000 0.0 -0.866025 \r
+p 0.707107 0.0 -0.707107 \r
+p 0.707107 0.0 0.707107 \r
+p 0.866025 0.0 -0.500000 \r
+p 0.866026 0.0 0.500000 \r
+p 0.965926 0.0 -0.258819 \r
+p 0.965926 0.0 0.258819 \r
+p 1.0 0.0 0.0 \r
+\r
+f 13 25 23\r
+f 13 23 21\r
+f 13 21 19\r
+f 13 19 18\r
+f 13 18 16\r
+f 13 16 12\r
+f 13 12 10\r
+f 13 10 8\r
+f 13 8 6\r
+f 13 6 4\r
+f 13 4 2\r
+f 13 2 1\r
+f 13 1 3\r
+f 13 3 5\r
+f 13 5 7\r
+f 13 7 9\r
+f 13 9 11\r
+f 13 11 14\r
+f 13 14 15\r
+f 13 15 17\r
+f 13 17 20\r
+f 13 20 22\r
+f 13 22 24\r
+f 13 24 25\r
diff --git a/3D GFX/3D Synthezier/include/seinl1.3d b/3D GFX/3D Synthezier/include/seinl1.3d
new file mode 100644 (file)
index 0000000..b6bf757
--- /dev/null
@@ -0,0 +1,9 @@
+obj blk1\r
+obj blk2 x+6\r
+obj blk2 x+12\r
+obj blk1 x+18\r
+\r
+rnd obj^pol^xz-92^z-6^x+1 dum dum dum dum\r
+rnd obj^car^xz91^z-10^x+5 dum dum dum dum\r
+rnd obj^car^xz87^z-8^x+19 dum dum dum dum\r
+rnd obj^bus^xz-90^z-12^x+10 dum dum dum dum dum dum dum dum
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/seinp1.3d b/3D GFX/3D Synthezier/include/seinp1.3d
new file mode 100644 (file)
index 0000000..b8499db
--- /dev/null
@@ -0,0 +1,19 @@
+obj blk1\r
+obj blk1 x+6\r
+obj blk1 x+12\r
+obj blk2 x+18\r
+\r
+obj blk2 x+24\r
+obj blk1 x+30\r
+obj blk1 x+36\r
+obj blk1 x+42\r
+\r
+obj blk1 x+48\r
+obj blk1 x+54\r
+obj blk1 x+60\r
+obj blk2 x+66\r
+\r
+obj blk2 x+72\r
+obj blk1 x+78\r
+obj blk1 x+84\r
+obj blk1 x+90\r
diff --git a/3D GFX/3D Synthezier/include/solar.3d b/3D GFX/3D Synthezier/include/solar.3d
new file mode 100644 (file)
index 0000000..a898eec
--- /dev/null
@@ -0,0 +1,23 @@
+here\r
+p      -3      0       -3\r
+p      3       0       -3\r
+p      3       0       3\r
+p      -3      0       3\r
+\r
+p      -3      15      -3\r
+p      3       15      -3\r
+p      3       15      3\r
+p      -3      15      3\r
+\r
+p      -20     6       -9\r
+p      20      6       -9\r
+p      10      24      9\r
+p      -10     24      9\r
+\r
+mtl pronks\r
+f 0 1 5 4\r
+f 1 2 6 5\r
+f 2 3 7 6\r
+f 3 0 4 7\r
+mtl solar\r
+f 8 9 10 11
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/toru.3d b/3D GFX/3D Synthezier/include/toru.3d
new file mode 100644 (file)
index 0000000..0f91bfb
--- /dev/null
@@ -0,0 +1,38 @@
+here\r
+p 0 0 10\r
+p 0 5 10\r
+\r
+p 7.071067 0 7.071069\r
+p 7.071067 5 7.071069\r
+\r
+p 10 0 3.139165E-06\r
+p 10 5 3.139165E-06\r
+\r
+p 7.071071 0 -7.071064\r
+p 7.071071 5 -7.071064\r
+\r
+p 6.27833E-06 0 -10\r
+p 6.27833E-06 5 -10\r
+\r
+p -7.071062 0 -7.071074\r
+p -7.071062 5 -7.071074\r
+\r
+p -10 0 -9.417495E-06\r
+p -10 5 -9.417495E-06\r
+\r
+p -7.071075 0 7.07106\r
+p -7.071075 5 7.07106\r
+mtl pronks\r
+f 0 1 3 2\r
+f 2 3 5 4\r
+f 4 5 7 6\r
+f 6 7 9 8\r
+\r
+f 8 9 11 10\r
+f 10 11 13 12\r
+f 12 13 15 14\r
+f 14 15 1 0\r
+\r
+f 1 3 5 7\r
+f 1 7 9 15\r
+f 9 11 13 15
\ No newline at end of file
diff --git a/3D GFX/3D Synthezier/include/vedru.3d b/3D GFX/3D Synthezier/include/vedru.3d
new file mode 100644 (file)
index 0000000..6d238b8
--- /dev/null
@@ -0,0 +1,51 @@
+obj plaat xz20 x+0 y+0 z+1\r
+obj plaat xz18.42122 x+.3894183 y+.1333333 z+.921061\r
+obj plaat xz13.93413 x+.7173561 y+.2666667 z+.6967067\r
+obj plaat xz7.247154 x+.9320391 y+.4 z+.3623577\r
+obj plaat xz-.5839909 x+.9995736 y+.5333334 z-2.919955E-02\r
+obj plaat xz-8.322937 x+.9092974 y+.6666667 z-.4161468\r
+obj plaat xz-14.74788 x+.6754631 y+.8 z-.7373938\r
+obj plaat xz-18.84445 x+.334988 y+.9333334 z-.9422224\r
+obj plaat xz-19.96589 x-5.837443E-02 y+1.066667 z-.9982948\r
+obj plaat xz-17.93517 x-.4425208 y+1.2 z-.8967583\r
+obj plaat xz-13.07286 x-.7568028 y+1.333333 z-.6536433\r
+obj plaat xz-6.146646 x-.9516022 y+1.466667 z-.3073323\r
+obj plaat xz1.749993 x-.9961646 y+1.6 z+8.749965E-02\r
+obj plaat xz9.370347 x-.8834543 y+1.733334 z+.4685173\r
+obj plaat xz15.51133 x-.631266 y+1.866667 z+.7755664\r
+obj plaat xz19.20341 x-.2794146 y+2 z+.9601706\r
+obj plaat xz19.8637 x+.1165502 y+2.133334 z+.9931848\r
+obj plaat xz17.38794 x+.4941143 y+2.266667 z+.8693969\r
+obj plaat xz12.16701 x+.7936686 y+2.4 z+.6083503\r
+obj plaat xz5.025171 x+.96792 y+2.533334 z+.2512586\r
+obj plaat xz-2.910019 x+.9893581 y+2.666667 z-.145501\r
+obj plaat xz-10.38578 x+.8545986 y+2.8 z-.5192891\r
+obj plaat xz-16.22186 x+.584917 y+2.933333 z-.8110932\r
+obj plaat xz-19.49687 x+.2228901 y+3.066667 z-.9748436\r
+obj plaat xz-19.69376 x-.1743262 y+3.2 z-.984688\r
+obj plaat xz-16.78144 x-.5440203 y+3.333333 z-.839072\r
+obj plaat xz-11.21971 x-.8278257 y+3.466666 z-.5609854\r
+obj plaat xz-3.886632 x-.9809359 y+3.599999 z-.1943316\r
+obj plaat xz4.060056 x-.9791781 y+3.733333 z+.2030028\r
+obj plaat xz11.36575 x-.82283 y+3.866666 z+.5682876\r
+obj plaat xz16.87705 x-.5365753 y+3.999999 z+.8438524\r
+obj plaat xz19.72383 x-.1656074 y+4.133332 z+.9861917\r
+obj plaat xz19.45667 x+.2315063 y+4.266665 z+.9728334\r
+obj plaat xz16.11773 x+.5920703 y+4.399999 z+.8058863\r
+obj plaat xz10.23416 x+.8591596 y+4.533332 z+.5117078\r
+obj plaat xz2.734839 x+.9906067 y+4.666665 z+.1367419\r
+obj plaat xz-5.196248 x+.9656591 y+4.799998 z-.2598124\r
+obj plaat xz-12.30696 x+.7882555 y+4.933331 z-.6153481\r
+obj plaat xz-17.47468 x+.4864039 y+5.066665 z-.8737341\r
+obj plaat xz-19.88354 x+.1077599 y+5.199998 z-.9941769\r
+obj plaat xz-19.15323 x-.2878969 y+5.333331 z-.9576614\r
+obj plaat xz-15.39904 x-.638102 y+5.466665 z-.7699519\r
+obj plaat xz-9.213687 x-.8875641 y+5.599998 z-.4606843\r
+obj plaat xz-1.573701 x-.9968995 y+5.733331 z-7.868504E-02\r
+obj plaat xz6.314738 x-.9488468 y+5.866664 z+.3157369\r
+obj plaat xz13.20622 x-.7509923 y+5.999998 z+.660311\r
+obj plaat xz18.01273 x-.4345728 y+6.133331 z+.9006367\r
+obj plaat xz19.97544 x-4.954402E-02 y+6.266664 z+.998772\r
+obj plaat xz18.78447 x+.3433067 y+6.399997 z+.9392233\r
+obj plaat xz14.62785 x+.6819569 y+6.53333 z+.7313923\r
+obj plaat xz8.161816 x+.9129413 y+6.666664 z+.4080908\r
diff --git a/3D GFX/3D land.bas b/3D GFX/3D land.bas
new file mode 100755 (executable)
index 0000000..5a7c5e2
--- /dev/null
@@ -0,0 +1,115 @@
+DECLARE SUB DrawQuadrilateral (xCoord1%, yCoord1%, xCoord2%, yCoord2%, xCoord3%, yCoord3%, xCoord4%, yCoord4%, colorVal%)\r
+' Program to render 3D shaded landscape with perspective and distortion effects.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 1999, Initial version\r
+' 2024 - 2025, Improved program readability\r
+\r
+DECLARE SUB SetPalette ()\r
+DEFINT A-Z\r
+' Declare shared arrays for X and Y coordinates\r
+DIM SHARED xCoordinates(1 TO 40, 1 TO 40)\r
+DIM SHARED yCoordinates(1 TO 40, 1 TO 40)\r
+\r
+' Set screen mode to 12: 640x480 pixels, 16 colors\r
+SCREEN 12\r
+\r
+' Initialize color palette\r
+SetPalette\r
+\r
+' Set initial scaling factor\r
+scalingFactor = 1.5\r
+\r
+' Main loop start\r
+1 :\r
+' Loop through each point in the grid\r
+FOR rowIndex = 1 TO 40\r
+    FOR colIndex = 1 TO 40\r
+        ' Calculate the position with distortion\r
+        xPos = 120 + (colIndex * 10)\r
+        yPos = 200 + (rowIndex * 3)\r
+        \r
+        ' Apply a cosine distortion based on distance from center\r
+        yPos = yPos - COS(SQR((colIndex - 20) ^ 2 + (rowIndex - 20) ^ 2) / scalingFactor) * 20\r
+\r
+        ' Apply perspective transformation\r
+        xPos = (xPos - 320) * (rowIndex + 50) / 50 + 320\r
+        yPos = (yPos - 240) * (rowIndex + 50) / 50 + 240\r
+\r
+        ' Store the transformed coordinates\r
+        xCoordinates(colIndex, rowIndex) = xPos\r
+        yCoordinates(colIndex, rowIndex) = yPos\r
+    NEXT colIndex\r
+NEXT rowIndex\r
+\r
+' Draw grid based on the stored coordinates\r
+FOR rowIndex = 1 TO 39\r
+    FOR colIndex = 1 TO 39\r
+        ' Alternate colors for each box\r
+        IF (colIndex + rowIndex) \ 2 <> (colIndex + rowIndex + 1) \ 2 THEN colorIndex = 0 ELSE colorIndex = 5\r
+       \r
+        ' Calculate a brightness factor\r
+        brightnessFactor = rowIndex + (colIndex / 3)\r
+       \r
+        ' Draw the quadrilateral with the calculated color and brightness\r
+        DrawQuadrilateral xCoordinates(colIndex, rowIndex), yCoordinates(colIndex, rowIndex), xCoordinates(colIndex + 1, rowIndex), yCoordinates(colIndex + 1, rowIndex), xCoordinates(colIndex, rowIndex + 1), yCoordinates(colIndex, rowIndex + 1),  _\r
+xCoordinates(colIndex + 1, rowIndex + 1), yCoordinates(colIndex + 1, rowIndex + 1), colorIndex\r
+    NEXT colIndex\r
+NEXT rowIndex\r
+\r
+' Wait for user input and adjust the scaling factor\r
+userInput$ = INPUT$(1)\r
+scalingFactor = scalingFactor * 1.9\r
+\r
+' Clear the screen for the next iteration\r
+CLS\r
+\r
+' If the scaling factor is too large, exit the program\r
+IF scalingFactor > 10 THEN SYSTEM\r
+\r
+' Jump back to the main loop start\r
+GOTO 1\r
+\r
+' Subroutine to draw a filled box using line drawing\r
+SUB DrawQuadrilateral (xCoord1, yCoord1, xCoord2, yCoord2, xCoord3, yCoord3, xCoord4, yCoord4, colorVal)\r
+    ' Fills a quadrilateral area by connecting the edges.\r
+    ' It uses a scanline approach, storing intersection points, then drawing horizontal lines between those intersection points.\r
+    ' Adjust color index based on position and brightness factor\r
+    colorVal = colorVal + (yCoord2 - yCoord1) / 3.5 + (brightnessFactor / 8) + 4\r
+    ' Ensure the color index is within valid range\r
+    IF colorVal < 0 THEN colorVal = 0\r
+    IF colorVal > 15 THEN colorVal = 15\r
+    ' Calculate the length of the longer side\r
+    sideLength1 = SQR((xCoord1 - xCoord2) ^ 2 + (yCoord1 - yCoord2) ^ 2)\r
+    sideLength2 = SQR((xCoord3 - xCoord4) ^ 2 + (yCoord3 - yCoord4) ^ 2)\r
+    IF sideLength2 < sideLength1 THEN sideLength2 = sideLength1\r
+    ' Draw the box using lines\r
+    FOR lineIndex = 1 TO sideLength2\r
+        xCoord5 = (xCoord2 - xCoord1) * lineIndex / sideLength2 + xCoord1\r
+        yCoord5 = (yCoord2 - yCoord1) * lineIndex / sideLength2 + yCoord1\r
+        xCoord6 = (xCoord4 - xCoord3) * lineIndex / sideLength2 + xCoord3\r
+        yCoord6 = (yCoord4 - yCoord3) * lineIndex / sideLength2 + yCoord3\r
+        ' Draw two adjacent lines to create a filled effect\r
+        LINE (xCoord5, yCoord5)-(xCoord6, yCoord6), colorVal\r
+        LINE (xCoord5 + 1, yCoord5)-(xCoord6 + 1, yCoord6), colorVal\r
+    NEXT lineIndex\r
+END SUB\r
+\r
+' Subroutine to initialize color palette\r
+SUB SetPalette\r
+    ' Initializes the color palette for the screen.\r
+    ' It sets the RGB values for each color index in the palette.\r
+    FOR paletteIndex = 1 TO 16\r
+        ' Set the color values for each palette entry\r
+        OUT &H3C8, paletteIndex\r
+        OUT &H3C9, paletteIndex * 4\r
+        OUT &H3C9, paletteIndex * 4\r
+        OUT &H3C9, paletteIndex * 3\r
+    NEXT paletteIndex\r
+END SUB\r
+\r
diff --git a/3D GFX/3D land.webm b/3D GFX/3D land.webm
new file mode 100644 (file)
index 0000000..1e60d2d
Binary files /dev/null and b/3D GFX/3D land.webm differ
diff --git a/3D GFX/Anaglyph.bas b/3D GFX/Anaglyph.bas
new file mode 100755 (executable)
index 0000000..10d6a4b
--- /dev/null
@@ -0,0 +1,465 @@
+' Projects realtime anaglyph with bouncing cubes. Colored glasses required to view stereo effect.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+\r
+' Changelog:\r
+' 2004.07, Initial version\r
+' 2024 - 2025, Improved program readability\r
+\r
+' Controls:\r
+' arrow keys - move around\r
+' 2, 6, 4, 8 - look around\r
+' -          - fly up\r
+' +          - fly down\r
+' q, w       - change horizontal distance between left and right view\r
+\r
+DECLARE SUB DrawLine (x1%, y1%, x2%, y2%)\r
+DECLARE SUB CreateCube ()\r
+DECLARE SUB PlaceCubes ()\r
+DECLARE SUB RenderScene ()\r
+DECLARE SUB InitializeEnvironment ()\r
+DECLARE SUB InitializeProgram ()\r
+\r
+DIM SHARED originalPointCount, originalLineCount, currentPointCount, currentLineCount\r
+DIM SHARED pointX(1 TO 1000)\r
+DIM SHARED pointY(1 TO 1000)\r
+DIM SHARED pointZ(1 TO 1000)\r
+\r
+DIM SHARED projectedX(1 TO 1000)\r
+DIM SHARED projectedXRight(1 TO 1000)\r
+DIM SHARED projectedY(1 TO 1000)\r
+\r
+DIM SHARED originalProjectedX(1 TO 1000)\r
+DIM SHARED originalProjectedXRight(1 TO 1000)\r
+DIM SHARED originalProjectedY(1 TO 1000)\r
+DIM SHARED originalProjectedPointCount\r
+DIM SHARED lineStart(1 TO 1000)\r
+DIM SHARED lineEnd(1 TO 1000)\r
+DIM SHARED lineColor(1 TO 1000)\r
+DIM SHARED originalLineStart(1 TO 1000)\r
+DIM SHARED originalLineEnd(1 TO 1000)\r
+DIM SHARED originalProjectedLineCount\r
+\r
+DIM SHARED cameraX, cameraY, cameraZ\r
+DIM SHARED cameraXSpeed, cameraYSpeed, cameraZSpeed\r
+DIM SHARED rotationAngle1, rotationAngle2\r
+DIM SHARED rotationAngle1Speed, rotationAngle2Speed\r
+DIM SHARED cubeX(1 TO 10)\r
+DIM SHARED cubeY(1 TO 10)\r
+DIM SHARED cubeZ(1 TO 10)\r
+DIM SHARED cubeXSpeed(1 TO 10)\r
+DIM SHARED cubeYSpeed(1 TO 10)\r
+DIM SHARED cubeZSpeed(1 TO 10)\r
+DIM SHARED cubeCount\r
+DIM SHARED horizontalViewDistance\r
+\r
+DIM SHARED movementSpeed\r
+\r
+movementSpeed = 4\r
+'ON ERROR GOTO 2\r
+\r
+InitializeProgram\r
+InitializeEnvironment\r
+PlaceCubes\r
+horizontalViewDistance = -.1\r
+1\r
+PCOPY 0, 1\r
+CLS\r
+\r
+currentPointCount = originalPointCount\r
+currentLineCount = originalLineCount\r
+\r
+CreateCube\r
+RenderScene\r
+\r
+cameraX = cameraX + cameraXSpeed\r
+cameraY = cameraY + cameraYSpeed\r
+cameraZ = cameraZ + cameraZSpeed\r
+rotationAngle1 = rotationAngle1 + rotationAngle1Speed\r
+rotationAngle2 = rotationAngle2 + rotationAngle2Speed\r
+\r
+inputKey$ = INKEY$\r
+IF inputKey$ <> "" THEN\r
+    IF inputKey$ = CHR$(0) + "H" THEN\r
+        ' Move forward\r
+        cameraZSpeed = cameraZSpeed - SIN(rotationAngle1) / 100\r
+        cameraXSpeed = cameraXSpeed - COS(rotationAngle1) / 100\r
+    END IF\r
+    IF inputKey$ = CHR$(0) + "P" THEN\r
+        ' Move backward\r
+        cameraZSpeed = cameraZSpeed + SIN(rotationAngle1) / 100\r
+        cameraXSpeed = cameraXSpeed + COS(rotationAngle1) / 100\r
+    END IF\r
+    IF inputKey$ = CHR$(0) + "M" THEN\r
+        ' Strafe left\r
+        cameraZSpeed = cameraZSpeed + COS(rotationAngle1) / 100\r
+        cameraXSpeed = cameraXSpeed - SIN(rotationAngle1) / 100\r
+    END IF\r
+    IF inputKey$ = CHR$(0) + "K" THEN\r
+        ' Strafe right\r
+        cameraZSpeed = cameraZSpeed - COS(rotationAngle1) / 100\r
+        cameraXSpeed = cameraXSpeed + SIN(rotationAngle1) / 100\r
+    END IF\r
+\r
+    IF inputKey$ = "6" THEN rotationAngle1Speed = rotationAngle1Speed - .01\r
+    IF inputKey$ = "4" THEN rotationAngle1Speed = rotationAngle1Speed + .01\r
+    IF inputKey$ = "8" THEN rotationAngle2Speed = rotationAngle2Speed - .01\r
+    IF inputKey$ = "2" THEN rotationAngle2Speed = rotationAngle2Speed + .01\r
+    IF inputKey$ = "+" THEN cameraYSpeed = cameraYSpeed - .01\r
+    IF inputKey$ = "-" THEN cameraYSpeed = cameraYSpeed + .01\r
+    IF inputKey$ = "q" THEN horizontalViewDistance = horizontalViewDistance - .01\r
+    IF inputKey$ = "w" THEN horizontalViewDistance = horizontalViewDistance + .01\r
+    IF inputKey$ = " " THEN\r
+        ' Slow down movements\r
+        cameraXSpeed = cameraXSpeed / 2\r
+        cameraYSpeed = cameraYSpeed / 2\r
+        cameraZSpeed = cameraZSpeed / 2\r
+\r
+        rotationAngle1Speed = rotationAngle1Speed / 2\r
+        rotationAngle2Speed = rotationAngle2Speed / 2\r
+    END IF\r
+    IF inputKey$ = CHR$(27) THEN SYSTEM\r
+END IF\r
+GOTO 1\r
+2\r
+END\r
+RESUME\r
+\r
+SUB InitializeEnvironment\r
+\r
+' This subroutine initializes the environment by creating points and lines.\r
+FOR worldZ = -5 TO 5\r
+    FOR worldX = -5 TO 5\r
+        currentPointCount = currentPointCount + 1\r
+        pointX(currentPointCount) = worldX\r
+        pointY(currentPointCount) = SIN(SQR(worldX * worldX + worldZ * worldZ) / 2)\r
+        pointZ(currentPointCount) = worldZ\r
+        IF worldX > -5 THEN\r
+            currentLineCount = currentLineCount + 1\r
+            lineStart(currentLineCount) = currentPointCount\r
+            lineEnd(currentLineCount) = currentPointCount - 1\r
+            lineColor(currentLineCount) = 3\r
+        END IF\r
+        IF worldZ > -5 THEN\r
+            currentLineCount = currentLineCount + 1\r
+            lineStart(currentLineCount) = currentPointCount\r
+            lineEnd(currentLineCount) = currentPointCount - 11\r
+            lineColor(currentLineCount) = 3\r
+        END IF\r
+    NEXT worldX\r
+NEXT worldZ\r
+\r
+originalPointCount = currentPointCount\r
+originalLineCount = currentLineCount\r
+\r
+END SUB\r
+\r
+SUB InitializeEnvironment1\r
+\r
+' This subroutine initializes the environment with a simple setup.\r
+currentPointCount = 1\r
+pointX(currentPointCount) = -2\r
+pointY(currentPointCount) = 0\r
+pointZ(currentPointCount) = 0\r
+\r
+currentPointCount = currentPointCount + 1\r
+pointX(currentPointCount) = 2\r
+pointY(currentPointCount) = 0\r
+pointZ(currentPointCount) = 0\r
+\r
+currentLineCount = 1\r
+lineStart(currentLineCount) = 1\r
+lineEnd(currentLineCount) = 2\r
+lineColor(currentLineCount) = 14\r
+\r
+END SUB\r
+\r
+SUB DrawLine (x1%, y1%, x2%, y2%)\r
+\r
+' This subroutine draws a line between two points using a custom algorithm.\r
+' It calculates intermediate points and sets pixels with appropriate colors.\r
+' The color is inverted if the point is already set to avoid overwriting.\r
+\r
+lineLength = ABS(x1% - x2%)\r
+lineLength2 = ABS(y1% - y2%)\r
+IF lineLength2 > lineLength THEN lineLength = lineLength2\r
+IF lineLength < 2 THEN GOTO 101\r
+\r
+xDelta = x2% - x1%\r
+yDelta = y2% - y1%\r
+\r
+FOR stp% = 1 TO lineLength\r
+    x = xDelta * stp% / lineLength + x1%\r
+    y = yDelta * stp% / lineLength + y1%\r
+    currentColor = POINT(x, y)\r
+    IF currentColor = 0 THEN PSET (x, y), 2\r
+    IF currentColor = 1 THEN PSET (x, y), 3\r
+NEXT stp%\r
+101\r
+END SUB\r
+\r
+SUB DrawLineRight (x1, y1, x2, y2)\r
+' This subroutine draws a line using the LINE statement for the right eye view.\r
+LINE (x1, y1)-(x2, y2), 1\r
+END SUB\r
+\r
+SUB CreateCube\r
+\r
+' This subroutine updates the positions of the cubes and adds their edges to the environment.\r
+FOR cubeIndex = 1 TO cubeCount\r
+    worldX = cubeX(cubeIndex)\r
+    worldY = cubeY(cubeIndex)\r
+    worldZ = cubeZ(cubeIndex)\r
+\r
+    velocityX = cubeXSpeed(cubeIndex)\r
+    velocityY = cubeYSpeed(cubeIndex)\r
+    velocityZ = cubeZSpeed(cubeIndex)\r
+\r
+    ' Apply gravity to the cube's vertical movement\r
+    velocityY = velocityY - .01\r
+\r
+    ' Calculate new positions based on velocity and speed\r
+    worldX = worldX + velocityX / movementSpeed\r
+    worldY = worldY + velocityY / movementSpeed\r
+    worldZ = worldZ + velocityZ / movementSpeed\r
+\r
+    ' Bounce from boundaries\r
+    IF worldX > 5 THEN velocityX = -.1\r
+    IF worldZ > 5 THEN velocityZ = -.1\r
+    IF worldX < -5 THEN velocityX = .1\r
+    IF worldZ < -5 THEN velocityZ = .1\r
+    IF worldY < .5 THEN velocityY = RND * .2 + .1\r
+\r
+    ' Add cube edges to the environment\r
+    currentLineCount = currentLineCount + 1\r
+    lineStart(currentLineCount) = currentPointCount + 1\r
+    lineEnd(currentLineCount) = currentPointCount + 2\r
+    lineColor(currentLineCount) = 14\r
+\r
+    currentLineCount = currentLineCount + 1\r
+    lineStart(currentLineCount) = currentPointCount + 3\r
+    lineEnd(currentLineCount) = currentPointCount + 2\r
+    lineColor(currentLineCount) = 14\r
+\r
+    currentLineCount = currentLineCount + 1\r
+    lineStart(currentLineCount) = currentPointCount + 3\r
+    lineEnd(currentLineCount) = currentPointCount + 4\r
+    lineColor(currentLineCount) = 14\r
+\r
+    currentLineCount = currentLineCount + 1\r
+    lineStart(currentLineCount) = currentPointCount + 1\r
+    lineEnd(currentLineCount) = currentPointCount + 4\r
+    lineColor(currentLineCount) = 14\r
+\r
+    currentLineCount = currentLineCount + 1\r
+    lineStart(currentLineCount) = currentPointCount + 1\r
+    lineEnd(currentLineCount) = currentPointCount + 5\r
+    lineColor(currentLineCount) = 14\r
+\r
+    currentLineCount = currentLineCount + 1\r
+    lineStart(currentLineCount) = currentPointCount + 2\r
+    lineEnd(currentLineCount) = currentPointCount + 6\r
+    lineColor(currentLineCount) = 14\r
+\r
+    currentLineCount = currentLineCount + 1\r
+    lineStart(currentLineCount) = currentPointCount + 3\r
+    lineEnd(currentLineCount) = currentPointCount + 7\r
+    lineColor(currentLineCount) = 14\r
+\r
+    currentLineCount = currentLineCount + 1\r
+    lineStart(currentLineCount) = currentPointCount + 4\r
+    lineEnd(currentLineCount) = currentPointCount + 8\r
+    lineColor(currentLineCount) = 14\r
+\r
+    currentLineCount = currentLineCount + 1\r
+    lineStart(currentLineCount) = currentPointCount + 5\r
+    lineEnd(currentLineCount) = currentPointCount + 6\r
+    lineColor(currentLineCount) = 14\r
+\r
+    currentLineCount = currentLineCount + 1\r
+    lineStart(currentLineCount) = currentPointCount + 7\r
+    lineEnd(currentLineCount) = currentPointCount + 6\r
+    lineColor(currentLineCount) = 14\r
+\r
+    currentLineCount = currentLineCount + 1\r
+    lineStart(currentLineCount) = currentPointCount + 7\r
+    lineEnd(currentLineCount) = currentPointCount + 8\r
+    lineColor(currentLineCount) = 14\r
+\r
+    currentLineCount = currentLineCount + 1\r
+    lineStart(currentLineCount) = currentPointCount + 5\r
+    lineEnd(currentLineCount) = currentPointCount + 8\r
+    lineColor(currentLineCount) = 14\r
+\r
+    ' Add cube vertices to the environment\r
+    currentPointCount = currentPointCount + 1\r
+    pointX(currentPointCount) = worldX - .5\r
+    pointY(currentPointCount) = worldY - .5\r
+    pointZ(currentPointCount) = worldZ - .5\r
+\r
+    currentPointCount = currentPointCount + 1\r
+    pointX(currentPointCount) = worldX + .5\r
+    pointY(currentPointCount) = worldY - .5\r
+    pointZ(currentPointCount) = worldZ - .5\r
+\r
+    currentPointCount = currentPointCount + 1\r
+    pointX(currentPointCount) = worldX + .5\r
+    pointY(currentPointCount) = worldY + .5\r
+    pointZ(currentPointCount) = worldZ - .5\r
+\r
+    currentPointCount = currentPointCount + 1\r
+    pointX(currentPointCount) = worldX - .5\r
+    pointY(currentPointCount) = worldY + .5\r
+    pointZ(currentPointCount) = worldZ - .5\r
+\r
+    currentPointCount = currentPointCount + 1\r
+    pointX(currentPointCount) = worldX - .5\r
+    pointY(currentPointCount) = worldY - .5\r
+    pointZ(currentPointCount) = worldZ + .5\r
+\r
+    currentPointCount = currentPointCount + 1\r
+    pointX(currentPointCount) = worldX + .5\r
+    pointY(currentPointCount) = worldY - .5\r
+    pointZ(currentPointCount) = worldZ + .5\r
+\r
+    currentPointCount = currentPointCount + 1\r
+    pointX(currentPointCount) = worldX + .5\r
+    pointY(currentPointCount) = worldY + .5\r
+    pointZ(currentPointCount) = worldZ + .5\r
+\r
+    currentPointCount = currentPointCount + 1\r
+    pointX(currentPointCount) = worldX - .5\r
+    pointY(currentPointCount) = worldY + .5\r
+    pointZ(currentPointCount) = worldZ + .5\r
+\r
+    ' Update cube positions and velocities\r
+    cubeX(cubeIndex) = worldX\r
+    cubeY(cubeIndex) = worldY\r
+    cubeZ(cubeIndex) = worldZ\r
+    cubeXSpeed(cubeIndex) = velocityX\r
+    cubeYSpeed(cubeIndex) = velocityY\r
+    cubeZSpeed(cubeIndex) = velocityZ\r
+NEXT cubeIndex\r
+\r
+END SUB\r
+\r
+SUB PlaceCubes\r
+\r
+' This subroutine initializes the positions and velocities of the cubes.\r
+scaleFactor = 1\r
+FOR cubeIndex = 1 TO cubeCount\r
+    cubeX(cubeIndex) = RND * 10 - 5\r
+    cubeY(cubeIndex) = 2\r
+    cubeZ(cubeIndex) = RND * 10 - 5\r
+    cubeXSpeed(cubeIndex) = (RND * .5 - .25) / scaleFactor\r
+    cubeYSpeed(cubeIndex) = (RND * .5 + .1) / scaleFactor\r
+    cubeZSpeed(cubeIndex) = (RND * .5 - .25) / scaleFactor\r
+NEXT cubeIndex\r
+\r
+END SUB\r
+\r
+SUB RenderScene\r
+' This subroutine renders the environment by projecting 3D points onto a 2D plane.\r
+' It applies rotation and perspective projection to create the anaglyph effect.\r
+\r
+sinAngle1 = SIN(rotationAngle1)\r
+cosAngle1 = COS(rotationAngle1)\r
+sinAngle2 = SIN(rotationAngle2)\r
+cosAngle2 = COS(rotationAngle2)\r
+\r
+' Project each 3D point to 2D screen coordinates\r
+FOR pointIndex = 1 TO currentPointCount\r
+    worldX = pointX(pointIndex) + cameraX\r
+    worldY = pointY(pointIndex) - cameraY\r
+    worldZ = pointZ(pointIndex) + cameraZ\r
+\r
+    ' First rotation around Y-axis (horizontal rotation)\r
+    rotatedX = worldX * sinAngle1 - worldZ * cosAngle1\r
+    rotatedZ = worldX * cosAngle1 + worldZ * sinAngle1\r
+\r
+    ' Second rotation around X-axis (vertical rotation)\r
+    rotatedY = worldY * sinAngle2 - rotatedZ * cosAngle2\r
+    depth = worldY * cosAngle2 + rotatedZ * sinAngle2\r
+\r
+    ' Apply perspective projection if point is in view\r
+    IF depth < .1 THEN\r
+        projectedX(pointIndex) = -1\r
+    ELSE\r
+        projectedX(pointIndex) = 160 + ((rotatedX + horizontalViewDistance) / depth * 200)\r
+        projectedXRight(pointIndex) = 160 + ((rotatedX - horizontalViewDistance) / depth * 200)\r
+        projectedY(pointIndex) = 100 - (rotatedY / depth * 200)\r
+    END IF\r
+NEXT pointIndex\r
+\r
+' Draw lines between projected points for left eye view\r
+FOR lineIndex = 1 TO currentLineCount\r
+    startPoint = lineStart(lineIndex)\r
+    endPoint = lineEnd(lineIndex)\r
+    IF projectedX(startPoint) = -1 OR projectedX(endPoint) = -1 THEN\r
+        ' Skip drawing if either point is out of view\r
+    ELSE\r
+        LINE (projectedX(startPoint), projectedY(startPoint))-(projectedX(endPoint), projectedY(endPoint)), 1\r
+    END IF\r
+NEXT lineIndex\r
+\r
+' Draw lines between projected points for right eye view\r
+FOR lineIndex = 1 TO currentLineCount\r
+    startPoint = lineStart(lineIndex)\r
+    endPoint = lineEnd(lineIndex)\r
+    IF projectedX(startPoint) = -1 OR projectedX(endPoint) = -1 THEN\r
+        ' Skip drawing if either point is out of view\r
+    ELSE\r
+        DrawLine INT(projectedXRight(startPoint)), INT(projectedY(startPoint)), INT(projectedXRight(endPoint)), INT(projectedY(endPoint))\r
+    END IF\r
+NEXT lineIndex\r
+\r
+END SUB\r
+\r
+SUB InitializeProgram\r
+SCREEN 7, , , 1\r
+\r
+OUT &H3C8, 0\r
+OUT &H3C9, 63\r
+OUT &H3C9, 63\r
+OUT &H3C9, 63\r
+\r
+OUT &H3C8, 1\r
+OUT &H3C9, 63\r
+OUT &H3C9, 0\r
+OUT &H3C9, 0\r
+\r
+OUT &H3C8, 2\r
+OUT &H3C9, 0\r
+OUT &H3C9, 63\r
+OUT &H3C9, 63\r
+\r
+OUT &H3C8, 3\r
+OUT &H3C9, 0\r
+OUT &H3C9, 0\r
+OUT &H3C9, 0\r
+\r
+originalPointCount = 0\r
+originalLineCount = 0\r
+currentPointCount = originalPointCount\r
+currentLineCount = originalLineCount\r
+cubeCount = 9\r
+\r
+cameraX = 0\r
+cameraY = 4\r
+cameraZ = 7\r
+rotationAngle1 = 3.14 / 2\r
+rotationAngle2 = rotationAngle1 + .6\r
+\r
+FOR pointIndex = 1 TO 1000\r
+    lineColor(pointIndex) = 4\r
+NEXT pointIndex\r
+\r
+FOR lineIndex = 1 TO 1000\r
+    originalLineStart(lineIndex) = 1\r
+    originalLineEnd(lineIndex) = 1\r
+NEXT lineIndex\r
+\r
+END SUB\r
diff --git a/3D GFX/Anaglyph.html b/3D GFX/Anaglyph.html
new file mode 100644 (file)
index 0000000..43346da
--- /dev/null
@@ -0,0 +1,18 @@
+<HTML>\r
+<HEAD><TITLE>stereo vision</TITLE></HEAD>\r
+\r
+<BODY>\r
+\r
+<CENTER><H1>stereo vision</H1></CENTER>\r
+<BR>\r
+<BR>\r
+3D engine producing realtime stereo view. (ANAGLYPH)\r
+Conical grid with cubes flying around.\r
+You can freely fly around and adjust\r
+stereo view properties. Requires stereo glasses.\r
+\r
+<BR><IMG SRC="glasses-front.gif">\r
+\r
+<BR><IMG SRC="sshot.png">\r
+</BODY>\r
+</HTML>
\ No newline at end of file
diff --git a/3D GFX/Anaglyph.png b/3D GFX/Anaglyph.png
new file mode 100644 (file)
index 0000000..8f81825
Binary files /dev/null and b/3D GFX/Anaglyph.png differ
diff --git a/3D GFX/Helicopter/Helicopter.bas b/3D GFX/Helicopter/Helicopter.bas
new file mode 100644 (file)
index 0000000..d227cbc
--- /dev/null
@@ -0,0 +1,1144 @@
+DECLARE SUB DisplayScene1 ()\r
+DECLARE SUB DisplayScene9 ()\r
+DECLARE SUB DisplayScene2 ()\r
+DECLARE SUB DisplayScene8 ()\r
+DECLARE SUB DisplayScene3 ()\r
+DECLARE SUB DisplayScene4 ()\r
+DECLARE SUB DisplayScene5 ()\r
+DECLARE SUB DisplayScene7 ()\r
+DECLARE SUB InitializeProgram ()\r
+DECLARE SUB DisplayScenePart1 ()\r
+DECLARE SUB DisplayScenePart2 ()\r
+DECLARE SUB DisplayScenePart3 ()\r
+DECLARE SUB DisplayScenePart4 ()\r
+DECLARE SUB DisplayScenePart5 ()\r
+DECLARE SUB DisplayScenePart6 ()\r
+DECLARE SUB DisplayScenePart7 ()\r
+DECLARE SUB DisplayScenePart8 ()\r
+DECLARE SUB DisplayScenePart10 ()\r
+DECLARE SUB DisplayScenePart9 ()\r
+DECLARE SUB DrawRoundedBox (topLeftX!, topLeftY!, bottomRightX!, bottomRightY!)\r
+DECLARE SUB ComputeShadeValue (firstPointX!, firstPointY!, firstPointZ!, secondPointX!, secondPointY!, secondPointZ!, thirdPointX!, thirdPointY!, thirdPointZ!, shadeValue!)\r
+DECLARE SUB GetAngle (firstPointX!, firstPointY!, secondPointX!, secondPointY!, angleBetween!)\r
+DECLARE SUB RotatePoint (centerX!, centerY!, pointX!, pointY!, rotationAngle!)\r
+DECLARE SUB FillPolygon (vertex1X!, vertex1Y!, vertex2X!, vertex2Y!, vertex3X!, vertex3Y!, fillColor!)\r
+DECLARE SUB InitializeFont ()\r
+DECLARE SUB WaitForInput ()\r
+DECLARE SUB MakeBackground ()\r
+DECLARE SUB SetPalette (red!, green!, blue!, colorIndex!)\r
+DECLARE SUB PrintText (posX!, posY!, scale!, colorValue!, textString$)\r
+\r
+' Presentation demonstrating realtime 3D graphics.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2002, Initial version\r
+' 2025, Improved program readability\r
+\r
+DIM SHARED globalPiValue\r
+DIM SHARED globalPi\r
+DIM SHARED globalAngleOne\r
+DIM SHARED globalAngleTwo\r
+\r
+' Holds the captured font bitmap\r
+DIM SHARED fontData(0 TO 7, 0 TO 7, 32 TO 150)\r
+\r
+InitializeProgram\r
+DisplayScene1\r
+DisplayScene2\r
+DisplayScene3\r
+DisplayScene4\r
+DisplayScene7\r
+DisplayScene8\r
+\r
+\r
+SUB ComputeShadeValue (firstPointX, firstPointY, firstPointZ, secondPointX, secondPointY, secondPointZ, thirdPointX, thirdPointY, thirdPointZ, shadeValue)\r
+    '\r
+    ' Computes a brightness value for a 3D triangle based on distance from viewer.\r
+    ' The algorithm:\r
+    ' 1. Makes local copies of the three points\r
+    ' 2. Applies three sequential rotations to simulate 3D perspective\r
+    ' 3. Calculates distance from viewer to determine shading\r
+    '\r
+\r
+    ' Create local copies of the points\r
+    localFirstPointX = firstPointX\r
+    localFirstPointY = firstPointY\r
+    localFirstPointZ = firstPointZ\r
+    localSecondPointX = secondPointX\r
+    localSecondPointY = secondPointY\r
+    localSecondPointZ = secondPointZ\r
+    localThirdPointX = thirdPointX\r
+    localThirdPointY = thirdPointY\r
+    localThirdPointZ = thirdPointZ\r
+\r
+    ' First rotation around Y-axis\r
+    GetAngle localFirstPointX, localFirstPointY, localSecondPointX, localSecondPointY, tempAngle1\r
+    RotatePoint localFirstPointX, localFirstPointY, localSecondPointX, localSecondPointY, -tempAngle1\r
+    RotatePoint localFirstPointX, localFirstPointY, localThirdPointX, localThirdPointY, -tempAngle1\r
+\r
+    ' Second rotation around X-axis\r
+    GetAngle localFirstPointY, localFirstPointZ, localSecondPointY, localSecondPointZ, tempAngle2\r
+    tempAngle2 = tempAngle2 + globalPi / 2\r
+    RotatePoint localFirstPointY, localFirstPointZ, localSecondPointY, localSecondPointZ, -tempAngle2\r
+    RotatePoint localFirstPointY, localFirstPointZ, localThirdPointY, localThirdPointZ, -tempAngle2\r
+\r
+    ' Third rotation around Z-axis\r
+    GetAngle localFirstPointX, localFirstPointZ, localThirdPointX, localThirdPointZ, tempAngle3\r
+    tempAngle3 = tempAngle3 + globalPi / 2\r
+    RotatePoint localFirstPointX, localFirstPointZ, localSecondPointX, localSecondPointZ, -tempAngle3\r
+    RotatePoint localFirstPointX, localFirstPointZ, localThirdPointX, localThirdPointZ, -tempAngle3\r
+\r
+    ' Calculate distance from viewer to determine shading\r
+    viewerX = localFirstPointX\r
+    viewerY = localFirstPointY\r
+    viewerZ = localFirstPointZ + 30\r
+    RotatePoint localFirstPointX, localFirstPointZ, viewerX, viewerZ, tempAngle3\r
+    RotatePoint localFirstPointY, localFirstPointZ, viewerY, viewerZ, tempAngle2\r
+    RotatePoint localFirstPointX, localFirstPointY, viewerX, viewerY, tempAngle1\r
+\r
+    ' Compute distance from viewer to first point\r
+    distanceX = firstPointX + 20\r
+    distanceY = firstPointY + 10\r
+    distance = SQR((distanceX - viewerX) ^ 2 + (distanceY - viewerY) ^ 2)\r
+    shadeValue = 49 - distance\r
+    IF shadeValue < 0 THEN shadeValue = 0\r
+END SUB\r
+\r
+SUB DisplayScene1\r
+    '\r
+    ' Loads a 3D model from data.dat and demonstrates real-time rotation.\r
+    ' The model is projected to 2D and animated with a rotating effect.\r
+    '\r
+\r
+    SetPalette 0, 63, 20, 255\r
+    DIM modelVertexX(0 TO 1000)\r
+    DIM modelVertexY(0 TO 1000)\r
+    DIM modelVertexZ(0 TO 1000)\r
+    DIM projectedVertexX(0 TO 1000)\r
+    DIM projectedVertexY(0 TO 1000)\r
+    DIM lineStartVertex(0 TO 1500)\r
+    DIM lineEndVertex(0 TO 1500)\r
+    DIM oldLineStartX(1 TO 1500)\r
+    DIM oldLineStartY(1 TO 1500)\r
+    DIM oldLineEndX(1 TO 1500)\r
+    DIM oldLineEndY(1 TO 1500)\r
+    DIM totalVertices, totalLines\r
+    DIM rotationAngle1, rotationAngle2, rotationAngle3\r
+    DIM rotationSpeed1, rotationSpeed2, rotationSpeed3\r
+    DIM incrementVertices, incrementPolygons\r
+    DIM animationTime\r
+    DIM currentLines\r
+    DIM progressIndex\r
+\r
+    animationTime = 0\r
+    progressIndex = 1\r
+    rotationAngle1 = 0\r
+    rotationAngle2 = 0\r
+    totalVertices = -1\r
+    totalLines = 0\r
+    incrementVertices = 0\r
+    incrementPolygons = 0\r
+    currentLines = 0\r
+\r
+    SetPalette 40, 40, 40, 254\r
+    COLOR 254\r
+    LOCATE 2, 11\r
+    PRINT "One moment"\r
+\r
+    OPEN "data.dat" FOR INPUT AS #1\r
+    INPUT #1, incrementVertices\r
+    INPUT #1, incrementPolygons\r
+\r
+    FOR vertexIndex = 1 TO incrementVertices\r
+        INPUT #1, xVal, yVal, zVal\r
+        totalVertices = totalVertices + 1\r
+        modelVertexX(totalVertices) = xVal - 100\r
+        modelVertexY(totalVertices) = yVal\r
+        modelVertexZ(totalVertices) = zVal\r
+    NEXT vertexIndex\r
+\r
+    INPUT #1, lineVal1, lineVal2, lineVal3\r
+\r
+    FOR polygonIndex = 1 TO incrementPolygons - 1\r
+        INPUT #1, lineVal1!, lineVal2!, lineVal3!\r
+        newLineStart! = lineVal1!\r
+        newLineEnd! = lineVal2!\r
+        GOSUB AddLine\r
+        newLineStart! = lineVal2!\r
+        newLineEnd! = lineVal3!\r
+        GOSUB AddLine\r
+        newLineStart! = lineVal1!\r
+        newLineEnd! = lineVal3!\r
+        GOSUB AddLine\r
+        LOCATE 4, 10\r
+        PRINT STR$(INT(polygonIndex / (incrementPolygons - 1) * 100)) + "% ready"\r
+    NEXT polygonIndex\r
+\r
+    CLOSE 1\r
+    CLS\r
+\r
+RotateLoop:\r
+    animationTime = animationTime + 1\r
+    quitKey$ = INKEY$\r
+    IF quitKey$ = "q" THEN END\r
+\r
+    varA = COS(animationTime / 25)\r
+    rotationAngle1 = COS(animationTime / 29) * varA\r
+    rotationAngle2 = (globalPiValue / 2) + SIN(animationTime / 42) * varA\r
+    sin1 = SIN(rotationAngle1)\r
+    cos1 = COS(rotationAngle1)\r
+    sin2 = SIN(rotationAngle2)\r
+    cos2 = COS(rotationAngle2)\r
+\r
+    IF progressIndex >= 1 THEN\r
+        currentLines = currentLines + progressIndex\r
+        progressIndex = progressIndex + .03\r
+        IF currentLines > totalLines THEN currentLines = totalLines: progressIndex = 0\r
+    END IF\r
+\r
+    ' Project each 3D vertex to 2D\r
+    FOR vertexIndex = 0 TO totalVertices\r
+        x = modelVertexX(vertexIndex)\r
+        y = modelVertexY(vertexIndex)\r
+        z = modelVertexZ(vertexIndex)\r
+        zTemp = z * sin1 + y * cos1\r
+        yTemp = y * sin1 - z * cos1\r
+        zFinal = zTemp * sin2 + x * cos2\r
+        xFinal = x * sin2 - zTemp * cos2\r
+        zFinal = zFinal + 100\r
+        xFinal = xFinal / zFinal * 74 * 2\r
+        yFinal = yTemp / zFinal * 65 * 2\r
+        projectedVertexX(vertexIndex) = xFinal + 160\r
+        projectedVertexY(vertexIndex) = yFinal + 80\r
+    NEXT vertexIndex\r
+\r
+    ' Draw lines between vertices\r
+    FOR lineIndex = 1 TO currentLines\r
+        startVertex = lineStartVertex(lineIndex)\r
+        endVertex = lineEndVertex(lineIndex)\r
+        x1 = projectedVertexX(startVertex)\r
+        y1 = projectedVertexY(startVertex)\r
+        x2 = projectedVertexX(endVertex)\r
+        y2 = projectedVertexY(endVertex)\r
+        LINE (oldLineStartX(lineIndex), oldLineStartY(lineIndex))-(oldLineEndX(lineIndex), oldLineEndY(lineIndex)), 0\r
+        LINE (x1, y1)-(x2, y2), 255\r
+        oldLineStartX(lineIndex) = x1\r
+        oldLineStartY(lineIndex) = y1\r
+        oldLineEndX(lineIndex) = x2\r
+        oldLineEndY(lineIndex) = y2\r
+    NEXT lineIndex\r
+\r
+    SOUND 0, .5\r
+    IF animationTime < 280 THEN GOTO RotateLoop\r
+    GOTO EndScene\r
+\r
+AddLine:\r
+    FOR checkIndex = 1 TO totalLines\r
+        IF lineStartVertex(checkIndex) = newLineStart! THEN\r
+            IF lineEndVertex(checkIndex) = newLineEnd! THEN RETURN\r
+        END IF\r
+        IF lineStartVertex(checkIndex) = newLineEnd! THEN\r
+            IF lineEndVertex(checkIndex) = newLineStart! THEN RETURN\r
+        END IF\r
+    NEXT checkIndex\r
+\r
+    totalLines = totalLines + 1\r
+    lineStartVertex(totalLines) = newLineStart!\r
+    lineEndVertex(totalLines) = newLineEnd!\r
+    RETURN\r
+\r
+EndScene:\r
+    globalAngleOne = rotationAngle1\r
+    globalAngleTwo = rotationAngle2\r
+END SUB\r
+\r
+SUB DisplayScene2\r
+    '\r
+    ' Loads human face 3D model "data.dat" and projects triangular faces in 2D.\r
+    ' Each triangle's average depth is computed, and polygons are drawn\r
+    ' from back to front with FillPolygon. The shading is computed too.\r
+    '\r
+\r
+    SetPalette 0, 63, 20, 255\r
+    CLS\r
+    globalAngleOne = 0\r
+    globalAngleTwo = 1.5\r
+    DIM pointX(0 TO 2000)\r
+    DIM pointY(0 TO 2000)\r
+    DIM pointZ(0 TO 2000)\r
+    DIM rotatedX(0 TO 2000)\r
+    DIM rotatedY(0 TO 2000)\r
+    DIM rotatedZ(0 TO 2000)\r
+    DIM polyVertex1(1 TO 2000)\r
+    DIM polyVertex2(1 TO 2000)\r
+    DIM polyVertex3(1 TO 2000)\r
+    numPoints = 0\r
+    numTriangles = 0\r
+\r
+    OPEN "data.dat" FOR INPUT AS #1\r
+    INPUT #1, totalPoints\r
+    INPUT #1, totalPolys\r
+\r
+    FOR loopIndex = 1 TO totalPoints\r
+        INPUT #1, posXVal, posYVal, posZVal\r
+        pointX(numPoints) = posXVal - 100\r
+        pointY(numPoints) = posYVal\r
+        pointZ(numPoints) = posZVal\r
+        numPoints = numPoints + 1\r
+    NEXT loopIndex\r
+\r
+    INPUT #1, lineValA, lineValB, lineValC\r
+\r
+    FOR loopIndex = 1 TO totalPolys - 1\r
+        INPUT #1, lineValA, lineValB, lineValC\r
+        numTriangles = numTriangles + 1\r
+        polyVertex1(numTriangles) = lineValA\r
+        polyVertex2(numTriangles) = lineValB\r
+        polyVertex3(numTriangles) = lineValC\r
+    NEXT loopIndex\r
+\r
+    CLOSE #1\r
+\r
+    sin1 = SIN(globalAngleOne)\r
+    cos1 = COS(globalAngleOne)\r
+    sin2 = SIN(globalAngleTwo)\r
+    cos2 = COS(globalAngleTwo)\r
+\r
+    ' Project each 3D point\r
+    FOR loopIndex = 0 TO numPoints\r
+        localX = pointX(loopIndex)\r
+        localY = pointY(loopIndex)\r
+        localZ = pointZ(loopIndex)\r
+        zTmp = localZ * sin1 + localY * cos1\r
+        yTmp = localY * sin1 - localZ * cos1\r
+        zFin = zTmp * sin2 + localX * cos2\r
+        xFin = localX * sin2 - zTmp * cos2\r
+        zFin = zFin + 100\r
+        xFin = xFin / zFin * 74 * 2\r
+        yFin = yTmp / zFin * 65 * 2\r
+        rotatedX(loopIndex) = xFin + 160\r
+        rotatedY(loopIndex) = yFin + 80\r
+        rotatedZ(loopIndex) = zFin\r
+    NEXT loopIndex\r
+\r
+    ' Adjust palette for shading\r
+    FOR loopIndex = 1 TO 49\r
+        SetPalette loopIndex * 1.1 + 20, loopIndex * 1.1 + 10, loopIndex * 1.1, loopIndex\r
+    NEXT loopIndex\r
+\r
+    DIM polyDepth(1 TO numTriangles)\r
+\r
+    FOR loopIndex = 1 TO numTriangles\r
+        polyDepth(loopIndex) = (rotatedZ(polyVertex1(loopIndex)) + rotatedZ(polyVertex2(loopIndex)) + rotatedZ(polyVertex3(loopIndex)))\r
+    NEXT loopIndex\r
+\r
+    endIndex = numTriangles\r
+\r
+    ' Sort by descending depth (z)\r
+    FOR loopIndex = 1 TO numTriangles\r
+        bigVal = -10000\r
+        bigIndex = 1\r
+        FOR checkIdx = 1 TO endIndex\r
+            IF polyDepth(checkIdx) > bigVal THEN\r
+                bigVal = polyDepth(checkIdx)\r
+                bigIndex = checkIdx\r
+            END IF\r
+        NEXT checkIdx\r
+\r
+        vertexA = polyVertex1(bigIndex)\r
+        vertexB = polyVertex2(bigIndex)\r
+        vertexC = polyVertex3(bigIndex)\r
+        polyDepth(bigIndex) = polyDepth(endIndex)\r
+        polyVertex1(bigIndex) = polyVertex1(endIndex)\r
+        polyVertex2(bigIndex) = polyVertex2(endIndex)\r
+        polyVertex3(bigIndex) = polyVertex3(endIndex)\r
+        endIndex = endIndex - 1\r
+\r
+        ComputeShadeValue rotatedX(vertexA), rotatedY(vertexA), rotatedZ(vertexA), rotatedX(vertexB), rotatedY(vertexB), rotatedZ(vertexB), rotatedX(vertexC), rotatedY(vertexC), rotatedZ(vertexC), shadeVal\r
+\r
+        FillPolygon INT(rotatedX(vertexA)), INT(rotatedY(vertexA)), INT(rotatedX(vertexB)), INT(rotatedY(vertexB)), INT(rotatedX(vertexC)), INT(rotatedY(vertexC)), INT(shadeVal)\r
+    NEXT loopIndex\r
+\r
+' Delay before proceeding to next scene\r
+    FOR loopIndex = 1 TO 20\r
+        SOUND 0, 1\r
+    NEXT loopIndex\r
+\r
+END SUB\r
+\r
+SUB DisplayScene3\r
+    '\r
+    ' Demonstrates simple raster/wave effects by copying screen slices,\r
+    ' does some random shifting, then shows text with circles around the bits.\r
+    '\r
+\r
+    DIM bufferArray(1 TO 10000)\r
+    DIM waveArray(0 TO 35)\r
+\r
+\r
+    ' Build a wave-like boundary in waveArray()\r
+    FOR loopIndex = 0 TO 30\r
+        IF loopIndex <= 5 THEN waveArray(loopIndex) = 120 + (SQR((20 - loopIndex) * loopIndex))\r
+        IF (loopIndex > 5) AND (loopIndex < 25) THEN waveArray(loopIndex) = 120 + 10\r
+        IF loopIndex >= 25 THEN waveArray(loopIndex) = 120 + (SQR((30 - loopIndex) * (loopIndex - 10)))\r
+    NEXT loopIndex\r
+\r
+    ' Slide the screen upward in small blocks\r
+    FOR screenY = 0 TO 30\r
+        FOR screenX = 10 TO 300 STEP 10\r
+            GET (screenX, 0)-(screenX + 9, 198), bufferArray(1)\r
+            PUT (screenX, 1), bufferArray(1), PSET\r
+        NEXT screenX\r
+\r
+        ' Slight color shift\r
+        FOR colorIx = 1 TO 49\r
+            SetPalette colorIx * 1.1 + (20 - screenY), colorIx * 1.1 + 10 + (screenY / 1.5), colorIx * 1.1, colorIx\r
+        NEXT colorIx\r
+\r
+        SOUND 0, 1\r
+        LINE (160 - waveArray(screenY), 20)-(160 + waveArray(screenY), 20), 255\r
+    NEXT screenY\r
+\r
+    LOCATE 1, 1\r
+    COLOR 254\r
+    SetPalette 0, 0, 0, 254\r
+    PRINT "Test 123456789"\r
+    SetPalette 63, 0, 0, 253\r
+\r
+    ' Draw circles around the nonzero pixels of the printed text\r
+    FOR rowY = 0 TO 8\r
+        FOR rowX = 0 TO 120\r
+            pixelVal = POINT(rowX, rowY)\r
+            IF pixelVal > 0 THEN CIRCLE (rowX * 2 + 50, rowY * 3 + 26), 2, 0\r
+        NEXT rowX\r
+\r
+        FOR rowX = 0 TO 120\r
+            pixelVal = POINT(rowX, rowY + 1)\r
+            IF pixelVal > 0 THEN CIRCLE (rowX * 2 + 50, (rowY + 1) * 3 + 26), 2, 253\r
+        NEXT rowX\r
+\r
+        SOUND 0, 2\r
+    NEXT rowY\r
+\r
+    RANDOMIZE 1\r
+\r
+    ' Perform random screen shifts\r
+    FOR loopIndex = 1 TO 10\r
+        randY = RND * 100 + 50\r
+        FOR screenX = 10 TO 300 STEP 10\r
+            GET (screenX, randY)-(screenX + 9, 198), bufferArray(1)\r
+            PUT (screenX, randY - 1), bufferArray(1), PSET\r
+        NEXT screenX\r
+    NEXT loopIndex\r
+\r
+    COLOR 253\r
+    SetPalette 0, 0, 0, 253\r
+    LOCATE 1\r
+    PRINT " Author:  Svjatoslav Agejenko 30.09.2001 "\r
+\r
+    GET (0, 0)-(319, 8), bufferArray(1)\r
+    LOCATE 1\r
+    PRINT "                                        "\r
+    PUT (0, 190), bufferArray(1), PSET\r
+\r
+    FOR loopIndex = 1 TO 32\r
+        SetPalette 0, loopIndex, loopIndex * 2, 253\r
+        SOUND 0, 1\r
+    NEXT loopIndex\r
+\r
+    WaitForInput\r
+END SUB\r
+\r
+SUB DisplayScene4\r
+    '\r
+    ' Builds a fractal backdrop, prints short text lines\r
+   \r
+    RANDOMIZE 1\r
+    MakeBackground\r
+    DrawRoundedBox 30, 50, 290, 150\r
+    SetPalette 32, 64, 32, 250\r
+    yOffset = 0\r
+    PrintText 30, 70 + yOffset, 1, 250, "Next will be animated helicopter."\r
+    yOffset = yOffset + 16\r
+    PrintText 30, 70 + yOffset, 1, 250, "Helicopter chooses and picks up"\r
+    yOffset = yOffset + 20\r
+    PrintText 30, 70 + yOffset, 1, 250, "random pyramids. Press any key"\r
+    yOffset = yOffset + 16\r
+    PrintText 30, 70 + yOffset, 1, 250, "to proceed to next slide."\r
+    WaitForInput\r
+END SUB\r
+\r
+SUB DisplayScene7\r
+    '\r
+    ' Simple transitional effect: draws horizontal lines across the screen\r
+    ' in steps, clearing or darkening each row to black.\r
+    '\r
+\r
+    SetPalette 0, 0, 0, 0\r
+    FOR outerIndex = 0 TO 19\r
+        FOR drawY = outerIndex TO 199 STEP 20\r
+            LINE (0, drawY)-(319, drawY), 0\r
+        NEXT drawY\r
+        SOUND 0, .5\r
+    NEXT outerIndex\r
+END SUB\r
+\r
+SUB DisplayScene8\r
+    '\r
+    ' A more complex 3D scene:\r
+    ' Terrain with various heights.\r
+    ' Helicopter hovers over terrain.\r
+    ' Helicopter randomly chooses small pyramids that are scattered around terrain,\r
+    ' flies to pyramids and picks them up one-by-one.\r
+    ' Press any key to transition to next slide.\r
+\r
+    FOR fadeIndex = 1 TO 50\r
+        SetPalette 0, 0, 0, fadeIndex\r
+    NEXT fadeIndex\r
+\r
+    DIM mainX(0 TO 800)\r
+    DIM mainY(0 TO 800)\r
+    DIM mainZ(0 TO 800)\r
+    DIM lineStart(0 TO 1000)\r
+    DIM lineEnd(0 TO 1000)\r
+    DIM lineColor(0 TO 1000)\r
+    DIM lineBufferXOne(1 TO 1000)\r
+    DIM lineBufferYOne(1 TO 1000)\r
+    DIM lineBufferXTwo(1 TO 1000)\r
+    DIM lineBufferYTwo(1 TO 1000)\r
+    DIM projectedX(0 TO 800)\r
+    DIM projectedY(0 TO 800)\r
+    DIM holdX(1 TO 50)\r
+    DIM holdY(1 TO 50)\r
+    DIM holdZ(1 TO 50)\r
+    DIM helicopterAngle\r
+    DIM helicopterRotorAngle\r
+    DIM holdNumber\r
+    DIM helicopterPointer\r
+    DIM holdAx, holdAy, holdAz\r
+    DIM moveX, moveZ, moveY\r
+    DIM destinationX, destinationZ\r
+    DIM destinationAngle\r
+    DIM totalPoints, totalLines\r
+    DIM angleOne, angleTwo\r
+    DIM timeCounter\r
+    DIM incVal\r
+    DIM miniCount\r
+    DIM minutesVal\r
+\r
+    minutesVal = 0\r
+    miniCount = 25\r
+    timeCounter = 0\r
+    incVal = 1\r
+    angleOne = 0\r
+    angleTwo = 0\r
+    totalPoints = 0\r
+    totalLines = 0\r
+\r
+    RANDOMIZE 100\r
+    blockSize = 64\r
+\r
+FractalSubLoop:\r
+    halfBlock = blockSize / 2\r
+    FOR rowY = 0 TO 100 STEP blockSize\r
+        FOR rowX = 0 TO 100 STEP blockSize\r
+            color1 = POINT(rowX, rowY)\r
+            color2 = POINT(rowX + blockSize, rowY)\r
+            color3 = POINT(rowX, rowY + blockSize)\r
+            color4 = POINT(rowX + blockSize, rowY + blockSize)\r
+            color5 = (color1 + color2 + color3 + color4) / 4 + RND * blockSize * 6 - halfBlock * 7\r
+            color6 = (color2 + color4) / 2 + RND * blockSize * 6 - halfBlock * 7\r
+            color7 = (color3 + color4) / 2 + RND * blockSize * 6 - halfBlock * 7\r
+\r
+            IF color5 > 50 THEN color5 = 50\r
+            IF color5 < 0 THEN color5 = 0\r
+            IF color6 > 50 THEN color6 = 50\r
+            IF color6 < 0 THEN color6 = 0\r
+            IF color7 > 50 THEN color7 = 50\r
+            IF color7 < 0 THEN color7 = 0\r
+\r
+            PSET (rowX + halfBlock, rowY + halfBlock), color5\r
+            PSET (rowX + blockSize, rowY + halfBlock), color6\r
+            PSET (rowX + halfBlock, rowY + blockSize), color7\r
+        NEXT rowX\r
+    NEXT rowY\r
+\r
+    blockSize = blockSize / 2\r
+    IF blockSize > 1 THEN GOTO FractalSubLoop\r
+\r
+    ' Build mesh points in mainX(), mainY(), mainZ()\r
+    FOR zLoop = 1 TO 400 STEP 20\r
+        FOR xLoop = 1 TO 400 STEP 20\r
+            totalPoints = totalPoints + 1\r
+            mainX(totalPoints) = xLoop\r
+            mainY(totalPoints) = POINT(zLoop / 20 + 10, xLoop / 20 + 10) * 2\r
+            mainZ(totalPoints) = zLoop\r
+\r
+            IF xLoop > 1 THEN\r
+                totalLines = totalLines + 1\r
+                lineStart(totalLines) = totalPoints\r
+                lineEnd(totalLines) = totalPoints - 1\r
+                lineColor(totalLines) = 1\r
+            END IF\r
+\r
+            IF zLoop > 1 THEN\r
+                totalLines = totalLines + 1\r
+                lineStart(totalLines) = totalPoints\r
+                lineEnd(totalLines) = totalPoints - 20\r
+                lineColor(totalLines) = 1\r
+            END IF\r
+        NEXT xLoop\r
+    NEXT zLoop\r
+\r
+    LINE (0, 0)-(319, 199), 0, BF\r
+    SetPalette 0, 0, 0, 0\r
+    SetPalette 0, 40, 10, 1\r
+    SetPalette 0, 32, 64, 2\r
+    SetPalette 50, 50, 0, 3\r
+    SetPalette 64, 20, 0, 4\r
+\r
+    moveX = 200\r
+    moveZ = 200\r
+    distanceScale = 1000\r
+    holdAx = 200\r
+    holdAy = 0\r
+    holdAz = 200\r
+    destinationX = 200\r
+    destinationZ = 200\r
+\r
+    ' Load helicopter model\r
+    OPEN "data2.dat" FOR INPUT AS #1\r
+    indexA = 0\r
+    indexB = 0\r
+    helicopterPointer = totalPoints + 1\r
+\r
+ReadLoop:\r
+    INPUT #1, fileX, fileY, fileZ\r
+    IF fileX = 999 THEN GOTO CheckLines\r
+    indexA = indexA + 1\r
+    holdX(indexA) = fileX\r
+    holdY(indexA) = -fileY\r
+    holdZ(indexA) = fileZ\r
+    GOTO ReadLoop\r
+\r
+CheckLines:\r
+    INPUT #1, readA, readB\r
+    IF readA = 999 THEN GOTO CloseData\r
+    totalLines = totalLines + 1\r
+    lineStart(totalLines) = readA + totalPoints + 1\r
+    lineEnd(totalLines) = readB + totalPoints + 1\r
+    lineColor(totalLines) = 2\r
+    GOTO CheckLines\r
+\r
+CloseData:\r
+    CLOSE #1\r
+    totalPoints = totalPoints + indexA\r
+    holdNumber = indexA\r
+\r
+    RANDOMIZE 10\r
+    colorVal = 3\r
+\r
+    FOR indexA = 1 TO 25\r
+        randPick = RND * 396 + 2\r
+        xBox = mainX(randPick)\r
+        zBox = mainZ(randPick)\r
+        yBox = mainY(randPick) - 4\r
+\r
+        mainX(totalPoints + 1) = xBox - 5\r
+        mainY(totalPoints + 1) = yBox\r
+        mainZ(totalPoints + 1) = zBox - 5\r
+        mainX(totalPoints + 2) = xBox + 5\r
+        mainY(totalPoints + 2) = yBox\r
+        mainZ(totalPoints + 2) = zBox - 5\r
+        mainX(totalPoints + 3) = xBox + 5\r
+        mainY(totalPoints + 3) = yBox\r
+        mainZ(totalPoints + 3) = zBox + 5\r
+        mainX(totalPoints + 4) = xBox - 5\r
+        mainY(totalPoints + 4) = yBox\r
+        mainZ(totalPoints + 4) = zBox + 5\r
+        mainX(totalPoints + 5) = xBox\r
+        mainY(totalPoints + 5) = yBox - 5\r
+        mainZ(totalPoints + 5) = zBox\r
+\r
+        lineStart(totalLines + 1) = totalPoints + 1\r
+        lineEnd(totalLines + 1) = totalPoints + 2\r
+        lineColor(totalLines + 1) = colorVal\r
+        lineStart(totalLines + 2) = totalPoints + 2\r
+        lineEnd(totalLines + 2) = totalPoints + 3\r
+        lineColor(totalLines + 2) = colorVal\r
+        lineStart(totalLines + 3) = totalPoints + 3\r
+        lineEnd(totalLines + 3) = totalPoints + 4\r
+        lineColor(totalLines + 3) = colorVal\r
+        lineStart(totalLines + 4) = totalPoints + 4\r
+        lineEnd(totalLines + 4) = totalPoints + 1\r
+        lineColor(totalLines + 4) = colorVal\r
+        lineStart(totalLines + 5) = totalPoints + 1\r
+        lineEnd(totalLines + 5) = totalPoints + 5\r
+        lineColor(totalLines + 5) = colorVal\r
+        lineStart(totalLines + 6) = totalPoints + 2\r
+        lineEnd(totalLines + 6) = totalPoints + 5\r
+        lineColor(totalLines + 6) = colorVal\r
+        lineStart(totalLines + 7) = totalPoints + 3\r
+        lineEnd(totalLines + 7) = totalPoints + 5\r
+        lineColor(totalLines + 7) = colorVal\r
+        lineStart(totalLines + 8) = totalPoints + 4\r
+        lineEnd(totalLines + 8) = totalPoints + 5\r
+        lineColor(totalLines + 8) = colorVal\r
+\r
+        totalPoints = totalPoints + 5\r
+        totalLines = totalLines + 8\r
+    NEXT indexA\r
+\r
+MainLoop:\r
+    SOUND 0, 1\r
+    IF INKEY$ <> "" THEN minutesVal = 1\r
+    IF minutesVal > 150 THEN GOTO FinalArea\r
+    IF minutesVal <> 0 THEN minutesVal = minutesVal + 7\r
+\r
+    moveX = holdAx\r
+    moveY = 50 - holdAy - minutesVal\r
+    moveZ = holdAz\r
+\r
+    SELECT CASE incVal\r
+        CASE 1\r
+            destinationX = mainX(totalPoints)\r
+            destinationZ = mainZ(totalPoints)\r
+            GetAngle destinationX, destinationZ, holdAx, holdAz, destinationAngle\r
+\r
+            IF destinationAngle - helicopterAngle > globalPi THEN destinationAngle = destinationAngle - (globalPi * 2)\r
+            IF helicopterAngle - destinationAngle > globalPi THEN destinationAngle = destinationAngle + (globalPi * 2)\r
+\r
+            incVal = 2\r
+\r
+            FOR indexA = totalLines - 7 TO totalLines\r
+                lineColor(indexA) = 4\r
+            NEXT indexA\r
+\r
+        CASE 2\r
+            angleDiff = destinationAngle - helicopterAngle\r
+            IF destinationAngle = helicopterAngle THEN incVal = 3\r
+            IF angleDiff > .05 THEN angleDiff = .05\r
+            IF angleDiff < -.05 THEN angleDiff = -.05\r
+            helicopterAngle = helicopterAngle + angleDiff\r
+\r
+        CASE 3\r
+            diffX = destinationX - holdAx\r
+            diffZ = destinationZ - holdAz\r
+            distVal = SQR(diffX * diffX + diffZ * diffZ)\r
+            IF distVal < 5 THEN incVal = 4\r
+            distVal = distVal / 2\r
+            holdAx = holdAx + diffX / distVal\r
+            holdAz = holdAz + diffZ / distVal\r
+\r
+        CASE 4\r
+            FOR indexA = totalPoints - 4 TO totalPoints\r
+                mainY(indexA) = mainY(indexA) - 1\r
+            NEXT indexA\r
+\r
+            IF mainY(totalPoints) < 3 - holdAy THEN\r
+                FOR indexA = totalLines - 7 TO totalLines\r
+                    LINE (lineBufferXOne(indexA), lineBufferYOne(indexA))-(lineBufferXTwo(indexA), lineBufferYTwo(indexA)), 0\r
+                NEXT indexA\r
+\r
+                totalPoints = totalPoints - 5\r
+                totalLines = totalLines - 8\r
+                miniCount = miniCount - 1\r
+                incVal = 6\r
+\r
+                IF miniCount <= 0 THEN incVal = 7\r
+            END IF\r
+\r
+        CASE 6\r
+            incVal = 5\r
+\r
+        CASE 5\r
+            incVal = 1\r
+    END SELECT\r
+\r
+\r
+    ' Place helicopter on the scene\r
+    localYVal = 60 - mainY(INT((holdAz + 10) / 20) * 20 + INT((holdAx + 10) / 20))\r
+\r
+    IF holdAy > localYVal + 5 THEN holdAy = holdAy - 1\r
+    IF holdAy < localYVal THEN holdAy = holdAy + 1\r
+    IF holdAy > localYVal + 25 THEN holdAy = holdAy - 1\r
+    IF holdAy < localYVal - 20 THEN holdAy = holdAy + 1\r
+\r
+    sinVal = SIN(helicopterAngle)\r
+    cosVal = COS(helicopterAngle)\r
+\r
+    FOR indexA = 0 TO holdNumber - 5\r
+        tempX = holdX(indexA + 1)\r
+        tempZ = holdZ(indexA + 1)\r
+        mainX(indexA + helicopterPointer) = tempX * sinVal + tempZ * cosVal + holdAx\r
+        mainY(indexA + helicopterPointer) = holdY(indexA + 1) - holdAy\r
+        mainZ(indexA + helicopterPointer) = tempZ * sinVal - tempX * cosVal + holdAz\r
+    NEXT indexA\r
+\r
+    ' Rotate helicopter rotor\r
+    helicopterRotorAngle = helicopterRotorAngle + .5\r
+    sinVal = SIN(helicopterRotorAngle)\r
+    cosVal = COS(helicopterRotorAngle)\r
+\r
+    FOR indexA = holdNumber - 4 TO holdNumber - 1\r
+        tempX = holdX(indexA + 1)\r
+        tempZ = holdZ(indexA + 1)\r
+        mainX(indexA + helicopterPointer) = tempX * sinVal + tempZ * cosVal + holdAx\r
+        mainY(indexA + helicopterPointer) = holdY(indexA + 1) - holdAy\r
+        mainZ(indexA + helicopterPointer) = tempZ * sinVal - tempX * cosVal + holdAz\r
+    NEXT indexA\r
+\r
+    timeCounter = timeCounter + 1\r
+    angleOne = angleOne + SIN(timeCounter / 100) / 20\r
+    angleTwo = SIN(timeCounter / 42) * .3 + 1.15\r
+    sin1 = SIN(angleOne)\r
+    cos1 = COS(angleOne)\r
+    sin2 = SIN(angleTwo)\r
+    cos2 = COS(angleTwo)\r
+\r
+    ' Project all points to 2D\r
+    FOR indexA = 0 TO totalPoints\r
+        shiftX = mainX(indexA) - moveX\r
+        shiftY = mainY(indexA) - moveY\r
+        shiftZ = mainZ(indexA) - moveZ\r
+        zIntermediate = shiftZ * sin1 + shiftX * cos1\r
+        xIntermediate = shiftX * sin1 - shiftZ * cos1\r
+        zProject = zIntermediate * sin2 + shiftY * cos2\r
+        yProject = shiftY * sin2 - zIntermediate * cos2\r
+        zProject = zProject + distanceScale\r
+\r
+        IF zProject < 1 THEN projectedX(indexA) = -1: GOTO Skip2D\r
+\r
+        xProject = xIntermediate / zProject * 74 * 2\r
+        yProject = yProject / zProject * 65 * 2\r
+        projectedX(indexA) = xProject + 160\r
+        projectedY(indexA) = yProject + 80\r
+\r
+Skip2D:\r
+    NEXT indexA\r
+\r
+    ' Erase old lines and draw new ones\r
+    FOR indexA = 1 TO totalLines\r
+        startIndex = lineStart(indexA)\r
+        endIndex = lineEnd(indexA)\r
+        x1Temp = projectedX(startIndex)\r
+        x2Temp = projectedX(endIndex)\r
+        LINE (lineBufferXOne(indexA), lineBufferYOne(indexA))-(lineBufferXTwo(indexA), lineBufferYTwo(indexA)), 0\r
+\r
+        IF (x1Temp = -1) OR (x2Temp = -1) THEN GOTO SkipDrawing\r
+\r
+        y1Temp = projectedY(startIndex)\r
+        y2Temp = projectedY(endIndex)\r
+        LINE (x1Temp, y1Temp)-(x2Temp, y2Temp), lineColor(indexA)\r
+        lineBufferXOne(indexA) = x1Temp\r
+        lineBufferYOne(indexA) = y1Temp\r
+        lineBufferXTwo(indexA) = x2Temp\r
+        lineBufferYTwo(indexA) = y2Temp\r
+\r
+SkipDrawing:\r
+    NEXT indexA\r
+\r
+    IF distanceScale > 200 THEN distanceScale = distanceScale - 10\r
+    IF timeCounter < 28000 THEN GOTO MainLoop\r
+\r
+FinalArea:\r
+END SUB\r
+\r
+SUB DrawRoundedBox (topLeftX, topLeftY, bottomRightX, bottomRightY)\r
+    '\r
+    ' Draws a soft-edged rectangular box by fading pixel colors around its edges.\r
+    ' This creates a gentle "rounded" or "blurred" border appearance.\r
+    '\r
+\r
+    FOR currentY = topLeftY TO bottomRightY\r
+        fadeSize = 10\r
+        ' Fade in the upper boundary region\r
+        IF currentY - topLeftY <= 10 THEN\r
+            fadeSize = (SQR((20 - (currentY - topLeftY)) * (currentY - topLeftY)))\r
+        END IF\r
+        ' Fade in the lower boundary region\r
+        IF bottomRightY - currentY <= 10 THEN\r
+            fadeSize = (SQR((20 - (bottomRightY - currentY)) * (bottomRightY - currentY)))\r
+        END IF\r
+        FOR currentX = topLeftX - fadeSize TO bottomRightX + fadeSize\r
+            colorVal = POINT(currentX, currentY)\r
+            IF colorVal <= 127 THEN\r
+                colorVal = colorVal + 127\r
+                IF colorVal > 245 THEN colorVal = 245\r
+                PSET (currentX, currentY), colorVal\r
+            END IF\r
+        NEXT currentX\r
+    NEXT currentY\r
+END SUB\r
+\r
+SUB FillPolygon (vertex1X, vertex1Y, vertex2X, vertex2Y, vertex3X, vertex3Y, fillColor)\r
+    '\r
+    ' Fills a triangular area using a scanline algorithm.\r
+    ' 1. Finds intersection points between edges and horizontal scanlines\r
+    ' 2. Draws horizontal lines between pairs of intersections\r
+    '\r
+\r
+    DIM scanIntersection(-100 TO 300)\r
+    startX = vertex1X\r
+    startY = vertex1Y\r
+    endX = vertex2X\r
+    endY = vertex2Y\r
+    GOSUB DrawEdges\r
+    startX = vertex1X\r
+    startY = vertex1Y\r
+    endX = vertex3X\r
+    endY = vertex3Y\r
+    GOSUB DrawEdges\r
+    startX = vertex3X\r
+    startY = vertex3Y\r
+    endX = vertex2X\r
+    endY = vertex2Y\r
+    GOSUB DrawEdges\r
+    GOTO FinishPolygon\r
+\r
+DrawEdges:\r
+    ' Swap points if needed to ensure we draw from top to bottom\r
+    IF endY < startY THEN\r
+        SWAP startY, endY\r
+        SWAP startX, endX\r
+    END IF\r
+    ' For each scanline between the two points\r
+    FOR scanY = startY TO endY - 1\r
+        ' Calculate x position along the edge\r
+        scanX = startX + (endX - startX) * ((scanY - startY) / (endY - startY))\r
+        ' Store first intersection point\r
+        IF scanIntersection(scanY) = 0 THEN\r
+            scanIntersection(scanY) = scanX\r
+        ELSE\r
+            ' Draw horizontal line between intersections\r
+            LINE (scanX, scanY)-(scanIntersection(scanY), scanY), fillColor\r
+        END IF\r
+    NEXT scanY\r
+    RETURN\r
+\r
+FinishPolygon:\r
+END SUB\r
+\r
+SUB GetAngle (firstPointX, firstPointY, secondPointX, secondPointY, angleBetween)\r
+    '\r
+    ' Calculates the angle between two 2D points in radians.\r
+    ' Used for rotation calculations in 3D rendering.\r
+    '\r
+\r
+    IF firstPointY = secondPointY THEN\r
+        IF secondPointX > firstPointX THEN\r
+            angleBetween = globalPi / 2\r
+        ELSE\r
+            angleBetween = globalPi * 1.5\r
+        END IF\r
+        GOTO SkipSpecialCases\r
+    END IF\r
+\r
+    IF secondPointY > firstPointY THEN\r
+        IF secondPointX = firstPointX THEN\r
+            angleBetween = globalPi\r
+            GOTO SkipSpecialCases\r
+        END IF\r
+        IF secondPointX > firstPointX THEN\r
+            angleBetween = (globalPi * 1) - ATN((secondPointX - firstPointX) / (secondPointY - firstPointY))\r
+        ELSE\r
+            angleBetween = globalPi + ATN((firstPointX - secondPointX) / (secondPointY - firstPointY))\r
+        END IF\r
+    ELSE\r
+        IF secondPointX = firstPointX THEN\r
+            angleBetween = 0\r
+            GOTO SkipSpecialCases\r
+        END IF\r
+        IF secondPointX > firstPointX THEN\r
+            angleBetween = ATN((secondPointX - firstPointX) / (firstPointY - secondPointY))\r
+        ELSE\r
+            angleBetween = globalPi * 2 - ATN((firstPointX - secondPointX) / (firstPointY - secondPointY))\r
+        END IF\r
+    END IF\r
+\r
+SkipSpecialCases:\r
+END SUB\r
+\r
+SUB InitializeFont\r
+    '\r
+    ' Captures the current text font into fontData() for later use in PrintText.\r
+    ' This is done by printing each ASCII character (32..150) and reading its bits.\r
+    '\r
+\r
+    SetPalette 0, 0, 0, 70\r
+    COLOR 70\r
+    FOR asciiCode = 32 TO 150\r
+        LOCATE 1, 1\r
+        PRINT CHR$(asciiCode);\r
+        FOR rowY = 0 TO 7\r
+            FOR rowX = 0 TO 7\r
+                fontData(rowX, rowY, asciiCode) = POINT(rowX, rowY)\r
+            NEXT rowX\r
+        NEXT rowY\r
+    NEXT asciiCode\r
+END SUB\r
+\r
+SUB InitializeProgram\r
+    '\r
+    ' Initializes the environment:\r
+    '  1) Switches to SCREEN 13\r
+    '  2) Sets globalPi and globalPiI\r
+    '  3) Calculates a shared factor (fac) for angles\r
+    '  4) Calls InitializeFont to capture system font data\r
+    '\r
+\r
+    SCREEN 13\r
+    globalPi = 3.141592\r
+    globalPiValue = globalPi\r
+    angleFactor = 360 / (globalPi * 2)\r
+    InitializeFont\r
+END SUB\r
+\r
+DEFINT A-Z\r
+SUB MakeBackground\r
+    '\r
+    ' Creates a fractal-like landscape in the background by iteratively sampling\r
+    ' and perturbing pixel values. The result is a random terrain effect.\r
+    '\r
+\r
+    CLS\r
+    SetPalette 0, 5, 5, 250\r
+    SetPalette 0, 5, 5, 251\r
+    SetPalette 0, 5, 5, 252\r
+    SetPalette 0, 5, 5, 253\r
+    SetPalette 0, 5, 5, 254\r
+    SetPalette 0, 5, 5, 255\r
+\r
+    ' Set custom RGB values for palette entries 0..127\r
+    FOR colorIndex = 0 TO 127\r
+        OUT &H3C8, colorIndex\r
+        OUT &H3C9, SIN(colorIndex / 22) * 30 + 30\r
+        OUT &H3C9, SIN(colorIndex / 18) * 5 + 5\r
+        OUT &H3C9, COS(colorIndex / 12) * 10 + 10\r
+    NEXT colorIndex\r
+\r
+    ' Palette entries 128..245\r
+    FOR colorIndex = 128 TO 245\r
+        OUT &H3C8, colorIndex\r
+        offsetIndex = colorIndex - 128\r
+        OUT &H3C9, SIN(offsetIndex / 22) * 4 + 10\r
+        OUT &H3C9, SIN(offsetIndex / 18) * 4 + 10\r
+        OUT &H3C9, COS(offsetIndex / 12) * 4 + 10\r
+    NEXT colorIndex\r
+\r
+    maxValue = 127\r
+    blockSize = 2 ^ 8\r
+\r
+FractalLoop:\r
+    blockSize = blockSize \ 2\r
+    numXSteps = (319 \ blockSize) - 1\r
+    numYSteps = (199 \ blockSize) - 1\r
+\r
+    ' Subdivide squares in the image to add random variations\r
+    FOR rowY = 0 TO numYSteps\r
+        FOR rowX = 0 TO numXSteps\r
+            topLeftX = rowX * blockSize\r
+            topLeftY = rowY * blockSize\r
+            topLeftColor = POINT(topLeftX, topLeftY)\r
+            topRightColor = POINT(topLeftX + blockSize, topLeftY)\r
+            bottomLeftColor = POINT(topLeftX, topLeftY + blockSize)\r
+            bottomRightColor = POINT(topLeftX + blockSize, topLeftY + blockSize)\r
+\r
+            midTopColor = ((topLeftColor + topRightColor) / 2) + (RND * 6) - 3\r
+            IF midTopColor > maxValue THEN midTopColor = maxValue\r
+\r
+            midLeftColor = ((topLeftColor + bottomLeftColor) / 2) + (RND * 6) - 3\r
+            IF midLeftColor > maxValue THEN midLeftColor = maxValue\r
+\r
+            midRightColor = ((topRightColor + bottomRightColor) / 2) + (RND * 6) - 3\r
+            IF midRightColor > maxValue THEN midRightColor = maxValue\r
+\r
+            midBottomColor = ((bottomLeftColor + bottomRightColor) / 2) + (RND * 6) - 3\r
+            IF midBottomColor > maxValue THEN midBottomColor = maxValue\r
+\r
+            centerColor = ((midTopColor + midLeftColor + midRightColor + midBottomColor) / 4) + (RND * 6) - 3\r
+            IF centerColor > maxValue THEN centerColor = maxValue\r
+\r
+            PSET (topLeftX + blockSize / 2, topLeftY + blockSize / 2), centerColor\r
+            PSET (topLeftX + blockSize / 2, topLeftY), midTopColor\r
+            PSET (topLeftX, topLeftY + blockSize / 2), midLeftColor\r
+            PSET (topLeftX + blockSize, topLeftY + blockSize / 2), midRightColor\r
+            PSET (topLeftX + blockSize / 2, topLeftY + blockSize), midBottomColor\r
+        NEXT rowX\r
+    NEXT rowY\r
+\r
+    IF blockSize > 2 THEN GOTO FractalLoop\r
+END SUB\r
+\r
+DEFSNG A-Z\r
+SUB PrintText (posX, posY, scale, colorValue, textString$)\r
+    '\r
+    ' Renders text at (posX, posY) using the captured fontData().\r
+    ' Currently supports scale=1 for normal size. If scale=1, each character\r
+    ' is drawn 1:1 from the font data.\r
+    '\r
+\r
+    IF scale = 1 THEN\r
+        currentX = posX\r
+        FOR charIndex = 1 TO LEN(textString$)\r
+            asciiVal = ASC(RIGHT$(LEFT$(textString$, charIndex), 1))\r
+            IF asciiVal > 150 OR asciiVal < 32 THEN GOTO SkipCharacter\r
+            FOR rowY = 0 TO 7\r
+                FOR rowX = 0 TO 7\r
+                    pixelVal = fontData(rowX, rowY, asciiVal)\r
+                    IF pixelVal > 0 THEN PSET (rowX + currentX, rowY + posY), colorValue\r
+                NEXT rowX\r
+            NEXT rowY\r
+SkipCharacter:\r
+            currentX = currentX + 8\r
+        NEXT charIndex\r
+    END IF\r
+END SUB\r
+\r
+SUB RotatePoint (rotationCenterX, rotationCenterY, pointX, pointY, rotationAngle)\r
+    '\r
+    ' Rotates a 2D point around a center using standard rotation formulas.\r
+    ' X' = (X - CX)*cos - (Y - CY)*sin + CX\r
+    ' Y' = (X - CX)*sin + (Y - CY)*cos + CY\r
+    '\r
+\r
+    deltaX = pointX - rotationCenterX\r
+    deltaY = pointY - rotationCenterY\r
+    sinAngle = SIN(rotationAngle)\r
+    cosAngle = COS(rotationAngle)\r
+    pointX = deltaX * cosAngle - deltaY * sinAngle + rotationCenterX\r
+    pointY = deltaX * sinAngle + deltaY * cosAngle + rotationCenterY\r
+END SUB\r
+\r
+SUB SetPalette (red, green, blue, colorIndex)\r
+    '\r
+    ' Sets palette entry 'colorIndex' to (red,green,blue).\r
+    ' Each component 0..63.\r
+    '\r
+\r
+    IF red < 0 THEN red = 0\r
+    IF green < 0 THEN green = 0\r
+    IF blue < 0 THEN blue = 0\r
+    IF red > 63 THEN red = 63\r
+    IF green > 63 THEN green = 63\r
+    IF blue > 63 THEN blue = 63\r
+\r
+    OUT &H3C8, colorIndex\r
+    OUT &H3C9, red\r
+    OUT &H3C9, green\r
+    OUT &H3C9, blue\r
+END SUB\r
+\r
+SUB WaitForInput\r
+    '\r
+    ' Waits for exactly one keystroke and stores it into inputKey$.\r
+    '\r
+\r
+    inputKey$ = INPUT$(1)\r
+END SUB\r
+\r
diff --git a/3D GFX/Helicopter/data.dat b/3D GFX/Helicopter/data.dat
new file mode 100755 (executable)
index 0000000..b97fdd7
--- /dev/null
@@ -0,0 +1,1129 @@
+410 718\r
+89 6 10\r
+88 2 7\r
+87 6 8\r
+83 6 6\r
+99 -6 17\r
+99 -10 13\r
+96 -10 12\r
+95 -6 16\r
+93 -9 10\r
+92 -5 15\r
+90 -4 8\r
+91 -6 6\r
+88 -2 2\r
+90 2 12\r
+87 5 14\r
+88 2 16\r
+91 -3 18\r
+94 -4 19\r
+99 -5 20\r
+83 -1 23\r
+79 4 17\r
+76 1 22\r
+71 6 16\r
+70 6 19\r
+66 12 14\r
+64 12 16\r
+63 16 11\r
+62 17 13\r
+60 23 10\r
+64 17 7\r
+63 15 2\r
+59 22 4\r
+70 10 5\r
+83 1 -0\r
+75 4 -0\r
+75 7 5\r
+69 7 0\r
+57 22 -8\r
+60 14 -8\r
+68 4 -8\r
+74 0 -9\r
+86 -3 -9\r
+90 -8 -2\r
+93 -14 4\r
+92 -11 1\r
+92 -14 -1\r
+88 -14 -6\r
+90 -18 -5\r
+88 -12 -9\r
+91 -10 -14\r
+89 -8 -16\r
+85 -8 -19\r
+77 -1 -20\r
+71 4 -30\r
+69 4 -17\r
+90 -12 -19\r
+94 -15 -15\r
+92 -13 -12\r
+96 -16 6\r
+99 -17 6\r
+99 -25 0\r
+96 -21 1\r
+93 -17 2\r
+93 -21 -0\r
+93 -23 -4\r
+96 -25 -1\r
+90 -14 -10\r
+90 -16 -9\r
+91 -18 -8\r
+92 -19 -9\r
+94 -19 -10\r
+95 -24 -6\r
+96 -17 -13\r
+95 -17 -12\r
+96 -15 -15\r
+94 -15 -13\r
+99 -27 -3\r
+96 -26 -3\r
+99 -25 -8\r
+98 -16 -15\r
+98 -14 -19\r
+96 -14 -19\r
+94 -14 -18\r
+98 -16 -23\r
+96 -16 -23\r
+93 -15 -23\r
+89 -13 -24\r
+84 -9 -25\r
+78 -3 -27\r
+77 -2 -30\r
+80 -4 -33\r
+81 -3 -30\r
+84 -9 -32\r
+98 -12 -39\r
+96 -16 -33\r
+98 -16 -33\r
+93 -11 -38\r
+93 -15 -33\r
+88 -12 -33\r
+88 -10 -37\r
+84 -9 -36\r
+80 -3 -41\r
+86 -7 -41\r
+89 -9 -41\r
+93 -11 -40\r
+98 -13 -46\r
+92 -12 -46\r
+89 -10 -46\r
+86 -8 -46\r
+81 -3 -46\r
+74 3 -46\r
+74 3 -40\r
+61 14 -16\r
+57 23 -15\r
+57 23 -24\r
+62 14 -27\r
+60 23 -34\r
+66 15 -38\r
+62 22 -38\r
+67 16 -45\r
+64 22 -45\r
+69 17 -51\r
+73 17 -56\r
+71 21 -56\r
+79 20 -62\r
+78 5 -57\r
+83 5 -61\r
+67 21 -52\r
+69 10 -39\r
+75 4 -52\r
+80 -3 -52\r
+98 -13 -54\r
+93 -13 -54\r
+93 -9 -59\r
+98 -10 -59\r
+98 -2 -63\r
+93 -2 -62\r
+88 -3 -61\r
+89 -9 -57\r
+89 -11 -53\r
+86 -9 -53\r
+83 -3 -57\r
+98 5 -64\r
+93 6 -63\r
+98 20 -67\r
+92 18 -66\r
+86 20 -65\r
+88 6 -62\r
+61 18 14\r
+62 12 18\r
+60 22 20\r
+63 16 23\r
+68 5 22\r
+69 8 27\r
+61 22 27\r
+63 19 28\r
+63 21 32\r
+70 12 35\r
+70 10 31\r
+76 1 25\r
+76 2 29\r
+76 4 32\r
+77 7 37\r
+76 9 42\r
+70 14 40\r
+65 20 38\r
+71 19 46\r
+77 12 48\r
+82 5 43\r
+75 18 51\r
+79 18 55\r
+82 20 59\r
+85 19 60\r
+84 14 57\r
+83 25 62\r
+87 25 62\r
+91 24 64\r
+90 18 62\r
+95 24 64\r
+94 17 63\r
+99 24 64\r
+99 17 63\r
+99 11 59\r
+93 11 59\r
+89 12 59\r
+82 8 50\r
+83 3 38\r
+82 0 34\r
+83 -0 31\r
+82 -1 27\r
+89 -3 23\r
+89 -3 28\r
+93 -3 24\r
+99 -4 25\r
+93 -3 28\r
+99 -4 28\r
+89 -2 32\r
+93 -2 32\r
+99 -2 32\r
+93 -0 35\r
+99 -0 35\r
+93 0 38\r
+99 0 39\r
+92 2 44\r
+99 2 44\r
+93 7 55\r
+99 5 52\r
+93 4 51\r
+88 6 51\r
+89 3 43\r
+89 1 38\r
+89 -0 34\r
+66 11 11\r
+68 10 8\r
+72 6 12\r
+74 6 8\r
+80 4 13\r
+81 5 9\r
+84 5 10\r
+110 6 8\r
+109 2 7\r
+109 6 10\r
+114 6 6\r
+103 -6 16\r
+102 -10 12\r
+105 -5 15\r
+105 -9 10\r
+107 -4 8\r
+107 -6 6\r
+109 -2 2\r
+107 2 12\r
+110 5 13\r
+110 2 16\r
+106 -3 18\r
+103 -4 19\r
+114 -1 23\r
+118 5 16\r
+121 1 21\r
+128 6 18\r
+126 7 16\r
+134 12 15\r
+132 12 13\r
+135 17 12\r
+134 16 11\r
+138 23 9\r
+133 17 7\r
+138 22 4\r
+134 15 2\r
+127 10 5\r
+114 1 -0\r
+122 4 -0\r
+122 7 5\r
+128 8 0\r
+140 23 -9\r
+137 14 -9\r
+129 4 -9\r
+123 0 -9\r
+111 -3 -9\r
+107 -8 -2\r
+106 -11 1\r
+104 -14 4\r
+106 -14 -1\r
+109 -14 -6\r
+107 -18 -5\r
+109 -12 -9\r
+106 -10 -14\r
+108 -8 -16\r
+112 -8 -19\r
+120 -0 -21\r
+128 4 -18\r
+125 4 -30\r
+107 -12 -19\r
+103 -15 -15\r
+105 -13 -12\r
+102 -16 6\r
+101 -21 1\r
+104 -17 2\r
+104 -21 -0\r
+104 -23 -4\r
+101 -25 -1\r
+107 -14 -10\r
+107 -16 -9\r
+106 -18 -8\r
+105 -19 -9\r
+102 -24 -6\r
+104 -19 -10\r
+102 -17 -12\r
+101 -17 -13\r
+101 -15 -15\r
+103 -15 -13\r
+102 -26 -3\r
+101 -14 -19\r
+103 -14 -18\r
+101 -16 -23\r
+104 -15 -23\r
+108 -13 -24\r
+113 -9 -25\r
+118 -3 -28\r
+120 -1 -30\r
+117 -4 -34\r
+116 -2 -30\r
+113 -9 -32\r
+101 -16 -33\r
+104 -11 -38\r
+104 -15 -33\r
+109 -12 -33\r
+109 -10 -37\r
+112 -8 -36\r
+116 -3 -41\r
+110 -7 -41\r
+108 -9 -41\r
+103 -11 -40\r
+104 -12 -46\r
+108 -10 -46\r
+111 -8 -46\r
+116 -3 -47\r
+122 4 -46\r
+123 4 -40\r
+136 14 -17\r
+140 23 -16\r
+139 23 -25\r
+134 14 -27\r
+136 23 -34\r
+135 23 -38\r
+131 16 -38\r
+132 22 -46\r
+129 16 -45\r
+125 21 -56\r
+123 18 -56\r
+127 17 -51\r
+117 21 -62\r
+119 5 -57\r
+113 6 -61\r
+129 21 -52\r
+127 10 -39\r
+121 4 -52\r
+116 -3 -52\r
+103 -13 -54\r
+103 -9 -59\r
+103 -2 -62\r
+109 -3 -61\r
+108 -9 -57\r
+108 -11 -54\r
+111 -9 -53\r
+113 -3 -57\r
+104 6 -63\r
+104 18 -66\r
+109 6 -63\r
+110 20 -65\r
+135 13 18\r
+136 18 14\r
+138 22 19\r
+135 16 22\r
+128 8 26\r
+129 6 22\r
+134 19 27\r
+136 22 26\r
+135 22 32\r
+127 11 30\r
+128 13 35\r
+122 1 25\r
+122 2 29\r
+121 4 32\r
+121 7 37\r
+128 14 39\r
+121 9 41\r
+132 20 38\r
+127 19 46\r
+121 12 48\r
+115 5 43\r
+123 18 51\r
+119 18 55\r
+114 14 56\r
+113 20 60\r
+116 20 59\r
+111 25 62\r
+115 25 61\r
+108 18 62\r
+107 24 64\r
+104 17 63\r
+103 24 64\r
+105 11 59\r
+109 12 58\r
+115 9 50\r
+115 3 38\r
+115 1 34\r
+115 -0 31\r
+115 -1 27\r
+109 -3 23\r
+109 -3 28\r
+104 -3 24\r
+105 -3 28\r
+109 -2 32\r
+105 -2 31\r
+105 -0 34\r
+105 0 38\r
+105 2 43\r
+105 7 55\r
+105 4 51\r
+110 6 50\r
+109 3 43\r
+109 1 38\r
+109 -0 34\r
+129 10 7\r
+131 11 11\r
+125 6 12\r
+123 6 7\r
+117 5 12\r
+117 5 9\r
+113 5 10\r
+2 0 1\r
+3 2 1\r
+6 4 5\r
+4 6 7\r
+8 7 6\r
+7 8 9\r
+8 10 9\r
+11 10 8\r
+12 10 11\r
+1 10 12\r
+13 10 1\r
+9 10 13\r
+0 13 1\r
+14 13 0\r
+15 13 14\r
+9 15 16\r
+15 9 13\r
+17 9 16\r
+9 17 7\r
+18 7 17\r
+7 18 4\r
+19 15 14\r
+20 19 14\r
+19 20 21\r
+22 21 20\r
+21 22 23\r
+24 23 22\r
+23 24 25\r
+26 25 24\r
+25 26 27\r
+28 27 26\r
+28 26 29\r
+31 29 30\r
+32 30 29\r
+33 3 1\r
+12 33 1\r
+34 3 33\r
+3 34 35\r
+36 35 34\r
+35 36 32\r
+30 32 36\r
+31 30 37\r
+37 30 38\r
+38 30 36\r
+39 38 36\r
+34 39 36\r
+40 34 33\r
+40 33 41\r
+34 40 39\r
+41 33 12\r
+42 41 12\r
+44 8 43\r
+8 44 11\r
+42 11 44\r
+11 42 12\r
+42 44 45\r
+46 42 45\r
+47 46 45\r
+42 46 41\r
+48 41 46\r
+41 48 49\r
+50 41 49\r
+41 50 51\r
+52 41 51\r
+54 52 53\r
+52 54 40\r
+41 52 40\r
+50 49 55\r
+51 50 55\r
+56 55 49\r
+57 56 49\r
+8 58 43\r
+58 8 6\r
+58 5 59\r
+5 58 6\r
+61 59 60\r
+59 61 58\r
+62 58 61\r
+58 62 43\r
+44 43 62\r
+45 44 62\r
+63 45 62\r
+47 63 64\r
+63 47 45\r
+61 63 62\r
+63 61 65\r
+48 57 49\r
+57 48 66\r
+67 66 48\r
+46 67 48\r
+47 68 67\r
+46 47 67\r
+69 47 64\r
+47 69 68\r
+64 70 69\r
+70 64 71\r
+73 71 72\r
+71 73 70\r
+74 73 72\r
+75 74 56\r
+75 56 57\r
+74 75 73\r
+76 61 60\r
+61 76 65\r
+64 65 77\r
+65 64 63\r
+77 65 76\r
+78 77 76\r
+77 78 71\r
+77 71 64\r
+79 71 78\r
+71 79 72\r
+74 72 79\r
+80 74 79\r
+74 80 81\r
+56 81 82\r
+81 56 74\r
+55 56 82\r
+84 80 83\r
+80 84 81\r
+85 81 84\r
+81 85 82\r
+55 82 85\r
+86 55 85\r
+55 86 87\r
+51 55 87\r
+88 51 87\r
+51 88 52\r
+52 88 89\r
+53 52 89\r
+90 53 89\r
+89 91 90\r
+88 91 89\r
+90 91 92\r
+95 93 94\r
+96 94 93\r
+94 96 97\r
+98 97 96\r
+99 98 96\r
+98 99 100\r
+92 98 100\r
+90 92 100\r
+101 90 100\r
+102 101 100\r
+99 102 100\r
+102 99 103\r
+96 103 99\r
+103 96 104\r
+93 104 96\r
+106 93 105\r
+93 106 104\r
+107 104 106\r
+104 107 103\r
+108 103 107\r
+103 108 102\r
+101 102 109\r
+109 102 108\r
+101 109 110\r
+111 101 110\r
+101 111 53\r
+90 101 53\r
+39 40 54\r
+112 39 54\r
+39 112 38\r
+113 38 112\r
+38 113 37\r
+114 113 112\r
+115 114 112\r
+114 115 116\r
+118 115 117\r
+115 118 116\r
+120 117 119\r
+117 120 118\r
+123 121 122\r
+124 123 122\r
+125 124 122\r
+124 125 126\r
+127 119 121\r
+119 127 120\r
+128 119 117\r
+115 128 117\r
+128 115 53\r
+111 128 53\r
+128 111 110\r
+119 128 110\r
+121 119 110\r
+129 121 110\r
+109 129 110\r
+129 109 130\r
+115 54 53\r
+54 115 112\r
+127 121 123\r
+132 105 131\r
+105 132 106\r
+132 131 133\r
+133 131 134\r
+135 133 134\r
+133 135 136\r
+137 133 136\r
+138 133 137\r
+133 138 132\r
+139 132 138\r
+140 139 138\r
+141 140 138\r
+140 141 130\r
+109 140 130\r
+140 109 108\r
+139 140 108\r
+107 139 108\r
+142 136 135\r
+136 142 143\r
+144 143 142\r
+143 144 145\r
+147 145 146\r
+145 147 143\r
+124 147 146\r
+147 124 126\r
+121 125 122\r
+125 121 129\r
+141 129 130\r
+129 141 125\r
+126 137 147\r
+141 126 125\r
+126 141 137\r
+138 137 141\r
+147 136 143\r
+136 147 137\r
+132 107 106\r
+107 132 139\r
+28 29 31\r
+148 25 27\r
+25 148 149\r
+28 148 27\r
+148 28 150\r
+151 148 150\r
+148 151 149\r
+153 152 149\r
+151 153 149\r
+154 151 150\r
+151 154 155\r
+156 155 154\r
+158 156 157\r
+156 158 155\r
+151 155 158\r
+153 151 158\r
+149 152 25\r
+25 152 23\r
+152 21 23\r
+21 152 159\r
+153 159 152\r
+159 153 160\r
+158 160 153\r
+160 158 161\r
+162 161 158\r
+157 162 158\r
+157 163 162\r
+163 157 164\r
+156 164 157\r
+164 156 165\r
+164 165 166\r
+167 164 166\r
+164 167 163\r
+168 163 167\r
+166 169 167\r
+170 167 169\r
+172 170 171\r
+170 172 173\r
+174 172 171\r
+172 174 175\r
+172 176 177\r
+176 172 175\r
+179 176 178\r
+176 179 177\r
+181 178 180\r
+178 181 179\r
+183 181 182\r
+181 183 179\r
+184 179 183\r
+179 184 177\r
+173 177 184\r
+177 173 172\r
+167 173 185\r
+173 167 170\r
+167 185 168\r
+163 168 162\r
+186 162 168\r
+161 186 187\r
+188 161 187\r
+161 188 160\r
+189 160 188\r
+160 189 159\r
+159 189 19\r
+21 159 19\r
+190 19 189\r
+191 190 189\r
+19 190 16\r
+15 19 16\r
+192 16 190\r
+16 192 17\r
+193 17 192\r
+17 193 18\r
+194 193 192\r
+193 194 195\r
+190 194 192\r
+194 190 191\r
+188 191 189\r
+191 188 196\r
+194 196 197\r
+196 194 191\r
+198 194 197\r
+194 198 195\r
+199 198 197\r
+198 199 200\r
+201 200 199\r
+200 201 202\r
+203 202 201\r
+202 203 204\r
+183 182 205\r
+205 182 206\r
+207 205 206\r
+205 207 208\r
+173 184 185\r
+185 184 208\r
+168 185 208\r
+209 168 208\r
+168 209 210\r
+186 168 210\r
+211 186 210\r
+186 211 187\r
+196 187 211\r
+187 196 188\r
+199 196 211\r
+196 199 197\r
+210 199 211\r
+199 210 201\r
+209 201 210\r
+201 209 203\r
+207 203 209\r
+208 207 209\r
+204 207 206\r
+207 204 203\r
+162 186 161\r
+183 205 184\r
+205 208 184\r
+0 2 14\r
+26 32 29\r
+213 26 212\r
+26 24 212\r
+212 22 214\r
+22 212 24\r
+214 213 212\r
+213 214 215\r
+22 216 214\r
+216 22 20\r
+214 217 215\r
+217 214 216\r
+218 217 216\r
+216 14 218\r
+14 216 20\r
+221 219 220\r
+219 222 220\r
+5 223 224\r
+223 5 4\r
+224 225 226\r
+225 224 223\r
+227 226 225\r
+227 228 226\r
+227 229 228\r
+227 220 229\r
+227 230 220\r
+227 225 230\r
+230 221 220\r
+230 231 221\r
+230 232 231\r
+233 230 225\r
+230 233 232\r
+233 223 234\r
+223 233 225\r
+234 4 18\r
+4 234 223\r
+232 235 231\r
+235 236 231\r
+236 235 237\r
+236 238 239\r
+238 236 237\r
+239 240 241\r
+240 239 238\r
+241 242 243\r
+242 241 240\r
+242 244 243\r
+243 244 245\r
+245 246 247\r
+247 248 245\r
+222 249 220\r
+249 229 220\r
+222 250 249\r
+250 222 251\r
+251 252 250\r
+252 251 248\r
+248 247 252\r
+247 246 253\r
+247 253 254\r
+247 254 252\r
+254 255 252\r
+255 250 252\r
+250 256 249\r
+249 256 257\r
+256 250 255\r
+249 257 229\r
+257 258 229\r
+260 228 259\r
+228 260 226\r
+259 229 258\r
+229 259 228\r
+259 258 261\r
+258 262 261\r
+262 263 261\r
+262 258 257\r
+257 264 262\r
+264 257 265\r
+257 266 265\r
+266 257 267\r
+257 268 267\r
+268 269 270\r
+269 268 256\r
+268 257 256\r
+265 266 271\r
+266 267 271\r
+271 272 265\r
+272 273 265\r
+260 224 226\r
+224 260 274\r
+59 224 274\r
+224 59 5\r
+60 274 275\r
+274 60 59\r
+275 260 276\r
+260 275 274\r
+260 259 276\r
+259 261 276\r
+261 277 276\r
+278 261 263\r
+261 278 277\r
+276 279 275\r
+279 276 277\r
+265 280 264\r
+280 265 273\r
+280 281 264\r
+281 262 264\r
+282 263 281\r
+263 262 281\r
+278 282 283\r
+282 278 263\r
+283 284 278\r
+284 283 285\r
+287 285 286\r
+285 287 284\r
+286 288 287\r
+288 289 272\r
+272 289 273\r
+289 288 286\r
+60 279 76\r
+279 60 275\r
+290 277 278\r
+277 290 279\r
+279 290 76\r
+76 284 78\r
+284 76 290\r
+284 290 278\r
+284 79 78\r
+79 284 287\r
+287 288 79\r
+79 291 80\r
+291 79 288\r
+292 288 272\r
+288 292 291\r
+272 271 292\r
+83 291 293\r
+291 83 80\r
+293 292 294\r
+292 293 291\r
+292 271 294\r
+271 295 294\r
+295 271 296\r
+271 267 296\r
+267 297 296\r
+297 267 268\r
+297 268 298\r
+268 270 298\r
+270 299 298\r
+300 298 299\r
+300 297 298\r
+300 299 301\r
+93 95 302\r
+302 303 93\r
+303 302 304\r
+304 305 303\r
+305 306 303\r
+306 305 307\r
+305 301 307\r
+301 299 307\r
+299 308 307\r
+308 309 307\r
+307 310 306\r
+310 307 309\r
+306 311 303\r
+311 306 310\r
+311 93 303\r
+105 311 312\r
+311 105 93\r
+312 310 313\r
+310 312 311\r
+313 309 314\r
+309 313 310\r
+309 308 315\r
+309 315 314\r
+315 308 316\r
+308 317 316\r
+317 308 270\r
+308 299 270\r
+256 255 269\r
+255 318 269\r
+318 255 254\r
+254 319 318\r
+319 254 253\r
+319 320 318\r
+320 321 318\r
+321 320 322\r
+324 322 323\r
+322 324 321\r
+326 323 325\r
+323 326 324\r
+329 327 328\r
+327 330 328\r
+330 331 328\r
+331 330 332\r
+326 333 329\r
+333 326 325\r
+326 334 324\r
+334 321 324\r
+321 334 270\r
+334 317 270\r
+317 334 316\r
+334 326 316\r
+326 329 316\r
+329 335 316\r
+316 336 315\r
+336 316 335\r
+269 321 270\r
+321 269 318\r
+329 333 327\r
+131 312 337\r
+312 131 105\r
+131 337 338\r
+131 338 134\r
+134 339 135\r
+339 134 338\r
+338 340 339\r
+338 341 340\r
+341 338 337\r
+337 342 341\r
+342 343 341\r
+343 344 341\r
+344 343 336\r
+343 315 336\r
+315 343 314\r
+343 342 314\r
+342 313 314\r
+135 345 142\r
+345 135 339\r
+142 346 144\r
+346 142 345\r
+348 345 347\r
+345 348 346\r
+348 332 330\r
+332 348 347\r
+328 335 329\r
+335 328 331\r
+336 331 344\r
+331 336 335\r
+340 332 347\r
+331 340 344\r
+340 331 332\r
+340 341 344\r
+345 340 347\r
+340 345 339\r
+312 342 337\r
+342 312 313\r
+245 244 246\r
+242 349 350\r
+349 242 240\r
+350 244 242\r
+244 350 351\r
+350 352 351\r
+352 350 349\r
+354 353 349\r
+353 352 349\r
+351 355 356\r
+355 351 352\r
+355 357 356\r
+359 355 358\r
+355 359 357\r
+355 352 358\r
+352 353 358\r
+354 349 240\r
+354 240 238\r
+238 360 354\r
+360 238 237\r
+354 361 353\r
+361 354 360\r
+353 362 358\r
+362 353 361\r
+362 363 358\r
+363 359 358\r
+363 364 359\r
+364 363 365\r
+359 366 357\r
+366 359 364\r
+366 364 367\r
+367 365 368\r
+365 367 364\r
+365 369 368\r
+370 367 368\r
+368 371 370\r
+374 372 373\r
+372 374 371\r
+374 375 376\r
+375 374 373\r
+377 375 373\r
+375 377 378\r
+380 377 379\r
+377 380 378\r
+180 379 181\r
+379 180 380\r
+182 379 381\r
+379 182 181\r
+381 377 382\r
+377 381 379\r
+382 373 372\r
+373 382 377\r
+383 371 368\r
+371 383 372\r
+383 368 369\r
+369 365 363\r
+363 384 369\r
+384 362 385\r
+385 361 386\r
+361 385 362\r
+386 360 387\r
+360 386 361\r
+387 360 235\r
+360 237 235\r
+235 388 387\r
+388 389 387\r
+388 235 233\r
+235 232 233\r
+233 390 388\r
+390 233 234\r
+234 193 390\r
+193 234 18\r
+390 195 391\r
+195 390 193\r
+390 389 388\r
+389 390 391\r
+387 392 386\r
+392 387 389\r
+393 389 391\r
+389 393 392\r
+393 195 198\r
+195 393 391\r
+393 200 394\r
+200 393 198\r
+394 202 395\r
+202 394 200\r
+395 204 396\r
+204 395 202\r
+182 381 397\r
+182 397 206\r
+397 398 206\r
+398 397 399\r
+382 372 383\r
+382 383 399\r
+383 369 399\r
+369 400 399\r
+400 369 401\r
+369 384 401\r
+401 385 402\r
+385 401 384\r
+402 386 392\r
+386 402 385\r
+402 393 394\r
+393 402 392\r
+394 401 402\r
+401 394 395\r
+401 396 400\r
+396 401 395\r
+396 398 400\r
+398 399 400\r
+206 396 204\r
+396 206 398\r
+384 363 362\r
+397 381 382\r
+399 397 382\r
+219 221 231\r
+248 243 245\r
+243 403 404\r
+241 243 404\r
+405 241 404\r
+241 405 239\r
+404 406 405\r
+406 404 403\r
+405 236 239\r
+236 405 407\r
+406 407 405\r
+407 406 408\r
+408 409 407\r
+231 407 409\r
+407 231 236\r
diff --git a/3D GFX/Helicopter/data2.dat b/3D GFX/Helicopter/data2.dat
new file mode 100755 (executable)
index 0000000..a6a3427
--- /dev/null
@@ -0,0 +1,50 @@
+0 -10 -5\r
+0 -10 5\r
+-20 -10 -5\r
+-20 -10 5\r
+-20 0 -5\r
+-20 0 5\r
+0 10 -5\r
+0 10 5\r
+30 10 0\r
+10 0 -5\r
+10 0 5\r
+30 0 0\r
+40 10 0\r
+40 20 0\r
+-30 15 -3\r
+-30 15 3\r
+30 15 -3\r
+30 15 3\r
+999 999 999\r
+0 1\r
+2 3\r
+0 2\r
+1 3\r
+4 5\r
+2 4\r
+3 5\r
+4 0\r
+5 1\r
+6 7\r
+4 6\r
+5 7\r
+6 0\r
+7 1\r
+6 8\r
+7 8\r
+9 10\r
+6 9\r
+7 10\r
+0 9\r
+1 10\r
+9 11\r
+10 11\r
+11 12\r
+12 13\r
+13 8\r
+14 15\r
+16 17\r
+14 17\r
+15 16\r
+999 999
\ No newline at end of file
diff --git a/3D GFX/Helicopter/demo, 1.png b/3D GFX/Helicopter/demo, 1.png
new file mode 100644 (file)
index 0000000..2710913
Binary files /dev/null and b/3D GFX/Helicopter/demo, 1.png differ
diff --git a/3D GFX/Helicopter/demo, 2.png b/3D GFX/Helicopter/demo, 2.png
new file mode 100644 (file)
index 0000000..a01153d
Binary files /dev/null and b/3D GFX/Helicopter/demo, 2.png differ
diff --git a/3D GFX/Helicopter/demo, 3.png b/3D GFX/Helicopter/demo, 3.png
new file mode 100644 (file)
index 0000000..f6989bc
Binary files /dev/null and b/3D GFX/Helicopter/demo, 3.png differ
diff --git a/3D GFX/Helicopter/demo, 4.png b/3D GFX/Helicopter/demo, 4.png
new file mode 100644 (file)
index 0000000..2aa35b3
Binary files /dev/null and b/3D GFX/Helicopter/demo, 4.png differ
diff --git a/3D GFX/Miscellaneous/!.bas b/3D GFX/Miscellaneous/!.bas
new file mode 100644 (file)
index 0000000..5709555
--- /dev/null
@@ -0,0 +1,289 @@
+' 3D Wireframe Exclamation Mark.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Usage:\r
+'   Up, Down, Left, Right, w, z - rotate exclamation mark\r
+'   <space> - slow down rotation\r
+'   q - quit program\r
+'\r
+' Changelog:\r
+'   ~2000 - Initial version\r
+\r
+DECLARE SUB LoadVertexAndLineData ()\r
+' Loads vertex and line data from DATA statements into arrays.\r
+' It reads coordinates and line indices, and determines the count of vertices and lines.\r
+\r
+DECLARE SUB NormalizeCoordinates ()\r
+' Normalizes coordinates to fit the screen by scaling them.\r
+' It finds the maximum absolute value among the coordinates and scales all coordinates accordingly.\r
+\r
+DECLARE SUB Render3DWireframe ()\r
+' Renders the 3D wireframe of an exclamation mark.\r
+' It updates rotation angles, rotates and projects vertices, and draws lines between them.\r
+' It also handles user input to control the rotation and exit the program.\r
+\r
+DECLARE SUB PrecomputeTrigonometricValues ()\r
+' Precomputes sine and cosine values for angles from 0 to 360 degrees.\r
+' This allows for faster computation during the rendering process.\r
+\r
+DEFINT A-Z\r
+\r
+' Arrays to store vertex coordinates and projected coordinates\r
+DIM SHARED vertexX(100), vertexY(100), vertexZ(100)\r
+DIM SHARED startX(100), startY(100), endX(100), endY(100)\r
+DIM SHARED x(100), y(100), z(100), lineStartIndex(100), lineEndIndex(100)\r
+\r
+' Arrays to store precomputed sine and cosine values\r
+DIM SHARED cosineValue&(360), sineValue&(360)\r
+\r
+' Variables to store the number of vertices and lines, and rotation angles\r
+DIM SHARED vertexCount, lineCount\r
+DIM SHARED angleX, angleY\r
+\r
+' Initialize rotation angles\r
+angleX = 0\r
+angleY = 0\r
+\r
+' Set screen mode and clear the screen\r
+SCREEN 12\r
+CLS\r
+\r
+' Precompute sine and cosine values for faster rendering\r
+PrecomputeTrigonometricValues\r
+\r
+' Load vertex and line data from DATA statements\r
+LoadVertexAndLineData\r
+\r
+' Normalize coordinates to fit the screen\r
+NormalizeCoordinates\r
+\r
+' Render the 3D wireframe\r
+Render3DWireframe\r
+\r
+' Vertex data\r
+DATA 5,-60,-10\r
+DATA 15,-50,-10\r
+DATA 15,0,-10\r
+DATA 5,10,-10\r
+DATA -5,10,-10\r
+DATA -15,0,-10\r
+DATA -15,-50,-10\r
+DATA -5,-60,-10\r
+DATA 5,-60,10\r
+DATA 15,-50,10\r
+DATA 15,0,10\r
+DATA 5,10,10\r
+DATA -5,10,10\r
+DATA -15,0,10\r
+DATA -15,-50,10\r
+DATA -5,-60,10\r
+DATA 5,20,10\r
+DATA 15,30,10\r
+DATA 15,40,10\r
+DATA 5,50,10\r
+DATA -5,50,10\r
+DATA -15,40,10\r
+DATA -15,30,10\r
+DATA -5,20,10\r
+DATA 5,20,-10\r
+DATA 15,30,-10\r
+DATA 15,40,-10\r
+DATA 5,50,-10\r
+DATA -5,50,-10\r
+DATA -15,40,-10\r
+DATA -15,30,-10\r
+DATA -5,20,-10\r
+DATA 999,999,999\r
+\r
+' Line data\r
+DATA 0,1\r
+DATA 1,2\r
+DATA 2,3\r
+DATA 3,4\r
+DATA 4,5\r
+DATA 5,6\r
+DATA 6,7\r
+DATA 7,0\r
+DATA 8,9\r
+DATA 9,10\r
+DATA 10,11\r
+DATA 11,12\r
+DATA 12,13\r
+DATA 13,14\r
+DATA 14,15\r
+DATA 15,8\r
+DATA 0,8\r
+DATA 1,9\r
+DATA 2,10\r
+DATA 3,11\r
+DATA 4,12\r
+DATA 5,13\r
+DATA 6,14\r
+DATA 7,15\r
+DATA 16,17\r
+DATA 17,18\r
+DATA 18,19\r
+DATA 19,20\r
+DATA 20,21\r
+DATA 21,22\r
+DATA 22,23\r
+DATA 23,16\r
+DATA 24,25\r
+DATA 25,26\r
+DATA 26,27\r
+DATA 27,28\r
+DATA 28,29\r
+DATA 29,30\r
+DATA 30,31\r
+DATA 31,24\r
+DATA 24,16\r
+DATA 25,17\r
+DATA 26,18\r
+DATA 27,19\r
+DATA 28,20\r
+DATA 29,21\r
+DATA 30,22\r
+DATA 31,23\r
+DATA 999,999\r
+\r
+SUB LoadVertexAndLineData\r
+    ' Load vertex coordinates from DATA statements into arrays x, y, and z.\r
+    ' The loop continues until a sentinel value (999) is encountered.\r
+    FOR i = 0 TO 10000\r
+        READ x(i), y(i), z(i)\r
+        IF x(i) = 999 THEN x(i) = 0: y(i) = 0: z(i) = 0: GOTO EndVertexData\r
+    NEXT i\r
+\r
+EndVertexData:\r
+    vertexCount = i\r
+\r
+    ' Load line data from DATA statements into arrays lineStartIndex and lineEndIndex.\r
+    ' The loop continues until a sentinel value (999) is encountered.\r
+    FOR i = 0 TO 10000\r
+        READ lineStartIndex(i), lineEndIndex(i)\r
+        IF lineStartIndex(i) = 999 THEN GOTO EndLineData\r
+    NEXT i\r
+\r
+EndLineData:\r
+    lineCount = i\r
+END SUB\r
+\r
+SUB NormalizeCoordinates\r
+    ' Normalize coordinates to fit the screen by scaling them.\r
+    ' First, find the maximum absolute value among the coordinates.\r
+    maxValue = 0\r
+    FOR i = 0 TO vertexCount\r
+        IF ABS(x(i)) > maxValue THEN maxValue = ABS(x(i))\r
+        IF ABS(y(i)) > maxValue THEN maxValue = ABS(y(i))\r
+        IF ABS(z(i)) > maxValue THEN maxValue = ABS(z(i))\r
+    NEXT i\r
+\r
+    ' Scale all coordinates by a factor of 100 / maxValue to fit the screen.\r
+    scaleFactor = 100 / maxValue\r
+    FOR i = 0 TO vertexCount\r
+        x(i) = x(i) * scaleFactor\r
+        y(i) = y(i) * scaleFactor\r
+        z(i) = z(i) * scaleFactor\r
+    NEXT i\r
+END SUB\r
+\r
+SUB PrecomputeTrigonometricValues\r
+    ' Precompute sine and cosine values for angles from 0 to 360 degrees.\r
+    ' This allows for faster computation during the rendering process.\r
+    FOR angle! = 0 TO 359 / 57.29577950999999# STEP 1 / 57.29577950999999#\r
+        cosineValue&(angle) = INT(.5 + COS(angle!) * 1024)\r
+        sineValue&(angle) = INT(.5 + SIN(angle!) * 1024)\r
+        angle = angle + 1\r
+    NEXT angle!\r
+END SUB\r
+\r
+SUB Render3DWireframe\r
+    DO\r
+        ' Update rotation angles based on user input\r
+        angleX = angleX + deltaX\r
+        angleY = angleY + deltaY\r
+        angleZ = angleZ + deltaZ\r
+        SOUND 0, 1\r
+\r
+        ' Ensure rotation angles stay within the range of 0 to 359 degrees\r
+        IF angleX <= 0 THEN angleX = angleX + 360\r
+        IF angleY <= 0 THEN angleY = angleY + 360\r
+        IF angleZ <= 0 THEN angleZ = angleZ + 360\r
+        IF angleX >= 360 THEN angleX = angleX - 360\r
+        IF angleY >= 360 THEN angleY = angleY - 360\r
+        IF angleZ >= 360 THEN angleZ = angleZ - 360\r
+\r
+        ' Get precomputed sine and cosine values for the rotation angles\r
+        cosX& = cosineValue&(angleX): sinX& = sineValue&(angleX)\r
+        cosY& = cosineValue&(angleY): sinY& = sineValue&(angleY)\r
+        cosZ& = cosineValue&(angleZ): sinZ& = sineValue&(angleZ)\r
+\r
+        ' Rotate and project vertices onto the 2D screen\r
+        FOR i = 0 TO vertexCount - 1\r
+            originalX = x(i): originalY = y(i): originalZ = z(i)\r
+            rotatedX = (originalX * cosX& - originalY * sinX&) \ 1024\r
+            rotatedY = (originalX * sinX& + originalY * cosX&) \ 1024\r
+            tempX& = (rotatedX * cosY& - originalZ * sinY&) \ 1024\r
+            tempZ = (rotatedX * sinY& + originalZ * cosY&) \ 1024\r
+            tempY& = (rotatedY * cosZ& - tempZ * sinZ&) \ 1024\r
+            finalZ = (rotatedY * sinZ& + tempZ * cosZ&) \ 1024\r
+\r
+            ' Adjust the Z-coordinate to add perspective\r
+            finalZ = finalZ + 300\r
+\r
+            ' Project the 3D coordinates onto the 2D screen\r
+            vertexX(i) = 320 + (tempX& / finalZ * 500)\r
+            vertexY(i) = 240 + (tempY& / finalZ * 500)\r
+        NEXT i\r
+\r
+        ' Draw lines between the projected vertices\r
+        FOR i = 0 TO lineCount - 1\r
+            startVertex = lineStartIndex(i)\r
+            endVertex = lineEndIndex(i)\r
+            startXCoord = vertexX(startVertex)\r
+            startYCoord = vertexY(startVertex)\r
+            endXCoord = vertexX(endVertex)\r
+            endYCoord = vertexY(endVertex)\r
+\r
+            ' Erase the previous line\r
+            LINE (startX(i), startY(i))-(endX(i), endY(i)), 0\r
+\r
+            ' Draw the new line\r
+            LINE (endXCoord, endYCoord)-(startXCoord, startYCoord), 15\r
+\r
+            ' Store the current coordinates for the next iteration\r
+            startX(i) = endXCoord: startY(i) = endYCoord\r
+            endX(i) = startXCoord: endY(i) = startYCoord\r
+        NEXT i\r
+\r
+        ' Handle user input to control the rotation\r
+        keyPressed$ = INKEY$\r
+        IF keyPressed$ <> "" THEN\r
+            SELECT CASE keyPressed$\r
+                CASE CHR$(0) + CHR$(72)  ' Up arrow\r
+                    deltaX = deltaX + 1\r
+                CASE CHR$(0) + CHR$(80)  ' Down arrow\r
+                    deltaX = deltaX - 1\r
+                CASE CHR$(0) + CHR$(75)  ' Left arrow\r
+                    deltaY = deltaY - 1\r
+                CASE CHR$(0) + CHR$(77)  ' Right arrow\r
+                    deltaY = deltaY + 1\r
+                CASE "w"\r
+                    deltaZ = deltaZ - 1\r
+                CASE "z"\r
+                    deltaZ = deltaZ + 1\r
+                CASE " "  ' Space bar\r
+                    deltaX = deltaX / 2\r
+                    deltaY = deltaY / 2\r
+                    deltaZ = deltaZ / 2\r
+                CASE CHR$(27)  ' Escape key\r
+                    SYSTEM\r
+            END SELECT\r
+        END IF\r
+    LOOP\r
+END SUB\r
+\r
diff --git a/3D GFX/Miscellaneous/!.webm b/3D GFX/Miscellaneous/!.webm
new file mode 100644 (file)
index 0000000..1786991
Binary files /dev/null and b/3D GFX/Miscellaneous/!.webm differ
diff --git a/3D GFX/Miscellaneous/3D ball.bas b/3D GFX/Miscellaneous/3D ball.bas
new file mode 100755 (executable)
index 0000000..dd3de01
--- /dev/null
@@ -0,0 +1,183 @@
+' 3D animation of point-cloud ball bouncing around the screen\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 1999, Initial version.\r
+' 2024 - 2025, Improved code readability.\r
+\r
+DECLARE SUB InitializeScene ()\r
+DECLARE SUB UpdateOrientation ()\r
+DECLARE SUB DisplayPoints (angle1 AS SINGLE, angle2 AS SINGLE, angle3 AS SINGLE)\r
+RANDOMIZE TIMER\r
+SCREEN 12\r
+\r
+' Shared arrays to hold the positions of points in 3D space\r
+DIM SHARED pointX(1 TO 1000) AS SINGLE\r
+DIM SHARED pointY(1 TO 1000) AS SINGLE\r
+DIM SHARED pointZ(1 TO 1000) AS SINGLE\r
+\r
+' Shared arrays to hold the previous on-screen positions of points\r
+DIM SHARED prevX(1 TO 1000) AS INTEGER\r
+DIM SHARED prevY(1 TO 1000) AS INTEGER\r
+\r
+' Shared variables for simulation control\r
+DIM SHARED totalPoints AS INTEGER\r
+DIM SHARED ballX\r
+DIM SHARED ballY\r
+DIM SHARED ballVelocityX\r
+DIM SHARED ballVelocityY\r
+\r
+' Shared variables for rotation angles and their velocities\r
+DIM SHARED rotationAngle1\r
+DIM SHARED rotationAngle2\r
+DIM SHARED rotationAngle3\r
+DIM SHARED angularVelocity1\r
+DIM SHARED angularVelocity2\r
+DIM SHARED angularVelocity3\r
+\r
+' Initialize the total number of points to be displayed\r
+totalPoints = 500\r
+\r
+CALL InitializeScene\r
+\r
+' Initialization of rotation angles and ball position\r
+rotationAngle1 = 0\r
+rotationAngle2 = 0\r
+rotationAngle3 = 0\r
+\r
+' Main loop\r
+DO\r
+    CALL DisplayPoints(rotationAngle1, rotationAngle2, rotationAngle3)\r
+\r
+    ' Update the rotation angles based on their velocities\r
+    rotationAngle1 = rotationAngle1 + angularVelocity1\r
+    rotationAngle2 = rotationAngle2 + angularVelocity2\r
+    rotationAngle3 = rotationAngle3 + angularVelocity3\r
+\r
+    ' Add force of gravity\r
+    ballVelocityY = ballVelocityY + .1\r
+\r
+    ' Update the ball's position and velocity\r
+    ballY = ballY + ballVelocityY\r
+    ballX = ballX + ballVelocityX\r
+\r
+    ' Check for ball bounce conditions\r
+    IF ballY > 160 THEN\r
+        ballVelocityY = -ballVelocityY\r
+        ballVelocityX = ballVelocityX + (RND * 2 - 1)\r
+        CALL UpdateOrientation\r
+    END IF\r
+\r
+    IF ballX < -200 OR ballX > 200 THEN\r
+        ballVelocityX = -ballVelocityX\r
+        CALL UpdateOrientation\r
+    END IF\r
+\r
+    ' Check for user input to exit the program\r
+    a$ = INKEY$\r
+    IF a$ <> "" THEN\r
+        CLS\r
+        SYSTEM\r
+    END IF\r
+LOOP\r
+\r
+' Subroutine to display the points on the screen\r
+SUB DisplayPoints (angle1 AS SINGLE, angle2 AS SINGLE, angle3 AS SINGLE)\r
+\r
+    ' Calculate the sine and cosine for rotation angles\r
+    s1 = SIN(angle1)\r
+    c1 = COS(angle1)\r
+    s2 = SIN(angle2)\r
+    c2 = COS(angle2)\r
+    s3 = SIN(angle3)\r
+    c3 = COS(angle3)\r
+\r
+    ' For each point, apply rotation transformations and project to 2D\r
+    FOR a = 1 TO totalPoints\r
+        x = pointX(a)\r
+        y = pointY(a)\r
+        z = pointZ(a)\r
+\r
+        x1 = x * s1 + y * c1\r
+        y1 = x * c1 - y * s1\r
+\r
+        z1 = z * s2 + y1 * c2\r
+        y2 = z * c2 - y1 * s2\r
+\r
+        z2 = z1 * s3 + x1 * c3\r
+        x2 = z1 * c3 - x1 * s3\r
+\r
+        ' Perspective projection\r
+        z2 = z2 + 200\r
+\r
+        ' Convert to screen coordinates and apply ball offset\r
+        xScreen = x2 / z2 * 320 + 320 + ballX\r
+        yScreen = y2 / z2 * 300 + 240 + ballY\r
+\r
+        ' Erase the previous point position and draw the new one\r
+        PSET (prevX(a), prevY(a)), 0\r
+        PSET (xScreen, yScreen), 3\r
+\r
+        ' Update the previous on-screen positions\r
+        prevX(a) = xScreen\r
+        prevY(a) = yScreen\r
+    NEXT a\r
+END SUB\r
+\r
+' Subroutine to initialize the 3D points and ball properties\r
+SUB InitializeScene\r
+    PRINT "Calculating coordinates"\r
+    PRINT "Please wait....."\r
+\r
+    ' Generate random 3D coordinates for each point\r
+    FOR a = 1 TO totalPoints\r
+        ang1 = RND * 100\r
+        ang2 = RND * 100\r
+        ang3 = RND * 100\r
+\r
+        s1 = SIN(ang1)\r
+        c1 = COS(ang1)\r
+        s2 = SIN(ang2)\r
+        c2 = COS(ang2)\r
+        s3 = SIN(ang3)\r
+        c3 = COS(ang3)\r
+\r
+        ' Apply rotation transformations to the point\r
+        x = 50\r
+        y = 0\r
+        z = 0\r
+\r
+        x1 = x * s1 + y * c1\r
+        y1 = x * c1 - y * s1\r
+\r
+        z1 = z * s2 + y1 * c2\r
+        y2 = z * c2 - y1 * s2\r
+\r
+        z2 = z1 * s3 + x1 * c3\r
+        x2 = z1 * c3 - x1 * s3\r
+\r
+        pointX(a) = x2\r
+        pointY(a) = y2\r
+        pointZ(a) = z2\r
+    NEXT a\r
+\r
+    ' Set the initial ball velocity\r
+    ballVelocityX = 2 + RND\r
+    ballY = -100\r
+\r
+    CALL UpdateOrientation\r
+\r
+    CLS\r
+END SUB\r
+\r
+' Subroutine to update the angular velocities for rotation\r
+SUB UpdateOrientation\r
+    angularVelocity1 = (RND - .5) / 16\r
+    angularVelocity2 = (RND - .5) / 16\r
+    angularVelocity3 = (RND - .5) / 16\r
+END SUB\r
+\r
diff --git a/3D GFX/Miscellaneous/3D ball.webm b/3D GFX/Miscellaneous/3D ball.webm
new file mode 100644 (file)
index 0000000..cd04bfc
Binary files /dev/null and b/3D GFX/Miscellaneous/3D ball.webm differ
diff --git a/3D GFX/Miscellaneous/3D text.bas b/3D GFX/Miscellaneous/3D text.bas
new file mode 100755 (executable)
index 0000000..17b52b8
--- /dev/null
@@ -0,0 +1,475 @@
+' Renders 3D text within 3D room.\r
+' User can freely fly around the room and observe the text from different angles.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003, Initial version\r
+' 2024 - 2025, Improved program readability\r
+'\r
+' Keyboard controls:\r
+'   cursor keys and to z, w - rotate\r
+'   <SPACE> - slow down\r
+'   q and <ESC> - quit program\r
+'   + / - - move up / down\r
+\r
+\r
+DECLARE SUB defineOctagon (x!, y!, z!, size!)\r
+DECLARE SUB printText (x AS SINGLE, y AS SINGLE, text AS STRING)\r
+DECLARE SUB renderCharacter (x AS SINGLE, y AS SINGLE, character AS STRING)\r
+DECLARE SUB readFontData ()\r
+DECLARE SUB defineSquare (x AS SINGLE, y AS SINGLE, z AS SINGLE, size AS SINGLE)\r
+DECLARE SUB defineRectangle (x AS SINGLE, y AS SINGLE, z AS SINGLE, size AS SINGLE)\r
+DECLARE SUB createFloor ()\r
+DECLARE SUB addPoint (x AS INTEGER, y AS INTEGER, z AS INTEGER)\r
+DECLARE SUB initializeProgram ()\r
+DECLARE SUB addSquare (x1 AS INTEGER, y1 AS INTEGER, z1 AS INTEGER)\r
+DECLARE SUB defineCubeAndRectangle ()\r
+DECLARE SUB multiplyCoordinates ()\r
+DECLARE SUB render3DScene ()\r
+DECLARE SUB calculateSineCosine ()\r
+\r
+DIM SHARED pointX(4000) AS SINGLE, pointY(4000) AS SINGLE, pointZ(4000) AS SINGLE\r
+DIM SHARED x(4000) AS SINGLE, y(4000) AS SINGLE, z(4000) AS SINGLE\r
+DIM SHARED oldPointX(4000) AS SINGLE, oldPointY(4000) AS SINGLE, oldPointZ(4000) AS SINGLE\r
+DIM SHARED lineStart(4000) AS INTEGER, lineEnd(4000) AS INTEGER\r
+DIM SHARED lineColor(4000) AS INTEGER\r
+DIM SHARED numPoints AS INTEGER, numLines AS INTEGER\r
+DIM SHARED userX AS SINGLE, userY AS SINGLE, userZ AS SINGLE, userSpeed AS SINGLE, userDirection AS SINGLE\r
+DIM SHARED fontPointX(0 TO 10, 0 TO 255) AS SINGLE, fontPointY(0 TO 10, 0 TO 255) AS SINGLE\r
+DIM SHARED fontLineStart(0 TO 10, 0 TO 255) AS INTEGER, fontLineEnd(0 TO 10, 0 TO 255) AS INTEGER\r
+\r
+userX = 0\r
+userY = 0\r
+userZ = -100\r
+\r
+initializeProgram\r
+render3DScene\r
+\r
+SUB createFloor\r
+' Create the floor of the 3D room using hexagons and squares\r
+FOR x = -100 TO 0 STEP 12.067 + .3\r
+    FOR z = -100 TO 0 STEP 12.067 + .3\r
+        defineOctagon x, -125, z, 6.53\r
+        defineRectangle x + 6.033 + .15, -125, z + 6.033 + .15, 3.111 + .3\r
+    NEXT z\r
+NEXT x\r
+\r
+' Loop to create squares\r
+FOR y = -100 TO 0 STEP 20.3\r
+    FOR x = -100 TO 0 STEP 20.3\r
+        defineSquare x, y, 200, 10\r
+    NEXT x\r
+NEXT y\r
+END SUB\r
+\r
+SUB defineCubeAndRectangle\r
+' Define the corners of a cube\r
+pointX(numPoints + 1) = -150\r
+pointY(numPoints + 1) = -125\r
+pointZ(numPoints + 1) = -200\r
+pointX(numPoints + 2) = 150\r
+pointY(numPoints + 2) = -125\r
+pointZ(numPoints + 2) = -200\r
+pointX(numPoints + 3) = 150\r
+pointY(numPoints + 3) = 125\r
+pointZ(numPoints + 3) = -200\r
+pointX(numPoints + 4) = -150\r
+pointY(numPoints + 4) = 125\r
+pointZ(numPoints + 4) = -200\r
+pointX(numPoints + 5) = -150\r
+pointY(numPoints + 5) = -125\r
+pointZ(numPoints + 5) = 200\r
+pointX(numPoints + 6) = 150\r
+pointY(numPoints + 6) = -125\r
+pointZ(numPoints + 6) = 200\r
+pointX(numPoints + 7) = 150\r
+pointY(numPoints + 7) = 125\r
+pointZ(numPoints + 7) = 200\r
+pointX(numPoints + 8) = -150\r
+pointY(numPoints + 8) = 125\r
+pointZ(numPoints + 8) = 200\r
+\r
+' Define the lines connecting the corners\r
+lineStart(numLines + 1) = numPoints + 1\r
+lineEnd(numLines + 1) = numPoints + 2\r
+lineStart(numLines + 2) = numPoints + 2\r
+lineEnd(numLines + 2) = numPoints + 3\r
+lineStart(numLines + 3) = numPoints + 3\r
+lineEnd(numLines + 3) = numPoints + 4\r
+lineStart(numLines + 4) = numPoints + 4\r
+lineEnd(numLines + 4) = numPoints + 1\r
+lineStart(numLines + 5) = numPoints + 5\r
+lineEnd(numLines + 5) = numPoints + 6\r
+lineStart(numLines + 6) = numPoints + 6\r
+lineEnd(numLines + 6) = numPoints + 7\r
+lineStart(numLines + 7) = numPoints + 7\r
+lineEnd(numLines + 7) = numPoints + 8\r
+lineStart(numLines + 8) = numPoints + 8\r
+lineEnd(numLines + 8) = numPoints + 5\r
+lineStart(numLines + 9) = numPoints + 5\r
+lineEnd(numLines + 9) = numPoints + 1\r
+lineStart(numLines + 10) = numPoints + 6\r
+lineEnd(numLines + 10) = numPoints + 2\r
+lineStart(numLines + 11) = numPoints + 7\r
+lineEnd(numLines + 11) = numPoints + 3\r
+lineStart(numLines + 12) = numPoints + 8\r
+lineEnd(numLines + 12) = numPoints + 4\r
+\r
+numPoints = numPoints + 8\r
+numLines = numLines + 12\r
+\r
+' Define the corners of rectangle\r
+pointX(numPoints + 1) = -150\r
+pointY(numPoints + 1) = -125 + 201\r
+pointZ(numPoints + 1) = 0\r
+pointX(numPoints + 2) = -150\r
+pointY(numPoints + 2) = -125 + 201\r
+pointZ(numPoints + 2) = 89\r
+pointX(numPoints + 3) = -150\r
+pointY(numPoints + 3) = -125\r
+pointZ(numPoints + 3) = 89\r
+pointX(numPoints + 4) = -150\r
+pointY(numPoints + 4) = -125\r
+pointZ(numPoints + 4) = 0\r
+\r
+' Define the lines connecting these corners\r
+lineStart(numLines + 1) = numPoints + 1\r
+lineEnd(numLines + 1) = numPoints + 2\r
+lineStart(numLines + 2) = numPoints + 2\r
+lineEnd(numLines + 2) = numPoints + 3\r
+lineStart(numLines + 3) = numPoints + 3\r
+lineEnd(numLines + 3) = numPoints + 4\r
+lineStart(numLines + 4) = numPoints + 4\r
+lineEnd(numLines + 4) = numPoints + 1\r
+\r
+numPoints = numPoints + 4\r
+numLines = numLines + 4\r
+\r
+printText 0, 0, "three dimensional "\r
+printText 0, -3, "text example"\r
+printText 0, -6, "etc etc etc"\r
+END SUB\r
+\r
+SUB defineOctagon (x, y, z, size)\r
+' Initialize variables\r
+b = 0\r
+f = .3925\r
+\r
+' Loop to create points of the octagon\r
+FOR a = 0 + f TO 6 + f STEP 6.28 / 8\r
+    x1 = SIN(a) * size\r
+    y1 = COS(a) * size\r
+    b = b + 1\r
+    ' Store the points in the shared arrays\r
+    pointX(numPoints + b) = x1 + x\r
+    pointY(numPoints + b) = y\r
+    pointZ(numPoints + b) = y1 + z\r
+NEXT a\r
+\r
+' Define the lines connecting these points\r
+lineStart(numLines + 1) = numPoints + 1\r
+lineEnd(numLines + 1) = numPoints + 2\r
+lineColor(numLines + 1) = 12\r
+lineStart(numLines + 2) = numPoints + 2\r
+lineEnd(numLines + 2) = numPoints + 3\r
+lineColor(numLines + 2) = 12\r
+lineStart(numLines + 3) = numPoints + 3\r
+lineEnd(numLines + 3) = numPoints + 4\r
+lineColor(numLines + 3) = 12\r
+lineStart(numLines + 4) = numPoints + 4\r
+lineEnd(numLines + 4) = numPoints + 5\r
+lineColor(numLines + 4) = 12\r
+lineStart(numLines + 5) = numPoints + 5\r
+lineEnd(numLines + 5) = numPoints + 6\r
+lineColor(numLines + 5) = 12\r
+lineStart(numLines + 6) = numPoints + 6\r
+lineEnd(numLines + 6) = numPoints + 7\r
+lineColor(numLines + 6) = 12\r
+lineStart(numLines + 7) = numPoints + 7\r
+lineEnd(numLines + 7) = numPoints + 8\r
+lineColor(numLines + 7) = 12\r
+lineStart(numLines + 8) = numPoints + 8\r
+lineEnd(numLines + 8) = numPoints + 1\r
+lineColor(numLines + 8) = 12\r
+\r
+numPoints = numPoints + b\r
+numLines = numLines + 8\r
+END SUB\r
+\r
+SUB defineRectangle (x AS SINGLE, y AS SINGLE, z AS SINGLE, size AS SINGLE)\r
+' Define the corners of the rectangle\r
+pointX(numPoints + 1) = x\r
+pointY(numPoints + 1) = y\r
+pointZ(numPoints + 1) = z + size\r
+pointX(numPoints + 2) = x + size\r
+pointY(numPoints + 2) = y\r
+pointZ(numPoints + 2) = z\r
+pointX(numPoints + 3) = x\r
+pointY(numPoints + 3) = y\r
+pointZ(numPoints + 3) = z - size\r
+pointX(numPoints + 4) = x - size\r
+pointY(numPoints + 4) = y\r
+pointZ(numPoints + 4) = z\r
+\r
+' Define the lines connecting these corners\r
+lineStart(numLines + 1) = numPoints + 1\r
+lineEnd(numLines + 1) = numPoints + 2\r
+lineColor(numLines + 1) = 10\r
+lineStart(numLines + 2) = numPoints + 2\r
+lineEnd(numLines + 2) = numPoints + 3\r
+lineColor(numLines + 2) = 10\r
+lineStart(numLines + 3) = numPoints + 3\r
+lineEnd(numLines + 3) = numPoints + 4\r
+lineColor(numLines + 3) = 10\r
+lineStart(numLines + 4) = numPoints + 4\r
+lineEnd(numLines + 4) = numPoints + 1\r
+lineColor(numLines + 4) = 10\r
+\r
+' Update the counters\r
+numPoints = numPoints + 4\r
+numLines = numLines + 4\r
+END SUB\r
+\r
+SUB defineSquare (x AS SINGLE, y AS SINGLE, z AS SINGLE, size AS SINGLE)\r
+' Define the corners of the square\r
+pointX(numPoints + 1) = x - size\r
+pointY(numPoints + 1) = y - size\r
+pointZ(numPoints + 1) = z\r
+pointX(numPoints + 2) = x + size\r
+pointY(numPoints + 2) = y - size\r
+pointZ(numPoints + 2) = z\r
+pointX(numPoints + 3) = x + size\r
+pointY(numPoints + 3) = y + size\r
+pointZ(numPoints + 3) = z\r
+pointX(numPoints + 4) = x - size\r
+pointY(numPoints + 4) = y + size\r
+pointZ(numPoints + 4) = z\r
+\r
+' Define the lines connecting these corners\r
+lineStart(numLines + 1) = numPoints + 1\r
+lineEnd(numLines + 1) = numPoints + 2\r
+lineColor(numLines + 1) = 14\r
+lineStart(numLines + 2) = numPoints + 2\r
+lineEnd(numLines + 2) = numPoints + 3\r
+lineColor(numLines + 2) = 14\r
+lineStart(numLines + 3) = numPoints + 3\r
+lineEnd(numLines + 3) = numPoints + 4\r
+lineColor(numLines + 3) = 14\r
+lineStart(numLines + 4) = numPoints + 4\r
+lineEnd(numLines + 4) = numPoints + 1\r
+lineColor(numLines + 4) = 14\r
+\r
+' Update the counters\r
+numPoints = numPoints + 4\r
+numLines = numLines + 4\r
+END SUB\r
+\r
+SUB initializeProgram\r
+' Initialize the screen and clear it\r
+SCREEN 12\r
+CLS\r
+\r
+' Set the default color for all points\r
+FOR a = 1 TO 4000\r
+    lineColor(a) = 15\r
+NEXT a\r
+\r
+' Initialize counters\r
+numPoints = 0\r
+numLines = 0\r
+\r
+' Initialize font data\r
+FOR a = 0 TO 255\r
+    FOR b = 0 TO 10\r
+        fontPointX(b, a) = 999\r
+        fontPointY(b, a) = 999\r
+        fontLineStart(b, a) = 999\r
+        fontLineEnd(b, a) = 999\r
+    NEXT b\r
+NEXT a\r
+\r
+' Read the font data\r
+readFontData\r
+\r
+' Define the corners of the cubes\r
+defineCubeAndRectangle\r
+END SUB\r
+\r
+SUB printText (x AS SINGLE, y AS SINGLE, text AS STRING)\r
+' Loop to print each character\r
+FOR b = 1 TO LEN(text)\r
+    c$ = RIGHT$(LEFT$(text, b), 1)\r
+    renderCharacter x + b * 3, y, c$\r
+NEXT b\r
+END SUB\r
+\r
+SUB readFontData\r
+' Open the font file\r
+OPEN "font.dat" FOR INPUT AS #1\r
+\r
+' Loop to read the font data\r
+3\r
+IF EOF(1) <> 0 THEN GOTO 2\r
+LINE INPUT #1, a$\r
+\r
+IF LEFT$(a$, 1) = "#" THEN\r
+  chr = ASC(RIGHT$(LEFT$(a$, 3), 1))\r
+  ' Initialize counters\r
+  pp = 0\r
+  lp = 0\r
+END IF\r
+\r
+' Read the points for the character\r
+IF LEFT$(a$, 1) = "p" THEN\r
+    fontPointX(pp, chr) = VAL(RIGHT$(LEFT$(a$, 3), 1))\r
+    fontPointY(pp, chr) = VAL(RIGHT$(LEFT$(a$, 5), 1))\r
+    pp = pp + 1\r
+END IF\r
+\r
+' Read the lines for the character\r
+IF LEFT$(a$, 1) = "l" THEN\r
+    fontLineStart(lp, chr) = VAL(RIGHT$(LEFT$(a$, 3), 1))\r
+    fontLineEnd(lp, chr) = VAL(RIGHT$(LEFT$(a$, 5), 1))\r
+    lp = lp + 1\r
+END IF\r
+\r
+GOTO 3\r
+\r
+' Close the font file\r
+2\r
+CLOSE #1\r
+END SUB\r
+\r
+SUB render3DScene\r
+' Main loop for the 3D rendering\r
+1\r
+userX = userX + SIN(rotationAngleX) * userSpeed\r
+userZ = userZ + COS(rotationAngleX) * userSpeed\r
+userX = userX + COS(rotationAngleX) * userDirection\r
+userZ = userZ - SIN(rotationAngleX) * userDirection\r
+rotationAngleX = rotationAngleX + angleIncrementX\r
+rotationAngleY = rotationAngleY + angleIncrementY\r
+cosAngleX = COS(rotationAngleX): sinAngleX = SIN(rotationAngleX)\r
+cosAngleY = COS(rotationAngleY): sinAngleY = SIN(rotationAngleY)\r
+\r
+' Transform the coordinates\r
+FOR a = 1 TO numPoints\r
+    oldPointX(a) = pointX(a) - userX\r
+    oldPointY(a) = -pointY(a) - userY\r
+    oldPointZ(a) = pointZ(a) - userZ\r
+    x1 = (oldPointX(a) * cosAngleX - oldPointZ(a) * sinAngleX)\r
+    z1 = (oldPointX(a) * sinAngleX + oldPointZ(a) * cosAngleX)\r
+    y1 = (oldPointY(a) * cosAngleY - z1 * sinAngleY)\r
+    z2 = (oldPointY(a) * sinAngleY + z1 * cosAngleY)\r
+\r
+    ' Store the transformed coordinates\r
+    oldPointX(a) = x(a)\r
+    oldPointY(a) = y(a)\r
+\r
+    ' Check if the point is within the view\r
+    IF z2 < 20 THEN\r
+        x(a) = -1\r
+    ELSE\r
+        ' Apply perspective transformation\r
+        x(a) = 320 + (x1 / z2 * 500)\r
+        y(a) = 240 + (y1 / z2 * 500)\r
+    END IF\r
+NEXT\r
+\r
+' Draw the lines\r
+FOR a = 1 TO numLines\r
+    p1 = lineStart(a)\r
+    p2 = lineEnd(a)\r
+\r
+    ' Check if the points are within the view\r
+    IF oldPointX(p1) = -1 OR oldPointX(p2) = -1 THEN\r
+        ' Do nothing\r
+    ELSE\r
+        ' Erase line at old coordinates\r
+        LINE (oldPointX(p1), oldPointY(p1))-(oldPointX(p2), oldPointY(p2)), 0\r
+    END IF\r
+\r
+    IF x(p1) = -1 OR x(p2) = -1 THEN\r
+        ' Do nothing\r
+    ELSE\r
+        ' Draw line at new coordinates\r
+        LINE (x(p1), y(p1))-(x(p2), y(p2)), lineColor(a)\r
+    END IF\r
+NEXT\r
+\r
+' Handle user input\r
+userInput$ = INKEY$\r
+\r
+IF userInput$ <> "" THEN\r
+    SELECT CASE userInput$\r
+        CASE CHR$(0) + "P"\r
+            userSpeed = userSpeed - 1\r
+        CASE CHR$(0) + "H"\r
+            userSpeed = userSpeed + 1\r
+        CASE CHR$(0) + "M"\r
+            userDirection = userDirection + 1\r
+        CASE CHR$(0) + "K"\r
+            userDirection = userDirection - 1\r
+        CASE "+"\r
+            userY = userY + 3\r
+        CASE "-"\r
+            userY = userY - 3\r
+        CASE "6"\r
+            angleIncrementX = angleIncrementX + .01\r
+        CASE "4"\r
+            angleIncrementX = angleIncrementX - .01\r
+        CASE "8"\r
+            angleIncrementY = angleIncrementY - .01\r
+        CASE "2"\r
+            angleIncrementY = angleIncrementY + .01\r
+        CASE " "\r
+            angleIncrementX = angleIncrementX / 2\r
+            angleIncrementY = angleIncrementY / 2\r
+            angleIncrementZ = angleIncrementZ / 2\r
+            userSpeed = userSpeed / 2\r
+            userDirection = userDirection / 2\r
+        CASE "q"\r
+            SYSTEM\r
+        CASE CHR$(27)\r
+            SYSTEM\r
+    END SELECT\r
+END IF\r
+\r
+GOTO 1\r
+END SUB\r
+\r
+SUB renderCharacter (x AS SINGLE, y AS SINGLE, character AS STRING)\r
+' Initialize variables\r
+b = ASC(character)\r
+up = 0\r
+ul = 0\r
+\r
+' Loop to create points for the character\r
+FOR c = 0 TO 100\r
+    IF fontPointX(c, b) = 999 THEN GOTO 4\r
+    up = up + 1\r
+    pointX(numPoints + up) = x + fontPointX(c, b)\r
+    pointY(numPoints + up) = y - fontPointY(c, b)\r
+    pointZ(numPoints + up) = 0\r
+NEXT c\r
+\r
+4\r
+' Loop to define the lines for the character\r
+FOR c = 0 TO 100\r
+    IF fontLineStart(c, b) = 999 THEN GOTO 5\r
+    ul = ul + 1\r
+    lineStart(numLines + ul) = fontLineStart(c, b) + numPoints + 1\r
+    lineEnd(numLines + ul) = fontLineEnd(c, b) + numPoints + 1\r
+    lineColor(numLines + ul) = 4\r
+NEXT c\r
+\r
+5\r
+' Update the counters\r
+numPoints = numPoints + up\r
+numLines = numLines + ul\r
+END SUB\r
+\r
diff --git a/3D GFX/Miscellaneous/3D text.webm b/3D GFX/Miscellaneous/3D text.webm
new file mode 100644 (file)
index 0000000..0846d14
Binary files /dev/null and b/3D GFX/Miscellaneous/3D text.webm differ
diff --git a/3D GFX/Miscellaneous/Bouncing cubes.bas b/3D GFX/Miscellaneous/Bouncing cubes.bas
new file mode 100755 (executable)
index 0000000..e87c62d
--- /dev/null
@@ -0,0 +1,351 @@
+' Program to render flying and bouncing cubes on top of a grid-like floor\r
+'\r
+' By Svjatoslav Agejenko\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2001, Initial version\r
+' 2024 - 2025, Improved program readability\r
+'\r
+' Navigation controls:\r
+' Arrow keys - Move forward/backward/left/right\r
+' 2,6,4,8 - Look around (up/down/left/right)\r
+' -       - Fly upward\r
+' +       - Fly downward\r
+\r
+\r
+DECLARE SUB updateColliders()\r
+DECLARE SUB initializeColliders()\r
+DECLARE SUB renderScene()\r
+DECLARE SUB initializeEnvironment()\r
+DECLARE SUB initializeProgram()\r
+\r
+DIM SHARED initialNumPoints, initialNumLines, numPoints, numLines\r
+DIM SHARED pointXCoord(1 TO 1000) AS SINGLE\r
+DIM SHARED pointYCoord(1 TO 1000) AS SINGLE\r
+DIM SHARED pointZCoord(1 TO 1000) AS SINGLE\r
+DIM SHARED renderedXCoord(1 TO 1000) AS SINGLE\r
+DIM SHARED renderedYCoord(1 TO 1000) AS SINGLE\r
+DIM SHARED prevRenderedXCoord(1 TO 1000) AS SINGLE\r
+DIM SHARED prevRenderedYCoord(1 TO 1000) AS SINGLE\r
+DIM SHARED lineStart(1 TO 1000) AS INTEGER\r
+DIM SHARED lineEnd(1 TO 1000) AS INTEGER\r
+DIM SHARED lineColor(1 TO 1000) AS INTEGER\r
+DIM SHARED prevLineStart(1 TO 1000) AS INTEGER\r
+DIM SHARED prevLineEnd(1 TO 1000) AS INTEGER\r
+DIM SHARED prevLineCount AS INTEGER\r
+DIM SHARED cameraXPos AS SINGLE, cameraXSpeed AS SINGLE\r
+DIM SHARED cameraYPos AS SINGLE, cameraYSpeed AS SINGLE\r
+DIM SHARED cameraZPos AS SINGLE, cameraZSpeed AS SINGLE\r
+DIM SHARED cameraAngleX AS SINGLE, cameraAngleXSpeed AS SINGLE\r
+DIM SHARED cameraAngleY AS SINGLE, cameraAngleYSpeed AS SINGLE\r
+DIM SHARED cubeXPos(1 TO 10) AS SINGLE\r
+DIM SHARED cubeYPos(1 TO 10) AS SINGLE\r
+DIM SHARED cubeZPos(1 TO 10) AS SINGLE\r
+DIM SHARED cubeXSpeed(1 TO 10) AS SINGLE\r
+DIM SHARED cubeYSpeed(1 TO 10) AS SINGLE\r
+DIM SHARED cubeZSpeed(1 TO 10) AS SINGLE\r
+DIM SHARED numCubes AS INTEGER\r
+\r
+ON ERROR GOTO ErrorHandler\r
+\r
+initializeProgram\r
+initializeEnvironment\r
+initializeColliders\r
+\r
+' The main loop of the program\r
+MainLoop:\r
+numPoints = initialNumPoints\r
+numLines = initialNumLines\r
+\r
+updateColliders\r
+renderScene\r
+\r
+' Update positions and angles\r
+cameraXPos = cameraXPos + cameraXSpeed\r
+cameraYPos = cameraYPos + cameraYSpeed\r
+cameraZPos = cameraZPos + cameraZSpeed\r
+cameraAngleX = cameraAngleX + cameraAngleXSpeed\r
+cameraAngleY = cameraAngleY + cameraAngleYSpeed\r
+\r
+userInput$ = INKEY$\r
+IF userInput$ <> "" THEN\r
+    ' Handle arrow keys for movement\r
+    IF userInput$ = CHR$(0) + "H" THEN\r
+        cameraZSpeed = cameraZSpeed - SIN(cameraAngleX) / 100\r
+        cameraXSpeed = cameraXSpeed - COS(cameraAngleX) / 100\r
+    END IF\r
+    IF userInput$ = CHR$(0) + "P" THEN\r
+        cameraZSpeed = cameraZSpeed + SIN(cameraAngleX) / 100\r
+        cameraXSpeed = cameraXSpeed + COS(cameraAngleX) / 100\r
+    END IF\r
+    IF userInput$ = CHR$(0) + "M" THEN\r
+        cameraZSpeed = cameraZSpeed + COS(cameraAngleX) / 100\r
+        cameraXSpeed = cameraXSpeed - SIN(cameraAngleX) / 100\r
+    END IF\r
+    IF userInput$ = CHR$(0) + "K" THEN\r
+        cameraZSpeed = cameraZSpeed - COS(cameraAngleX) / 100\r
+        cameraXSpeed = cameraXSpeed + SIN(cameraAngleX) / 100\r
+    END IF\r
+    ' Handle number keys for looking around\r
+    IF userInput$ = "6" THEN cameraAngleXSpeed = cameraAngleXSpeed - 0.01\r
+    IF userInput$ = "4" THEN cameraAngleXSpeed = cameraAngleXSpeed + 0.01\r
+    IF userInput$ = "8" THEN cameraAngleYSpeed = cameraAngleYSpeed - 0.01\r
+    IF userInput$ = "2" THEN cameraAngleYSpeed = cameraAngleYSpeed + 0.01\r
+    ' Handle plus and minus keys for flying up and down\r
+    IF userInput$ = "+" THEN cameraYSpeed = cameraYSpeed - 0.01\r
+    IF userInput$ = "-" THEN cameraYSpeed = cameraYSpeed + 0.01\r
+    ' Exit the program on pressing ESC\r
+    IF userInput$ = CHR$(27) THEN SYSTEM\r
+END IF\r
+\r
+GOTO MainLoop\r
+\r
+ErrorHandler:\r
+END\r
+RESUME\r
+\r
+SUB initializeEnvironment\r
+' This subroutine initializes environment points\r
+FOR z = -5 TO 5\r
+    FOR x = -5 TO 5\r
+        numPoints = numPoints + 1\r
+        pointXCoord(numPoints) = x\r
+        pointYCoord(numPoints) = 0\r
+        pointZCoord(numPoints) = z\r
+        ' Add lines between points\r
+        IF x > -5 THEN\r
+            numLines = numLines + 1\r
+            lineStart(numLines) = numPoints\r
+            lineEnd(numLines) = numPoints - 1\r
+            lineColor(numLines) = 3\r
+        END IF\r
+        IF z > -5 THEN\r
+            numLines = numLines + 1\r
+            lineStart(numLines) = numPoints\r
+            lineEnd(numLines) = numPoints - 11\r
+            lineColor(numLines) = 3\r
+        END IF\r
+    NEXT x\r
+NEXT z\r
+' Store the number of points and lines\r
+initialNumPoints = numPoints\r
+initialNumLines = numLines\r
+END SUB\r
+\r
+SUB updateColliders\r
+' This subroutine updates the positions and angles of colliders\r
+FOR a = 1 TO numCubes\r
+    x = cubeXPos(a)\r
+    y = cubeYPos(a)\r
+    z = cubeZPos(a)\r
+    xs = cubeXSpeed(a)\r
+    ys = cubeYSpeed(a)\r
+    zs = cubeZSpeed(a)\r
+    ' Update the Y-axis position\r
+    ys = ys - 0.01\r
+    ' Update the X and Z positions\r
+    x = x + xs\r
+    y = y + ys\r
+    z = z + zs\r
+    ' Bounce off walls\r
+    IF x > 5 THEN xs = -0.1\r
+    IF z > 5 THEN zs = -0.1\r
+    IF x < -5 THEN xs = 0.1\r
+    IF z < -5 THEN zs = 0.1\r
+    ' Reset Y position if it falls below a threshold\r
+    IF y < 0.5 THEN ys = RND * 0.2 + 0.1\r
+    ' Create lines for visualization\r
+    numLines = numLines + 1\r
+    lineStart(numLines) = numPoints + 1\r
+    lineEnd(numLines) = numPoints + 2\r
+    lineColor(numLines) = 14\r
+    numLines = numLines + 1\r
+    lineStart(numLines) = numPoints + 3\r
+    lineEnd(numLines) = numPoints + 2\r
+    lineColor(numLines) = 14\r
+    numLines = numLines + 1\r
+    lineStart(numLines) = numPoints + 3\r
+    lineEnd(numLines) = numPoints + 4\r
+    lineColor(numLines) = 14\r
+    numLines = numLines + 1\r
+    lineStart(numLines) = numPoints + 1\r
+    lineEnd(numLines) = numPoints + 4\r
+    lineColor(numLines) = 14\r
+    numLines = numLines + 1\r
+    lineStart(numLines) = numPoints + 1\r
+    lineEnd(numLines) = numPoints + 5\r
+    lineColor(numLines) = 14\r
+    numLines = numLines + 1\r
+    lineStart(numLines) = numPoints + 2\r
+    lineEnd(numLines) = numPoints + 6\r
+    lineColor(numLines) = 14\r
+    numLines = numLines + 1\r
+    lineStart(numLines) = numPoints + 3\r
+    lineEnd(numLines) = numPoints + 7\r
+    lineColor(numLines) = 14\r
+    numLines = numLines + 1\r
+    lineStart(numLines) = numPoints + 4\r
+    lineEnd(numLines) = numPoints + 8\r
+    lineColor(numLines) = 14\r
+    numLines = numLines + 1\r
+    lineStart(numLines) = numPoints + 5\r
+    lineEnd(numLines) = numPoints + 6\r
+    lineColor(numLines) = 14\r
+    numLines = numLines + 1\r
+    lineStart(numLines) = numPoints + 7\r
+    lineEnd(numLines) = numPoints + 6\r
+    lineColor(numLines) = 14\r
+    numLines = numLines + 1\r
+    lineStart(numLines) = numPoints + 7\r
+    lineEnd(numLines) = numPoints + 8\r
+    lineColor(numLines) = 14\r
+    numLines = numLines + 1\r
+    lineStart(numLines) = numPoints + 5\r
+    lineEnd(numLines) = numPoints + 8\r
+    lineColor(numLines) = 14\r
+    ' Update the array with new positions and speeds\r
+    numPoints = numPoints + 1\r
+    pointXCoord(numPoints) = x - 0.5\r
+    pointYCoord(numPoints) = y - 0.5\r
+    pointZCoord(numPoints) = z - 0.5\r
+    numPoints = numPoints + 1\r
+    pointXCoord(numPoints) = x + 0.5\r
+    pointYCoord(numPoints) = y - 0.5\r
+    pointZCoord(numPoints) = z - 0.5\r
+    numPoints = numPoints + 1\r
+    pointXCoord(numPoints) = x + 0.5\r
+    pointYCoord(numPoints) = y + 0.5\r
+    pointZCoord(numPoints) = z - 0.5\r
+    numPoints = numPoints + 1\r
+    pointXCoord(numPoints) = x - 0.5\r
+    pointYCoord(numPoints) = y + 0.5\r
+    pointZCoord(numPoints) = z - 0.5\r
+    numPoints = numPoints + 1\r
+    pointXCoord(numPoints) = x - 0.5\r
+    pointYCoord(numPoints) = y - 0.5\r
+    pointZCoord(numPoints) = z + 0.5\r
+    numPoints = numPoints + 1\r
+    pointXCoord(numPoints) = x + 0.5\r
+    pointYCoord(numPoints) = y - 0.5\r
+    pointZCoord(numPoints) = z + 0.5\r
+    numPoints = numPoints + 1\r
+    pointXCoord(numPoints) = x + 0.5\r
+    pointYCoord(numPoints) = y + 0.5\r
+    pointZCoord(numPoints) = z + 0.5\r
+    numPoints = numPoints + 1\r
+    pointXCoord(numPoints) = x - 0.5\r
+    pointYCoord(numPoints) = y + 0.5\r
+    pointZCoord(numPoints) = z + 0.5\r
+    ' Update the collider array with new positions and speeds\r
+    cubeXPos(a) = x\r
+    cubeYPos(a) = y\r
+    cubeZPos(a) = z\r
+    cubeXSpeed(a) = xs\r
+    cubeYSpeed(a) = ys\r
+    cubeZSpeed(a) = zs\r
+NEXT a\r
+END SUB\r
+\r
+SUB initializeColliders\r
+' This subroutine initializes colliders with random positions and speeds\r
+FOR a = 1 TO numCubes\r
+    cubeXPos(a) = RND * 10 - 5\r
+    cubeYPos(a) = 2\r
+    cubeZPos(a) = RND * 10 - 5\r
+    cubeXSpeed(a) = RND * 0.5 - 0.25\r
+    cubeYSpeed(a) = RND * 0.5 + 0.1\r
+    cubeZSpeed(a) = RND * 0.5 - 0.25\r
+NEXT a\r
+END SUB\r
+\r
+SUB renderScene\r
+' Calculate sine and cosine for angle rotation\r
+s1 = SIN(cameraAngleX)\r
+c1 = COS(cameraAngleX)\r
+s2 = SIN(cameraAngleY)\r
+c2 = COS(cameraAngleY)\r
+' Loop through all points to render them\r
+FOR a = 1 TO numPoints\r
+    x = pointXCoord(a) + cameraXPos\r
+    y = pointYCoord(a) - cameraYPos\r
+    z = pointZCoord(a) + cameraZPos\r
+    ' Rotate the point\r
+    x1 = x * s1 - z * c1\r
+    z1 = x * c1 + z * s1\r
+    y1 = y * s2 - z1 * c2\r
+    z2 = y * c2 + z1 * s2\r
+    ' Project the 3D point to a 2D screen coordinate\r
+    IF z2 < 0.1 THEN\r
+        renderedXCoord(a) = -1\r
+    ELSE\r
+        renderedXCoord(a) = 320 + (x1 / z2 * 400)\r
+        renderedYCoord(a) = 240 - (y1 / z2 * 400)\r
+    END IF\r
+NEXT a\r
+' Render all lines\r
+FOR a = 1 TO numLines\r
+    l1 = prevLineStart(a)\r
+    l2 = prevLineEnd(a)\r
+    ' Skip rendering if either end of the line is out of view\r
+    IF prevRenderedXCoord(l1) = -1 OR prevRenderedXCoord(l2) = -1 THEN\r
+    ELSE\r
+        LINE (prevRenderedXCoord(l1), prevRenderedYCoord(l1))-(prevRenderedXCoord(l2), prevRenderedYCoord(l2)), 0\r
+    END IF\r
+    ' Update line indices for next frame\r
+    l1 = lineStart(a)\r
+    l2 = lineEnd(a)\r
+    ' Skip rendering if either end of the line is out of view\r
+    IF renderedXCoord(l1) = -1 OR renderedXCoord(l2) = -1 THEN\r
+    ELSE\r
+        LINE (renderedXCoord(l1), renderedYCoord(l1))-(renderedXCoord(l2), renderedYCoord(l2)), lineColor(a)\r
+    END IF\r
+NEXT\r
+' Handle lines that were added during the frame\r
+IF numLines < prevLineCount THEN\r
+    FOR a = numLines + 1 TO prevLineCount\r
+        l1 = prevLineStart(a)\r
+        l2 = prevLineEnd(a)\r
+        ' Skip rendering if either end of the line is out of view\r
+        IF prevRenderedXCoord(l1) = -1 OR prevRenderedXCoord(l2) = -1 THEN\r
+        ELSE\r
+            LINE (prevRenderedXCoord(l1), prevRenderedYCoord(l1))-(prevRenderedXCoord(l2), prevRenderedYCoord(l2)), 0\r
+        END IF\r
+    NEXT\r
+END IF\r
+' Save the current frame's points and lines for next frame\r
+FOR a = 1 TO numPoints\r
+    prevRenderedXCoord(a) = renderedXCoord(a)\r
+    prevRenderedYCoord(a) = renderedYCoord(a)\r
+NEXT a\r
+FOR a = 1 TO numLines\r
+    prevLineStart(a) = lineStart(a)\r
+    prevLineEnd(a) = lineEnd(a)\r
+NEXT a\r
+prevLineCount = numLines\r
+END SUB\r
+\r
+SUB initializeProgram\r
+' Initialize the screen and variables\r
+SCREEN 12\r
+initialNumPoints = 0\r
+initialNumLines = 0\r
+numPoints = initialNumPoints\r
+numLines = initialNumLines\r
+numCubes = 9\r
+cameraXPos = 0\r
+cameraYPos = 4\r
+cameraZPos = 7\r
+cameraAngleX = 3.14 / 2\r
+cameraAngleY = cameraAngleX + 0.6\r
+' Initialize all lines to have a thickness of 4\r
+FOR a = 1 TO 1000\r
+    lineColor(a) = 4\r
+NEXT a\r
+' Store the initial state of all lines\r
+FOR a = 1 TO 1000\r
+    prevLineStart(a) = 1\r
+    prevLineEnd(a) = 1\r
+NEXT a\r
+END SUB\r
diff --git a/3D GFX/Miscellaneous/Bouncing cubes.webm b/3D GFX/Miscellaneous/Bouncing cubes.webm
new file mode 100644 (file)
index 0000000..2328295
Binary files /dev/null and b/3D GFX/Miscellaneous/Bouncing cubes.webm differ
diff --git a/3D GFX/Miscellaneous/Matrix math.bas b/3D GFX/Miscellaneous/Matrix math.bas
new file mode 100755 (executable)
index 0000000..431b7e3
--- /dev/null
@@ -0,0 +1,75 @@
+' Program to demonstrate 3x3 matrix math for coordinate rotation in 3D space.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.03, Initial version\r
+' 2024.08, Improved program readability\r
+\r
+' Use keys:\r
+' 7 9 - change alpha angle\r
+' 4 6 - change beta angle\r
+' 1 3 - change gamma angle\r
+' ESC - quit program\r
+\r
+DECLARE SUB graphicalCoordinates (xVal AS Single, yVal AS Single, zVal AS Single, x1Val AS Single, y1Val AS Single)\r
+DECLARE SUB setAngles (alphaVal AS Single, betaVal AS Single, gammaVal AS Single)\r
+DIM SHARED matrixX1 AS Single, matrixY1 AS Single, matrixZ1 AS Single\r
+DIM SHARED matrixX2 AS Single, matrixY2 AS Single, matrixZ2 AS Single\r
+DIM SHARED matrixX3 AS Single, matrixY3 AS Single, matrixZ3 AS Single\r
+\r
+SCREEN 7, , , 1\r
+\r
+' Main loop starts here\r
+DO\r
+    CALL setAngles(angleAlpha, angleBeta, angleGamma)\r
+\r
+    FOR y = -70 TO 70 STEP 5\r
+        FOR x = -70 TO 70 STEP 5\r
+            CALL graphicalCoordinates(x, y, SIN((ABS(x) + ABS(y)) / 30) * 30, x1Val, y1Val)\r
+            PSET (x1Val, y1Val), 15\r
+        NEXT x\r
+    NEXT y\r
+    PCOPY 0, 1\r
+    CLS\r
+    inputChar$ = INPUT$(1)\r
+\r
+    ' Adjust rotation angles based on user input\r
+    IF inputChar$ = "7" THEN angleAlpha = angleAlpha + 0.1\r
+    IF inputChar$ = "9" THEN angleAlpha = angleAlpha - 0.1\r
+    IF inputChar$ = "4" THEN angleBeta = angleBeta + 0.1\r
+    IF inputChar$ = "6" THEN angleBeta = angleBeta - 0.1\r
+    IF inputChar$ = "1" THEN angleGamma = angleGamma + 0.1\r
+    IF inputChar$ = "3" THEN angleGamma = angleGamma - 0.1\r
+    IF inputChar$ = CHR$(27) THEN SYSTEM ' Exit program if ESC key is pressed\r
+LOOP\r
+\r
+SUB graphicalCoordinates (xVal AS Single, yVal AS Single, zVal AS Single, x1Val AS Single, y1Val AS Single)\r
+    ' Perform matrix transformation to rotate coordinates\r
+    rxVal = xVal * matrixX1 + yVal * matrixY1 + zVal * matrixZ1\r
+    ryVal = xVal * matrixX2 + yVal * matrixY2 + zVal * matrixZ2\r
+    rzVal = xVal * matrixX3 + yVal * matrixY3 + zVal * matrixZ3\r
+\r
+    ' Apply perspective calculation to give the illusion of depth\r
+    rzVal = rzVal + 100\r
+    x1Val = rxVal / rzVal * 120 + 160\r
+    y1Val = ryVal / rzVal * 120 + 100\r
+END SUB\r
+\r
+SUB setAngles (alphaVal AS Single, betaVal AS Single, gammaVal AS Single)\r
+    ' Calculate the elements of the rotation matrix based on the angles\r
+    matrixX1 = SIN(gammaVal) * SIN(betaVal) * SIN(alphaVal) + COS(gammaVal) * COS(alphaVal)\r
+    matrixY1 = COS(betaVal) * SIN(alphaVal)\r
+    matrixZ1 = SIN(gammaVal) * COS(alphaVal) - COS(gammaVal) * SIN(betaVal) * SIN(alphaVal)\r
+\r
+    matrixX2 = SIN(gammaVal) * SIN(betaVal) * COS(alphaVal) - COS(gammaVal) * SIN(alphaVal)\r
+    matrixY2 = COS(betaVal) * COS(alphaVal)\r
+    matrixZ2 = -COS(gammaVal) * SIN(betaVal) * COS(alphaVal) - SIN(gammaVal) * SIN(alphaVal)\r
+\r
+    matrixX3 = -SIN(gammaVal) * COS(betaVal)\r
+    matrixY3 = SIN(betaVal)\r
+    matrixZ3 = COS(gammaVal) * COS(betaVal)\r
+END SUB
\ No newline at end of file
diff --git a/3D GFX/Miscellaneous/Matrix math.webm b/3D GFX/Miscellaneous/Matrix math.webm
new file mode 100644 (file)
index 0000000..5e6ea9a
Binary files /dev/null and b/3D GFX/Miscellaneous/Matrix math.webm differ
diff --git a/3D GFX/Miscellaneous/Maze explorer.bas b/3D GFX/Miscellaneous/Maze explorer.bas
new file mode 100755 (executable)
index 0000000..f733f57
--- /dev/null
@@ -0,0 +1,293 @@
+' Evolving 3D Maze explorer.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+\r
+' Changelog:\r
+' 2003.12, Initial version\r
+' 2024 - 2025, Improved program readability\r
+'\r
+' Navigation:\r
+'   WASD - move around\r
+'   Drag mouse - look around\r
+'   Press left and right mouse buttons simultaneously while dragging mouse - move in X and Z axis\r
+'   Press right mouse button while dragging mouse - move in Y axis\r
+'\r
+' Press 'q' to quit the program\r
+\r
+DECLARE SUB verifyTsrIsLoaded ()\r
+DECLARE SUB startText ()\r
+DECLARE SUB handleInput ()\r
+DECLARE SUB putByte (addr!, dat!)\r
+DECLARE SUB putWord (addr!, dat!)\r
+DECLARE FUNCTION getWord! (addr!)\r
+DECLARE FUNCTION getByte! (addr!)\r
+DECLARE SUB initializeProgram ()\r
+DECLARE SUB render3DScene ()\r
+\r
+DIM SHARED pointX(1 TO 500)\r
+DIM SHARED pointY(1 TO 500)\r
+DIM SHARED pointZ(1 TO 500)\r
+DIM SHARED renderedPointX(1 TO 500)\r
+DIM SHARED renderedPointY(1 TO 500)\r
+DIM SHARED renderedPointEnabled(1 TO 500)\r
+\r
+DIM SHARED lineStart(1 TO 500)\r
+DIM SHARED lineEnd(1 TO 500)\r
+DIM SHARED lineColor(1 TO 500)\r
+\r
+DIM SHARED lineCount, pointCount\r
+\r
+DIM SHARED angleY, angleX, angleZ\r
+\r
+DIM SHARED frameTime\r
+\r
+DIM SHARED extensionSegment, extensionAddress\r
+\r
+DIM SHARED cameraX, cameraY, cameraZ\r
+DIM SHARED cameraXSpeed, cameraYSpeed, cameraZSpeed\r
+DIM SHARED leftMouseButton, rightMouseButton\r
+DIM SHARED maxMove\r
+\r
+lineCount = 0\r
+pointCount = 0\r
+\r
+initializeProgram\r
+\r
+' Initialize position variables\r
+currentX = 0\r
+currentY = 0\r
+currentZ = 0\r
+\r
+pointCount = 1\r
+pointX(pointCount) = currentX\r
+pointY(pointCount) = currentY\r
+pointZ(pointCount) = currentZ\r
+\r
+1\r
+\r
+IF pointCount < 500 THEN\r
+\r
+  ' Increase the number of points and add a new point at the current position\r
+  pointCount = pointCount + 1\r
+  pointX(pointCount) = currentX\r
+  pointY(pointCount) = currentY\r
+  pointZ(pointCount) = currentZ\r
+\r
+  ' Increase the number of lines and define a line between the new point and the previous one\r
+  lineCount = lineCount + 1\r
+  lineStart(lineCount) = pointCount\r
+  lineEnd(lineCount) = pointCount - 1\r
+  lineColor(lineCount) = INT(RND * 15) + 1\r
+\r
+  ' Randomly choose orientation for the next move\r
+  SELECT CASE INT(RND * 3)\r
+  CASE 0\r
+    currentX = RND * 500 - 250\r
+  CASE 1\r
+    currentY = RND * 100 - 50\r
+  CASE 2\r
+    currentZ = RND * 500 - 250\r
+  END SELECT\r
+END IF\r
+\r
+handleInput\r
+render3DScene\r
+\r
+' Copy the current screen to page 1 and clear the screen\r
+PCOPY 0, 1\r
+CLS\r
+GOTO 1\r
+\r
+SUB render3DScene\r
+\r
+' Calculate sine and cosine for Y-axis rotation\r
+sinY = SIN(angleY)\r
+cosY = COS(angleY)\r
+\r
+' Calculate sine and cosine for X-axis rotation\r
+sinX = SIN(angleX)\r
+cosX = COS(angleX)\r
+\r
+' Calculate sine and cosine for Z-axis rotation (not used in current code)\r
+sinZ = SIN(angleZ)\r
+cosZ = COS(angleZ)\r
+\r
+' Project 3D points to 2D screen coordinates\r
+FOR a = 1 TO pointCount\r
+  deltaX = pointX(a) - cameraX\r
+  deltaY = pointY(a) - cameraY\r
+  deltaZ = pointZ(a) - cameraZ\r
+\r
+  ' Rotate around Y axis\r
+  rotatedX = deltaX * cosY + deltaZ * sinY\r
+  rotatedZ = deltaZ * cosY - deltaX * sinY\r
+\r
+  ' Rotate around X axis\r
+  rotatedY = deltaY * cosX + rotatedZ * sinX\r
+  finalZ = rotatedZ * cosX - deltaY * sinX\r
+\r
+  ' Check if the point is in front of the camera (finalZ > 3)\r
+  IF finalZ > 3 THEN\r
+    renderedPointEnabled(a) = 1\r
+    renderedPointX(a) = rotatedX / finalZ * 130 + 160\r
+    renderedPointY(a) = rotatedY / finalZ * 130 + 100\r
+  ELSE\r
+    renderedPointEnabled(a) = 0\r
+  END IF\r
+NEXT a\r
+\r
+' Draw lines between visible points\r
+FOR a = 1 TO lineCount\r
+\r
+  p1 = lineStart(a)\r
+  p2 = lineEnd(a)\r
+  IF (renderedPointEnabled(p1) = 1) AND (renderedPointEnabled(p2) = 1) THEN\r
+    LINE (renderedPointX(p1), renderedPointY(p1))-(renderedPointX(p2), renderedPointY(p2)), lineColor(a)\r
+  END IF\r
+\r
+NEXT a\r
+\r
+END SUB\r
+\r
+SUB handleInput\r
+\r
+' Read mouse data\r
+IF getByte(8) <> 0 THEN\r
+  putByte 8, 0\r
+  ' Read mouse translation along x axis\r
+  mouseXDelta = getWord(2)\r
+  putWord 2, 0\r
+  ' Read mouse translation along y axis\r
+  mouseYDelta = getWord(4)\r
+  putWord 4, 0\r
+  ' Read pressed mouse buttons\r
+  button = getWord(6)\r
+  putWord 6, 0\r
+\r
+  ' Detect if left, right or both mouse buttons were pressed\r
+  leftMouseButton = 0\r
+  rightMouseButton = 0\r
+  IF button = 1 THEN leftMouseButton = 1\r
+  IF button = 2 THEN rightMouseButton = 1\r
+  IF button = 3 THEN leftMouseButton = 1: rightMouseButton = 1\r
+\r
+  IF rightMouseButton = 1 THEN\r
+    IF leftMouseButton = 1 THEN\r
+      ' If mouse left and right buttons are pressed at the same time,\r
+      ' use mouse translation to move avatar around X and Z axis.\r
+      cameraXSpeed = cameraXSpeed + SIN(angleY) * mouseYDelta / 4\r
+      cameraZSpeed = cameraZSpeed - COS(angleY) * mouseYDelta / 4\r
+      GOTO 3\r
+    END IF\r
+    ' If only right button is pressed, move around Y axis\r
+    cameraYSpeed = cameraYSpeed + mouseYDelta / 4\r
+3\r
+    mouseYDelta = 0\r
+  END IF\r
+\r
+END IF\r
+\r
+' Limit mouse movement to maxMove\r
+IF mouseXDelta < -maxMove THEN mouseXDelta = -maxMove\r
+IF mouseXDelta > maxMove THEN mouseXDelta = maxMove\r
+angleY = angleY - mouseXDelta / 150\r
+\r
+IF mouseYDelta < -maxMove THEN mouseYDelta = -maxMove\r
+IF mouseYDelta > maxMove THEN mouseYDelta = maxMove\r
+angleX = angleX - mouseYDelta / 150\r
+\r
+' Read keyboard input and update player position\r
+keyInput$ = INKEY$\r
+\r
+IF keyInput$ = "a" THEN cameraXSpeed = cameraXSpeed - COS(angleY): cameraZSpeed = cameraZSpeed - SIN(angleY)\r
+IF keyInput$ = "d" THEN cameraXSpeed = cameraXSpeed + COS(angleY): cameraZSpeed = cameraZSpeed + SIN(angleY)\r
+IF keyInput$ = "w" THEN cameraXSpeed = cameraXSpeed - SIN(angleY): cameraZSpeed = cameraZSpeed + COS(angleY)\r
+IF keyInput$ = "s" THEN cameraXSpeed = cameraXSpeed + SIN(angleY): cameraZSpeed = cameraZSpeed - COS(angleY)\r
+IF keyInput$ = "q" THEN SYSTEM\r
+\r
+' Apply friction to player movement\r
+cameraXSpeed = cameraXSpeed / 1.1\r
+cameraYSpeed = cameraYSpeed / 1.1\r
+cameraZSpeed = cameraZSpeed / 1.1\r
+\r
+' Update player position\r
+cameraX = cameraX + cameraXSpeed\r
+cameraZ = cameraZ + cameraZSpeed\r
+cameraY = cameraY + cameraYSpeed\r
+\r
+END SUB\r
+\r
+FUNCTION getByte (addr)\r
+getByte = PEEK(extensionAddress + addr)\r
+END FUNCTION\r
+\r
+FUNCTION getWord (addr)\r
+a = PEEK(extensionAddress + addr)\r
+b = PEEK(extensionAddress + addr + 1)\r
+\r
+' Convert bytes to a hex string and then to an integer\r
+c$ = HEX$(a)\r
+IF LEN(c$) = 1 THEN c$ = "0" + c$\r
+IF LEN(c$) = 0 THEN c$ = "00"\r
+\r
+c = VAL("&H" + HEX$(b) + c$)\r
+\r
+getWord = c\r
+END FUNCTION\r
+\r
+SUB putByte (addr, dat)\r
+POKE (extensionAddress + addr), dat\r
+END SUB\r
+\r
+SUB putWord (addr, dat)\r
+\r
+b$ = HEX$(dat)\r
+\r
+2\r
+IF LEN(b$) < 4 THEN b$ = "0" + b$: GOTO 2\r
+\r
+n1 = VAL("&H" + LEFT$(b$, 2))\r
+n2 = VAL("&H" + RIGHT$(b$, 2))\r
+\r
+POKE (extensionAddress + addr), n2\r
+POKE (extensionAddress + addr + 1), n1\r
+\r
+END SUB\r
+\r
+SUB initializeProgram\r
+verifyTsrIsLoaded\r
+\r
+SCREEN 7, , , 1\r
+\r
+' Set camera speed limit\r
+maxMove = 50\r
+\r
+END SUB\r
+\r
+SUB verifyTsrIsLoaded\r
+\r
+DEF SEG = 0     ' Read first from interrupt table\r
+\r
+extensionSegment = PEEK(&H79 * 4 + 3) * 256\r
+extensionSegment = extensionSegment + PEEK(&H79 * 4 + 2)\r
+\r
+PRINT "Segment is: " + HEX$(extensionSegment)\r
+\r
+extensionAddress = PEEK(&H79 * 4 + 1) * 256\r
+extensionAddress = extensionAddress + PEEK(&H79 * 4 + 0)\r
+\r
+PRINT "relative address is:"; extensionAddress\r
+\r
+DEF SEG = extensionSegment\r
+\r
+' Verify TSR signature\r
+IF getWord(0) <> 1983 THEN\r
+  PRINT "FATAL ERROR:  you must load"\r
+  PRINT "QBasic extension TSR first!"\r
+  SYSTEM\r
+END IF\r
+\r
+END SUB\r
diff --git a/3D GFX/Miscellaneous/Maze explorer.png b/3D GFX/Miscellaneous/Maze explorer.png
new file mode 100644 (file)
index 0000000..96348a3
Binary files /dev/null and b/3D GFX/Miscellaneous/Maze explorer.png differ
diff --git a/3D GFX/Miscellaneous/Tank.bas b/3D GFX/Miscellaneous/Tank.bas
new file mode 100755 (executable)
index 0000000..479e421
--- /dev/null
@@ -0,0 +1,800 @@
+' Program to render animated 3D tank driving back and forth on a 3D bridge\r
+' Tank tracks are synchronized with movement. Free camera navigation available.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2000, Initial version\r
+' 2024 - 2025, Improved code readability\r
+'\r
+' Controls:\r
+' Arrow keys - Look around\r
+' +/- - Move forward/backward\r
+' Q - Quit\r
+' Space - Stop movement\r
+\r
+DECLARE SUB InitializeProgram ()\r
+DECLARE SUB SavePosition (x1%, y1%, x2%, y3%)\r
+DECLARE SUB LoadBridgeGeometry ()\r
+DECLARE SUB UpdateTankTracks ()\r
+DECLARE SUB InitializeTrackSegments ()\r
+DECLARE SUB GetTrackSegmentPoints (x1%, y1%, x2%, Y2%)\r
+DECLARE SUB DisplayText ()\r
+DECLARE SUB LoadInitialGeometry ()\r
+DECLARE SUB MultiplyCoordinates ()\r
+DECLARE SUB RenderSceneLoop ()\r
+DECLARE SUB PrecomputeTrigTables ()\r
+\r
+DEFINT A-Y\r
+' Screen coordinate arrays for projected points\r
+DIM SHARED screenX(1000), screenY(1000), depthZ(1000)\r
+' World space coordinates for all 3D points\r
+DIM SHARED worldPointX(2000), worldPointY(2000), worldPointZ(2000)\r
+' Previous frame's rotated point coordinates for motion trails\r
+DIM SHARED prevStartX(1000), prevStartY(1000), prevEndX(1000), prevEndY(1000)\r
+' Line connections between points\r
+DIM SHARED lineStartIndex(1000), lineEndIndex(1000)\r
+' Precomputed sine/cosine tables for fast rotation calculations\r
+DIM SHARED precomputedCosine&(360), precomputedSine&(360)\r
+DIM SHARED totalPoints, totalLines\r
+\r
+' Track system arrays and counters\r
+DIM SHARED trackX(1 TO 3000)\r
+DIM SHARED trackY(1 TO 3000)\r
+DIM SHARED trackSegmentCount\r
+DIM SHARED currentTrackSegmentIndex\r
+\r
+' Geometry pointers for different object types\r
+DIM SHARED trackStartPointIndex ' Point index for first track segment\r
+DIM SHARED trackStartLineIndex   ' Line index for first track segment\r
+DIM SHARED bridgeStartPointIndex ' Point index for bridge geometry\r
+DIM SHARED bridgeStartLineIndex  ' Line index for bridge geometry\r
+\r
+' Tank position tracking\r
+DIM SHARED tracksXOffset\r
+DIM SHARED tankPosX, tankPosY, tankPosZ\r
+DIM SHARED previousTankPosX, previousTankPosY, previousTankPosZZ\r
+\r
+' Camera rotation angles in degrees\r
+DIM SHARED yawRotationDeg, pitchRotationDeg, rollRotationDeg\r
+DIM SHARED movementSpeed\r
+\r
+DIM SHARED tankMovementDirection\r
+\r
+InitializeProgram\r
+RenderSceneLoop\r
+\r
+' 3D Model Data Section\r
+' Contains coordinates for:\r
+' - Tank body\r
+' - Bridge structure\r
+' - Connection lines between points\r
+DATA -10,-30,-20\r
+DATA 30,-30,-20\r
+DATA 30,-10,-20\r
+DATA -10,-10,-20\r
+\r
+DATA -10,-30,20\r
+DATA 30,-30,20\r
+DATA 30,-10,20\r
+DATA -10,-10,20\r
+\r
+DATA -10,-40,-15\r
+DATA 30,-40,-15\r
+DATA -10,-40,15\r
+DATA 30,-40,15\r
+\r
+DATA -20,-30,-15\r
+DATA -20,-30, 15\r
+\r
+DATA -70,-10,-50\r
+DATA 60,-10, -50\r
+DATA 70,  0, -50\r
+DATA 70, 20, -50\r
+DATA 60, 30, -50\r
+DATA -70,30, -50\r
+DATA -80,20, -50\r
+DATA -80, 0, -50\r
+\r
+DATA -70,-10,-30\r
+DATA 60,-10, -30\r
+DATA 70,  0, -30\r
+DATA 70, 20, -30\r
+DATA 60, 30, -30\r
+DATA -70,30, -30\r
+DATA -80,20, -30\r
+DATA -80, 0, -30\r
+\r
+DATA -70,-10, 50\r
+DATA 60,-10,  50\r
+DATA 70,  0,  50\r
+DATA 70, 20,  50\r
+DATA 60, 30,  50\r
+DATA -70,30,  50\r
+DATA -80,20,  50\r
+DATA -80, 0,  50\r
+\r
+DATA -70,-10, 30\r
+DATA 60,-10,  30\r
+DATA 70,  0,  30\r
+DATA 70, 20,  30\r
+DATA 60, 30,  30\r
+DATA -70,30,  30\r
+DATA -80,20,  30\r
+DATA -80, 0,  30\r
+\r
+DATA -50,-7,-30\r
+DATA  50,-7,-30\r
+DATA  50, 15,-30\r
+DATA -50, 15,-30\r
+\r
+DATA -50,-7, 30\r
+DATA  50,-7, 30\r
+DATA  50, 15,30\r
+DATA -50, 15,30\r
+\r
+DATA -20,-20,-5\r
+DATA -20,-20, 5\r
+DATA -20,-30, 5\r
+DATA -20,-30,-5\r
+\r
+DATA -100,-30,-5\r
+DATA -100,-30, 5\r
+DATA -100,-40, 5\r
+DATA -100,-40,-5\r
+\r
+DATA 999,999,999\r
+\r
+DATA 0,1\r
+DATA 1,2\r
+DATA 2,3\r
+DATA 3,0\r
+\r
+DATA 4,5\r
+DATA 5,6\r
+DATA 6,7\r
+DATA 7,4\r
+\r
+DATA 0,8\r
+DATA 1,9\r
+DATA 4,10\r
+DATA 5,11\r
+\r
+DATA 0,12\r
+DATA 4,13\r
+DATA 12,8\r
+DATA 13,10\r
+\r
+DATA 8,9\r
+DATA 10,11\r
+DATA 8,10\r
+DATA 9,11\r
+\r
+DATA 12,13\r
+DATA 12,3\r
+DATA 13,7\r
+DATA 3,7\r
+DATA 1,5\r
+DATA 2,6\r
+\r
+DATA 14,15\r
+DATA 15,16\r
+DATA 16,17\r
+DATA 17,18\r
+DATA 18,19\r
+DATA 19,20\r
+DATA 20,21\r
+DATA 21,14\r
+\r
+DATA 22,23\r
+DATA 23,24\r
+DATA 24,25\r
+DATA 25,26\r
+DATA 26,27\r
+DATA 27,28\r
+DATA 28,29\r
+DATA 29,22\r
+\r
+DATA 30,31\r
+DATA 31,32\r
+DATA 32,33\r
+DATA 33,34\r
+DATA 34,35\r
+DATA 35,36\r
+DATA 36,37\r
+DATA 37,30\r
+\r
+DATA 38,39\r
+DATA 39,40\r
+DATA 40,41\r
+DATA 41,42\r
+DATA 42,43\r
+DATA 43,44\r
+DATA 44,45\r
+DATA 45,38\r
+\r
+DATA 46,47\r
+DATA 47,48\r
+DATA 48,49\r
+DATA 49,46\r
+\r
+DATA 50,51\r
+DATA 51,52\r
+DATA 52,53\r
+DATA 53,50\r
+\r
+DATA 50,46\r
+DATA 51,47\r
+DATA 52,48\r
+DATA 53,49\r
+\r
+DATA 54,55\r
+DATA 55,56\r
+DATA 56,57\r
+DATA 57,54\r
+\r
+DATA 54,58\r
+DATA 55,59\r
+DATA 56,60\r
+DATA 57,61\r
+\r
+DATA 58,59\r
+DATA 59,60\r
+DATA 60,61\r
+DATA 61,58\r
+\r
+DATA 54,3\r
+DATA 55,7\r
+\r
+DATA 999, 999\r
+'                                                          BRIDGE\r
+'                                                 right handlebars\r
+DATA 100,0,100\r
+DATA 100,50,100\r
+\r
+DATA 50,0,100\r
+DATA 50,50,100\r
+\r
+DATA 0,0,100\r
+DATA 0,50,100\r
+\r
+DATA -50,0,100\r
+DATA -50,50,100\r
+\r
+DATA -100,0,100\r
+DATA -100,50,100\r
+                       ' 5\r
+DATA -150,0,100\r
+DATA -150,50,100\r
+\r
+DATA -200,0,100\r
+DATA -200,50,100\r
+\r
+DATA -250,0,100\r
+DATA -250,50,100\r
+\r
+DATA -300,0,100\r
+DATA -300,50,100\r
+\r
+DATA -350,0,100\r
+DATA -350,50,100\r
+                           ' 10\r
+\r
+DATA -400,0,100\r
+DATA -400,50,100\r
+\r
+DATA -450,0,100\r
+DATA -450,50,100\r
+\r
+DATA -500,0,100\r
+DATA -500,50,100\r
+\r
+DATA -550,0,100\r
+DATA -550,50,100\r
+\r
+DATA -600,0,100\r
+DATA -600,50,100\r
+\r
+DATA -650,0,100\r
+DATA -650,50,100\r
+\r
+                    ' left handlebars\r
+DATA 100,0,-100\r
+DATA 100,50,-100\r
+\r
+DATA 50,0,-100\r
+DATA 50,50,-100\r
+\r
+DATA 0,0,-100\r
+DATA 0,50,-100\r
+\r
+DATA -50,0,-100\r
+DATA -50,50,-100\r
+\r
+DATA -100,0,-100\r
+DATA -100,50,-100\r
+                       ' 5\r
+DATA -150,0,-100\r
+DATA -150,50,-100\r
+\r
+DATA -200,0,-100\r
+DATA -200,50,-100\r
+\r
+DATA -250,0,-100\r
+DATA -250,50,-100\r
+\r
+DATA -300,0,-100\r
+DATA -300,50,-100\r
+\r
+DATA -350,0,-100\r
+DATA -350,50,-100\r
+                           ' 10\r
+\r
+DATA -400,0,-100\r
+DATA -400,50,-100\r
+\r
+DATA -450,0,-100\r
+DATA -450,50,-100\r
+\r
+DATA -500,0,-100\r
+DATA -500,50,-100\r
+\r
+DATA -550,0,-100\r
+DATA -550,50,-100\r
+\r
+DATA -600,0,-100\r
+DATA -600,50,-100\r
+\r
+DATA -650,0,-100\r
+DATA -650,50,-100\r
+                '   bottom line\r
+DATA 100,75,-100\r
+DATA -650,75,-100\r
+\r
+DATA 100,75,100\r
+DATA -650,75,100\r
+                ' shore\r
+DATA 75,75,-100\r
+DATA 75,75,100\r
+                   'right\r
+DATA -50,200,-100\r
+DATA -50,200,100\r
+\r
+DATA  75,200,-190\r
+DATA  75,200, 190\r
+                   'left\r
+DATA -525,200,-100\r
+DATA -525,200, 100\r
+\r
+DATA -600,200,-190\r
+DATA -600,200, 190\r
+\r
+'\r
+\r
+DATA 999,999,999\r
+\r
+                 'right handlebars\r
+\r
+DATA 2,3\r
+DATA 4,5\r
+DATA 6,7\r
+DATA 8,9\r
+\r
+DATA 10,11\r
+DATA 12,13\r
+DATA 14,15\r
+DATA 16,17\r
+DATA 18,19\r
+\r
+DATA 20,21\r
+DATA 22,23\r
+DATA 24,25\r
+DATA 26,27\r
+DATA 28,29\r
+\r
+\r
+                   'left handlebars\r
+DATA 34,35\r
+DATA 36,37\r
+DATA 38,39\r
+DATA 40,41\r
+\r
+DATA 42,43\r
+DATA 44,45\r
+DATA 46,47\r
+DATA 48,49\r
+DATA 50,51\r
+\r
+DATA 52,53\r
+DATA 54,55\r
+DATA 56,57\r
+DATA 58,59\r
+DATA 60,61\r
+\r
+'          long features\r
+DATA 0,4\r
+DATA 4,8\r
+DATA 8,12\r
+DATA 12,16\r
+DATA 16,20\r
+DATA 20,24\r
+DATA 24,28\r
+DATA 28,30\r
+\r
+DATA 1,5\r
+DATA 5,9\r
+DATA 9,13\r
+DATA 13,17\r
+DATA 17,21\r
+DATA 21,25\r
+DATA 25,29\r
+DATA 29,31\r
+\r
+DATA 32,36\r
+DATA 36,40\r
+DATA 40,44\r
+DATA 44,48\r
+DATA 48,52\r
+DATA 52,56\r
+DATA 56,60\r
+DATA 60,62\r
+\r
+DATA 33,37\r
+DATA 37,41\r
+DATA 41,45\r
+DATA 45,49\r
+DATA 49,53\r
+DATA 53,57\r
+DATA 57,61\r
+DATA 61,63\r
+\r
+'\r
+\r
+'  end\r
+\r
+DATA 1,33\r
+DATA 31,63\r
+\r
+DATA 64,65\r
+DATA 66,67\r
+DATA 64,66\r
+DATA 65,67\r
+\r
+DATA 0,66\r
+DATA 32,64\r
+DATA 30,67\r
+DATA 62,65\r
+            ' shore\r
+DATA 68,69\r
+DATA 70,71\r
+DATA 68,70\r
+DATA 69,71\r
+\r
+DATA 72,70\r
+DATA 72,68\r
+\r
+DATA 73,71\r
+DATA 73,69\r
+           'left\r
+DATA 74,76\r
+DATA 75,77\r
+DATA 74,75\r
+\r
+DATA 74,65\r
+DATA 76,65\r
+\r
+DATA 75,67\r
+DATA 77,67\r
+\r
+DATA 999, 999\r
+\r
+SUB GetTrackSegmentPoints (startX%, startY%, endX%, endY%)\r
+' Calculates evenly spaced points along a straight line between two coordinates\r
+' Used to create smooth tank track paths\r
+dx = ABS(startX - endX)\r
+dy = ABS(endY - startY)\r
+length = SQR(dx ^ 2 + dy ^ 2) * 1.017142857#\r
+\r
+' Calculate direction vectors\r
+directionX = (startX - endX) / length\r
+directionY = (endY - startY) / length\r
+\r
+currentX = startX%\r
+currentY = startY%\r
+\r
+FOR segment = 1 TO length\r
+    currentX = currentX - directionX\r
+    currentY = currentY + directionY\r
+    trackX(trackSegmentCount) = currentX\r
+    trackY(trackSegmentCount) = currentY\r
+    trackSegmentCount = trackSegmentCount + 1\r
+NEXT segment\r
+\r
+END SUB\r
+\r
+SUB InitializeProgram\r
+' Sets up initial program state and loads geometry\r
+SCREEN 12\r
+CLS\r
+movementSpeed = 0\r
+\r
+yawRotationDeg = 210\r
+pitchRotationDeg = 20\r
+rollRotationDeg = 90\r
+\r
+currentTrackSegmentIndex = 1\r
+tracksXOffset = 0\r
+\r
+previousTankPosX = 0\r
+previousTankPosY = 0\r
+previousTankPosZZ = 0\r
+tankPosX = 0\r
+tankPosY = -300\r
+tankPosZ = 100\r
+currentTrackSegmentIndex = 1\r
+\r
+tankMovementDirection = 1\r
+\r
+PrecomputeTrigTables\r
+LoadInitialGeometry\r
+LoadBridgeGeometry\r
+InitializeTrackSegments\r
+\r
+END SUB\r
+\r
+SUB InitializeTrackSegments\r
+' Sets up predefined track path segments connecting key points on the tank chassis\r
+trackSegmentCount = 1\r
+GetTrackSegmentPoints -70, -10, -80, 0\r
+GetTrackSegmentPoints -80, 0, -80, 20\r
+GetTrackSegmentPoints -80, 20, -70, 30\r
+GetTrackSegmentPoints -70, 30, 60, 30\r
+GetTrackSegmentPoints 60, 30, 70, 20\r
+GetTrackSegmentPoints 70, 20, 70, 0\r
+GetTrackSegmentPoints 70, 0, 60, -10\r
+GetTrackSegmentPoints 60, -10, -70, -10\r
+\r
+END SUB\r
+\r
+SUB LoadBridgeGeometry\r
+' Loads bridge geometry from DATA statements and adjusts indices\r
+bridgeStartLineIndex = totalLines\r
+bridgeStartPointIndex = totalPoints\r
+\r
+ReadNextPoint:\r
+READ worldPointX(totalPoints), worldPointY(totalPoints), worldPointZ(totalPoints)\r
+IF worldPointX(totalPoints) = 999 THEN\r
+    worldPointX(totalPoints) = 0: worldPointY(totalPoints) = 0: worldPointZ(totalPoints) = 0: GOTO FoundEndOfBridgePoints\r
+END IF\r
+totalPoints = totalPoints + 1\r
+GOTO ReadNextPoint\r
+\r
+FoundEndOfBridgePoints:\r
+ReadNextLine:\r
+READ lineStartIndex(totalLines), lineEndIndex(totalLines)\r
+IF lineStartIndex(totalLines) = 999 THEN GOTO EndOfBridgeLines\r
+lineStartIndex(totalLines) = lineStartIndex(totalLines) + bridgeStartPointIndex\r
+lineEndIndex(totalLines) = lineEndIndex(totalLines) + bridgeStartPointIndex\r
+totalLines = totalLines + 1\r
+GOTO ReadNextLine\r
+\r
+EndOfBridgeLines:\r
+\r
+END SUB\r
+\r
+SUB LoadInitialGeometry\r
+' Loads all 3D model vertices and connection lines from DATA statements\r
+FOR pointIndex = 0 TO 10000\r
+    READ worldPointX(pointIndex), worldPointY(pointIndex), worldPointZ(pointIndex)\r
+    IF worldPointX(pointIndex) = 999 THEN\r
+        worldPointX(pointIndex) = 0: worldPointY(pointIndex) = 0: worldPointZ(pointIndex) = 0: GOTO FoundEndOfPoints\r
+    END IF\r
+NEXT\r
+\r
+FoundEndOfPoints:\r
+totalPoints = pointIndex\r
+\r
+FOR lineIndex = 0 TO 10000\r
+    READ lineStartIndex(lineIndex), lineEndIndex(lineIndex)\r
+    IF lineStartIndex(lineIndex) = 999 THEN GOTO FoundEndOfLines\r
+NEXT\r
+\r
+FoundEndOfLines:\r
+totalLines = lineIndex\r
+\r
+' Save starting indices for different object types\r
+trackStartPointIndex = totalPoints\r
+trackStartLineIndex = totalLines\r
+\r
+' Initialize space for track segments\r
+FOR segmentIndex = 1 TO 48\r
+    lineStartIndex(totalLines) = totalPoints\r
+    totalPoints = totalPoints + 1\r
+    lineEndIndex(totalLines) = totalPoints\r
+    totalPoints = totalPoints + 1\r
+    totalLines = totalLines + 1\r
+NEXT segmentIndex\r
+\r
+END SUB\r
+\r
+SUB PrecomputeTrigTables\r
+' Precomputes sine and cosine values for 0-360 degrees\r
+' Values are scaled by 1024 to maintain precision with integer math\r
+FOR angleRadians! = 0 TO 359 / 57.29577950999997# STEP 1 / 57.29577950999997#\r
+    precomputedCosine&(angle) = INT(.5 + COS(angleRadians!) * 1024)\r
+    precomputedSine&(angle) = INT(.5 + SIN(angleRadians!) * 1024)\r
+    angle = angle + 1\r
+NEXT\r
+CLS\r
+END SUB\r
+\r
+SUB RenderSceneLoop\r
+' Main rendering loop with camera controls and 3D projection\r
+DO\r
+    ' Update animated tank tracks\r
+    UpdateTankTracks\r
+\r
+    ' Apply rotation deltas to camera angles\r
+    yawRotationDeg = yawRotationDeg + rotationDeltaYaw\r
+    pitchRotationDeg = pitchRotationDeg + rotationDeltaPitch\r
+    rollRotationDeg = rollRotationDeg + rotationDeltaRoll\r
+\r
+    ' Keep angles within 0-360 degree range\r
+    IF yawRotationDeg <= 0 THEN yawRotationDeg = yawRotationDeg + 360\r
+    IF pitchRotationDeg <= 0 THEN pitchRotationDeg = pitchRotationDeg + 360\r
+    IF rollRotationDeg <= 0 THEN rollRotationDeg = rollRotationDeg + 360\r
+\r
+    IF yawRotationDeg >= 360 THEN yawRotationDeg = yawRotationDeg - 360\r
+    IF pitchRotationDeg >= 360 THEN pitchRotationDeg = pitchRotationDeg - 360\r
+    IF rollRotationDeg >= 360 THEN rollRotationDeg = rollRotationDeg - 360\r
+\r
+    ' Lookup precomputed trig values\r
+    cosYaw& = precomputedCosine&(yawRotationDeg)\r
+    sinYaw& = precomputedSine&(yawRotationDeg)\r
+    cosPitch& = precomputedCosine&(pitchRotationDeg)\r
+    sinPitch& = precomputedSine&(pitchRotationDeg)\r
+    cosRoll& = precomputedCosine&(rollRotationDeg)\r
+    sinRoll& = precomputedSine&(rollRotationDeg)\r
+\r
+    ' Update tank position based on movement speed\r
+    tankPosX = tankPosX - (sinYaw& * movementSpeed / 100)\r
+    tankPosY = tankPosY - (cosYaw& * movementSpeed / 100)\r
+    tankPosZ = tankPosZ - (sinPitch& * movementSpeed / 100)\r
+\r
+    ' Transform all points through rotation matrices\r
+    FOR pointIndex = 0 TO totalPoints - 1\r
+        ' Translate point by tank position\r
+        worldX = worldPointX(pointIndex) + tankPosX\r
+        worldY = worldPointY(pointIndex) + tankPosZ\r
+        worldZ = worldPointZ(pointIndex) + tankPosY\r
+\r
+        ' Apply Yaw rotation (around Y axis)\r
+        rotatedX = (worldX * cosYaw& - worldZ * sinYaw&) \ 1024\r
+        rotatedZ = (worldX * sinYaw& + worldZ * cosYaw&) \ 1024\r
+\r
+        ' Apply Pitch rotation (around X axis)\r
+        rotatedY = (worldY * cosPitch& - rotatedZ * sinPitch&) \ 1024\r
+        finalZ = (worldY * sinPitch& + rotatedZ * cosPitch&) \ 1024\r
+\r
+        ' Apply Roll rotation (around Z axis)\r
+        screenXCoord = (rotatedY * cosRoll& - rotatedX * sinRoll&) \ 1024\r
+        screenYCoord = (rotatedY * sinRoll& + rotatedX * cosRoll&) \ 1024\r
+\r
+        ' Perspective projection if point is in front of camera\r
+        IF finalZ > 10 THEN\r
+            screenX(pointIndex) = 320 + (screenXCoord / finalZ * 500)\r
+            screenY(pointIndex) = 240 + (screenYCoord / finalZ * 500)\r
+        ELSE\r
+            screenX(pointIndex) = -1\r
+        END IF\r
+    NEXT\r
+\r
+    ' Draw all connected lines\r
+    FOR lineIndex = 0 TO totalLines - 1\r
+        firstPoint = lineStartIndex(lineIndex)\r
+        secondPoint = lineEndIndex(lineIndex)\r
+\r
+        startX = screenX(firstPoint)\r
+        startY = screenY(firstPoint)\r
+        endX = screenX(secondPoint)\r
+        endY = screenY(secondPoint)\r
+\r
+        ' Erase previous frame's line if it was visible\r
+        IF prevStartX(lineIndex) <> -1 AND prevEndX(lineIndex) <> -1 THEN\r
+            LINE (prevStartX(lineIndex), prevStartY(lineIndex))-(prevEndX(lineIndex), prevEndY(lineIndex)), 0\r
+        END IF\r
+\r
+        ' Draw new line if both points are visible\r
+        IF endX <> -1 AND startX <> -1 THEN\r
+            LINE (endX, endY)-(startX, startY), 15\r
+        END IF\r
+\r
+        ' Save current coordinates for next frame\r
+        prevStartX(lineIndex) = endX\r
+        prevStartY(lineIndex) = endY\r
+        prevEndX(lineIndex) = startX\r
+        prevEndY(lineIndex) = startY\r
+    NEXT\r
+\r
+    ' Handle user input\r
+    keyInput$ = INKEY$\r
+    IF keyInput$ <> "" THEN\r
+        SELECT CASE keyInput$\r
+            ' Camera rotation controls\r
+            CASE CHR$(0) + "M" ' Right arrow\r
+                rotationDeltaYaw = rotationDeltaYaw - 1\r
+            CASE CHR$(0) + "K" ' Left arrow\r
+                rotationDeltaYaw = rotationDeltaYaw + 1\r
+            CASE CHR$(0) + "P" ' Down arrow\r
+                rotationDeltaPitch = rotationDeltaPitch + 1\r
+            CASE CHR$(0) + "H" ' Up arrow\r
+                rotationDeltaPitch = rotationDeltaPitch - 1\r
+            CASE "w" ' W key\r
+                rotationDeltaRoll = rotationDeltaRoll - 1\r
+            CASE "z" ' Z key\r
+                rotationDeltaRoll = rotationDeltaRoll + 1\r
+\r
+            ' Movement controls\r
+            CASE "-"\r
+                movementSpeed = movementSpeed - 1\r
+            CASE "+"\r
+                movementSpeed = movementSpeed + 1\r
+            CASE " " ' Spacebar\r
+                rotationDeltaYaw = 0: rotationDeltaPitch = 0: rotationDeltaRoll = 0\r
+                movementSpeed = 0\r
+            CASE CHR$(27) ' Escape key\r
+                SYSTEM\r
+        END SELECT\r
+    END IF\r
+LOOP\r
+END SUB\r
+\r
+SUB UpdateTankTracks\r
+\r
+' Animates tank tracks by cycling through predefined track segments\r
+tracksXOffset = tracksXOffset + tankMovementDirection\r
+currentTrackSegmentIndex = currentTrackSegmentIndex + tankMovementDirection\r
+\r
+' Wrap segment index at boundaries\r
+IF currentTrackSegmentIndex > 15 THEN currentTrackSegmentIndex = 1\r
+IF currentTrackSegmentIndex < 1 THEN currentTrackSegmentIndex = 15\r
+\r
+segmentIndex = currentTrackSegmentIndex\r
+\r
+' Update right-side track positions\r
+FOR pointIndex = trackStartPointIndex TO trackStartPointIndex + 48 STEP 2\r
+    worldPointX(pointIndex) = trackX(segmentIndex) - tracksXOffset\r
+    worldPointY(pointIndex) = trackY(segmentIndex)\r
+    worldPointZ(pointIndex) = 50\r
+    worldPointX(pointIndex + 1) = trackX(segmentIndex) - tracksXOffset\r
+    worldPointY(pointIndex + 1) = trackY(segmentIndex)\r
+    worldPointZ(pointIndex + 1) = 30\r
+    segmentIndex = segmentIndex + 15\r
+NEXT\r
+\r
+segmentIndex = currentTrackSegmentIndex\r
+\r
+' Update left-side track positions\r
+FOR pointIndex = trackStartPointIndex + 48 TO trackStartPointIndex + 94 STEP 2\r
+    worldPointX(pointIndex) = trackX(segmentIndex) - tracksXOffset\r
+    worldPointY(pointIndex) = trackY(segmentIndex)\r
+    worldPointZ(pointIndex) = -50\r
+    worldPointX(pointIndex + 1) = trackX(segmentIndex) - tracksXOffset\r
+    worldPointY(pointIndex + 1) = trackY(segmentIndex)\r
+    worldPointZ(pointIndex + 1) = -30\r
+    segmentIndex = segmentIndex + 15\r
+NEXT\r
+\r
+' Move entire tank back and forth when hitting boundaries\r
+FOR pointIndex = 0 TO 84\r
+    worldPointX(pointIndex) = worldPointX(pointIndex) - tankMovementDirection\r
+NEXT\r
+\r
+IF worldPointX(84) > 0 THEN tankMovementDirection = 1\r
+IF worldPointX(83) < -400 THEN tankMovementDirection = -1\r
+\r
+END SUB\r
+\r
diff --git a/3D GFX/Miscellaneous/Tank.webm b/3D GFX/Miscellaneous/Tank.webm
new file mode 100644 (file)
index 0000000..4d5e603
Binary files /dev/null and b/3D GFX/Miscellaneous/Tank.webm differ
diff --git a/3D GFX/Miscellaneous/Tiled room.bas b/3D GFX/Miscellaneous/Tiled room.bas
new file mode 100755 (executable)
index 0000000..24e3224
--- /dev/null
@@ -0,0 +1,502 @@
+' Program renders 3D room with various decorative tiles on the wall and on the floor.\r
+' User can freely fly around and look at the room from different angles.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' ?, Initial version\r
+' 2024, Improved program readability\r
+'\r
+' Keyboard controls:\r
+' <left>, <right>, <up>, <down> - move around\r
+' 2, 6, 4, 8 - look around (number pad)\r
+' <SPACE> - speed down\r
+' q - quit\r
+' + / - - move up / down\r
+'\r
+\r
+\r
+DECLARE SUB renderSquare2 (x!, y!, z!, s!)\r
+DECLARE SUB renderSquare (x%, y%, z%, s%)\r
+DECLARE SUB renderHexagon (x!, y!, z!, s!)\r
+DECLARE SUB generateCube ()\r
+\r
+DECLARE SUB start ()\r
+DECLARE SUB addSquare (x1%, y1%, z1%)\r
+DECLARE SUB getCornerVertices ()\r
+DECLARE SUB multiplyCoordinates ()\r
+DECLARE SUB calculateSine ()\r
+DIM SHARED xVertex(4000), yVertex(4000), zVertex(4000)\r
+DIM SHARED xCoordinate(4000), yCoordinate(4000), zCoordinate(4000)\r
+\r
+DIM SHARED xOriginal(4000), yOriginal(4000), zOriginal(4000)\r
+DIM SHARED point1Vertex(4000), point2Vertex(4000)\r
+DIM SHARED col(4000)\r
+DIM SHARED vertexCount, edgeCount\r
+DIM SHARED myx, myy, myz, mye, myk\r
+\r
+myx = 0\r
+myy = 0\r
+myz = -1000\r
+\r
+start\r
+\r
+nait3d\r
+\r
+SUB addSquare (x1%, y1%, z1%)\r
+    c = 1\r
+\r
+    ' Define the vertices of a square in 3D space\r
+    xVertex(vertexCount + 1) = -100 + x1\r
+    yVertex(vertexCount + 1) = y1\r
+    zVertex(vertexCount + 1) = -100 + z1\r
+\r
+    xVertex(vertexCount + 2) = 100 + x1\r
+    yVertex(vertexCount + 2) = y1\r
+    zVertex(vertexCount + 2) = -100 + z1\r
+\r
+    xVertex(vertexCount + 3) = 100 + x1\r
+    yVertex(vertexCount + 3) = y1\r
+    zVertex(vertexCount + 3) = 100 + z1\r
+\r
+    xVertex(vertexCount + 4) = -100 + x1\r
+    yVertex(vertexCount + 4) = y1\r
+    zVertex(vertexCount + 4) = 100 + z1\r
+\r
+    ' Define the edges of the square\r
+    point1Vertex(edgeCount + 1) = vertexCount + 1\r
+    point2Vertex(edgeCount + 1) = vertexCount + 2\r
+    col(edgeCount + 1) = c\r
+\r
+    point1Vertex(edgeCount + 2) = vertexCount + 2\r
+    point2Vertex(edgeCount + 2) = vertexCount + 3\r
+    col(edgeCount + 2) = c\r
+\r
+    point1Vertex(edgeCount + 3) = vertexCount + 3\r
+    point2Vertex(edgeCount + 3) = vertexCount + 4\r
+    col(edgeCount + 3) = c\r
+\r
+    point1Vertex(edgeCount + 4) = vertexCount + 4\r
+    point2Vertex(edgeCount + 4) = vertexCount + 1\r
+    col(edgeCount + 4) = c\r
+\r
+    ' Update the counters for the next square\r
+    vertexCount = vertexCount + 4\r
+    edgeCount = edgeCount + 4\r
+\r
+END SUB\r
+\r
+SUB getCornerVertices\r
+\r
+    ' Define the vertices of a square in 3D space\r
+    xVertex(vertexCount + 1) = -150\r
+    yVertex(vertexCount + 1) = -125\r
+    zVertex(vertexCount + 1) = -200\r
+\r
+    xVertex(vertexCount + 2) = 150\r
+    yVertex(vertexCount + 2) = -125\r
+    zVertex(vertexCount + 2) = -200\r
+\r
+    xVertex(vertexCount + 3) = 150\r
+    yVertex(vertexCount + 3) = 125\r
+    zVertex(vertexCount + 3) = -200\r
+\r
+    xVertex(vertexCount + 4) = -150\r
+    yVertex(vertexCount + 4) = 125\r
+    zVertex(vertexCount + 4) = -200\r
+\r
+    ' Define the edges of the square\r
+    point1Vertex(edgeCount + 1) = vertexCount + 1\r
+    point2Vertex(edgeCount + 1) = vertexCount + 2\r
+\r
+    point1Vertex(edgeCount + 2) = vertexCount + 2\r
+    point2Vertex(edgeCount + 2) = vertexCount + 3\r
+\r
+    point1Vertex(edgeCount + 3) = vertexCount + 3\r
+    point2Vertex(edgeCount + 3) = vertexCount + 4\r
+\r
+    point1Vertex(edgeCount + 4) = vertexCount + 4\r
+    point2Vertex(edgeCount + 4) = vertexCount + 1\r
+\r
+    ' Define the vertices of another square in 3D space\r
+    xVertex(vertexCount + 5) = -150\r
+    yVertex(vertexCount + 5) = -125\r
+    zVertex(vertexCount + 5) = 200\r
+\r
+    xVertex(vertexCount + 6) = 150\r
+    yVertex(vertexCount + 6) = -125\r
+    zVertex(vertexCount + 6) = 200\r
+\r
+    xVertex(vertexCount + 7) = 150\r
+    yVertex(vertexCount + 7) = 125\r
+    zVertex(vertexCount + 7) = 200\r
+\r
+    xVertex(vertexCount + 8) = -150\r
+    yVertex(vertexCount + 8) = 125\r
+    zVertex(vertexCount + 8) = 200\r
+\r
+    ' Define the edges of the second square\r
+    point1Vertex(edgeCount + 5) = vertexCount + 5\r
+    point2Vertex(edgeCount + 5) = vertexCount + 6\r
+\r
+    point1Vertex(edgeCount + 6) = vertexCount + 6\r
+    point2Vertex(edgeCount + 6) = vertexCount + 7\r
+\r
+    point1Vertex(edgeCount + 7) = vertexCount + 7\r
+    point2Vertex(edgeCount + 7) = vertexCount + 8\r
+\r
+    point1Vertex(edgeCount + 8) = vertexCount + 8\r
+    point2Vertex(edgeCount + 8) = vertexCount + 5\r
+\r
+    ' Define the edges connecting the two squares into cube\r
+    point1Vertex(edgeCount + 9) = vertexCount + 5\r
+    point2Vertex(edgeCount + 9) = vertexCount + 1\r
+\r
+    point1Vertex(edgeCount + 10) = vertexCount + 6\r
+    point2Vertex(edgeCount + 10) = vertexCount + 2\r
+\r
+    point1Vertex(edgeCount + 11) = vertexCount + 7\r
+    point2Vertex(edgeCount + 11) = vertexCount + 3\r
+\r
+    point1Vertex(edgeCount + 12) = vertexCount + 8\r
+    point2Vertex(edgeCount + 12) = vertexCount + 4\r
+\r
+    ' Update the counters for the next set of vertices and edges\r
+    vertexCount = vertexCount + 8\r
+    edgeCount = edgeCount + 12\r
+\r
+    ' Define a pyramid in 3D space\r
+    xVertex(vertexCount + 1) = -150\r
+    yVertex(vertexCount + 1) = -125 + 201\r
+    zVertex(vertexCount + 1) = 0\r
+\r
+    xVertex(vertexCount + 2) = -150\r
+    yVertex(vertexCount + 2) = -125 + 201\r
+    zVertex(vertexCount + 2) = 89\r
+\r
+    xVertex(vertexCount + 3) = -150\r
+    yVertex(vertexCount + 3) = -125\r
+    zVertex(vertexCount + 3) = 89\r
+\r
+    xVertex(vertexCount + 4) = -150\r
+    yVertex(vertexCount + 4) = -125\r
+    zVertex(vertexCount + 4) = 0\r
+\r
+    ' Define the edges of the pyramid\r
+    point1Vertex(edgeCount + 1) = vertexCount + 1\r
+    point2Vertex(edgeCount + 1) = vertexCount + 2\r
+\r
+    point1Vertex(edgeCount + 2) = vertexCount + 2\r
+    point2Vertex(edgeCount + 2) = vertexCount + 3\r
+\r
+    point1Vertex(edgeCount + 3) = vertexCount + 3\r
+    point2Vertex(edgeCount + 3) = vertexCount + 4\r
+\r
+    point1Vertex(edgeCount + 4) = vertexCount + 4\r
+    point2Vertex(edgeCount + 4) = vertexCount + 1\r
+\r
+    ' Update the counters for the next set of vertices and edges\r
+    vertexCount = vertexCount + 4\r
+    edgeCount = edgeCount + 4\r
+\r
+porand\r
+\r
+END SUB\r
+\r
+SUB renderHexagon (x, y, z, s)\r
+\r
+b = 0\r
+f = .3925\r
+' Calculate the vertices of a hexagon in 3D space\r
+FOR a = 0 + f TO 6 + f STEP 6.28 / 8\r
+    x1 = SIN(a) * s\r
+    y1 = COS(a) * s\r
+    b = b + 1\r
+\r
+    xVertex(vertexCount + b) = x + x1\r
+    yVertex(vertexCount + b) = y\r
+    zVertex(vertexCount + b) = z + y1\r
+\r
+NEXT a\r
+\r
+' Define the edges of the hexagon\r
+point1Vertex(edgeCount + 1) = vertexCount + 1\r
+point2Vertex(edgeCount + 1) = vertexCount + 2\r
+col(edgeCount + 1) = 12\r
+\r
+point1Vertex(edgeCount + 2) = vertexCount + 2\r
+point2Vertex(edgeCount + 2) = vertexCount + 3\r
+col(edgeCount + 2) = 12\r
+\r
+point1Vertex(edgeCount + 3) = vertexCount + 3\r
+point2Vertex(edgeCount + 3) = vertexCount + 4\r
+col(edgeCount + 3) = 12\r
+\r
+point1Vertex(edgeCount + 4) = vertexCount + 4\r
+point2Vertex(edgeCount + 4) = vertexCount + 5\r
+col(edgeCount + 4) = 12\r
+\r
+point1Vertex(edgeCount + 5) = vertexCount + 5\r
+point2Vertex(edgeCount + 5) = vertexCount + 6\r
+col(edgeCount + 5) = 12\r
+\r
+point1Vertex(edgeCount + 6) = vertexCount + 6\r
+point2Vertex(edgeCount + 6) = vertexCount + 7\r
+col(edgeCount + 6) = 12\r
+\r
+point1Vertex(edgeCount + 7) = vertexCount + 7\r
+point2Vertex(edgeCount + 7) = vertexCount + 8\r
+col(edgeCount + 7) = 12\r
+\r
+point1Vertex(edgeCount + 8) = vertexCount + 8\r
+point2Vertex(edgeCount + 8) = vertexCount + 1\r
+col(edgeCount + 8) = 12\r
+\r
+' Update the counters for the next set of vertices and edges\r
+vertexCount = vertexCount + b\r
+edgeCount = edgeCount + 8\r
+\r
+END SUB\r
+\r
+SUB nait3d\r
+\r
+    ' Main loop to render the 3D scene\r
+1\r
+\r
+    ' Update the position based on rotation\r
+    myx = myx + SIN(deg1) * mye\r
+    myz = myz + COS(deg1) * mye\r
+\r
+    myx = myx + COS(deg1) * myk\r
+    myz = myz - SIN(deg1) * myk\r
+\r
+    ' Update the rotation angles\r
+    deg1 = deg1 + d1\r
+    Deg2 = Deg2 + d2\r
+\r
+    ' Calculate the rotation matrices\r
+    C1 = COS(deg1): S1 = SIN(deg1)\r
+    C2 = COS(Deg2): S2 = SIN(Deg2)\r
+\r
+    ' Apply the rotation to each vertex\r
+    FOR a = 1 TO vertexCount\r
+        xo = xVertex(a) - myx\r
+        yo = -yVertex(a) - myy\r
+        zo = zVertex(a) - myz\r
+\r
+        x1 = (xo * C1 - zo * S1)\r
+        z1 = (xo * S1 + zo * C1)\r
+\r
+        y1 = (yo * C2 - z1 * S2)\r
+        z2 = (yo * S2 + z1 * C2)\r
+\r
+        ' Project the vertex onto the 2D screen\r
+        xOriginal(a) = xCoordinate(a)\r
+        yOriginal(a) = yCoordinate(a)\r
+        IF z2 < 20 THEN\r
+            xCoordinate(a) = -1\r
+        ELSE\r
+            xCoordinate(a) = 320 + (x1 / z2 * 500)\r
+            yCoordinate(a) = 240 + (y1 / z2 * 500)\r
+        END IF\r
+    NEXT\r
+\r
+    ' Draw the edges of each shape\r
+    FOR a = 1 TO edgeCount\r
+        p1 = point1Vertex(a)\r
+        p2 = point2Vertex(a)\r
+        IF xOriginal(p1) = -1 OR xOriginal(p2) = -1 THEN\r
+            ' Skip drawing if the vertex is off-screen\r
+        ELSE\r
+            ' erase edge on old coordinates\r
+            LINE (xOriginal(p1), yOriginal(p1))-(xOriginal(p2), yOriginal(p2)), 0\r
+        END IF\r
+\r
+        IF xCoordinate(p1) = -1 OR xCoordinate(p2) = -1 THEN\r
+            ' Skip drawing if the vertex is off-screen\r
+        ELSE\r
+            ' draw edge on new coordinates\r
+            LINE (xCoordinate(p1), yCoordinate(p1))-(xCoordinate(p2), yCoordinate(p2)), col(a)\r
+        END IF\r
+    NEXT\r
+\r
+    ' Handle user input\r
+    K$ = INKEY$\r
+    IF K$ <> "" THEN\r
+\r
+        SELECT CASE K$\r
+\r
+            CASE CHR$(0) + "P"\r
+                mye = mye - 3\r
+\r
+            CASE CHR$(0) + "H"\r
+                mye = mye + 3\r
+\r
+            CASE CHR$(0) + "M"\r
+                myk = myk + 3\r
+\r
+            CASE CHR$(0) + "K"\r
+                myk = myk - 3\r
+\r
+            CASE "+"\r
+                myy = myy + 3\r
+\r
+            CASE "-"\r
+                myy = myy - 3\r
+\r
+            CASE "6"\r
+                d1 = d1 + .01\r
+\r
+            CASE "4"\r
+                d1 = d1 - .01\r
+\r
+            CASE "8"\r
+                d2 = d2 - .01\r
+\r
+            CASE "2"\r
+                d2 = d2 + .01\r
+\r
+            CASE " "\r
+                d1 = d1 / 2\r
+                d2 = d2 / 2\r
+                d3 = d3 / 2\r
+                mye = mye / 2\r
+                myk = myk / 2\r
+\r
+            CASE "q"\r
+                SYSTEM\r
+\r
+            CASE CHR$(27)\r
+                SYSTEM\r
+        END SELECT\r
+    END IF\r
+\r
+    ' Continue the main loop\r
+    GOTO 1\r
+END SUB\r
+\r
+SUB porand\r
+\r
+    ' Generate a grid of shapes in 3D space\r
+    FOR x = -100 TO 0 STEP 12.067 + .3\r
+        FOR z = -100 TO 0 STEP 12.067 + .3\r
+            renderHexagon x, -125, z, 6.53\r
+            renderSquare x + 6.033 + .15, -125, z + 6.033 + .15, 3.111 + .3\r
+        NEXT z\r
+    NEXT x\r
+\r
+    ' Generate another grid of shapes in 3D space\r
+    FOR y = -100 TO 0 STEP 20.3\r
+        FOR x = -100 TO 0 STEP 20.3\r
+            renderSquare2 x, y, 200, 10\r
+        NEXT x\r
+    NEXT y\r
+\r
+END SUB\r
+\r
+SUB renderSquare (x%, y%, z%, s%)\r
+\r
+    ' Define the vertices of a square in 3D space\r
+    xVertex(vertexCount + 1) = x%\r
+    yVertex(vertexCount + 1) = y%\r
+    zVertex(vertexCount + 1) = z% + s%\r
+\r
+    xVertex(vertexCount + 2) = x% + s%\r
+    yVertex(vertexCount + 2) = y%\r
+    zVertex(vertexCount + 2) = z%\r
+\r
+    xVertex(vertexCount + 3) = x%\r
+    yVertex(vertexCount + 3) = y%\r
+    zVertex(vertexCount + 3) = z% - s%\r
+\r
+    xVertex(vertexCount + 4) = x% - s%\r
+    yVertex(vertexCount + 4) = y%\r
+    zVertex(vertexCount + 4) = z%\r
+\r
+    ' Define the edges of the square\r
+    point1Vertex(edgeCount + 1) = vertexCount + 1\r
+    point2Vertex(edgeCount + 1) = vertexCount + 2\r
+    col(edgeCount + 1) = 10\r
+\r
+    point1Vertex(edgeCount + 2) = vertexCount + 2\r
+    point2Vertex(edgeCount + 2) = vertexCount + 3\r
+    col(edgeCount + 2) = 10\r
+\r
+    point1Vertex(edgeCount + 3) = vertexCount + 3\r
+    point2Vertex(edgeCount + 3) = vertexCount + 4\r
+    col(edgeCount + 3) = 10\r
+\r
+    point1Vertex(edgeCount + 4) = vertexCount + 4\r
+    point2Vertex(edgeCount + 4) = vertexCount + 1\r
+    col(edgeCount + 4) = 10\r
+\r
+    ' Update the counters for the next square\r
+    vertexCount = vertexCount + 4\r
+    edgeCount = edgeCount + 4\r
+\r
+END SUB\r
+\r
+SUB renderSquare2 (x, y, z, s)\r
+\r
+    ' Define the vertices of a square in 3D space\r
+    xVertex(vertexCount + 1) = x - s\r
+    yVertex(vertexCount + 1) = y - s\r
+    zVertex(vertexCount + 1) = z\r
+\r
+    xVertex(vertexCount + 2) = x + s\r
+    yVertex(vertexCount + 2) = y - s\r
+    zVertex(vertexCount + 2) = z\r
+\r
+    xVertex(vertexCount + 3) = x + s\r
+    yVertex(vertexCount + 3) = y + s\r
+    zVertex(vertexCount + 3) = z\r
+\r
+    xVertex(vertexCount + 4) = x - s\r
+    yVertex(vertexCount + 4) = y + s\r
+    zVertex(vertexCount + 4) = z\r
+\r
+    ' Define the edges of the square\r
+    point1Vertex(edgeCount + 1) = vertexCount + 1\r
+    point2Vertex(edgeCount + 1) = vertexCount + 2\r
+    col(edgeCount + 1) = 14\r
+\r
+    point1Vertex(edgeCount + 2) = vertexCount + 2\r
+    point2Vertex(edgeCount + 2) = vertexCount + 3\r
+    col(edgeCount + 2) = 14\r
+\r
+    point1Vertex(edgeCount + 3) = vertexCount + 3\r
+    point2Vertex(edgeCount + 3) = vertexCount + 4\r
+    col(edgeCount + 3) = 14\r
+\r
+    point1Vertex(edgeCount + 4) = vertexCount + 4\r
+    point2Vertex(edgeCount + 4) = vertexCount + 1\r
+    col(edgeCount + 4) = 14\r
+\r
+    ' Update the counters for the next square\r
+    vertexCount = vertexCount + 4\r
+    edgeCount = edgeCount + 4\r
+\r
+END SUB\r
+\r
+SUB start\r
+\r
+    ' Initialize the screen and clear it\r
+    SCREEN 12\r
+    CLS\r
+\r
+    ' Set the initial color of all shapes\r
+    FOR a = 1 TO 4000\r
+        col(a) = 15\r
+    NEXT a\r
+\r
+    ' Initialize counters for vertices and edges\r
+    vertexCount = 0\r
+    edgeCount = 0\r
+\r
+    ' Generate the initial set of shapes\r
+    getCornerVertices\r
+\r
+END SUB\r
diff --git a/3D GFX/Miscellaneous/Tiled room.webm b/3D GFX/Miscellaneous/Tiled room.webm
new file mode 100644 (file)
index 0000000..0c4263a
Binary files /dev/null and b/3D GFX/Miscellaneous/Tiled room.webm differ
diff --git a/3D GFX/Miscellaneous/font.dat b/3D GFX/Miscellaneous/font.dat
new file mode 100644 (file)
index 0000000..d3c1e68
--- /dev/null
@@ -0,0 +1,230 @@
+# a\r
+p 1 0\r
+p 0 1\r
+p 2 1\r
+p 0 2\r
+p 2 2\r
+l 0 1\r
+l 0 2\r
+l 1 2\r
+l 1 3\r
+l 2 4\r
+# b\r
+p 0 0\r
+p 2 0\r
+p 0 1\r
+p 0 2\r
+p 2 2\r
+l 0 1\r
+l 0 3\r
+l 1 2\r
+l 3 4\r
+l 4 2\r
+# c\r
+p 2 0\r
+p 1 0\r
+p 0 1\r
+p 1 2\r
+p 2 2\r
+l 0 1\r
+l 1 2\r
+l 2 3\r
+l 3 4\r
+# d\r
+p 0 0\r
+p 1 0\r
+p 2 1\r
+p 1 2\r
+p 0 2\r
+l 0 1\r
+l 1 2\r
+l 2 3\r
+l 3 4\r
+l 4 0\r
+# e\r
+p 0 0\r
+p 2 0\r
+p 0 1\r
+p 2 1\r
+p 0 2\r
+p 2 2\r
+l 0 1\r
+l 2 3\r
+l 4 5\r
+l 0 4\r
+# f\r
+p 0 0\r
+p 2 0\r
+p 0 1\r
+p 2 1\r
+p 0 2\r
+l 0 1\r
+l 2 3\r
+l 0 4\r
+# g\r
+p 2 0\r
+p 1 0\r
+p 0 1\r
+p 1 2\r
+p 2 2\r
+p 2 1\r
+p 1 1\r
+l 0 1\r
+l 1 2\r
+l 2 3\r
+l 3 4\r
+l 4 5\r
+l 5 6\r
+# h\r
+p 0 0\r
+p 0 2\r
+p 2 0\r
+p 2 2\r
+p 0 1\r
+p 2 1\r
+l 0 1\r
+l 2 3\r
+l 4 5\r
+# i\r
+p 1 0\r
+p 1 2\r
+l 0 1\r
+# j\r
+p 0 1\r
+p 0 2\r
+p 1 2\r
+p 1 0\r
+l 0 1\r
+l 1 2\r
+l 2 3\r
+# k\r
+p 0 0\r
+p 0 2\r
+p 2 0\r
+p 2 2\r
+p 0 1\r
+l 0 1\r
+l 2 4\r
+l 4 3\r
+# l\r
+p 0 0\r
+p 0 2\r
+p 2 2\r
+l 0 1\r
+l 1 2\r
+# m\r
+p 0 2\r
+p 0 0\r
+p 1 1\r
+p 2 0\r
+p 2 2\r
+l 0 1\r
+l 1 2\r
+l 2 3\r
+l 3 4\r
+# n\r
+p 0 2\r
+p 0 0\r
+p 2 2\r
+p 2 0\r
+l 0 1\r
+l 1 2\r
+l 2 3\r
+# o\r
+p 0 0\r
+p 2 0\r
+p 2 2\r
+p 0 2\r
+l 0 1\r
+l 1 2\r
+l 2 3\r
+l 3 0\r
+# p\r
+p 0 0\r
+p 2 0\r
+p 2 1\r
+p 0 1\r
+p 0 2\r
+l 0 1\r
+l 1 2\r
+l 2 3\r
+l 0 4\r
+# q\r
+p 0 0\r
+p 2 0\r
+p 2 2\r
+p 0 2\r
+p 1 1\r
+l 0 1\r
+l 1 2\r
+l 2 3\r
+l 3 0\r
+l 2 4\r
+# r\r
+p 0 0\r
+p 2 0\r
+p 2 1\r
+p 0 1\r
+p 0 2\r
+p 2 2\r
+l 0 1\r
+l 1 2\r
+l 2 3\r
+l 0 4\r
+l 5 3\r
+# s\r
+p 2 0\r
+p 0 0\r
+p 0 1\r
+p 2 1\r
+p 2 2\r
+p 0 2\r
+l 0 1\r
+l 1 2\r
+l 2 3\r
+l 3 4\r
+l 4 5\r
+# t\r
+p 0 0\r
+p 2 0\r
+p 1 0\r
+p 1 2\r
+l 0 1\r
+l 2 3\r
+# u\r
+p 0 0\r
+p 0 2\r
+p 2 2\r
+p 2 0\r
+l 0 1\r
+l 1 2\r
+l 2 3\r
+# v\r
+p 0 0\r
+p 1 2\r
+p 2 0\r
+l 0 1\r
+l 1 2\r
+# x\r
+p 0 0\r
+p 2 2\r
+p 2 0\r
+p 0 2\r
+l 0 1\r
+l 2 3\r
+# y\r
+p 0 0\r
+p 2 0\r
+p 1 1\r
+p 1 2\r
+l 0 2\r
+l 1 2\r
+l 2 3\r
+# z\r
+p 0 0\r
+p 2 0\r
+p 0 2\r
+p 2 2\r
+l 0 1\r
+l 1 2\r
+l 2 3
\ No newline at end of file
diff --git a/3D GFX/Miscellaneous/index.html b/3D GFX/Miscellaneous/index.html
new file mode 100644 (file)
index 0000000..ea5b4f2
--- /dev/null
@@ -0,0 +1,416 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<!-- 2025-07-28 ma 03:33 -->
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+<meta name="viewport" content="width=device-width, initial-scale=1" />
+<title>Miscellaneous 3D graphics demos</title>
+<meta name="generator" content="Org Mode" />
+<style>
+  #content { max-width: 60em; margin: auto; }
+  .title  { text-align: center;
+             margin-bottom: .2em; }
+  .subtitle { text-align: center;
+              font-size: medium;
+              font-weight: bold;
+              margin-top:0; }
+  .todo   { font-family: monospace; color: red; }
+  .done   { font-family: monospace; color: green; }
+  .priority { font-family: monospace; color: orange; }
+  .tag    { background-color: #eee; font-family: monospace;
+            padding: 2px; font-size: 80%; font-weight: normal; }
+  .timestamp { color: #bebebe; }
+  .timestamp-kwd { color: #5f9ea0; }
+  .org-right  { margin-left: auto; margin-right: 0px;  text-align: right; }
+  .org-left   { margin-left: 0px;  margin-right: auto; text-align: left; }
+  .org-center { margin-left: auto; margin-right: auto; text-align: center; }
+  .underline { text-decoration: underline; }
+  #postamble p, #preamble p { font-size: 90%; margin: .2em; }
+  p.verse { margin-left: 3%; }
+  pre {
+    border: 1px solid #e6e6e6;
+    border-radius: 3px;
+    background-color: #f2f2f2;
+    padding: 8pt;
+    font-family: monospace;
+    overflow: auto;
+    margin: 1.2em;
+  }
+  pre.src {
+    position: relative;
+    overflow: auto;
+  }
+  pre.src:before {
+    display: none;
+    position: absolute;
+    top: -8px;
+    right: 12px;
+    padding: 3px;
+    color: #555;
+    background-color: #f2f2f299;
+  }
+  pre.src:hover:before { display: inline; margin-top: 14px;}
+  /* Languages per Org manual */
+  pre.src-asymptote:before { content: 'Asymptote'; }
+  pre.src-awk:before { content: 'Awk'; }
+  pre.src-authinfo::before { content: 'Authinfo'; }
+  pre.src-C:before { content: 'C'; }
+  /* pre.src-C++ doesn't work in CSS */
+  pre.src-clojure:before { content: 'Clojure'; }
+  pre.src-css:before { content: 'CSS'; }
+  pre.src-D:before { content: 'D'; }
+  pre.src-ditaa:before { content: 'ditaa'; }
+  pre.src-dot:before { content: 'Graphviz'; }
+  pre.src-calc:before { content: 'Emacs Calc'; }
+  pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
+  pre.src-fortran:before { content: 'Fortran'; }
+  pre.src-gnuplot:before { content: 'gnuplot'; }
+  pre.src-haskell:before { content: 'Haskell'; }
+  pre.src-hledger:before { content: 'hledger'; }
+  pre.src-java:before { content: 'Java'; }
+  pre.src-js:before { content: 'Javascript'; }
+  pre.src-latex:before { content: 'LaTeX'; }
+  pre.src-ledger:before { content: 'Ledger'; }
+  pre.src-lisp:before { content: 'Lisp'; }
+  pre.src-lilypond:before { content: 'Lilypond'; }
+  pre.src-lua:before { content: 'Lua'; }
+  pre.src-matlab:before { content: 'MATLAB'; }
+  pre.src-mscgen:before { content: 'Mscgen'; }
+  pre.src-ocaml:before { content: 'Objective Caml'; }
+  pre.src-octave:before { content: 'Octave'; }
+  pre.src-org:before { content: 'Org mode'; }
+  pre.src-oz:before { content: 'OZ'; }
+  pre.src-plantuml:before { content: 'Plantuml'; }
+  pre.src-processing:before { content: 'Processing.js'; }
+  pre.src-python:before { content: 'Python'; }
+  pre.src-R:before { content: 'R'; }
+  pre.src-ruby:before { content: 'Ruby'; }
+  pre.src-sass:before { content: 'Sass'; }
+  pre.src-scheme:before { content: 'Scheme'; }
+  pre.src-screen:before { content: 'Gnu Screen'; }
+  pre.src-sed:before { content: 'Sed'; }
+  pre.src-sh:before { content: 'shell'; }
+  pre.src-sql:before { content: 'SQL'; }
+  pre.src-sqlite:before { content: 'SQLite'; }
+  /* additional languages in org.el's org-babel-load-languages alist */
+  pre.src-forth:before { content: 'Forth'; }
+  pre.src-io:before { content: 'IO'; }
+  pre.src-J:before { content: 'J'; }
+  pre.src-makefile:before { content: 'Makefile'; }
+  pre.src-maxima:before { content: 'Maxima'; }
+  pre.src-perl:before { content: 'Perl'; }
+  pre.src-picolisp:before { content: 'Pico Lisp'; }
+  pre.src-scala:before { content: 'Scala'; }
+  pre.src-shell:before { content: 'Shell Script'; }
+  pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
+  /* additional language identifiers per "defun org-babel-execute"
+       in ob-*.el */
+  pre.src-cpp:before  { content: 'C++'; }
+  pre.src-abc:before  { content: 'ABC'; }
+  pre.src-coq:before  { content: 'Coq'; }
+  pre.src-groovy:before  { content: 'Groovy'; }
+  /* additional language identifiers from org-babel-shell-names in
+     ob-shell.el: ob-shell is the only babel language using a lambda to put
+     the execution function name together. */
+  pre.src-bash:before  { content: 'bash'; }
+  pre.src-csh:before  { content: 'csh'; }
+  pre.src-ash:before  { content: 'ash'; }
+  pre.src-dash:before  { content: 'dash'; }
+  pre.src-ksh:before  { content: 'ksh'; }
+  pre.src-mksh:before  { content: 'mksh'; }
+  pre.src-posh:before  { content: 'posh'; }
+  /* Additional Emacs modes also supported by the LaTeX listings package */
+  pre.src-ada:before { content: 'Ada'; }
+  pre.src-asm:before { content: 'Assembler'; }
+  pre.src-caml:before { content: 'Caml'; }
+  pre.src-delphi:before { content: 'Delphi'; }
+  pre.src-html:before { content: 'HTML'; }
+  pre.src-idl:before { content: 'IDL'; }
+  pre.src-mercury:before { content: 'Mercury'; }
+  pre.src-metapost:before { content: 'MetaPost'; }
+  pre.src-modula-2:before { content: 'Modula-2'; }
+  pre.src-pascal:before { content: 'Pascal'; }
+  pre.src-ps:before { content: 'PostScript'; }
+  pre.src-prolog:before { content: 'Prolog'; }
+  pre.src-simula:before { content: 'Simula'; }
+  pre.src-tcl:before { content: 'tcl'; }
+  pre.src-tex:before { content: 'TeX'; }
+  pre.src-plain-tex:before { content: 'Plain TeX'; }
+  pre.src-verilog:before { content: 'Verilog'; }
+  pre.src-vhdl:before { content: 'VHDL'; }
+  pre.src-xml:before { content: 'XML'; }
+  pre.src-nxml:before { content: 'XML'; }
+  /* add a generic configuration mode; LaTeX export needs an additional
+     (add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
+  pre.src-conf:before { content: 'Configuration File'; }
+
+  table { border-collapse:collapse; }
+  caption.t-above { caption-side: top; }
+  caption.t-bottom { caption-side: bottom; }
+  td, th { vertical-align:top;  }
+  th.org-right  { text-align: center;  }
+  th.org-left   { text-align: center;   }
+  th.org-center { text-align: center; }
+  td.org-right  { text-align: right;  }
+  td.org-left   { text-align: left;   }
+  td.org-center { text-align: center; }
+  dt { font-weight: bold; }
+  .footpara { display: inline; }
+  .footdef  { margin-bottom: 1em; }
+  .figure { padding: 1em; }
+  .figure p { text-align: center; }
+  .equation-container {
+    display: table;
+    text-align: center;
+    width: 100%;
+  }
+  .equation {
+    vertical-align: middle;
+  }
+  .equation-label {
+    display: table-cell;
+    text-align: right;
+    vertical-align: middle;
+  }
+  .inlinetask {
+    padding: 10px;
+    border: 2px solid gray;
+    margin: 10px;
+    background: #ffffcc;
+  }
+  #org-div-home-and-up
+   { text-align: right; font-size: 70%; white-space: nowrap; }
+  textarea { overflow-x: auto; }
+  .linenr { font-size: smaller }
+  .code-highlighted { background-color: #ffff00; }
+  .org-info-js_info-navigation { border-style: none; }
+  #org-info-js_console-label
+    { font-size: 10px; font-weight: bold; white-space: nowrap; }
+  .org-info-js_search-highlight
+    { background-color: #ffff00; color: #000000; font-weight: bold; }
+  .org-svg { }
+</style>
+<style type="text/css">
+               body {
+                 max-width: 35cm !important;
+               }
+               #content {
+                 max-width: 80em !important;
+                 width: 90%;
+               }
+               </style>
+<link rel="stylesheet" type="text/css" href="https://thomasf.github.io/solarized-css/solarized-dark.min.css" />
+</head>
+<body>
+<div id="content" class="content">
+<h1 class="title">Miscellaneous 3D graphics demos</h1>
+<div id="table-of-contents" role="doc-toc">
+<h2>Table of Contents</h2>
+<div id="text-table-of-contents" role="doc-toc">
+<ul>
+<li><a href="#org7773f6b">1. Rotating exclamation mark</a></li>
+<li><a href="#org3e8525d">2. 3D bouncing ball</a></li>
+<li><a href="#orgbda18f8">3. 3D text in a room</a></li>
+<li><a href="#org3f9cc1b">4. 3D bouncing cubes on grid floor</a></li>
+<li><a href="#org59197c7">5. Matrix math for rotation in 3D space</a></li>
+<li><a href="#orgb8734ec">6. Maze explorer</a></li>
+<li><a href="#org33e3a25">7. Tank animation</a></li>
+<li><a href="#orgfb42a5b">8. Tiled room</a></li>
+</ul>
+</div>
+</div>
+<style>
+  .flex-center {
+    display: flex;            /* activate flexbox */
+    justify-content: center;  /* horizontally center anything inside   */
+  }
+
+  .flex-center video {
+    width: min(90%, 1000px); /* whichever is smaller wins */
+    height: auto;            /* preserve aspect ratio */
+  }
+
+  .responsive-img {
+    width: min(100%, 1000px);
+    height: auto;
+  }
+</style>
+
+<div id="outline-container-org7773f6b" class="outline-2">
+<h2 id="org7773f6b"><span class="section-number-2">1.</span> Rotating exclamation mark</h2>
+<div class="outline-text-2" id="text-1">
+<p>
+Wireframe 3D model of a rotating exclamation mark.
+</p>
+
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="!.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+
+<p>
+<a href="!.bas">Source code</a>
+</p>
+</div>
+</div>
+
+
+<div id="outline-container-org3e8525d" class="outline-2">
+<h2 id="org3e8525d"><span class="section-number-2">2.</span> 3D bouncing ball</h2>
+<div class="outline-text-2" id="text-2">
+<p>
+3D ball made of point cloud.
+</p>
+
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="3D%20ball.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+
+<p>
+<a href="3D%20ball.bas">Source code</a>
+</p>
+</div>
+</div>
+
+
+<div id="outline-container-orgbda18f8" class="outline-2">
+<h2 id="orgbda18f8"><span class="section-number-2">3.</span> 3D text in a room</h2>
+<div class="outline-text-2" id="text-3">
+<p>
+Wireframe 3D text hanging in a wireframe 3D room. User can look and
+fly around in all directions.
+</p>
+
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="3D text.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+
+<p>
+<a href="3D%20text.bas">Source code</a>
+</p>
+</div>
+</div>
+
+
+<div id="outline-container-org3f9cc1b" class="outline-2">
+<h2 id="org3f9cc1b"><span class="section-number-2">4.</span> 3D bouncing cubes on grid floor</h2>
+<div class="outline-text-2" id="text-4">
+<p>
+3D wireframe cubes bouncing on a grid floor, creating an immersive and
+dynamic visual effect.
+</p>
+
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="Bouncing cubes.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+
+<p>
+<a href="3D%20GFX/Bouncing%20cubes.bas">Source code</a>
+</p>
+</div>
+</div>
+
+
+<div id="outline-container-org59197c7" class="outline-2">
+<h2 id="org59197c7"><span class="section-number-2">5.</span> Matrix math for rotation in 3D space</h2>
+<div class="outline-text-2" id="text-5">
+<p>
+Instead of combining simple 2D rotors, pixels in this 3D space are
+rotated by using matrix multiplications.
+</p>
+
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="Matrix math.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+
+<p>
+<a href="Matrix%20math.bas">Source code</a>
+</p>
+</div>
+</div>
+
+
+<div id="outline-container-orgb8734ec" class="outline-2">
+<h2 id="orgb8734ec"><span class="section-number-2">6.</span> Maze explorer</h2>
+<div class="outline-text-2" id="text-6">
+<p>
+TODO: add description
+</p>
+
+
+<div id="org5fab01b" class="figure">
+<p><a href="Maze%20explorer.bas" class="responsive-img"><img src="Maze%20explorer.png" alt="Maze%20explorer.png" class="responsive-img" /></a>
+</p>
+</div>
+
+<p>
+<a href="Maze explorer.bas">Source code</a>
+</p>
+</div>
+</div>
+
+<div id="outline-container-org33e3a25" class="outline-2">
+<h2 id="org33e3a25"><span class="section-number-2">7.</span> Tank animation</h2>
+<div class="outline-text-2" id="text-7">
+<p>
+Animated tank driving through the bridge back and forward. User can
+look and fly around in all directions.
+</p>
+
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="Tank.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+
+<p>
+<a href="Tank.bas">Source code</a>
+</p>
+</div>
+</div>
+
+
+<div id="outline-container-orgfb42a5b" class="outline-2">
+<h2 id="orgfb42a5b"><span class="section-number-2">8.</span> Tiled room</h2>
+<div class="outline-text-2" id="text-8">
+<p>
+Room with some tiles on the wall and on the floor. User can freely fly
+around.
+</p>
+
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="Tiled room.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+
+<p>
+<a href="Tiled%20room.bas">Source code</a>
+</p>
+</div>
+</div>
+</div>
+<div id="postamble" class="status">
+<p class="date">Created: 2025-07-28 ma 03:33</p>
+<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
+</div>
+</body>
+</html>
diff --git a/3D GFX/Miscellaneous/index.org b/3D GFX/Miscellaneous/index.org
new file mode 100644 (file)
index 0000000..3eb03a3
--- /dev/null
@@ -0,0 +1,153 @@
+#+TITLE: Miscellaneous 3D graphics demos
+#+LANGUAGE: en
+#+LATEX_HEADER: \usepackage[margin=1.0in]{geometry}
+#+LATEX_HEADER: \usepackage{parskip}
+#+LATEX_HEADER: \usepackage[none]{hyphenat}
+
+#+OPTIONS: H:20 num:20
+#+OPTIONS: author:nil
+
+#+begin_export html
+<style>
+  .flex-center {
+    display: flex;            /* activate flexbox */
+    justify-content: center;  /* horizontally center anything inside   */
+  }
+
+  .flex-center video {
+    width: min(90%, 1000px); /* whichever is smaller wins */
+    height: auto;            /* preserve aspect ratio */
+  }
+
+  .responsive-img {
+    width: min(100%, 1000px);
+    height: auto;
+  }
+</style>
+#+end_export
+
+* Rotating exclamation mark
+
+Wireframe 3D model of a rotating exclamation mark.
+
+#+begin_export html
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="!.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:!.bas][Source code]]
+
+
+* 3D bouncing ball
+
+3D ball made of point cloud.
+
+#+begin_export html
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="3D%20ball.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:3D%20ball.bas][Source code]]
+
+
+* 3D text in a room
+
+Wireframe 3D text hanging in a wireframe 3D room. User can look and
+fly around in all directions.
+
+#+begin_export html
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="3D text.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:3D%20text.bas][Source code]]
+
+
+* 3D bouncing cubes on grid floor
+
+3D wireframe cubes bouncing on a grid floor, creating an immersive and
+dynamic visual effect.
+
+#+begin_export html
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="Bouncing cubes.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:3D%20GFX/Bouncing%20cubes.bas][Source code]]
+
+
+* Matrix math for rotation in 3D space
+
+Instead of combining simple 2D rotors, pixels in this 3D space are
+rotated by using matrix multiplications.
+
+#+begin_export html
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="Matrix math.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:Matrix%20math.bas][Source code]]
+
+
+* Maze explorer
+
+TODO: add description
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:Maze%20explorer.bas][file:Maze%20explorer.png]]
+
+[[file:Maze explorer.bas][Source code]]
+
+* Tank animation
+
+Animated tank driving through the bridge back and forward. User can
+look and fly around in all directions.
+
+#+begin_export html
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="Tank.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:Tank.bas][Source code]]
+
+
+* Tiled room
+
+Room with some tiles on the wall and on the floor. User can freely fly
+around.
+
+#+begin_export html
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="Tiled room.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:Tiled%20room.bas][Source code]]
diff --git a/3D GFX/Miscellaneous/logo.png b/3D GFX/Miscellaneous/logo.png
new file mode 100644 (file)
index 0000000..f261c1b
Binary files /dev/null and b/3D GFX/Miscellaneous/logo.png differ
diff --git a/3D GFX/Ray casting engine.bas b/3D GFX/Ray casting engine.bas
new file mode 100755 (executable)
index 0000000..53e17ee
--- /dev/null
@@ -0,0 +1,422 @@
+DECLARE SUB InitializeProgram ()\r
+DECLARE SUB GenerateLandscape ()\r
+DECLARE SUB DisplayTopDownLandscape ()\r
+DECLARE SUB DisplayFrame ()\r
+DECLARE FUNCTION getcol! (r!, g!, b!)\r
+DECLARE SUB FillSquareArea (x1%, y1%, x2%, y2%, c%, h%)\r
+DECLARE SUB CreateTower (towerX%, towerY%)\r
+DECLARE SUB SetupPalette ()\r
+DECLARE SUB DrawLineFromPlayer (x%, y%, xl%)\r
+' Realtime 3D rendering with ray casting engine.\r
+\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+\r
+' Changelog:\r
+' 2003.03, Initial version\r
+' 2024 - 2025, Improved program readability\r
+\r
+' 3D engine automatically adjusts quality to keep constant framerate at 10 fps.\r
+' When framerate is lower than 10 fps, quality will be decreased to speed up rendering.\r
+\r
+' At least Intel Pentium 200 MHz in DOS mode is required to run this program smoothly.\r
+\r
+' keys to use:\r
+' Arrow keys - move around\r
+' 4, 6       - turn left, right\r
+' 8, 2       - look up, down\r
+' Enter      - Toggle full quality\r
+' Space      - jump up (fly)\r
+' ESC        - exit program\r
+\r
+DEFINT A-Y\r
+\r
+DIM SHARED landh(0 TO 180, 0 TO 180)\r
+DIM SHARED landc(0 TO 180, 0 TO 180)\r
+\r
+DIM SHARED zmyx, zmyy, zmyz\r
+DIM SHARED myx, myy, myz\r
+DIM SHARED zmyan, myan2\r
+DIM SHARED ste, stem, dist\r
+DIM SHARED tim$, frm, frml\r
+\r
+frmrate = 10    ' Desired framerate.\r
+                ' Lower framerate, better quality\r
+\r
+InitializeProgram\r
+GenerateLandscape\r
+\r
+DisplayTopDownLandscape\r
+a$ = INPUT$(1)\r
+1\r
+LOCATE 1, 35\r
+PRINT frml\r
+\r
+' Increment the frame counter\r
+frm = frm + 1\r
+\r
+' Check if a new second has passed\r
+IF tim$ <> TIME$ THEN\r
+    ' Update the time\r
+    tim$ = TIME$\r
+\r
+    ' Adjust the step size based on the current frame rate\r
+    IF frm > frmrate THEN\r
+        ste = ste - 1\r
+    ELSE\r
+        ste = ste + 1\r
+    END IF\r
+\r
+    ' Ensure the step size is within bounds\r
+    IF ste < 1 THEN\r
+        ste = 1\r
+    END IF\r
+\r
+    ' Calculate the previous step size\r
+    stem = ste - 1\r
+\r
+    ' Update the frame rate and reset the frame counter\r
+    frml = frm\r
+    frm = 0\r
+END IF\r
+\r
+' Check for user input\r
+a$ = INKEY$\r
+IF a$ <> "" THEN\r
+    SELECT CASE a$\r
+        CASE "4"\r
+            ' Turn left\r
+            zmyan = zmyan + .1\r
+        CASE "6"\r
+            ' Turn right\r
+            zmyan = zmyan - .1\r
+        CASE "8"\r
+            ' Look up\r
+            myan2 = myan2 + 5\r
+        CASE "2"\r
+            ' Look down\r
+            myan2 = myan2 - 5\r
+        CASE CHR$(0) + "H"\r
+            ' Move forward\r
+            zmyx = SIN(zmyan) * 3 + zmyx\r
+            zmyy = COS(zmyan) * 3 + zmyy\r
+        CASE CHR$(0) + "P"\r
+            ' Move backward\r
+            zmyx = -SIN(zmyan) * 3 + zmyx\r
+            zmyy = -COS(zmyan) * 3 + zmyy\r
+        CASE CHR$(0) + "K"\r
+            ' Move left\r
+            zmyx = COS(zmyan) * 3 + zmyx\r
+            zmyy = -SIN(zmyan) * 3 + zmyy\r
+        CASE CHR$(0) + "M"\r
+            ' Move right\r
+            zmyx = -COS(zmyan) * 3 + zmyx\r
+            zmyy = SIN(zmyan) * 3 + zmyy\r
+        CASE " "\r
+            ' Jump up (fly)\r
+            zmyzs = 2\r
+        CASE CHR$(13)\r
+            ' Toggle full quality\r
+            ste = 1\r
+        CASE CHR$(27)\r
+            ' Exit the program\r
+            SYSTEM\r
+    END SELECT\r
+END IF\r
+\r
+' Ensure the player stays within bounds\r
+IF zmyx > 170 THEN\r
+    zmyx = 170\r
+END IF\r
+IF zmyy > 170 THEN\r
+    zmyy = 170\r
+END IF\r
+IF zmyx < 10 THEN\r
+    zmyx = 10\r
+END IF\r
+IF zmyy < 10 THEN\r
+    zmyy = 10\r
+END IF\r
+\r
+' Handle jumping\r
+zmyz = zmyz + zmyzs\r
+zmyzs = zmyzs - .1\r
+\r
+' Ensure the player does not go below the ground\r
+IF zmyz < landh(myx, myy) + 10 THEN\r
+    zmyz = landh(myx, myy) + 10\r
+    ' Adjust jump speed\r
+    zmyzs = (zmyzs / 2) + .2\r
+END IF\r
+\r
+' Update player position\r
+myz = zmyz\r
+myy = zmyy\r
+myx = zmyx\r
+DisplayFrame\r
+GOTO 1\r
+\r
+SUB CreateTower (towerX%, towerY%)\r
+\r
+' Draw a tower at the specified position\r
+FOR a = 10 TO 0 STEP -1\r
+    ' Fill each level of the tower with color\r
+    FillSquareArea towerX% - a, towerY% - a, towerX% + a, towerY% + a, getcol(100, 0, a * 20), 20 - a\r
+NEXT a\r
+\r
+' Draw the top of the tower\r
+FillSquareArea towerX% - 11, towerY% - 11, towerX% - 9, towerY% - 9, getcol(255, 0, 0), 20\r
+FillSquareArea towerX% + 9, towerY% - 11, towerX% + 11, towerY% - 9, getcol(0, 255, 0), 20\r
+FillSquareArea towerX% - 11, towerY% + 9, towerX% - 9, towerY% + 11, getcol(0, 0, 255), 20\r
+FillSquareArea towerX% + 9, towerY% + 9, towerX% + 11, towerY% + 11, getcol(255, 255, 0), 20\r
+\r
+END SUB\r
+\r
+SUB DisplayFrame\r
+\r
+l = 0\r
+zst = -.0031 * ste\r
+FOR z = .5 TO -.5 STEP zst\r
+    ' Trace a line from the player's perspective\r
+    DrawLineFromPlayer SIN(zmyan + z) * dist + myx, COS(zmyan + z) * dist + myy, l\r
+    l = l + ste\r
+NEXT z\r
+\r
+END SUB\r
+\r
+SUB DisplayTopDownLandscape\r
+\r
+' Draw the landscape from a top-down perspective\r
+FOR z = 0 TO 180\r
+    zs = 1\r
+    IF z > 120 THEN\r
+        ' Adjust the step size for better performance\r
+        zs = .7\r
+    END IF\r
+    IF z > 160 THEN\r
+        ' Further adjust the step size\r
+        zs = .6\r
+    END IF\r
+    FOR zx = 0 TO 180 STEP zs\r
+        y1 = landh(zx, z) - 80\r
+        zx1 = zx - 90\r
+        z1 = 300 - z\r
+        zx2 = zx1 / z1 * 190\r
+        zy2 = y1 / z1 * 190\r
+\r
+        ' Draw a line representing the height of the landscape\r
+        LINE (zx2 + 160, 40 - zy2)-(zx2 + 160, 200), landc(zx, z)\r
+    NEXT zx\r
+NEXT z\r
+\r
+' Display a message to continue\r
+LOCATE 1, 1\r
+PRINT "Press any key to continue..."\r
+\r
+END SUB\r
+\r
+SUB DrawLineFromPlayer (x%, y%, xl%)\r
+\r
+' Trace a line from the player's perspective\r
+IF x < 0 THEN\r
+    ' Calculate the distance to the next point\r
+    zpr = myx / (myx - x)\r
+    x = 0\r
+    y = myy - ((myy - y) * zpr)\r
+END IF\r
+\r
+IF y < 0 THEN\r
+    ' Calculate the distance to the next point\r
+    zpr = myy / (myy - y)\r
+    y = 0\r
+    x = myx - ((myx - x) * zpr)\r
+END IF\r
+\r
+IF x > 180 THEN\r
+    ' Calculate the distance to the next point\r
+    zpr = (180 - myx) / (x - myx)\r
+    x = 180\r
+    y = myy - ((myy - y) * zpr)\r
+END IF\r
+\r
+IF y > 180 THEN\r
+    ' Calculate the distance to the next point\r
+    zpr = (180 - myy) / (y - myy)\r
+    y = 180\r
+    x = myx - ((myx - x) * zpr)\r
+END IF\r
+\r
+' Calculate the distance to the next point\r
+lp% = SQR(ABS(myx - x) ^ 2 + ABS(myy - y) ^ 2)\r
+\r
+' Save the current player position and orientation\r
+imyx% = myx\r
+imyy% = myy\r
+imyz% = myz\r
+xp% = x - imyx%\r
+yp% = y - imyy%\r
+istem% = stem\r
+imyan2% = myan2\r
+\r
+' Draw the line\r
+yo% = 200\r
+FOR a% = 1 TO lp%\r
+    cx% = xp% * a% / lp% + imyx%\r
+    cy% = yp% * a% / lp% + imyy%\r
+    yn% = imyan2% - ((landh(cx%, cy%) - imyz%) / a%) * 300\r
+\r
+    ' Draw the line segment\r
+    IF yn% < yo% THEN\r
+        LINE (xl%, yn%)-(xl% + istem%, yo% - 1), landc(cx%, cy%), BF\r
+        yo% = yn%\r
+    END IF\r
+NEXT a%\r
+\r
+' Draw the final line segment\r
+LINE (xl%, yo% - 1)-(xl% + istem%, 0), 0, BF\r
+\r
+END SUB\r
+\r
+SUB FillSquareArea (x1%, y1%, x2%, y2%, c%, h%)\r
+\r
+' Fill a square area with the specified color and height\r
+FOR y = y1 TO y2\r
+    FOR x = x1 TO x2\r
+        landh(x, y) = h\r
+        landc(x, y) = c\r
+    NEXT x\r
+NEXT y\r
+\r
+END SUB\r
+\r
+SUB GenerateLandscape\r
+\r
+' Create a square landscape\r
+FillSquareArea 0, 0, 180, 180, 15, 0\r
+\r
+' Generate the landscape height and color\r
+FOR y = 0 TO 180\r
+    FOR x = 0 TO 180\r
+        ' Calculate the checkerboard pattern\r
+        x1 = (x \ 10) MOD 2\r
+        y1 = (y \ 10) MOD 2\r
+        c = (x1 + y1) MOD 2\r
+\r
+        IF c = 0 THEN\r
+            ' Set the color to blue\r
+            landc(x, y) = getcol(0, 0, 250)\r
+        ELSE\r
+            ' Set the color to gray\r
+            landc(x, y) = getcol(50, 50, 50)\r
+        END IF\r
+    NEXT x\r
+NEXT y\r
+\r
+' Generate a hill\r
+FOR y = 10 TO 90\r
+    FOR x = 90 TO 170\r
+        ' Calculate the height of the hill\r
+        v = SQR((ABS(50 - y)) ^ 2 + (ABS(130 - x)) ^ 2)\r
+        h = SQR((60 - v) * (60 + v)) - 35\r
+\r
+        ' Ensure the height is positive\r
+        IF h > 0 THEN\r
+            landh(x, y) = h\r
+        END IF\r
+    NEXT x\r
+NEXT y\r
+\r
+' Add towers to the landscape\r
+CreateTower 20, 20\r
+CreateTower 60, 20\r
+CreateTower 40, 60\r
+\r
+' Generate a path\r
+FOR y = 100 TO 150\r
+    FOR x = 0 TO 50\r
+        ' Set the color to a dynamic value\r
+        landc(x, y) = getcol(SIN((x + y) / 2) * 125 + 125, SIN(x / 2) * 125 + 125, SIN(y / 2) * 125 + 125)\r
+        ' Set the height of the path\r
+        landh(x, y) = 50 - x\r
+    NEXT x\r
+NEXT y\r
+\r
+' Generate a spiral path\r
+FOR za = 0 TO 20 STEP .1\r
+    x = SIN(za) * (1 + (za * 2)) + 100\r
+    y = COS(za) * (1 + (za * 2)) + 100\r
+\r
+    ' Set the color of the spiral path\r
+    landc(x, y) = 200\r
+    landc(x + 1, y) = 200\r
+    landc(x, y + 1) = 200\r
+    landc(x + 1, y + 1) = 200\r
+NEXT za\r
+\r
+END SUB\r
+\r
+DEFSNG A-Y\r
+FUNCTION getcol (r, g, b)\r
+IF r < 0 THEN\r
+    ' Ensure the color value is within bounds\r
+    r = 0\r
+END IF\r
+IF g < 0 THEN\r
+    g = 0\r
+END IF\r
+IF b < 0 THEN\r
+    b = 0\r
+END IF\r
+IF r > 255 THEN\r
+    r = 255\r
+END IF\r
+IF g > 255 THEN\r
+    g = 255\r
+END IF\r
+IF b > 255 THEN\r
+    b = 255\r
+END IF\r
+' Calculate the color index\r
+getcol = INT(r / 43) * 36 + INT(g / 43) * 6 + INT(b / 43)\r
+END FUNCTION\r
+\r
+DEFINT A-Y\r
+SUB InitializeProgram\r
+' Set the graphics mode\r
+SCREEN 13\r
+PRINT "please wait..."\r
+\r
+' Initialize the color palette\r
+SetupPalette\r
+\r
+' Initialize player position and orientation\r
+zmyan = 4.14\r
+myan2 = 100\r
+ste = 1\r
+stem = ste - 1\r
+dist = 190\r
+tim$ = TIME$\r
+zmyx = 170\r
+zmyy = 170\r
+zmyz = 20\r
+\r
+END SUB\r
+\r
+SUB SetupPalette\r
+' Initialize the color palette\r
+c = 0\r
+FOR r = 0 TO 5\r
+    FOR g = 0 TO 5\r
+        FOR b = 0 TO 5\r
+            OUT &H3C8, c\r
+            c = c + 1\r
+            OUT &H3C9, r * 12\r
+            OUT &H3C9, g * 12\r
+            OUT &H3C9, b * 12\r
+        NEXT b\r
+    NEXT g\r
+NEXT r\r
+END SUB\r
+\r
diff --git a/3D GFX/Ray casting engine.html b/3D GFX/Ray casting engine.html
new file mode 100644 (file)
index 0000000..d5184d9
--- /dev/null
@@ -0,0 +1,16 @@
+<HTML>\r
+<HEAD><TITLE>ray casting 3D engine</TITLE></HEAD>\r
+\r
+<BODY text=#A0A0ff vLink=#0000ff aLink=#0000ff link=#0000ff bgColor=#000000>\r
+\r
+<CENTER><H1>ray casting 3D engine</H1></CENTER>\r
+<BR>\r
+<BR>\r
+3D engine what draws 3D landscape using ray casting alghoritm\r
+in realtime. You can walk/jump around, rotate view and look up and down. \r
+Image Quality will be automatically adjusted, to keep constant framerate.\r
+At least Pentium 200 MHz in DOS mode should be nice.\r
+\r
+<BR><IMG SRC="sshot.png">\r
+</BODY>\r
+</HTML>
\ No newline at end of file
diff --git a/3D GFX/Ray casting engine.png b/3D GFX/Ray casting engine.png
new file mode 100644 (file)
index 0000000..bc1851d
Binary files /dev/null and b/3D GFX/Ray casting engine.png differ
diff --git a/3D GFX/Space/Galaxy explorer.bas b/3D GFX/Space/Galaxy explorer.bas
new file mode 100755 (executable)
index 0000000..5a2f74d
--- /dev/null
@@ -0,0 +1,347 @@
+' Program to render a 3D point cloud galaxy.
+'
+' This program is free software: released under Creative Commons Zero (CC0) license
+' by Svjatoslav Agejenko.
+' Email: svjatoslav@svjatoslav.eu
+' Homepage: http://www.svjatoslav.eu
+
+' Changelog:
+' 2003, Initial version.
+' 2024, Improved program readability.
+
+' User can navigate through the galaxy using mouse or keyboard controls.
+' To use mouse controls, program requires a special TSR (terminate and stay resident)
+' program to be loaded. The TSR makes mouse input available to the QBasic program.
+
+' Navigation controls:
+' - Press left and right mouse buttons simultaneously to move in X and Z axis.
+' - Press right mouse button to move in Y axis.
+' - Use keyboard keys 'a', 'd', 'w', 's' to move in X and Z axis.
+' - Press 'q' to quit the program.
+
+DECLARE SUB temp ()
+DECLARE SUB mkGalaxy (x!, y!, z!)
+DECLARE SUB rndInit ()
+DECLARE FUNCTION rn! ()
+DECLARE SUB disp ()
+DECLARE SUB control ()
+DECLARE SUB putByte (addr!, dat!)
+DECLARE SUB putWord (addr!, dat!)
+DECLARE FUNCTION getWord! (addr!)
+DECLARE FUNCTION getByte! (addr!)
+DECLARE SUB start ()
+DECLARE SUB animate ()
+
+DIM SHARED angle1, angle2, angle3
+
+DIM SHARED time
+
+DIM SHARED externalSegment, externalAddress
+
+' Variables for the camera position and movement
+DIM SHARED myX, myY, myZ
+DIM SHARED speedX, speedY, speedZ
+DIM SHARED buttonLeft, buttonRight
+DIM SHARED maxMove
+
+' Variable for zoom level
+DIM SHARED zoom
+
+' Array to store random values
+DIM SHARED randomValue(0 TO 10000)
+DIM SHARED randomPointer
+
+' Arrays to store point coordinates and colors. These points make up galaxy.
+DIM SHARED pointX(1 TO 12000)
+DIM SHARED pointY(1 TO 12000)
+DIM SHARED pointZ(1 TO 12000)
+DIM SHARED pointColor(1 TO 12000)
+DIM SHARED numPoints
+
+' Temporary register array
+DIM SHARED temporaryRegister(0 TO 10)
+
+newLine = 0
+newPage = 0
+
+start
+
+currentX = 0
+currentY = 0
+currentZ = 0
+
+numPoints = 0
+mkGalaxy 0, 0, 0
+1
+
+' Generate a random angle for initial camera position
+variableAngle = INT(RND * 3)
+
+SELECT CASE variableAngle
+CASE 0
+    currentX = RND * 500 - 250
+CASE 1
+    currentY = RND * 100 - 50
+CASE 2
+    currentZ = RND * 500 - 250
+END SELECT
+
+control
+disp
+
+PCOPY 0, 1
+CLS
+GOTO 1
+
+SUB control
+
+' Check for mouse input
+IF getByte(8) <> 0 THEN
+    putByte 8, 0
+    xPosition = getWord(2)
+    putWord 2, 0
+    yPosition = getWord(4)
+    putWord 4, 0
+    button = getWord(6)
+    putWord 6, 0
+
+    ' Reset mouse buttons
+    buttonLeft = 0
+    buttonRight = 0
+
+    ' Handle mouse button states
+    IF button = 1 THEN buttonLeft = 1
+    IF button = 2 THEN buttonRight = 1
+    IF button = 3 THEN buttonLeft = 1: buttonRight = 1
+
+    ' Handle mouse movements
+    IF buttonRight = 1 THEN
+        IF buttonLeft = 1 THEN
+            speedX = speedX + SIN(angle1) * yPosition / 4
+            speedZ = speedZ - COS(angle1) * yPosition / 4
+            GOTO 3
+        END IF
+        speedY = speedY + yPosition / 4
+    3
+        yPosition = 0
+    END IF
+
+END IF
+
+' Limit the position values to prevent overflow
+IF xPosition < -maxMove THEN xPosition = -maxMove
+IF xPosition > maxMove THEN xPosition = maxMove
+angle1 = angle1 - xPosition / 150
+
+IF yPosition < -maxMove THEN yPosition = -maxMove
+IF yPosition > maxMove THEN yPosition = maxMove
+angle2 = angle2 - yPosition / 150
+
+' Check for keyboard input
+keyInput$ = INKEY$
+
+' Handle keyboard controls
+IF keyInput$ = "a" THEN speedX = speedX - COS(angle1): speedZ = speedZ - SIN(angle1)
+IF keyInput$ = "d" THEN speedX = speedX + COS(angle1): speedZ = speedZ + SIN(angle1)
+IF keyInput$ = "w" THEN speedX = speedX - SIN(angle1): speedZ = speedZ + COS(angle1)
+IF keyInput$ = "s" THEN speedX = speedX + SIN(angle1): speedZ = speedZ - COS(angle1)
+IF keyInput$ = "q" THEN SYSTEM
+
+' Decelerate the movement
+speedX = speedX / 1.1
+speedY = speedY / 1.1
+speedZ = speedZ / 1.1
+
+myX = myX + speedX
+myZ = myZ + speedZ
+myY = myY + speedY
+
+END SUB
+
+SUB disp
+
+' Calculate sine and cosine values for rotation angles
+sinAngle1 = SIN(angle1)
+cosAngle1 = COS(angle1)
+sinAngle2 = SIN(angle2)
+cosAngle2 = COS(angle2)
+
+' Loop through all points to calculate and display their positions
+FOR pointIndex = 1 TO numPoints
+
+    ' Calculate the distance from the camera
+    xCoordinate = pointX(pointIndex) - myX
+    yCoordinate = pointY(pointIndex) - myY
+    zCoordinate = pointZ(pointIndex) - myZ
+
+    ' Rotate the points
+    rotatedX = xCoordinate * cosAngle1 + zCoordinate * sinAngle1
+    rotatedZ = zCoordinate * cosAngle1 - xCoordinate * sinAngle1
+
+    rotatedY = yCoordinate * cosAngle2 + rotatedZ * sinAngle2
+    finalZ = rotatedZ * cosAngle2 - yCoordinate * sinAngle2
+
+    ' Draw points that are sufficiently close
+    IF finalZ > 3 THEN
+        screenX = rotatedX / finalZ * 130 + 160
+        screenY = rotatedY / finalZ * 130 + 100
+        PSET (screenX, screenY), pointColor(pointIndex)
+    END IF
+
+NEXT pointIndex
+END SUB
+
+FUNCTION getByte (address)
+getByte = PEEK(externalAddress + address)
+END FUNCTION
+
+FUNCTION getWord (address)
+firstByte = PEEK(externalAddress + address)
+secondByte = PEEK(externalAddress + address + 1)
+
+' Combine the two bytes into a single value
+combinedHex$ = HEX$(firstByte)
+IF LEN(combinedHex$) = 1 THEN combinedHex$ = "0" + combinedHex$
+IF LEN(combinedHex$) = 0 THEN combinedHex$ = "00"
+
+combinedValue = VAL("&H" + HEX$(secondByte) + combinedHex$)
+
+getWord = combinedValue
+END FUNCTION
+
+SUB mkGalaxy (localX, localY, localZ)
+
+' Generate random angles for stars within galaxy
+randomAngle1 = rn * 10
+randomAngle2 = rn * 10
+
+galaxySin1 = SIN(randomAngle1)
+galaxyCos1 = COS(randomAngle1)
+galaxySin2 = SIN(randomAngle2)
+galaxyCos2 = COS(randomAngle2)
+
+randomPointer = 0
+size = 100
+piValue = 3.14
+spiralBarsMultiplier = 3
+
+FOR pointIndex = 1 TO 10000
+
+    ' Generate a random star distance from the center
+    randomVariable = rn * 10
+    distanceFromCenter = randomVariable * randomVariable / 30
+
+    ' Calculate spiral offset and half of it
+    spiralOffset = rn * (11.5 - randomVariable) / 3
+    halfSpiralOffset = spiralOffset / 2
+
+    ' Generate angle exponent and spiral bar angle
+    angleExponent = rn * (distanceFromCenter / 2) / spiralBarsMultiplier * 2
+    spiralBarAngle = 2 * piValue / spiralBarsMultiplier * INT(rn * spiralBarsMultiplier)
+
+    ' Calculate x, z, and y coordinates
+    xCoordinate = (SIN(randomVariable - spiralBarAngle + angleExponent) * distanceFromCenter + rn * spiralOffset - halfSpiralOffset) * size
+    zCoordinate = (COS(randomVariable - spiralBarAngle + angleExponent) * distanceFromCenter + rn * spiralOffset - halfSpiralOffset) * size
+    yCoordinate = (rn * spiralOffset - halfSpiralOffset) * size
+
+    ' Rotate the coordinates
+    rotatedX = xCoordinate * galaxyCos1 + zCoordinate * galaxySin1
+    rotatedZ = zCoordinate * galaxyCos1 - xCoordinate * galaxySin1
+
+    rotatedY = yCoordinate * galaxyCos2 + rotatedZ * galaxySin2
+    finalZ = rotatedZ * galaxyCos2 - yCoordinate * galaxySin2
+
+    ' Store the point in arrays
+    numPoints = numPoints + 1
+
+    pointX(numPoints) = rotatedX + localX
+    pointY(numPoints) = rotatedY + localY
+    pointZ(numPoints) = finalZ + localZ
+    pointColor(numPoints) = INT(RND * 15) + 1
+NEXT pointIndex
+
+END SUB
+
+SUB putByte (address, dataByte)
+
+POKE (externalAddress + address), dataByte
+END SUB
+
+SUB putWord (address, dataWord)
+
+' Convert the word to a hexadecimal string
+hexValue$ = HEX$(dataWord)
+
+' Ensure the string has at least 4 characters
+2
+IF LEN(hexValue$) < 4 THEN
+    hexValue$ = "0" + hexValue$: GOTO 2
+END IF
+
+' Extract the first and second bytes
+firstByteValue = VAL("&H" + LEFT$(hexValue$, 2))
+secondByteValue = VAL("&H" + RIGHT$(hexValue$, 2))
+
+' Store the bytes in memory
+POKE (externalAddress + address), secondByteValue
+POKE (externalAddress + address + 1), firstByteValue
+
+END SUB
+
+FUNCTION rn
+
+' Increment the random pointer and get a new random value
+randomPointer = randomPointer + 1
+IF randomPointer > 10000 THEN randomPointer = 0
+rn = randomValue(randomPointer)
+
+END FUNCTION
+
+SUB rndInit
+
+' Initialize the array of random values
+FOR index = 0 TO 10000
+    randomValue(index) = RND
+NEXT index
+
+randomPointer = 0
+END SUB
+
+SUB start
+
+starText
+
+' Set up graphics mode
+SCREEN 7, , , 1
+
+' Initialize maximum movement and random values
+maxMove = 50
+rndInit
+
+END SUB
+
+SUB starText
+
+' Read the segment and address from the interrupt table
+DEF SEG = 0     ' read first from interrupt table
+
+externalSegment = PEEK(&H79 * 4 + 3) * 256
+externalSegment = externalSegment + PEEK(&H79 * 4 + 2)
+
+PRINT "Segment is: " + HEX$(externalSegment)
+
+externalAddress = PEEK(&H79 * 4 + 1) * 256
+externalAddress = externalAddress + PEEK(&H79 * 4 + 0)
+
+PRINT "relative address is:"; externalAddress
+
+' Read the word at the specified address
+DEF SEG = externalSegment
+
+IF getWord(0) <> 1983 THEN
+    PRINT "FATAL ERROR: you must load"
+    PRINT "QBasic extension TSR first!"
+    SYSTEM
+END IF
+
+END SUB
diff --git a/3D GFX/Space/Galaxy explorer.png b/3D GFX/Space/Galaxy explorer.png
new file mode 100644 (file)
index 0000000..28550e6
Binary files /dev/null and b/3D GFX/Space/Galaxy explorer.png differ
diff --git a/3D GFX/Space/Rocket simulator.bas b/3D GFX/Space/Rocket simulator.bas
new file mode 100755 (executable)
index 0000000..deffee8
--- /dev/null
@@ -0,0 +1,475 @@
+' 3D rocket simulator. Rocket takes off from the surface of the planet.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+\r
+' Changelog:\r
+' 2001, Initial version\r
+' 2024 - 2025, Improved program readability\r
+'\r
+' Usage:\r
+' arrow keys - move around\r
+' 2, 6, 4, 8 - look around\r
+' -          - fly up\r
+' +          - fly down\r
+\r
+DECLARE SUB AddRocketTrailPoints ()\r
+DECLARE SUB AddRocketTrailLine ()\r
+DEFDBL A-Z\r
+DECLARE SUB GenerateRocket ()\r
+DECLARE SUB GenerateEarth ()\r
+DECLARE SUB InitializeScene ()\r
+DECLARE SUB Render3DScene ()\r
+\r
+DIM SHARED pointX(1 TO 1500)\r
+DIM SHARED pointY(1 TO 1500)\r
+DIM SHARED pointZ(1 TO 1500)\r
+DIM SHARED lineStartPoint(1 TO 3000)\r
+DIM SHARED lineEndPoint(1 TO 3000)\r
+DIM SHARED lineColor(1 TO 3000)\r
+DIM SHARED onScreenPointX(1 TO 1900)\r
+DIM SHARED onScreenPointY(1 TO 1900)\r
+DIM SHARED rocketPointX(1 TO 200)\r
+DIM SHARED rocketPointY(1 TO 200)\r
+DIM SHARED rocketPointZ(1 TO 200)\r
+DIM SHARED pointCount, lineCount\r
+DIM SHARED cameraX, cameraY, cameraZ\r
+DIM SHARED cameraXSpeed, cameraYSpeed, cameraZSpeed\r
+DIM SHARED rotationAngleX, rotationAngleY\r
+DIM SHARED oldScreenPointX1(1 TO 2500)\r
+DIM SHARED oldScreenPointY1(1 TO 2500)\r
+DIM SHARED oldScreenPointX2(1 TO 2500)\r
+DIM SHARED oldScreenPointY2(1 TO 2500)\r
+DIM SHARED frameCount, frameCount2, frameRate\r
+DIM SHARED earthRadius, earthStep, rocketScale, rocketStep\r
+DIM SHARED pi\r
+DIM SHARED rocketStartPoint, rocketEndPoint, rocketPointCount\r
+DIM SHARED rocketX, rocketY, rocketZ, rocketXSpeed, rocketYSpeed, rocketZSpeed\r
+DIM SHARED timerString, timeSlice\r
+DIM SHARED lastAddedPoint\r
+\r
+InitializeScene\r
+\r
+rotationAngleX = -pi / 2\r
+\r
+' Initialize the rocket position and velocity\r
+rocketX = 0\r
+rocketY = earthRadius / 2 + .009\r
+rocketZ = 0\r
+cameraX = 0\r
+cameraY = earthRadius / 2\r
+cameraZ = -.05\r
+timeSlice = 0\r
+frameCount2 = 999999\r
+timerString$ = TIME$\r
+\r
+1\r
+frameCount = frameCount + 1\r
+frameCount2 = frameCount2 + 1\r
+\r
+' Display the current values of some variables\r
+LOCATE 1, 1\r
+PRINT pointCount, lineCount, earthRadius, earthStep\r
+LOCATE 2, 1\r
+PRINT rocketStartPoint, rocketEndPoint, TIMER\r
+\r
+' Update rocket position and velocity\r
+rocketX = rocketX + (rocketXSpeed * timeSlice)\r
+rocketY = rocketY + (rocketYSpeed * timeSlice)\r
+rocketZ = rocketZ + (rocketZSpeed * timeSlice)\r
+\r
+' Update the rocket's pitch and roll rates\r
+rocketYSpeed = rocketYSpeed + (.0098 * timeSlice)\r
+rocketXSpeed = SIN(frameCount / 20) / 50\r
+\r
+' Update the points that make up the rocket\r
+FOR a = 1 TO rocketPointCount\r
+    pointX(a + rocketStartPoint - 1) = rocketPointX(a) + rocketX\r
+    pointY(a + rocketStartPoint - 1) = rocketPointY(a) + rocketY\r
+    pointZ(a + rocketStartPoint - 1) = rocketPointZ(a) + rocketZ\r
+NEXT a\r
+\r
+' Update the observer position and velocity\r
+cameraX = cameraX + (cameraXSpeed * timeSlice)\r
+cameraY = cameraY + (cameraYSpeed * timeSlice)\r
+cameraZ = cameraZ + (cameraZSpeed * timeSlice)\r
+\r
+' Draw the 3D scene\r
+Render3DScene\r
+\r
+' Handle user input\r
+a$ = INKEY$\r
+IF a$ <> "" THEN\r
+    IF a$ = CHR$(0) + "H" THEN\r
+        ' Move forward\r
+        cameraZSpeed = cameraZSpeed - SIN(rotationAngleX) / 100\r
+        cameraXSpeed = cameraXSpeed + COS(rotationAngleX) / 100\r
+    END IF\r
+    IF a$ = CHR$(0) + "P" THEN\r
+        ' Move backward\r
+        cameraZSpeed = cameraZSpeed + SIN(rotationAngleX) / 100\r
+        cameraXSpeed = cameraXSpeed - COS(rotationAngleX) / 100\r
+    END IF\r
+    IF a$ = CHR$(0) + "M" THEN\r
+        ' Move right\r
+        cameraZSpeed = cameraZSpeed + COS(rotationAngleX) / 100\r
+        cameraXSpeed = cameraXSpeed + SIN(rotationAngleX) / 100\r
+    END IF\r
+    IF a$ = CHR$(0) + "K" THEN\r
+        ' Move left\r
+        cameraZSpeed = cameraZSpeed - COS(rotationAngleX) / 100\r
+        cameraXSpeed = cameraXSpeed - SIN(rotationAngleX) / 100\r
+    END IF\r
+    ' Change the viewing angle\r
+    IF a$ = CHR$(27) THEN SYSTEM\r
+    IF a$ = "4" THEN rotationAngleX = rotationAngleX + .1\r
+    IF a$ = "6" THEN rotationAngleX = rotationAngleX - .1\r
+    IF a$ = "2" THEN rotationAngleY = rotationAngleY + .1\r
+    IF a$ = "8" THEN rotationAngleY = rotationAngleY - .1\r
+    IF a$ = "-" THEN cameraYSpeed = cameraYSpeed + .01\r
+    IF a$ = "+" THEN cameraYSpeed = cameraYSpeed - .01\r
+    IF a$ = " " THEN cameraZSpeed = cameraZSpeed / 2: cameraXSpeed = cameraXSpeed / 2\r
+END IF\r
+\r
+' Calculate the speed and distance of the rocket\r
+v = SQR(rocketX * rocketX + rocketY * rocketY + rocketZ * rocketZ)\r
+s = SQR(rocketXSpeed * rocketXSpeed + rocketYSpeed * rocketYSpeed + rocketZSpeed * rocketZSpeed)\r
+\r
+' Display the current frame rate and other information\r
+IF timerString$ <> TIME$ THEN\r
+    timerString$ = TIME$\r
+    LOCATE 29, 1\r
+    PRINT "speed"; INT(s * 1000)\r
+    LOCATE 30, 1\r
+    PRINT "fps"; frameRate; "timeslice"; INT(timeSlice * 1000); "distance"; v;\r
+    ' Update the frame rate and time slice\r
+    frameRate = frameCount2\r
+    timeSlice = 1 / frameRate\r
+    frameCount2 = 0\r
+    ' Add new points to the scene\r
+    AddRocketTrailPoints\r
+    AddRocketTrailLine\r
+END IF\r
+GOTO 1\r
+\r
+SUB AddRocketTrailLine\r
+' Adds a new line to the scene to represent the rocket's trail.\r
+' It connects the current rocket position to the last added point, if any.\r
+pointCount = pointCount + 1\r
+pointX(pointCount) = rocketX\r
+pointY(pointCount) = rocketY\r
+pointZ(pointCount) = rocketZ\r
+\r
+' If there was a previous point, add a line connecting the previous point to the current point\r
+IF lastAddedPoint > 0 THEN\r
+    lineCount = lineCount + 1\r
+    lineStartPoint(lineCount) = lastAddedPoint\r
+    lineEndPoint(lineCount) = pointCount\r
+    lineColor(lineCount) = 13\r
+END IF\r
+lastAddedPoint = pointCount\r
+END SUB\r
+\r
+SUB AddRocketTrailPoints\r
+' Adds new points to the scene to represent the rocket's trail.\r
+' It adds three points forming a triangle to visualize the rocket's position.\r
+pointCount = pointCount + 1\r
+pointX(pointCount) = rocketX\r
+pointY(pointCount) = rocketY\r
+pointZ(pointCount) = rocketZ\r
+\r
+pointCount = pointCount + 1\r
+pointX(pointCount) = rocketX - .001\r
+pointY(pointCount) = rocketY - .001\r
+pointZ(pointCount) = rocketZ\r
+\r
+pointCount = pointCount + 1\r
+pointX(pointCount) = rocketX + .001\r
+pointY(pointCount) = rocketY - .001\r
+pointZ(pointCount) = rocketZ\r
+\r
+' Add lines connecting these points to form a triangle\r
+lineCount = lineCount + 1\r
+lineStartPoint(lineCount) = pointCount\r
+lineEndPoint(lineCount) = pointCount - 1\r
+lineColor(lineCount) = 14\r
+\r
+lineCount = lineCount + 1\r
+lineStartPoint(lineCount) = pointCount - 2\r
+lineEndPoint(lineCount) = pointCount - 1\r
+lineColor(lineCount) = 14\r
+\r
+lineCount = lineCount + 1\r
+lineStartPoint(lineCount) = pointCount\r
+lineEndPoint(lineCount) = pointCount - 2\r
+lineColor(lineCount) = 14\r
+END SUB\r
+\r
+SUB GenerateEarth\r
+' Generates the points that make up the earth.\r
+' It uses nested loops to create points in a spherical shape for the earth\r
+' and adds lines to connect these points to form the earth's surface.\r
+tmpp = pointCount\r
+le2 = 0\r
+FOR z = -(earthRadius / 3) TO (earthRadius / 3) STEP earthStep\r
+    le = 0\r
+    le2 = le2 + 1\r
+    FOR x = -(earthRadius / 3) TO (earthRadius / 3) STEP earthStep\r
+        ' Check if the point is within the rocket's radius\r
+        IF SQR(x * x + z * z) > (earthRadius / 2.5) THEN GOTO 4\r
+        le = le + 1\r
+        ' Add the first point of the line\r
+        IF le = 1 THEN\r
+            xs = x / earthStep\r
+        END IF\r
+        pointCount = pointCount + 1\r
+        pointX(pointCount) = x\r
+        v = SQR(x * x + z * z)\r
+        pointY(pointCount) = SQR((v + (earthRadius / 2)) * ((earthRadius / 2) - v))\r
+        pointZ(pointCount) = z\r
+        ' Add the line to the list of lines\r
+        IF le > 1 THEN\r
+            lineCount = lineCount + 1\r
+            lineStartPoint(lineCount) = pointCount\r
+            lineEndPoint(lineCount) = pointCount - 1\r
+            lineColor(lineCount) = 3\r
+        END IF\r
+        ' Add the line to the list of lines if it is part of a circle\r
+        IF le2 > 1 THEN\r
+            IF xso > (x / earthStep) THEN GOTO 4\r
+            IF xso + leo <= (x / earthStep) THEN GOTO 4\r
+            lineCount = lineCount + 1\r
+            lineStartPoint(lineCount) = pointCount\r
+            lineEndPoint(lineCount) = pointCount - leo - xso + xs\r
+            lineColor(lineCount) = 3\r
+        END IF\r
+4\r
+    NEXT x\r
+    ' Update the variables for the next circle\r
+    leo = le\r
+    xso = xs\r
+NEXT z\r
+END SUB\r
+\r
+SUB GenerateRocket\r
+' Generates the points that make up the rocket.\r
+' It uses loops to create points in a cylindrical shape for the rocket body\r
+' and adds lines to connect these points to form the rocket's structure.\r
+' It also adds points and lines for the top and bottom of the rocket.\r
+s = 50\r
+FOR y = -9 TO 10 STEP rocketStep\r
+    st = pi * 2 / 6\r
+    IF y > 5 THEN\r
+        s = s - 3\r
+    END IF\r
+    IF y > 8 THEN\r
+        s = s - 6\r
+    END IF\r
+    FOR a = 0 TO pi * 2 STEP st\r
+        x1 = SIN(a) * s\r
+        z1 = COS(a) * s\r
+        pointCount = pointCount + 1\r
+        pointX(pointCount) = x1 * rocketScale\r
+        pointY(pointCount) = y * 50 * rocketScale\r
+        pointZ(pointCount) = z1 * rocketScale\r
+        ' Add the line to the list of lines\r
+        IF a > 0 THEN\r
+            lineCount = lineCount + 1\r
+            lineStartPoint(lineCount) = pointCount\r
+            lineEndPoint(lineCount) = pointCount - 1\r
+            lineColor(lineCount) = 10\r
+        END IF\r
+        ' Add the line to the list of lines if it is part of a circle\r
+        IF y > -9 THEN\r
+            lineCount = lineCount + 1\r
+            lineStartPoint(lineCount) = pointCount\r
+            lineEndPoint(lineCount) = pointCount - 7\r
+            lineColor(lineCount) = 10\r
+        END IF\r
+    NEXT a\r
+NEXT y\r
+\r
+' Add the points that make up the top of the rocket\r
+pointCount = pointCount + 1\r
+pointX(pointCount) = 0\r
+pointY(pointCount) = 11 * 50 * rocketScale\r
+pointZ(pointCount) = 0\r
+FOR a = 1 TO 6\r
+    lineCount = lineCount + 1\r
+    lineStartPoint(lineCount) = pointCount\r
+    lineEndPoint(lineCount) = pointCount - a\r
+    lineColor(lineCount) = 10\r
+NEXT a\r
+\r
+' Add the points that make up the bottom of the rocket\r
+pointCount = pointCount + 1\r
+pointX(pointCount) = -100 * rocketScale\r
+pointY(pointCount) = -450 * rocketScale\r
+pointZ(pointCount) = 0\r
+pointCount = pointCount + 1\r
+pointX(pointCount) = 100 * rocketScale\r
+pointY(pointCount) = -450 * rocketScale\r
+pointZ(pointCount) = 0\r
+pointCount = pointCount + 1\r
+pointX(pointCount) = 0\r
+pointY(pointCount) = -200 * rocketScale\r
+pointZ(pointCount) = 0\r
+lineCount = lineCount + 1\r
+lineStartPoint(lineCount) = pointCount\r
+lineEndPoint(lineCount) = pointCount - 1\r
+lineColor(lineCount) = 12\r
+lineCount = lineCount + 1\r
+lineStartPoint(lineCount) = pointCount - 2\r
+lineEndPoint(lineCount) = pointCount - 1\r
+lineColor(lineCount) = 12\r
+lineCount = lineCount + 1\r
+lineStartPoint(lineCount) = pointCount\r
+lineEndPoint(lineCount) = pointCount - 2\r
+lineColor(lineCount) = 12\r
+pointCount = pointCount + 1\r
+pointX(pointCount) = 0\r
+pointY(pointCount) = -450 * rocketScale\r
+pointZ(pointCount) = -100 * rocketScale\r
+pointCount = pointCount + 1\r
+pointX(pointCount) = 0\r
+pointY(pointCount) = -450 * rocketScale\r
+pointZ(pointCount) = 100 * rocketScale\r
+lineCount = lineCount + 1\r
+lineStartPoint(lineCount) = pointCount\r
+lineEndPoint(lineCount) = pointCount - 1\r
+lineColor(lineCount) = 12\r
+lineCount = lineCount + 1\r
+lineStartPoint(lineCount) = pointCount - 2\r
+lineEndPoint(lineCount) = pointCount - 1\r
+lineColor(lineCount) = 12\r
+lineCount = lineCount + 1\r
+lineStartPoint(lineCount) = pointCount\r
+lineEndPoint(lineCount) = pointCount - 2\r
+lineColor(lineCount) = 12\r
+END SUB\r
+\r
+SUB InitializeScene\r
+' Initializes the graphics mode and sets up the initial scene.\r
+' It sets up the screen, initializes variables, adds initial points and lines,\r
+' and calls subroutines to generate the earth and the rocket.\r
+SCREEN 12\r
+VIEW PRINT 1 TO 30\r
+earthRadius = 12714\r
+earthStep = 500\r
+rocketStep = 4\r
+pi = 3.142657\r
+rocketScale = .00002\r
+frameCount2 = 0\r
+lastAddedPoint = -1\r
+pointX(1) = -.001\r
+pointY(1) = earthRadius / 2\r
+pointZ(1) = -.001\r
+pointX(2) = .001\r
+pointY(2) = earthRadius / 2\r
+pointZ(2) = -.001\r
+pointX(3) = .001\r
+pointY(3) = earthRadius / 2\r
+pointZ(3) = .001\r
+pointX(4) = -.001\r
+pointY(4) = earthRadius / 2\r
+pointZ(4) = .001\r
+pointCount = 4\r
+\r
+' Set up the initial lines that make up the rocket\r
+lineStartPoint(1) = 1\r
+lineEndPoint(1) = 2\r
+lineColor(1) = 14\r
+lineStartPoint(2) = 2\r
+lineEndPoint(2) = 3\r
+lineColor(2) = 14\r
+lineStartPoint(3) = 3\r
+lineEndPoint(3) = 4\r
+lineColor(3) = 14\r
+lineStartPoint(4) = 4\r
+lineEndPoint(4) = 1\r
+lineColor(4) = 14\r
+lineCount = 4\r
+\r
+' Initialize the observer position and velocity\r
+cameraX = 0\r
+cameraY = earthRadius * 2\r
+cameraZ = -35\r
+GenerateEarth\r
+cameraXSpeed = 0\r
+cameraYSpeed = 0\r
+cameraZSpeed = 0\r
+rotationAngleX = 0\r
+rocketStartPoint = pointCount + 1\r
+GenerateRocket\r
+rocketEndPoint = pointCount\r
+\r
+' Calculate the number of points that make up the rocket\r
+rocketPointCount = rocketEndPoint - rocketStartPoint + 1\r
+\r
+' Copy the initial points to the arrays for the rocket\r
+FOR a = 1 TO rocketPointCount\r
+    p = rocketStartPoint + a - 1\r
+    rocketPointX(a) = pointX(p)\r
+    rocketPointY(a) = pointY(p)\r
+    rocketPointZ(a) = pointZ(p)\r
+NEXT a\r
+END SUB\r
+\r
+SUB Render3DScene\r
+' Converts the 3D points to 2D for drawing on the screen.\r
+' It applies rotation transformations and projects the 3D points to 2D screen coordinates.\r
+' It then draws lines connecting the points if they are within the screen boundaries.\r
+s1 = SIN(rotationAngleX)\r
+c1 = COS(rotationAngleX)\r
+s2 = SIN(rotationAngleY)\r
+c2 = COS(rotationAngleY)\r
+FOR a = 1 TO pointCount\r
+    x = pointX(a) - cameraX\r
+    y = pointY(a) - cameraY\r
+    z = pointZ(a) - cameraZ\r
+    ' Apply the rotation transformations\r
+    x1 = x * s1 + z * c1\r
+    z1 = x * c1 - z * s1\r
+    y1 = z1 * s2 + y * c2\r
+    z2 = z1 * c2 - y * s2\r
+    ' Project the 3D point to 2D\r
+    IF z2 < .00001 THEN\r
+        onScreenPointX(a) = -1\r
+    ELSE\r
+        onScreenPointX(a) = x1 / z2 * 200 + 320\r
+        onScreenPointY(a) = 240 - y1 / z2 * 200\r
+        ' Check if the point is within the screen boundaries\r
+        IF onScreenPointX(a) < -50 OR onScreenPointX(a) > 1000 OR onScreenPointY(a) > 1000 THEN\r
+            onScreenPointX(a) = -1\r
+        END IF\r
+    END IF\r
+NEXT a\r
+\r
+' Draw the lines that make up the rocket\r
+FOR a = 1 TO lineCount\r
+    p1 = lineStartPoint(a)\r
+    p2 = lineEndPoint(a)\r
+    x1 = onScreenPointX(p1)\r
+    y1 = onScreenPointY(p1)\r
+    x2 = onScreenPointX(p2)\r
+    y2 = onScreenPointY(p2)\r
+    ' Check if the line is within the screen boundaries.\r
+    ' If so, erase line at old locations\r
+    IF oldScreenPointX1(a) = -1 OR oldScreenPointX2(a) = -1 THEN\r
+        ELSE\r
+            LINE (oldScreenPointX1(a), oldScreenPointY1(a))-(oldScreenPointX2(a), oldScreenPointY2(a)), 0\r
+    END IF\r
+    ' Draw the line if both endpoints are within the screen boundaries\r
+    IF x1 <> -1 AND x2 <> -1 THEN\r
+        LINE (x1, y1)-(x2, y2), lineColor(a)\r
+    END IF\r
+    ' Update the old endpoints of the line for the next frame\r
+    oldScreenPointX1(a) = x1\r
+    oldScreenPointY1(a) = y1\r
+    oldScreenPointX2(a) = x2\r
+    oldScreenPointY2(a) = y2\r
+NEXT a\r
+END SUB\r
+\r
diff --git a/3D GFX/Space/Rocket simulator.webm b/3D GFX/Space/Rocket simulator.webm
new file mode 100644 (file)
index 0000000..7e10602
Binary files /dev/null and b/3D GFX/Space/Rocket simulator.webm differ
diff --git a/3D GFX/Space/Stars.bas b/3D GFX/Space/Stars.bas
new file mode 100755 (executable)
index 0000000..b9f9bf1
--- /dev/null
@@ -0,0 +1,142 @@
+' 3D Starfield Simulation.0\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.03, Initial version\r
+' 2024 - 2025, Improved code readability\r
+\r
+DECLARE SUB AddStar (xPosition AS SINGLE, yPosition AS SINGLE, zPosition AS SINGLE)\r
+DECLARE SUB CreateGalaxy ()\r
+\r
+Dim Shared totalStars As Integer\r
+Dim Shared maxStars As Integer\r
+\r
+Randomize Timer\r
+maxStars = 2000\r
+totalStars = maxStars\r
+starFieldDepth = 500\r
+\r
+Dim Shared starXPositions(1 To maxStars + 1000) As Single\r
+Dim Shared starYPositions(1 To maxStars + 1000) As Single\r
+Dim Shared starZPositions(1 To maxStars + 1000) As Single\r
+\r
+' Initialize the positions of the stars\r
+For starIndex = 1 To totalStars\r
+    starZPositions(starIndex) = Rnd * starFieldDepth + 20\r
+    angle = Rnd * 100\r
+    starXPositions(starIndex) = Sin(angle) * 20\r
+    starYPositions(starIndex) = Cos(angle) * 20\r
+Next starIndex\r
+\r
+Screen 13\r
+\r
+\r
+Do\r
+\r
+    ' Calculate the camera's rotation and position offsets\r
+    frameCount = frameCount + 1\r
+    cameraRotation = (3.1412 / 2) + Sin(frameCount / 35) / 100 + Sin(frameCount / 21) / 100\r
+    rs1 = Sin(cameraRotation)\r
+    rc1 = Cos(cameraRotation)\r
+\r
+    ' Update and draw each star\r
+    For starIndex = 1 To totalStars\r
+        x = starXPositions(starIndex)\r
+        y = starYPositions(starIndex)\r
+        z = starZPositions(starIndex)\r
+\r
+        ' Project the star's 3D position onto the 2D screen\r
+        projectedX = (x / z) * 160 + 160\r
+        projectedY = (y / z) * 100 + 100\r
+        PSet (projectedX, projectedY), 0 ' Erase the previous position\r
+\r
+        ' Rotate the star's position around the camera\r
+        x5 = x * rs1 - y * rc1\r
+        y5 = x * rc1 + y * rs1\r
+\r
+        ' Update the star's position with camera movement\r
+        x = x5 + Sin(frameCount / 21) * 3\r
+        y = y5 + Sin(frameCount / 18) * 3\r
+\r
+        ' Move the star closer to the viewer and wrap around if too close\r
+        z = z - 3\r
+        If z < 10 Then\r
+            z = Rnd * 300 + 400\r
+            x = Rnd * 800 - 400\r
+            y = Rnd * 800 - 400\r
+        End If\r
+\r
+        ' Project the new position and draw with perspective-based brightness\r
+        projectedX = (x / z) * 160 + 160\r
+        projectedY = (y / z) * 100 + 100\r
+        colorCode = 3000 / z + 15\r
+        If colorCode > 31 Then colorCode = 31\r
+        PSet (projectedX, projectedY), colorCode\r
+\r
+        ' Update the star's array positions\r
+        starXPositions(starIndex) = x\r
+        starYPositions(starIndex) = y\r
+        starZPositions(starIndex) = z\r
+    Next starIndex\r
+\r
+    ' Add new stars to the galaxy if needed\r
+    If maxStars - totalStars > Rnd * 800 + 100 Then CreateGalaxy: totalStars = totalStars + 1\r
+\r
+    ' Remove the two farthest stars and replace them with new ones\r
+    For a = 1 To 2\r
+        starIndex = Int(Rnd * (totalStars - 10)) + 1\r
+        Swap starXPositions(totalStars), starXPositions(starIndex)\r
+        Swap starYPositions(totalStars), starYPositions(starIndex)\r
+        Swap starZPositions(totalStars), starZPositions(starIndex)\r
+\r
+        x = starXPositions(totalStars)\r
+        y = starYPositions(totalStars)\r
+        z = starZPositions(totalStars)\r
+        projectedX = (x / z) * 160 + 160\r
+        projectedY = (y / z) * 100 + 100\r
+        PSet (projectedX, projectedY), 0 ' Erase the star\r
+        totalStars = totalStars - 1\r
+    Next a\r
+\r
+\r
+    ' Check for user input to exit the program\r
+    If InKey$ <> "" Then System\r
+\r
+    ' sleep, to limit framerate\r
+    Sound 0, 1\r
+Loop\r
+\r
+' Subroutine to create a new galaxy of stars\r
+Sub CreateGalaxy\r
+    xForce = Rnd * 4 - 2\r
+    yForce = Rnd * 4 - 2\r
+    xPositionOffset = Rnd * 200 - 100\r
+    yPositionOffset = Rnd * 200 - 100\r
+\r
+    ' Add a new set of stars with varying positions and velocities\r
+    For starIndex = 1 To Int(Rnd * 15) + 10 Step .04\r
+        x = Sin(starIndex) * starIndex * starIndex / 10\r
+        y = Cos(starIndex) * starIndex * starIndex / 10\r
+        AddStar x + RND * starIndex * starIndex / 30 + xPositionOffset, _\r
+                   y + RND * starIndex * starIndex / 30 + yPositionOffset, _\r
+                   700 + RND * starIndex * starIndex / 30 + (x * xForce) + (y * yForce)\r
+    Next starIndex\r
+\r
+    ' Play a sound when creating new stars (commented out)\r
+    ' SOUND 1000, 1\r
+End Sub\r
+\r
+' Subroutine to add a new star at the specified position\r
+Sub AddStar (xPosition As Single, yPosition As Single, zPosition As Single)\r
+    totalStars = totalStars + 1\r
+    starIndex = totalStars\r
+\r
+    starXPositions(starIndex) = xPosition\r
+    starYPositions(starIndex) = yPosition\r
+    starZPositions(starIndex) = zPosition\r
+End Sub\r
+\r
diff --git a/3D GFX/Space/Stars.webm b/3D GFX/Space/Stars.webm
new file mode 100644 (file)
index 0000000..39cd97e
Binary files /dev/null and b/3D GFX/Space/Stars.webm differ
diff --git a/3D GFX/Space/Universe explorer/1.png b/3D GFX/Space/Universe explorer/1.png
new file mode 100644 (file)
index 0000000..ca51227
Binary files /dev/null and b/3D GFX/Space/Universe explorer/1.png differ
diff --git a/3D GFX/Space/Universe explorer/2.png b/3D GFX/Space/Universe explorer/2.png
new file mode 100644 (file)
index 0000000..1b73573
Binary files /dev/null and b/3D GFX/Space/Universe explorer/2.png differ
diff --git a/3D GFX/Space/Universe explorer/3.png b/3D GFX/Space/Universe explorer/3.png
new file mode 100644 (file)
index 0000000..1633045
Binary files /dev/null and b/3D GFX/Space/Universe explorer/3.png differ
diff --git a/3D GFX/Space/Universe explorer/Universe explorer.bas b/3D GFX/Space/Universe explorer/Universe explorer.bas
new file mode 100755 (executable)
index 0000000..7fbbc9d
--- /dev/null
@@ -0,0 +1,731 @@
+' 3D Universe Explorer. User can freely fly around.\r
+' Universe is made of galaxy clusters.\r
+' Galaxy cluster is made of galaxies.\r
+' Galaxies are made of stars.\r
+\r
+' Total amount of stars in the universe is enormous.\r
+' This program implements clever algorithm to dynamically increase\r
+' and decrease level of detail of the universe regions depending\r
+' on where user is in the universe and maintaining reasonable\r
+' quantity of stars to render at any given time.\r
+\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+'\r
+'\r
+' Changelog:\r
+' 2003.12, Initial version\r
+' 2024, Improved program readability\r
+\r
+DECLARE SUB loadScript (scriptName$)\r
+\r
+DECLARE SUB timerAdd (element!, time!, value!)\r
+DECLARE SUB timerinit ()\r
+DECLARE SUB timerprocess ()\r
+\r
+DECLARE SUB getCloudXYZ (a!, x1!, y1!, z2!)\r
+DECLARE FUNCTION gdist! (x!, y!, z!)\r
+DECLARE SUB mkworld ()\r
+DECLARE SUB galacloud (rx!, ry!, rz!)\r
+DECLARE SUB temp ()\r
+DECLARE SUB mkgalaxy (x!, y!, z!)\r
+DECLARE SUB rndinit ()\r
+DECLARE FUNCTION rn! ()\r
+DECLARE SUB disp ()\r
+DECLARE SUB startext ()\r
+DECLARE SUB control ()\r
+DECLARE SUB putbyte (addr!, dat!)\r
+DECLARE SUB putword (addr!, dat!)\r
+DECLARE FUNCTION getword! (addr!)\r
+DECLARE FUNCTION getbyte! (addr!)\r
+DECLARE SUB start ()\r
+DECLARE SUB animate ()\r
+\r
+DIM SHARED an1, an2, an3\r
+\r
+DIM SHARED tim\r
+\r
+DIM SHARED extSEG, extADDR\r
+\r
+' User position in the universe\r
+DIM SHARED myx, myy, myz\r
+' User velocity in the universe\r
+DIM SHARED myxs, myys, myzs\r
+' User pressed mouse buttons\r
+DIM SHARED buttL, buttR\r
+' Maximum user movement speed\r
+DIM SHARED maxmove\r
+\r
+' Zoom level\r
+DIM SHARED zoom\r
+DIM SHARED rndval(0 TO 10000)\r
+DIM SHARED rndp\r
+\r
+' Star positions and colors\r
+DIM SHARED px(1 TO 10000), py(1 TO 10000), pz(1 TO 10000)\r
+DIM SHARED pc(1 TO 10000)\r
+' Total number of stars\r
+DIM SHARED nump\r
+' User speed multiplier\r
+DIM SHARED myspd\r
+\r
+DIM SHARED tempr(0 TO 10)\r
+\r
+DIM SHARED vd\r
+\r
+DIM SHARED oftcloud(0 TO 3)\r
+\r
+' Galaxy positions\r
+DIM SHARED oftGalaX(0 TO 19), oftGalaY(0 TO 19), oftGalaZ(0 TO 19)\r
+\r
+DIM SHARED timerTime(0 TO 50, 0 TO 100)\r
+DIM SHARED timerValue(0 TO 50, 0 TO 100)\r
+\r
+DIM SHARED timerCplace(0 TO 50)\r
+DIM SHARED timerCtime(0 TO 50)\r
+DIM SHARED timerCvalue(0 TO 50)\r
+DIM SHARED timerLast\r
+\r
+DIM SHARED timerStartScript\r
+DIM SHARED ScriptRunning\r
+\r
+start\r
+\r
+cx = 0\r
+cy = 0\r
+cz = 0\r
+\r
+myx = 123456\r
+myy = 321\r
+myz = 23\r
+\r
+nump = 9999\r
+1\r
+' Initialize the universe\r
+mkworld\r
+\r
+va = INT(RND * 3)\r
+\r
+SELECT CASE va\r
+CASE 0\r
+  cx = RND * 500 - 250\r
+CASE 1\r
+  cy = RND * 100 - 50\r
+CASE 2\r
+  cz = RND * 500 - 250\r
+END SELECT\r
+\r
+' Handle user input and movement\r
+control\r
+\r
+' Display the universe\r
+disp\r
+\r
+' Process timers for scripted movements\r
+timerprocess\r
+\r
+' Copy screen buffer to main screen\r
+PCOPY 0, 1\r
+\r
+' Clear the screen\r
+CLS\r
+\r
+' Loop back to start\r
+GOTO 1\r
+\r
+SUB control\r
+\r
+' Handle mouse input\r
+IF getbyte(8) <> 0 THEN\r
+  putbyte 8, 0\r
+  xp = getword(2)\r
+  putword 2, 0\r
+  yp = getword(4)\r
+  putword 4, 0\r
+  butt = getword(6)\r
+  putword 6, 0\r
+\r
+  ' Determine which mouse buttons are pressed\r
+  buttL = 0\r
+  buttR = 0\r
+  IF butt = 1 THEN buttL = 1\r
+  IF butt = 2 THEN buttR = 1\r
+  IF butt = 3 THEN buttL = 1: buttR = 1\r
+\r
+  ' Handle right mouse button for up/down movement\r
+  IF buttR = 1 THEN\r
+    ' Handle both buttons pressed for back/front movement\r
+    IF buttL = 1 THEN\r
+      myxs = myxs + SIN(an1) * yp / 4\r
+      myzs = myzs - COS(an1) * yp / 4\r
+      GOTO 3\r
+    END IF\r
+\r
+    ' Handle right button for up/down movement\r
+    myys = myys + yp / 4\r
+3\r
+    yp = 0\r
+  END IF\r
+\r
+END IF\r
+\r
+' Clamp user input to maximum movement speed\r
+IF xp < -maxmove THEN xp = -maxmove\r
+IF xp > maxmove THEN xp = maxmove\r
+an1 = an1 - xp / 150\r
+\r
+IF yp < -maxmove THEN yp = -maxmove\r
+IF yp > maxmove THEN yp = maxmove\r
+an2 = an2 - yp / 150\r
+\r
+' Handle keyboard input for movement\r
+a$ = INKEY$\r
+\r
+IF a$ = "a" THEN myxs = myxs - COS(an1): myzs = myzs - SIN(an1)\r
+IF a$ = "d" THEN myxs = myxs + COS(an1): myzs = myzs + SIN(an1)\r
+IF a$ = "w" THEN myxs = myxs - SIN(an1): myzs = myzs + COS(an1)\r
+IF a$ = "s" THEN myxs = myxs + SIN(an1): myzs = myzs - COS(an1)\r
+\r
+' Handle keyboard input for speed multiplier\r
+IF a$ = "1" THEN myspd = .1\r
+IF a$ = "2" THEN myspd = 1\r
+IF a$ = "3" THEN myspd = 10\r
+IF a$ = "4" THEN myspd = 100\r
+IF a$ = "5" THEN myspd = 1000\r
+IF a$ = "6" THEN myspd = 10000\r
+IF a$ = "7" THEN myspd = 100000\r
+IF a$ = "8" THEN myspd = 1000000\r
+\r
+' Handle keyboard input for quitting the program\r
+IF a$ = "q" THEN SYSTEM\r
+\r
+' Handle keyboard input for recording script\r
+IF a$ = " " THEN\r
+  IF timerStartScript = 0 THEN\r
+    OPEN "script.dat" FOR OUTPUT AS #1\r
+    timerStartScript = TIMER\r
+  END IF\r
+  PRINT #1, TIMER - timerStartScript\r
+  PRINT #1, myx; myy; myz; an1; an2\r
+  SOUND 2000, .1\r
+END IF\r
+\r
+' Handle keyboard input for playing script\r
+IF a$ = "r" THEN\r
+  IF ScriptRunning = 0 THEN\r
+    timerinit\r
+    loadScript "script.dat"\r
+  ELSE\r
+    ScriptRunning = 0\r
+  END IF\r
+END IF\r
+\r
+' Friction to dampen movement speed over time\r
+myxs = myxs / 1.1\r
+myys = myys / 1.1\r
+myzs = myzs / 1.1\r
+\r
+' Update user position based on velocity and speed multiplier\r
+myx = myx + myxs * myspd\r
+myz = myz + myzs * myspd\r
+myy = myy + myys * myspd\r
+\r
+' Apply scripted movement if running\r
+IF ScriptRunning = 1 THEN\r
+  myx = timerCvalue(1)\r
+  myy = timerCvalue(2)\r
+  myz = timerCvalue(3)\r
+  an1 = timerCvalue(4)\r
+  an2 = timerCvalue(5)\r
+END IF\r
+\r
+END SUB\r
+\r
+SUB disp\r
+\r
+' Calculate sine and cosine for rotation\r
+s1 = SIN(an1)\r
+c1 = COS(an1)\r
+s2 = SIN(an2)\r
+c2 = COS(an2)\r
+\r
+' Initialize view distance\r
+vdn = 100000000\r
+\r
+' Loop through all stars to calculate their positions\r
+FOR a = 1 TO nump\r
+\r
+  ' Calculate star position relative to user\r
+  x = px(a) - myx\r
+  y = py(a) - myy\r
+  z = pz(a) - myz\r
+\r
+  ' Update view distance if star is closer\r
+  IF ABS(x) < vdn THEN\r
+    IF ABS(y) < vdn THEN\r
+      IF ABS(z) < vdn THEN vdn = SQR(x * x + y * y + z * z)\r
+    END IF\r
+  END IF\r
+\r
+  ' Rotate star position based on user orientation\r
+  x1 = x * c1 + z * s1\r
+  z1 = z * c1 - x * s1\r
+\r
+  y1 = y * c2 + z1 * s2\r
+  z2 = z1 * c2 - y * s2\r
+\r
+  ' Draw star if it is within view distance\r
+  IF z2 > 3 THEN\r
+    PSET (x1 / z2 * 130 + 160, y1 / z2 * 130 + 100), pc(a)\r
+  END IF\r
+\r
+NEXT a\r
+\r
+' Update average view distance\r
+vd = (vd * 5 + vdn) / 6\r
+\r
+END SUB\r
+\r
+SUB galacloud (rx, ry, rz)\r
+\r
+' Generate random cloud position\r
+a = INT(RND * 100)\r
+d = (a + 30) * 500\r
+\r
+x = d\r
+y = 0\r
+z = 0\r
+\r
+' Calculate sine and cosine for rotation\r
+a1 = SIN(a * (123.45 - (rx MOD 1235))) * 100\r
+a2 = SIN(a * 324 + (ry MOD 5431)) * 120\r
+\r
+s1 = SIN(a1)\r
+c1 = COS(a1)\r
+s2 = SIN(a2)\r
+c2 = COS(a2)\r
+\r
+' Rotate cloud position based on user orientation\r
+x1 = x * c1 + z * s1\r
+z1 = z * c1 - x * s1\r
+\r
+y1 = y * c2 + z1 * s2\r
+z2 = z1 * c2 - y * s2\r
+\r
+' Calculate distance from cloud to user\r
+fx = x1 + rx\r
+fy = y1 + ry\r
+fz = z2 + rz\r
+dist = gdist(fx, fy, fz)\r
+\r
+' Add cloud to galaxy list if within view distance\r
+IF dist < 20000 THEN\r
+  pl = INT(RND * 20)\r
+  oftGalaX(pl) = fx\r
+  oftGalaY(pl) = fy\r
+  oftGalaZ(pl) = fz\r
+  mkgalaxy fx, fy, fz\r
+ELSE\r
+  ' Add cloud to galaxy list if random or view distance is high\r
+  IF (RND * 100 < 10) OR (vd > 500000) THEN\r
+    mkgalaxy fx, fy, fz\r
+  END IF\r
+END IF\r
+\r
+END SUB\r
+\r
+FUNCTION gdist (x, y, z)\r
+' Calculate distance from user to given coordinates\r
+gdist = SQR((x - myx) ^ 2 + (y - myy) ^ 2 + (z - myz) ^ 2)\r
+\r
+END FUNCTION\r
+\r
+FUNCTION getbyte (addr)\r
+' Retrieve byte value at given RAM address\r
+getbyte = PEEK(extADDR + addr)\r
+\r
+END FUNCTION\r
+\r
+SUB getCloudXYZ (a, x1, y1, z2)\r
+\r
+d = a * 1000000\r
+\r
+x = d\r
+y = 0\r
+z = 0\r
+\r
+' Calculate sine and cosine for rotation\r
+a1 = SIN(a * 123) * 100\r
+a2 = SIN(a * 975) * 120\r
+\r
+s1 = SIN(a1)\r
+c1 = COS(a1)\r
+s2 = SIN(a2)\r
+c2 = COS(a2)\r
+\r
+' Rotate cloud position based on user orientation\r
+x1 = x * c1 + z * s1\r
+z1 = z * c1 - x * s1\r
+\r
+y1 = y * c2 + z1 * s2\r
+z2 = z1 * c2 - y * s2\r
+\r
+END SUB\r
+\r
+FUNCTION getword (addr)\r
+' Retrieve word value at given RAM address\r
+a = PEEK(extADDR + addr)\r
+b = PEEK(extADDR + addr + 1)\r
+\r
+c$ = HEX$(a)\r
+IF LEN(c$) = 1 THEN c$ = "0" + c$\r
+IF LEN(c$) = 0 THEN c$ = "00"\r
+\r
+c = VAL("&H" + HEX$(b) + c$)\r
+\r
+getword = c\r
+\r
+END FUNCTION\r
+\r
+SUB loadScript (scriptName$)\r
+' Load script from file and start playback\r
+ScriptRunning = 1\r
+rt = 2\r
+\r
+OPEN scriptName$ FOR INPUT AS #2\r
+\r
+5\r
+IF EOF(2) <> 0 THEN GOTO 6\r
+\r
+INPUT #2, t\r
+t = t / 2\r
+rt = rt + 6\r
+FOR a = 1 TO 5\r
+  INPUT #2, b\r
+  timerAdd a, rt, b\r
+NEXT a\r
+\r
+GOTO 5\r
+\r
+6\r
+CLOSE #2\r
+\r
+' Reset all timers to -1\r
+FOR a = 1 TO 5\r
+  timerAdd a, -1, b\r
+NEXT a\r
+\r
+END SUB\r
+\r
+SUB mkgalaxy (lx, ly, lz)\r
+\r
+' Skip galaxy generation if position is zero\r
+IF (lx = 0) AND (ly = 0) AND (lz = 0) THEN GOTO 4\r
+\r
+' Generate random seed for galaxy\r
+rndp = ABS(lx + ly + lz) MOD 9000\r
+n1 = rn * 100\r
+n2 = rn * 100\r
+n3 = rn * 100\r
+\r
+' Calculate sine and cosine for rotation\r
+gs1 = SIN(n1)\r
+gc1 = COS(n1)\r
+gs2 = SIN(n2)\r
+gc2 = COS(n2)\r
+gs3 = SIN(n3)\r
+gc3 = COS(n3)\r
+\r
+' Calculate galaxy size and temperature\r
+siz = rn * 50 + 75\r
+pi = 3.14\r
+sbm = INT(rn * 3) + 1\r
+\r
+' Calculate distance from galaxy to user\r
+dist = gdist(lx, ly, lz)\r
+\r
+' Determine number of stars based on distance\r
+amo = 1\r
+IF dist < 20000 THEN amo = 1\r
+IF dist < 5000 THEN amo = 2\r
+IF dist < 1000 THEN amo = 10\r
+IF dist < 500 THEN amo = 50\r
+\r
+' Generate stars in galaxy\r
+FOR a = 1 TO amo\r
+\r
+  ' Calculate random values for star position\r
+  b = RND * 10\r
+  s = b * b / 30\r
+\r
+  v1 = RND * (11.5 - b) / 3\r
+  v1p = v1 / 2\r
+\r
+  ane = RND * (s / 2) / sbm * 2\r
+  sba = 2 * pi / sbm * INT(RND * sbm)\r
+\r
+  x = (SIN(b - sba + ane) * s + RND * v1 - v1p) * siz\r
+  z = (COS(b - sba + ane) * s + RND * v1 - v1p) * siz\r
+  y = (RND * v1 - v1p) * siz\r
+\r
+  ' Rotate star position based on galaxy orientation\r
+  x1 = x * gc1 + z * gs1\r
+  z1 = z * gc1 - x * gs1\r
+\r
+  y1 = y * gc2 + z1 * gs2\r
+  z2 = z1 * gc2 - y * gs2\r
+\r
+  y2 = y1 * gc3 + x1 * gs3\r
+  x2 = x1 * gc3 - y1 * gs3\r
+\r
+  ' Add star to universe\r
+  pla = INT(RND * nump) + 1\r
+\r
+  px(pla) = x2 + lx\r
+  py(pla) = y2 + ly\r
+  pz(pla) = z2 + lz\r
+  pc(pla) = INT(RND * 15) + 1\r
+\r
+NEXT a\r
+\r
+4\r
+END SUB\r
+\r
+SUB mkworld\r
+\r
+' Generate initial galaxy clusters\r
+FOR b = 1 TO 10\r
+  a = INT(RND * 100)\r
+  getCloudXYZ a, x, y, z\r
+\r
+  ' Add cloud to galaxy list if within view distance\r
+  IF gdist(x, y, z) < vd * 3 THEN oftcloud(INT(RND * 4)) = a\r
+\r
+  ' Generate galaxy cluster at cloud position\r
+  galacloud x, y, z\r
+NEXT b\r
+\r
+' Add additional galaxy clusters if view distance is high\r
+IF vd < 4000000 THEN\r
+  FOR b = 0 TO 3\r
+    a = oftcloud(b)\r
+    getCloudXYZ a, x, y, z\r
+\r
+    ' Generate galaxy cluster at cloud position\r
+    galacloud x, y, z\r
+  NEXT b\r
+END IF\r
+\r
+' Add galaxies to universe if view distance is low\r
+IF vd < 10000 THEN\r
+\r
+  FOR b = 0 TO 19\r
+    x = oftGalaX(b)\r
+    y = oftGalaY(b)\r
+    z = oftGalaZ(b)\r
+\r
+    ' Generate galaxy at given position\r
+    mkgalaxy x, y, z\r
+  NEXT b\r
+\r
+ELSE\r
+END IF\r
+\r
+END SUB\r
+\r
+SUB putbyte (addr, dat)\r
+\r
+' Store byte value at given RAM address\r
+POKE (extADDR + addr), dat\r
+\r
+END SUB\r
+\r
+SUB putword (addr, dat)\r
+\r
+' Store word value at given RAM address\r
+b$ = HEX$(dat)\r
+\r
+2\r
+IF LEN(b$) < 4 THEN b$ = "0" + b$: GOTO 2\r
+\r
+n1 = VAL("&H" + LEFT$(b$, 2))\r
+n2 = VAL("&H" + RIGHT$(b$, 2))\r
+\r
+POKE (extADDR + addr), n2\r
+POKE (extADDR + addr + 1), n1\r
+\r
+END SUB\r
+\r
+FUNCTION rn\r
+\r
+' Generate random number based on current index\r
+rndp = rndp + 1\r
+IF rndp > 10000 THEN rndp = 0\r
+rn = rndval(rndp)\r
+\r
+END FUNCTION\r
+\r
+SUB rndinit\r
+\r
+' Initialize random number array\r
+FOR a = 0 TO 10000\r
+  rndval(a) = RND\r
+NEXT a\r
+\r
+rndp = 0\r
+\r
+END SUB\r
+\r
+SUB start\r
+\r
+PRINT "Universe Explorer"\r
+PRINT "by Svjatoslav Agejenko, n0@hot.ee"\r
+PRINT "2003.12"\r
+PRINT\r
+\r
+PRINT "Use mouse to aim."\r
+PRINT "Use keys: a, s, d, w  to move around,"\r
+PRINT "1 2 3 4 5 6 7 to change speed multiplier."\r
+PRINT "r - to start/stop demo."\r
+\r
+PRINT "right mouse button, to move UP <> DOWN."\r
+PRINT "both right & left mouse buttons pressed to move BACK <> FRONT."\r
+\r
+PRINT "At least P3 500 MHz, would be nice."\r
+PRINT "Better CPU, more details and higher framerate."\r
+PRINT "Requires mouse driver, and QBasic extension TSR"\r
+PRINT "to be loaded first."\r
+\r
+PRINT\r
+\r
+PRINT "In this program:"\r
+\r
+PRINT "Several stars, make up galaxy."\r
+PRINT "Several galaxies makes metagalaxy."\r
+PRINT "Several metagalaxies makes up universe."\r
+\r
+PRINT\r
+\r
+PRINT "Press Any key To Continue."\r
+a$ = INPUT$(1)\r
+\r
+startext\r
+\r
+SCREEN 7, , , 1\r
+\r
+maxmove = 50\r
+rndinit\r
+myspd = 1000000\r
+\r
+END SUB\r
+\r
+SUB startext\r
+\r
+' Read interrupt table to find QBasic extension TSR\r
+DEF SEG = 0\r
+\r
+extSEG = PEEK(&H79 * 4 + 3) * 256\r
+extSEG = extSEG + PEEK(&H79 * 4 + 2)\r
+\r
+PRINT "Segment is: " + HEX$(extSEG)\r
+\r
+extADDR = PEEK(&H79 * 4 + 1) * 256\r
+extADDR = extADDR + PEEK(&H79 * 4 + 0)\r
+\r
+PRINT "relative address is:"; extADDR\r
+\r
+DEF SEG = extSEG\r
+\r
+' Check if QBasic extension TSR is loaded\r
+IF getword(0) <> 1983 THEN\r
+  PRINT "FATAL ERROR:  you must load"\r
+  PRINT "QBasic extension TSR first!"\r
+  SYSTEM\r
+END IF\r
+\r
+END SUB\r
+\r
+SUB timerAdd (element, time, value)\r
+\r
+' Add timer event to list\r
+FOR a = 0 TO 100\r
+  IF (timerTime(element, a) = 0) AND (timerValue(element, a) = 0) THEN GOTO timer3\r
+NEXT a\r
+timer3:\r
+\r
+timerTime(element, a) = time\r
+timerValue(element, a) = value\r
+\r
+END SUB\r
+\r
+SUB timerdisp\r
+LOCATE 1, 1\r
+\r
+' Display all active timers\r
+FOR a = 0 TO 10\r
+  PRINT timerCplace(a), timerCtime(a), timerCvalue(a)\r
+NEXT a\r
+\r
+END SUB\r
+\r
+SUB timerinit\r
+\r
+' Initialize all timers to zero\r
+timerLast = TIMER\r
+\r
+FOR a = 1 TO 50\r
+  FOR b = 1 TO 100\r
+    timerTime(a, b) = 0\r
+    timerValue(a, b) = 0\r
+  NEXT b\r
+NEXT a\r
+\r
+END SUB\r
+\r
+SUB timerprocess\r
+\r
+' Process all active timers\r
+timerCurrent = TIMER\r
+timerDiff = timerCurrent - timerLast\r
+timerLast = timerCurrent\r
+\r
+FOR a = 0 TO 50\r
+  ctim = timerCtime(a) + timerDiff\r
+  Cplace = timerCplace(a)\r
+timer2:\r
+  IF timerTime(a, Cplace + 1) = -1 THEN\r
+    ctim = 0\r
+    Cplace = 0\r
+  END IF\r
+  IF timerTime(a, Cplace + 1) < ctim THEN\r
+    IF timerTime(a, Cplace + 1) = 0 THEN\r
+      timerCvalue(a) = timerValue(a, Cplace)\r
+      GOTO timer1:\r
+    END IF\r
+    Cplace = Cplace + 1\r
+    GOTO timer2\r
+  END IF\r
+\r
+  v1 = timerValue(a, Cplace)\r
+  t1 = timerTime(a, Cplace)\r
+  v2 = timerValue(a, Cplace + 1)\r
+  t2 = timerTime(a, Cplace + 1)\r
+\r
+  ' Interpolate between two timer values\r
+  IF v1 = v2 THEN\r
+    timerCvalue(a) = v1\r
+  ELSE\r
+    Tdiff1 = t2 - t1\r
+    Tdiff2 = ctim - t1\r
+    Vdiff = v2 - v1\r
+    timerCvalue(a) = Tdiff2 / Tdiff1 * Vdiff + v1\r
+  END IF\r
+timer1:\r
+  timerCplace(a) = Cplace\r
+  timerCtime(a) = ctim\r
+NEXT a\r
+\r
+END SUB\r
diff --git a/3D GFX/Space/Universe explorer/index.html b/3D GFX/Space/Universe explorer/index.html
new file mode 100644 (file)
index 0000000..2daf567
--- /dev/null
@@ -0,0 +1,45 @@
+<HTML>\r
+<HEAD><TITLE>Universe Explorer</TITLE></HEAD>\r
+\r
+<BODY text=#A0A0ff vLink=#0000ff aLink=#0000ff link=#0000ff bgColor=#000000>\r
+\r
+<CENTER><H1>Universe Explorer</H1></CENTER>\r
+<BR>\r
+<BR>\r
+This QBasic program draws 3D universe consisting of stars in realtime.\r
+\r
+Stars form different galaxies, and galaxies in turn form metagalaxies, witch\r
+finally form universe.\r
+\r
+Program allows you to freely fly around using mouse and the keyboard.\r
+In this simulation universe consists from many millions of stars.\r
+Since QBasic cannot handle large arrays it was quite an art to\r
+invent and optimize formula witch syntheszies any part of the\r
+universe on demand. Every galaxy and metagalaxy is unique.\r
+When user flies near to some galaxy, it will be synthezied,\r
+and detail level will increase.\r
+<BR><BR><BR>\r
+<BR><b>single metagalaxy</b>\r
+<BR><IMG SRC="3.png">\r
+<BR><BR><BR>\r
+<BR><b>single galaxy</b>\r
+<BR><IMG SRC="1.png">\r
+<BR><BR><BR>\r
+<BR><b>another galaxy</b>\r
+<BR><IMG SRC="2.png">\r
+<BR>\r
+<BR><pre>\r
+<code>\r
+Requirements:\r
+       CPU 500 MHz or better\r
+       MS QBasic (preferably QB 4.5)\r
+       QBEXT TSR (included)\r
+\r
+Running program:\r
+       Since QB has no mouse support there is workaround hack: QBEXT.\r
+       Thats a tiny TSR that must be loaded first to allow\r
+       mouse usage.\r
+</code>\r
+</pre>\r
+</BODY>\r
+</HTML>
\ No newline at end of file
diff --git a/3D GFX/Space/Universe explorer/qbext.com b/3D GFX/Space/Universe explorer/qbext.com
new file mode 100755 (executable)
index 0000000..ae54fc4
Binary files /dev/null and b/3D GFX/Space/Universe explorer/qbext.com differ
diff --git a/3D GFX/Space/Universe explorer/run.bat b/3D GFX/Space/Universe explorer/run.bat
new file mode 100755 (executable)
index 0000000..15e61be
--- /dev/null
@@ -0,0 +1,2 @@
+qbext\r
+qb /run expluniv.bas
\ No newline at end of file
diff --git a/3D GFX/Space/index.html b/3D GFX/Space/index.html
new file mode 100644 (file)
index 0000000..d6e9b43
--- /dev/null
@@ -0,0 +1,334 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<!-- 2025-07-28 ma 03:33 -->
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+<meta name="viewport" content="width=device-width, initial-scale=1" />
+<title>Space themed 3D graphics</title>
+<meta name="generator" content="Org Mode" />
+<style>
+  #content { max-width: 60em; margin: auto; }
+  .title  { text-align: center;
+             margin-bottom: .2em; }
+  .subtitle { text-align: center;
+              font-size: medium;
+              font-weight: bold;
+              margin-top:0; }
+  .todo   { font-family: monospace; color: red; }
+  .done   { font-family: monospace; color: green; }
+  .priority { font-family: monospace; color: orange; }
+  .tag    { background-color: #eee; font-family: monospace;
+            padding: 2px; font-size: 80%; font-weight: normal; }
+  .timestamp { color: #bebebe; }
+  .timestamp-kwd { color: #5f9ea0; }
+  .org-right  { margin-left: auto; margin-right: 0px;  text-align: right; }
+  .org-left   { margin-left: 0px;  margin-right: auto; text-align: left; }
+  .org-center { margin-left: auto; margin-right: auto; text-align: center; }
+  .underline { text-decoration: underline; }
+  #postamble p, #preamble p { font-size: 90%; margin: .2em; }
+  p.verse { margin-left: 3%; }
+  pre {
+    border: 1px solid #e6e6e6;
+    border-radius: 3px;
+    background-color: #f2f2f2;
+    padding: 8pt;
+    font-family: monospace;
+    overflow: auto;
+    margin: 1.2em;
+  }
+  pre.src {
+    position: relative;
+    overflow: auto;
+  }
+  pre.src:before {
+    display: none;
+    position: absolute;
+    top: -8px;
+    right: 12px;
+    padding: 3px;
+    color: #555;
+    background-color: #f2f2f299;
+  }
+  pre.src:hover:before { display: inline; margin-top: 14px;}
+  /* Languages per Org manual */
+  pre.src-asymptote:before { content: 'Asymptote'; }
+  pre.src-awk:before { content: 'Awk'; }
+  pre.src-authinfo::before { content: 'Authinfo'; }
+  pre.src-C:before { content: 'C'; }
+  /* pre.src-C++ doesn't work in CSS */
+  pre.src-clojure:before { content: 'Clojure'; }
+  pre.src-css:before { content: 'CSS'; }
+  pre.src-D:before { content: 'D'; }
+  pre.src-ditaa:before { content: 'ditaa'; }
+  pre.src-dot:before { content: 'Graphviz'; }
+  pre.src-calc:before { content: 'Emacs Calc'; }
+  pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
+  pre.src-fortran:before { content: 'Fortran'; }
+  pre.src-gnuplot:before { content: 'gnuplot'; }
+  pre.src-haskell:before { content: 'Haskell'; }
+  pre.src-hledger:before { content: 'hledger'; }
+  pre.src-java:before { content: 'Java'; }
+  pre.src-js:before { content: 'Javascript'; }
+  pre.src-latex:before { content: 'LaTeX'; }
+  pre.src-ledger:before { content: 'Ledger'; }
+  pre.src-lisp:before { content: 'Lisp'; }
+  pre.src-lilypond:before { content: 'Lilypond'; }
+  pre.src-lua:before { content: 'Lua'; }
+  pre.src-matlab:before { content: 'MATLAB'; }
+  pre.src-mscgen:before { content: 'Mscgen'; }
+  pre.src-ocaml:before { content: 'Objective Caml'; }
+  pre.src-octave:before { content: 'Octave'; }
+  pre.src-org:before { content: 'Org mode'; }
+  pre.src-oz:before { content: 'OZ'; }
+  pre.src-plantuml:before { content: 'Plantuml'; }
+  pre.src-processing:before { content: 'Processing.js'; }
+  pre.src-python:before { content: 'Python'; }
+  pre.src-R:before { content: 'R'; }
+  pre.src-ruby:before { content: 'Ruby'; }
+  pre.src-sass:before { content: 'Sass'; }
+  pre.src-scheme:before { content: 'Scheme'; }
+  pre.src-screen:before { content: 'Gnu Screen'; }
+  pre.src-sed:before { content: 'Sed'; }
+  pre.src-sh:before { content: 'shell'; }
+  pre.src-sql:before { content: 'SQL'; }
+  pre.src-sqlite:before { content: 'SQLite'; }
+  /* additional languages in org.el's org-babel-load-languages alist */
+  pre.src-forth:before { content: 'Forth'; }
+  pre.src-io:before { content: 'IO'; }
+  pre.src-J:before { content: 'J'; }
+  pre.src-makefile:before { content: 'Makefile'; }
+  pre.src-maxima:before { content: 'Maxima'; }
+  pre.src-perl:before { content: 'Perl'; }
+  pre.src-picolisp:before { content: 'Pico Lisp'; }
+  pre.src-scala:before { content: 'Scala'; }
+  pre.src-shell:before { content: 'Shell Script'; }
+  pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
+  /* additional language identifiers per "defun org-babel-execute"
+       in ob-*.el */
+  pre.src-cpp:before  { content: 'C++'; }
+  pre.src-abc:before  { content: 'ABC'; }
+  pre.src-coq:before  { content: 'Coq'; }
+  pre.src-groovy:before  { content: 'Groovy'; }
+  /* additional language identifiers from org-babel-shell-names in
+     ob-shell.el: ob-shell is the only babel language using a lambda to put
+     the execution function name together. */
+  pre.src-bash:before  { content: 'bash'; }
+  pre.src-csh:before  { content: 'csh'; }
+  pre.src-ash:before  { content: 'ash'; }
+  pre.src-dash:before  { content: 'dash'; }
+  pre.src-ksh:before  { content: 'ksh'; }
+  pre.src-mksh:before  { content: 'mksh'; }
+  pre.src-posh:before  { content: 'posh'; }
+  /* Additional Emacs modes also supported by the LaTeX listings package */
+  pre.src-ada:before { content: 'Ada'; }
+  pre.src-asm:before { content: 'Assembler'; }
+  pre.src-caml:before { content: 'Caml'; }
+  pre.src-delphi:before { content: 'Delphi'; }
+  pre.src-html:before { content: 'HTML'; }
+  pre.src-idl:before { content: 'IDL'; }
+  pre.src-mercury:before { content: 'Mercury'; }
+  pre.src-metapost:before { content: 'MetaPost'; }
+  pre.src-modula-2:before { content: 'Modula-2'; }
+  pre.src-pascal:before { content: 'Pascal'; }
+  pre.src-ps:before { content: 'PostScript'; }
+  pre.src-prolog:before { content: 'Prolog'; }
+  pre.src-simula:before { content: 'Simula'; }
+  pre.src-tcl:before { content: 'tcl'; }
+  pre.src-tex:before { content: 'TeX'; }
+  pre.src-plain-tex:before { content: 'Plain TeX'; }
+  pre.src-verilog:before { content: 'Verilog'; }
+  pre.src-vhdl:before { content: 'VHDL'; }
+  pre.src-xml:before { content: 'XML'; }
+  pre.src-nxml:before { content: 'XML'; }
+  /* add a generic configuration mode; LaTeX export needs an additional
+     (add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
+  pre.src-conf:before { content: 'Configuration File'; }
+
+  table { border-collapse:collapse; }
+  caption.t-above { caption-side: top; }
+  caption.t-bottom { caption-side: bottom; }
+  td, th { vertical-align:top;  }
+  th.org-right  { text-align: center;  }
+  th.org-left   { text-align: center;   }
+  th.org-center { text-align: center; }
+  td.org-right  { text-align: right;  }
+  td.org-left   { text-align: left;   }
+  td.org-center { text-align: center; }
+  dt { font-weight: bold; }
+  .footpara { display: inline; }
+  .footdef  { margin-bottom: 1em; }
+  .figure { padding: 1em; }
+  .figure p { text-align: center; }
+  .equation-container {
+    display: table;
+    text-align: center;
+    width: 100%;
+  }
+  .equation {
+    vertical-align: middle;
+  }
+  .equation-label {
+    display: table-cell;
+    text-align: right;
+    vertical-align: middle;
+  }
+  .inlinetask {
+    padding: 10px;
+    border: 2px solid gray;
+    margin: 10px;
+    background: #ffffcc;
+  }
+  #org-div-home-and-up
+   { text-align: right; font-size: 70%; white-space: nowrap; }
+  textarea { overflow-x: auto; }
+  .linenr { font-size: smaller }
+  .code-highlighted { background-color: #ffff00; }
+  .org-info-js_info-navigation { border-style: none; }
+  #org-info-js_console-label
+    { font-size: 10px; font-weight: bold; white-space: nowrap; }
+  .org-info-js_search-highlight
+    { background-color: #ffff00; color: #000000; font-weight: bold; }
+  .org-svg { }
+</style>
+<style type="text/css">
+               body {
+                 max-width: 35cm !important;
+               }
+               #content {
+                 max-width: 80em !important;
+                 width: 90%;
+               }
+               </style>
+<link rel="stylesheet" type="text/css" href="https://thomasf.github.io/solarized-css/solarized-dark.min.css" />
+</head>
+<body>
+<div id="content" class="content">
+<h1 class="title">Space themed 3D graphics</h1>
+<div id="table-of-contents" role="doc-toc">
+<h2>Table of Contents</h2>
+<div id="text-table-of-contents" role="doc-toc">
+<ul>
+<li><a href="#org3423fbf">1. Galaxy explorer</a></li>
+<li><a href="#org514bffe">2. Rocket simulator</a></li>
+<li><a href="#orgadb0264">3. Stars</a></li>
+<li><a href="#org9c279ca">4. Universe explorer</a></li>
+</ul>
+</div>
+</div>
+<style>
+  .flex-center {
+    display: flex;            /* activate flexbox */
+    justify-content: center;  /* horizontally center anything inside   */
+  }
+
+  .flex-center video {
+    width: min(90%, 1000px); /* whichever is smaller wins */
+    height: auto;            /* preserve aspect ratio */
+  }
+
+  .responsive-img {
+    width: min(100%, 1000px);
+    height: auto;
+  }
+</style>
+
+<div id="outline-container-org3423fbf" class="outline-2">
+<h2 id="org3423fbf"><span class="section-number-2">1.</span> Galaxy explorer</h2>
+<div class="outline-text-2" id="text-1">
+<p>
+TODO: add description
+</p>
+
+
+<div id="org99ca7c0" class="figure">
+<p><a href="Galaxy%20explorer.bas" class="responsive-img"><img src="Galaxy%20explorer.png" alt="Galaxy%20explorer.png" class="responsive-img" /></a>
+</p>
+</div>
+
+<p>
+<a href="!.bas">Source code</a>
+</p>
+</div>
+</div>
+
+
+<div id="outline-container-org514bffe" class="outline-2">
+<h2 id="org514bffe"><span class="section-number-2">2.</span> Rocket simulator</h2>
+<div class="outline-text-2" id="text-2">
+<p>
+TODO: add description
+</p>
+
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="Rocket simulator.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+
+<p>
+<a href="Rocket simulator.bas">Source code</a>
+</p>
+</div>
+</div>
+
+
+<div id="outline-container-orgadb0264" class="outline-2">
+<h2 id="orgadb0264"><span class="section-number-2">3.</span> Stars</h2>
+<div class="outline-text-2" id="text-3">
+<p>
+TODO: add description
+</p>
+
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="Stars.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+
+<p>
+<a href="Stars.bas">Source code</a>
+</p>
+</div>
+</div>
+
+<div id="outline-container-org9c279ca" class="outline-2">
+<h2 id="org9c279ca"><span class="section-number-2">4.</span> Universe explorer</h2>
+<div class="outline-text-2" id="text-4">
+<p>
+TODO: add description
+</p>
+
+
+<div id="org080be9c" class="figure">
+<p><a href="Universe%20explorer/Universe%20explorer.bas" class="responsive-img"><img src="Universe%20explorer/1.png" alt="1.png" class="responsive-img" /></a>
+</p>
+</div>
+
+
+<div id="org83b6225" class="figure">
+<p><a href="Universe%20explorer/Universe%20explorer.bas" class="responsive-img"><img src="Universe%20explorer/2.png" alt="2.png" class="responsive-img" /></a>
+</p>
+</div>
+
+
+<div id="org31f0834" class="figure">
+<p><a href="Universe%20explorer/Universe%20explorer.bas" class="responsive-img"><img src="Universe%20explorer/3.png" alt="3.png" class="responsive-img" /></a>
+</p>
+</div>
+
+<p>
+<a href="!.bas">Source code</a>
+</p>
+</div>
+</div>
+</div>
+<div id="postamble" class="status">
+<p class="date">Created: 2025-07-28 ma 03:33</p>
+<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
+</div>
+</body>
+</html>
diff --git a/3D GFX/Space/index.org b/3D GFX/Space/index.org
new file mode 100644 (file)
index 0000000..8f0b931
--- /dev/null
@@ -0,0 +1,87 @@
+#+TITLE: Space themed 3D graphics
+#+LANGUAGE: en
+#+LATEX_HEADER: \usepackage[margin=1.0in]{geometry}
+#+LATEX_HEADER: \usepackage{parskip}
+#+LATEX_HEADER: \usepackage[none]{hyphenat}
+
+#+OPTIONS: H:20 num:20
+#+OPTIONS: author:nil
+
+#+begin_export html
+<style>
+  .flex-center {
+    display: flex;            /* activate flexbox */
+    justify-content: center;  /* horizontally center anything inside   */
+  }
+
+  .flex-center video {
+    width: min(90%, 1000px); /* whichever is smaller wins */
+    height: auto;            /* preserve aspect ratio */
+  }
+
+  .responsive-img {
+    width: min(100%, 1000px);
+    height: auto;
+  }
+</style>
+#+end_export
+
+* Galaxy explorer
+
+TODO: add description
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:Galaxy%20explorer.bas][file:Galaxy%20explorer.png]]
+
+[[file:!.bas][Source code]]
+
+
+* Rocket simulator
+
+TODO: add description
+
+#+begin_export html
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="Rocket simulator.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:Rocket simulator.bas][Source code]]
+
+
+* Stars
+
+TODO: add description
+
+#+begin_export html
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="Stars.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:Stars.bas][Source code]]
+
+* Universe explorer
+
+TODO: add description
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:Universe%20explorer/Universe%20explorer.bas][file:Universe%20explorer/1.png]]
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:Universe%20explorer/Universe%20explorer.bas][file:Universe%20explorer/2.png]]
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:Universe%20explorer/Universe%20explorer.bas][file:Universe%20explorer/3.png]]
+
+[[file:!.bas][Source code]]
diff --git a/3D GFX/Space/logo.png b/3D GFX/Space/logo.png
new file mode 100644 (file)
index 0000000..d0121eb
Binary files /dev/null and b/3D GFX/Space/logo.png differ
diff --git a/3D GFX/Space/qbext.com b/3D GFX/Space/qbext.com
new file mode 100755 (executable)
index 0000000..ae54fc4
Binary files /dev/null and b/3D GFX/Space/qbext.com differ
diff --git a/3D GFX/Swapping 3D engine/engine.bas b/3D GFX/Swapping 3D engine/engine.bas
new file mode 100755 (executable)
index 0000000..a23a9a3
--- /dev/null
@@ -0,0 +1,937 @@
+DECLARE SUB createLongLine (x1!, y1!, z1!, x2!, y2!, z2!, c!)\r
+DECLARE SUB makeGrid (x1!, y1!, z1!, x2!, y2!, z2!)\r
+DECLARE SUB prn (a$, x!, y!, z!)\r
+DECLARE SUB fill4 ()\r
+DECLARE SUB loadObject (name$, x!, y!, z!)\r
+DECLARE SUB putChar (a$, x!, y!, z!)\r
+\r
+' 3D engine that can theoretically render infinite wireframe 3D worlds.\r
+' This is accomplished by partitioning world into cube shaped fragments.\r
+' Fragments are dynamically loaded into RAM and offloaded from RAM to disk\r
+' while user moves around in world.\r
+'\r
+' As a result, huge world can be stored on-disk while only necessary part of it\r
+' in close proximity is kept in limited RAM.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2004.1 - Initial version\r
+'\r
+\r
+DECLARE SUB fill3 ()\r
+DECLARE SUB fill1 ()\r
+DECLARE SUB fill2 ()\r
+DECLARE SUB addMsg (a$)\r
+DECLARE SUB dispmsg ()\r
+DECLARE SUB loadArea (tx1!, ty1!, tz1!, tx2!, ty2!, tz2!)\r
+DECLARE SUB loadCluster (x!, y!, z!)\r
+DECLARE SUB checkVisibility ()\r
+DECLARE SUB decVisibility ()\r
+DECLARE SUB applyBounds ()\r
+DECLARE SUB clearWorld ()\r
+DECLARE SUB createNewLine (x1!, y1!, z1!, x2!, y2!, z2!, c!)\r
+DECLARE SUB createWorld ()\r
+DECLARE FUNCTION getClustName$ (a!, b!, c!)\r
+DECLARE FUNCTION toStr$ (a!)\r
+\r
+DECLARE SUB insertLine (x1!, y1!, z1!, x2!, y2!, z2!, c!)\r
+DECLARE SUB startext ()\r
+DECLARE SUB control ()\r
+DECLARE SUB putbyte (addr!, dat!)\r
+DECLARE SUB putword (addr!, dat!)\r
+DECLARE FUNCTION getword! (addr!)\r
+DECLARE FUNCTION getbyte! (addr!)\r
+DECLARE SUB start ()\r
+DECLARE SUB render ()\r
+\r
+\r
+DIM SHARED an1, an2\r
+\r
+DIM SHARED extSEG, extADDR\r
+DIM SHARED buttL, buttR\r
+DIM SHARED maxmove\r
+\r
+DIM SHARED linAmo\r
+linAmo = 5000\r
+\r
+DIM SHARED linX1(0 TO linAmo) AS INTEGER\r
+DIM SHARED linY1(0 TO linAmo) AS INTEGER\r
+DIM SHARED linZ1(0 TO linAmo) AS INTEGER\r
+DIM SHARED linX2(0 TO linAmo) AS INTEGER\r
+DIM SHARED linY2(0 TO linAmo) AS INTEGER\r
+DIM SHARED linZ2(0 TO linAmo) AS INTEGER\r
+DIM SHARED linC(0 TO linAmo) AS INTEGER\r
+\r
+DIM SHARED myx, myy, myz\r
+DIM SHARED myxs, myys, myzs\r
+\r
+DIM SHARED curFreeLine\r
+DIM SHARED worldSize\r
+\r
+DIM SHARED usedLines\r
+DIM SHARED desMaxLines\r
+\r
+DIM SHARED visMaxX, visMaxY, visMaxZ\r
+DIM SHARED visMinX, visMinY, visMinZ\r
+\r
+DIM SHARED visDist\r
+DIM SHARED msgs$(1 TO 10)\r
+DIM SHARED frm\r
+\r
+\r
+'DIM SHARED blkData(1 TO 50) AS STRING * 512\r
+'DIM SHARED blkFrag(1 TO 50) AS STRING * 512\r
+\r
+\r
+\r
+\r
+nl = 0\r
+np = 0\r
+\r
+start\r
+\r
+\r
+cx = 0\r
+cy = 0\r
+cz = 0\r
+\r
+np = 1\r
+px(1) = 0\r
+py(1) = 0\r
+pz(1) = 0\r
+\r
+makeGrid -400, -400, -400, 400, 400, 400\r
+\r
+1\r
+frm = frm + 1\r
+\r
+'fill1\r
+fill2\r
+fill3\r
+fill4\r
+\r
+\r
+control\r
+\r
+render\r
+\r
+LOCATE 1, 1\r
+PRINT usedLines, visDist\r
+\r
+checkVisibility\r
+\r
+PCOPY 0, 1\r
+CLS\r
+GOTO 1\r
+\r
+SUB addMsg (a$)\r
+\r
+FOR a = 1 TO 9\r
+  msgs$(a) = msgs$(a + 1)\r
+NEXT a\r
+\r
+msgs$(10) = a$\r
+END SUB\r
+\r
+SUB applyBounds\r
+\r
+FOR a = 0 TO linAmo\r
+  IF linC(a) > 0 THEN\r
+\r
+\r
+    cx = (linX1(a) + linX2(a)) / 2\r
+    cy = (linY1(a) + linY2(a)) / 2\r
+    cz = (linZ1(a) + linZ2(a)) / 2\r
+   \r
+    clx = INT(cx / 100)\r
+    cly = INT(cy / 100)\r
+    clz = INT(cz / 100)\r
+\r
+    IF clx > visMaxX THEN GOTO 8\r
+    IF clx < visMinX THEN GOTO 8\r
+   \r
+    IF cly > visMaxY THEN GOTO 8\r
+    IF cly < visMinY THEN GOTO 8\r
+\r
+    IF clz > visMaxZ THEN GOTO 8\r
+    IF clz < visMinZ THEN GOTO 8\r
+\r
+    GOTO 7\r
+8   linC(a) = -1\r
+    usedLines = usedLines - 1\r
+  END IF\r
+7\r
+NEXT a\r
+\r
+END SUB\r
+\r
+SUB checkVisibility\r
+\r
+'DIM SHARED visMaxX, visMaxY, visMaxZ\r
+'DIM SHARED visMinX, visMinY, visMinZ\r
+\r
+\r
+mx = INT(myx / 100)\r
+my = INT(myy / 100)\r
+mz = INT(myz / 100)\r
+\r
+\r
+IF mx + visDist > visMaxX THEN\r
+  newX = mx + visDist\r
+  loadArea visMaxX + 1, visMinY, visMinZ, newX, visMaxY, visMaxZ\r
+  visMaxX = newX\r
+  LOCATE 1, 30\r
+  PRINT "1"\r
+END IF\r
+IF mx - visDist < visMinX THEN\r
+  newX = mx - visDist\r
+  loadArea visMinX - 1, visMinY, visMinZ, newX, visMaxY, visMaxZ\r
+  visMinX = newX\r
+  LOCATE 1, 30\r
+  PRINT "2"\r
+END IF\r
+\r
+\r
+IF my + visDist > visMaxY THEN\r
+  newY = my + visDist\r
+  loadArea visMinX, visMaxY + 1, visMinZ, visMaxX, newY, visMaxZ\r
+  visMaxY = newY\r
+  LOCATE 1, 30\r
+  PRINT "3"\r
+END IF\r
+IF my - visDist < visMinY THEN\r
+  newY = my - visDist\r
+  loadArea visMinX, visMinY - 1, visMinZ, visMaxX, newY, visMaxZ\r
+  visMinY = newY\r
+  LOCATE 1, 30\r
+  PRINT "4"\r
+END IF\r
+\r
+\r
+IF mz + visDist > visMaxZ THEN\r
+  newZ = mz + visDist\r
+  loadArea visMinX, visMinY, visMaxZ + 1, visMaxX, visMaxY, newZ\r
+  visMaxZ = newZ\r
+  LOCATE 1, 30\r
+  PRINT "5"\r
+END IF\r
+IF mz - visDist < visMinZ THEN\r
+  newZ = mz - visDist\r
+  loadArea visMinX, visMinY, visMinZ - 1, visMaxX, visMaxY, newZ\r
+  visMinZ = newZ\r
+  LOCATE 1, 30\r
+  PRINT "6"\r
+END IF\r
+\r
+\r
+IF usedLines > desMaxLines THEN decVisibility\r
+\r
+END SUB\r
+\r
+SUB clearWorld\r
+\r
+\r
+CHDIR "world"\r
+\r
+FOR x = -worldSize TO worldSize\r
+\r
+  n$ = "X" + toStr$(x)\r
+  CHDIR n$\r
+\r
+  FOR y = -worldSize TO worldSize\r
+\r
+    n2$ = "Y" + toStr$(y)\r
+    CHDIR n2$\r
+\r
+    PRINT x, y\r
+    FOR z = -worldSize TO worldSize\r
+\r
+      n3$ = "z" + toStr$(z) + ".dat"\r
+      OPEN n3$ FOR OUTPUT AS #1\r
+'      PRINT #1, "0"\r
+      CLOSE #1\r
+    NEXT z\r
+\r
+    CHDIR ".."\r
+  NEXT y\r
+\r
+  CHDIR ".."\r
+NEXT x\r
+\r
+CHDIR ".."\r
+\r
+END SUB\r
+\r
+SUB control\r
+\r
+\r
+IF getbyte(8) <> 0 THEN\r
+  putbyte 8, 0\r
+  xp = getword(2)\r
+  putword 2, 0\r
+  yp = getword(4)\r
+  putword 4, 0\r
+  butt = getword(6)\r
+  putword 6, 0\r
+  buttL = 0\r
+  buttR = 0\r
+  IF butt = 1 THEN buttL = 1\r
+  IF butt = 2 THEN buttR = 1\r
+  IF butt = 3 THEN buttL = 1: buttR = 1\r
+\r
+\r
+  IF buttR = 1 THEN\r
+    IF buttL = 1 THEN\r
+      myxs = myxs + SIN(an1) * yp / 4\r
+      myzs = myzs - COS(an1) * yp / 4\r
+      GOTO 3\r
+    END IF\r
+    myys = myys + yp / 4\r
+3\r
+    yp = 0\r
+  END IF\r
+\r
+END IF\r
+\r
+\r
+\r
+\r
+IF xp < -maxmove THEN xp = -maxmove\r
+IF xp > maxmove THEN xp = maxmove\r
+an1 = an1 - xp / 150\r
+\r
+IF yp < -maxmove THEN yp = -maxmove\r
+IF yp > maxmove THEN yp = maxmove\r
+an2 = an2 - yp / 150\r
+\r
+\r
+\r
+a$ = INKEY$\r
+\r
+IF a$ = "a" THEN myxs = myxs - COS(an1): myzs = myzs - SIN(an1)\r
+IF a$ = "d" THEN myxs = myxs + COS(an1): myzs = myzs + SIN(an1)\r
+IF a$ = "w" THEN myxs = myxs - SIN(an1): myzs = myzs + COS(an1)\r
+IF a$ = "s" THEN myxs = myxs + SIN(an1): myzs = myzs - COS(an1)\r
+IF a$ = "q" THEN SYSTEM\r
+\r
+myxs = myxs / 1.1\r
+myys = myys / 1.1\r
+myzs = myzs / 1.1\r
+\r
+myx = myx + myxs\r
+myz = myz + myzs\r
+myy = myy + myys\r
+\r
+END SUB\r
+\r
+SUB createLongLine (x1, y1, z1, x2, y2, z2, c)\r
+d = SQR((x1 - x2) ^ 2 + (y1 - y2) ^ 2 + (z1 - z2) ^ 2)\r
+\r
+IF d < 100 THEN\r
+  createNewLine x1, y1, z1, x2, y2, z2, c\r
+ELSE\r
+  xp = (x1 + x2) / 2\r
+  yp = (y1 + y2) / 2\r
+  zp = (z1 + z2) / 2\r
+  createLongLine x1, y1, z1, xp, yp, zp, c\r
+  createLongLine xp, yp, zp, x2, y2, z2, c\r
+END IF\r
+END SUB\r
+\r
+SUB createNewLine (x1, y1, z1, x2, y2, z2, c)\r
+\r
+cx = (x1 + x2) / 2\r
+cy = (y1 + y2) / 2\r
+cz = (z1 + z2) / 2\r
+\r
+clx = INT(cx / 100)\r
+cly = INT(cy / 100)\r
+clz = INT(cz / 100)\r
+\r
+IF clx >= visMinX THEN\r
+  IF clx <= visMaxX THEN\r
+    IF cly >= visMinY THEN\r
+      IF cly <= visMaxY THEN\r
+        IF clz >= visMinZ THEN\r
+          IF clz <= visMaxZ THEN\r
+            insertLine x1, y1, z1, x2, y2, z2, c\r
+          END IF\r
+        END IF\r
+      END IF\r
+    END IF\r
+  END IF\r
+END IF\r
+\r
+cln$ = getClustName(clx, cly, clz)\r
+\r
+' PRINT "Cluster name:" + cln$\r
+OPEN cln$ FOR APPEND AS #1\r
+  PRINT #1, x1; y1; z1; x2; y2; z2; c\r
+CLOSE #1\r
+\r
+END SUB\r
+\r
+SUB createWorld\r
+\r
+\r
+\r
+CHDIR "world"\r
+\r
+FOR x = -worldSize TO worldSize\r
\r
+  n$ = "X" + toStr$(x)\r
+  MKDIR n$\r
+  CHDIR n$\r
+\r
+  FOR y = -worldSize TO worldSize\r
+\r
+    n2$ = "Y" + toStr$(y)\r
+    MKDIR n2$\r
+    CHDIR n2$\r
+\r
+    PRINT x, y\r
+    FOR z = -worldSize TO worldSize\r
+\r
+      n3$ = "z" + toStr$(z) + ".dat"\r
+      OPEN n3$ FOR OUTPUT AS #1\r
+'      PRINT #1, "0"\r
+      CLOSE #1\r
+    NEXT z\r
+\r
+    CHDIR ".."\r
+  NEXT y\r
+\r
+  CHDIR ".."\r
+NEXT x\r
+\r
+CHDIR ".."\r
+\r
+END SUB\r
+\r
+SUB decVisibility\r
+\r
+mx = INT(myx / 100)\r
+my = INT(myy / 100)\r
+mz = INT(myz / 100)\r
+\r
+6\r
+de = 0\r
+\r
+IF visMaxX > mx + visDist THEN\r
+  visMaxX = mx + visDist\r
+  de = 1\r
+END IF\r
+\r
+IF visMinX < mx - visDist THEN\r
+  visMinX = mx - visDist\r
+  de = 1\r
+END IF\r
+\r
+\r
+IF visMaxY > my + visDist THEN\r
+  visMaxY = my + visDist\r
+  de = 1\r
+END IF\r
+\r
+IF visMinY < my - visDist THEN\r
+  visMinY = my - visDist\r
+  de = 1\r
+END IF\r
+\r
+\r
+IF visMaxZ > mz + visDist THEN\r
+  visMaxZ = mz + visDist\r
+  de = 1\r
+END IF\r
+\r
+IF visMinZ < mz - visDist THEN\r
+  visMinZ = mz - visDist\r
+  de = 1\r
+END IF\r
+\r
+IF de = 0 THEN\r
+  IF visDist > 3 THEN visDist = visDist - 1: GOTO 6\r
+ELSE\r
+  addMsg "Visibility decareased"\r
+END IF\r
+\r
+\r
+applyBounds\r
+END SUB\r
+\r
+SUB dispmsg\r
+FOR a = 1 TO 10\r
+  LOCATE a, 39 - LEN(msgs$(a))\r
+  PRINT msgs$(a)\r
+NEXT a\r
+END SUB\r
+\r
+SUB fill1\r
+\r
+x1 = RND * 800 - 400\r
+y1 = RND * 800 - 400\r
+z1 = RND * 800 - 400\r
+\r
+x2 = x1 + RND * 20\r
+y2 = y1 + RND * 20\r
+z2 = z1 + RND * 20\r
+\r
+createNewLine x1, y1, z1, x2, y2, z2, INT(RND * 15) + 1\r
+\r
+END SUB\r
+\r
+SUB fill2\r
+\r
+\r
+frmt = frm * 15\r
+\r
+x1 = SIN(frmt / 533) * 300 + SIN(frmt / 53) * 50\r
+y1 = COS(frmt / 422) * 300 + SIN(frmt / 31) * 20\r
+z1 = SIN(frmt / 133) * 300 + SIN(frmt / 39) * 60\r
+\r
+frmt = (frm - 1) * 15\r
+\r
+x2 = SIN(frmt / 533) * 300 + SIN(frmt / 53) * 50\r
+y2 = COS(frmt / 422) * 300 + SIN(frmt / 31) * 20\r
+z2 = SIN(frmt / 133) * 300 + SIN(frmt / 39) * 60\r
+\r
+\r
+\r
+createNewLine x1, y1, z1, x2, y2, z2, INT(RND * 15) + 1\r
+\r
+END SUB\r
+\r
+SUB fill3\r
+\r
+IF frm / 10 = frm \ 10 THEN  ELSE GOTO fill31\r
+\r
+c = RND * 15 + 1\r
+\r
+x = RND * 800 - 400\r
+y = RND * 800 - 400\r
+z = RND * 800 - 400\r
+\r
+s = RND * 10 + 3\r
+\r
+createNewLine x - s, y - s, z - s, x + s, y - s, z - s, c\r
+createNewLine x + s, y - s, z - s, x + s, y + s, z - s, c\r
+createNewLine x + s, y + s, z - s, x - s, y + s, z - s, c\r
+createNewLine x - s, y + s, z - s, x - s, y - s, z - s, c\r
+\r
+createNewLine x - s, y - s, z + s, x + s, y - s, z + s, c\r
+createNewLine x + s, y - s, z + s, x + s, y + s, z + s, c\r
+createNewLine x + s, y + s, z + s, x - s, y + s, z + s, c\r
+createNewLine x - s, y + s, z + s, x - s, y - s, z + s, c\r
+\r
+createNewLine x - s, y - s, z - s, x - s, y - s, z + s, c\r
+createNewLine x + s, y - s, z - s, x + s, y - s, z + s, c\r
+createNewLine x + s, y + s, z - s, x + s, y + s, z + s, c\r
+createNewLine x - s, y + s, z - s, x - s, y + s, z + s, c\r
+\r
+xo = x\r
+yo = y\r
+zo = z\r
+\r
+\r
+x = x + RND * 80 - 40\r
+y = y + RND * 80 - 40\r
+z = z + RND * 80 - 40\r
+\r
+s = RND * 10 + 3\r
+\r
+createNewLine x - s, y - s, z - s, x + s, y - s, z - s, c\r
+createNewLine x + s, y - s, z - s, x + s, y + s, z - s, c\r
+createNewLine x + s, y + s, z - s, x - s, y + s, z - s, c\r
+createNewLine x - s, y + s, z - s, x - s, y - s, z - s, c\r
+\r
+createNewLine x - s, y - s, z + s, x + s, y - s, z + s, c\r
+createNewLine x + s, y - s, z + s, x + s, y + s, z + s, c\r
+createNewLine x + s, y + s, z + s, x - s, y + s, z + s, c\r
+createNewLine x - s, y + s, z + s, x - s, y - s, z + s, c\r
+\r
+createNewLine x - s, y - s, z - s, x - s, y - s, z + s, c\r
+createNewLine x + s, y - s, z - s, x + s, y - s, z + s, c\r
+createNewLine x + s, y + s, z - s, x + s, y + s, z + s, c\r
+createNewLine x - s, y + s, z - s, x - s, y + s, z + s, c\r
+\r
+\r
+createNewLine x, y, z, xo, yo, zo, c\r
+\r
+fill31:\r
+END SUB\r
+\r
+SUB fill4\r
+IF RND * 100 < 2 THEN\r
+\r
+b$ = ""\r
+FOR a = 1 TO RND * 3 + 1\r
+b$ = b$ + CHR$(48 + RND * 9)\r
+NEXT a\r
+\r
+'b$ = "Hello, world!"\r
+prn b$, RND * 800 - 400, RND * 800 - 400, RND * 800 - 400\r
+\r
+END IF\r
+END SUB\r
+\r
+FUNCTION getbyte (addr)\r
+getbyte = PEEK(extADDR + addr)\r
+END FUNCTION\r
+\r
+FUNCTION getClustName$ (a, b, c)\r
+\r
+getClustName$ = "WORLD\X" + toStr$(a) + "\Y" + toStr$(b) + "\Z" + toStr$(c) + ".DAT"\r
+\r
+END FUNCTION\r
+\r
+FUNCTION getword (addr)\r
+a = PEEK(extADDR + addr)\r
+b = PEEK(extADDR + addr + 1)\r
+\r
+\r
+c$ = HEX$(a)\r
+IF LEN(c$) = 1 THEN c$ = "0" + c$\r
+IF LEN(c$) = 0 THEN c$ = "00"\r
+\r
+\r
+c = VAL("&H" + HEX$(b) + c$)\r
+\r
+getword = c\r
+END FUNCTION\r
+\r
+SUB importCluster (x, y, z)\r
+\r
+cln$ = getClustName(x, y, z)\r
+'[PRINT cln$\r
+\r
+OPEN cln$ FOR INPUT AS #1\r
+5\r
+IF EOF(1) <> 0 THEN GOTO 4\r
\r
+INPUT #1, x1, y1, z1, x2, y2, z2, c\r
+insertLine x1, y1, z1, x2, y2, z2, c\r
+\r
+GOTO 5\r
+4\r
+CLOSE #1\r
+\r
+\r
+END SUB\r
+\r
+SUB insertLine (x1, y1, z1, x2, y2, z2, c)\r
+\r
+insertLine1:\r
+IF linC(curFreeLine) = -1 THEN\r
+  linX1(curFreeLine) = x1\r
+  linY1(curFreeLine) = y1\r
+  linZ1(curFreeLine) = z1\r
+\r
+  linX2(curFreeLine) = x2\r
+  linY2(curFreeLine) = y2\r
+  linZ2(curFreeLine) = z2\r
\r
+  linC(curFreeLine) = c\r
+  curFreeLine = curFreeLine + 1\r
+  usedLines = usedLines + 1\r
+  IF curFreeLine > linAmo THEN curFreeLine = 0\r
+ELSE\r
+  curFreeLine = curFreeLine + 1\r
+  IF curFreeLine > linAmo THEN curFreeLine = 0\r
+  GOTO insertLine1\r
+END IF\r
+\r
+\r
+END SUB\r
+\r
+SUB loadArea (tx1, ty1, tz1, tx2, ty2, tz2)\r
+\r
+LOCATE 3, 1\r
+addMsg "Loading Area!"\r
+addMsg toStr$(tx1) + " " + toStr$(ty1) + " " + toStr$(tz1)\r
+addMsg toStr$(tx2) + " " + toStr$(ty2) + " " + toStr$(tz2)\r
+\r
+\r
+'PCOPY 0, 1\r
+'SLEEP\r
+\r
+x1 = tx1\r
+x2 = tx2\r
+\r
+y1 = ty1\r
+y2 = ty2\r
+\r
+z1 = tz1\r
+z2 = tz2\r
+\r
+IF x1 > x2 THEN SWAP x1, x2\r
+IF y1 > y2 THEN SWAP y1, y2\r
+IF z1 > z2 THEN SWAP z1, z2\r
+\r
+FOR x = x1 TO x2\r
+  FOR y = y1 TO y2\r
+    FOR z = z1 TO z2\r
+      loadCluster x, y, z\r
+    NEXT z\r
+  NEXT y\r
+NEXT x\r
+\r
+END SUB\r
+\r
+SUB loadCluster (x, y, z)\r
+\r
+IF ABS(x) > worldSize THEN GOTO 11\r
+IF ABS(y) > worldSize THEN GOTO 11\r
+IF ABS(z) > worldSize THEN GOTO 11\r
+\r
+cln$ = getClustName(x, y, z)\r
+\r
+OPEN cln$ FOR INPUT AS #1\r
+10\r
+IF EOF(1) <> 0 THEN GOTO 9\r
+\r
+INPUT #1, x1, y1, z1, x2, y2, z2, c\r
+insertLine x1, y1, z1, x2, y2, z2, c\r
+\r
+GOTO 10\r
+9\r
+CLOSE #1\r
+\r
+11\r
+\r
+END SUB\r
+\r
+SUB loadObject (name$, x, y, z)\r
+\r
+'SCREEN 13\r
+'PRINT "objects\" + name$ + ".3d"\r
+'END\r
+\r
+OPEN "OBJECTS\" + name$ + ".3d" FOR INPUT AS #2\r
+13\r
+IF EOF(2) <> 0 THEN GOTO 12\r
+INPUT #2, x1, y1, z1, x2, y2, z2, co\r
+createNewLine x1 + x, y1 + y, z1 + z, x2 + x, y2 + y, z2 + z, co\r
+GOTO 13\r
+12\r
+CLOSE #2\r
+\r
+END SUB\r
+\r
+SUB makeGrid (x1, y1, z1, x2, y2, z2)\r
+\r
+s = 100\r
+\r
+FOR x = x1 TO x2 STEP s\r
+  FOR y = y1 TO y2 STEP s\r
+    createLongLine x1, y, x, x2, y, x, 1\r
+    createLongLine x, y1, y, x, y2, y, 1\r
+    createLongLine x, y, z1, x, y, z2, 1\r
+  NEXT y\r
+NEXT x\r
+\r
+END SUB\r
+\r
+SUB mousedemo\r
+\r
+\r
+\r
+cx = 150\r
+cy = 100\r
+maxmove = 50\r
+100\r
+frm = frm + 1\r
+\r
+\r
+LOCATE 1, 1\r
+PRINT cx, cy\r
+PRINT frm\r
+\r
+CIRCLE (cx, cy), 10, 0\r
+xp = getword(2)\r
+putword 2, 0\r
+yp = getword(4)\r
+putword 4, 0\r
+\r
+\r
+IF xp < -maxmove THEN xp = -maxmove\r
+IF xp > maxmove THEN xp = maxmove\r
+cx = cx + xp\r
+\r
+IF yp < -maxmove THEN yp = -maxmove\r
+IF yp > maxmove THEN yp = maxmove\r
+cy = cy + yp\r
+\r
+\r
+CIRCLE (cx, cy), 10, 10\r
+\r
+\r
+\r
+SOUND 0, .05\r
+GOTO 100\r
+\r
+\r
+END SUB\r
+\r
+SUB prn (a$, x, y, z)\r
+\r
+FOR a = 1 TO LEN(a$)\r
+  b$ = RIGHT$(LEFT$(a$, a), 1)\r
+  putChar b$, x + (a - 1) * 8, y, z\r
+NEXT a\r
+END SUB\r
+\r
+SUB putbyte (addr, dat)\r
+\r
+POKE (extADDR + addr), dat\r
+END SUB\r
+\r
+SUB putChar (a$, x, y, z)\r
+\r
+n$ = "FONT\LTR" + toStr(ASC(a$))\r
+loadObject n$, x, y, z\r
+\r
+END SUB\r
+\r
+SUB putword (addr, dat)\r
+\r
+b$ = HEX$(dat)\r
+\r
+2\r
+IF LEN(b$) < 4 THEN b$ = "0" + b$: GOTO 2\r
+\r
+n1 = VAL("&H" + LEFT$(b$, 2))\r
+n2 = VAL("&H" + RIGHT$(b$, 2))\r
+\r
+\r
+POKE (extADDR + addr), n2\r
+POKE (extADDR + addr + 1), n1\r
+\r
+END SUB\r
+\r
+SUB render\r
+\r
+s1 = SIN(an1)\r
+c1 = COS(an1)\r
+\r
+s2 = SIN(an2)\r
+c2 = COS(an2)\r
+\r
+\r
+FOR a = 0 TO linAmo\r
+\r
+  IF linC(a) > 0 THEN\r
+    x11 = linX1(a) - myx\r
+    y11 = linY1(a) - myy\r
+    z11 = linZ1(a) - myz\r
\r
+    x21 = linX2(a) - myx\r
+    y21 = linY2(a) - myy\r
+    z21 = linZ2(a) - myz\r
+\r
+\r
+    x12 = x11 * c1 + z11 * s1\r
+    z12 = z11 * c1 - x11 * s1\r
+\r
+\r
+    y12 = y11 * c2 + z12 * s2\r
+    z13 = z12 * c2 - y11 * s2\r
+\r
+\r
+    IF z13 > 3 THEN\r
+      x22 = x21 * c1 + z21 * s1\r
+      z22 = z21 * c1 - x21 * s1\r
+\r
+\r
+      y22 = y21 * c2 + z22 * s2\r
+      z23 = z22 * c2 - y21 * s2\r
+\r
+\r
+      IF z23 > 3 THEN\r
+   \r
+        rx1 = x12 / z13 * 130 + 160\r
+        ry1 = y12 / z13 * 130 + 100\r
+      \r
+        rx2 = x22 / z23 * 130 + 160\r
+        ry2 = y22 / z23 * 130 + 100\r
+     \r
+        LINE (rx1, ry1)-(rx2, ry2), linC(a)\r
+      END IF\r
+    END IF\r
+  END IF\r
+NEXT a\r
+\r
+\r
+'dispmsg\r
+\r
+END SUB\r
+\r
+SUB start\r
+\r
+RANDOMIZE TIMER\r
+\r
+FOR a = 0 TO linAmo\r
+  linC(a) = -1\r
+NEXT a\r
+\r
+\r
+startext\r
+\r
+maxmove = 50\r
+curFreeLine = 0\r
+worldSize = 5\r
+usedLines = 0\r
+desMaxLines = 2000\r
+\r
+visMaxX = worldSize\r
+visMaxY = worldSize\r
+visMaxZ = worldSize\r
+visMinX = -worldSize\r
+visMinY = -worldSize\r
+visMinZ = -worldSize\r
+\r
+visDist = worldSize\r
+\r
+createWorld\r
+\r
+SCREEN 7, , , 1\r
+\r
+\r
+\r
+END SUB\r
+\r
+SUB startext\r
+\r
+DEF SEG = 0     ' read first from interrupt table\r
+\r
+extSEG = PEEK(&H79 * 4 + 3) * 256\r
+extSEG = extSEG + PEEK(&H79 * 4 + 2)\r
+\r
+PRINT "Segment is: " + HEX$(extSEG)\r
+\r
+extADDR = PEEK(&H79 * 4 + 1) * 256\r
+extADDR = extADDR + PEEK(&H79 * 4 + 0)\r
+\r
+PRINT "relative address is:"; extADDR\r
+\r
+DEF SEG = extSEG\r
+\r
+IF getword(0) <> 1983 THEN\r
+  PRINT "FATAL ERROR:  you must load"\r
+  PRINT "QBasic extension TSR first!"\r
+  SYSTEM\r
+END IF\r
+\r
+END SUB\r
+\r
+FUNCTION toStr$ (a)\r
+\r
+b$ = STR$(a)\r
+IF LEFT$(b$, 1) = " " THEN b$ = RIGHT$(b$, LEN(b$) - 1)\r
+toStr$ = b$\r
+\r
+END FUNCTION\r
+\r
diff --git a/3D GFX/Swapping 3D engine/index.html b/3D GFX/Swapping 3D engine/index.html
new file mode 100644 (file)
index 0000000..08bf2d5
--- /dev/null
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<!-- 2025-05-31 la 07:17 -->
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+<meta name="viewport" content="width=device-width, initial-scale=1" />
+<title>Swapping 3D engine</title>
+<meta name="generator" content="Org Mode" />
+<style>
+  #content { max-width: 60em; margin: auto; }
+  .title  { text-align: center;
+             margin-bottom: .2em; }
+  .subtitle { text-align: center;
+              font-size: medium;
+              font-weight: bold;
+              margin-top:0; }
+  .todo   { font-family: monospace; color: red; }
+  .done   { font-family: monospace; color: green; }
+  .priority { font-family: monospace; color: orange; }
+  .tag    { background-color: #eee; font-family: monospace;
+            padding: 2px; font-size: 80%; font-weight: normal; }
+  .timestamp { color: #bebebe; }
+  .timestamp-kwd { color: #5f9ea0; }
+  .org-right  { margin-left: auto; margin-right: 0px;  text-align: right; }
+  .org-left   { margin-left: 0px;  margin-right: auto; text-align: left; }
+  .org-center { margin-left: auto; margin-right: auto; text-align: center; }
+  .underline { text-decoration: underline; }
+  #postamble p, #preamble p { font-size: 90%; margin: .2em; }
+  p.verse { margin-left: 3%; }
+  pre {
+    border: 1px solid #e6e6e6;
+    border-radius: 3px;
+    background-color: #f2f2f2;
+    padding: 8pt;
+    font-family: monospace;
+    overflow: auto;
+    margin: 1.2em;
+  }
+  pre.src {
+    position: relative;
+    overflow: auto;
+  }
+  pre.src:before {
+    display: none;
+    position: absolute;
+    top: -8px;
+    right: 12px;
+    padding: 3px;
+    color: #555;
+    background-color: #f2f2f299;
+  }
+  pre.src:hover:before { display: inline; margin-top: 14px;}
+  /* Languages per Org manual */
+  pre.src-asymptote:before { content: 'Asymptote'; }
+  pre.src-awk:before { content: 'Awk'; }
+  pre.src-authinfo::before { content: 'Authinfo'; }
+  pre.src-C:before { content: 'C'; }
+  /* pre.src-C++ doesn't work in CSS */
+  pre.src-clojure:before { content: 'Clojure'; }
+  pre.src-css:before { content: 'CSS'; }
+  pre.src-D:before { content: 'D'; }
+  pre.src-ditaa:before { content: 'ditaa'; }
+  pre.src-dot:before { content: 'Graphviz'; }
+  pre.src-calc:before { content: 'Emacs Calc'; }
+  pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
+  pre.src-fortran:before { content: 'Fortran'; }
+  pre.src-gnuplot:before { content: 'gnuplot'; }
+  pre.src-haskell:before { content: 'Haskell'; }
+  pre.src-hledger:before { content: 'hledger'; }
+  pre.src-java:before { content: 'Java'; }
+  pre.src-js:before { content: 'Javascript'; }
+  pre.src-latex:before { content: 'LaTeX'; }
+  pre.src-ledger:before { content: 'Ledger'; }
+  pre.src-lisp:before { content: 'Lisp'; }
+  pre.src-lilypond:before { content: 'Lilypond'; }
+  pre.src-lua:before { content: 'Lua'; }
+  pre.src-matlab:before { content: 'MATLAB'; }
+  pre.src-mscgen:before { content: 'Mscgen'; }
+  pre.src-ocaml:before { content: 'Objective Caml'; }
+  pre.src-octave:before { content: 'Octave'; }
+  pre.src-org:before { content: 'Org mode'; }
+  pre.src-oz:before { content: 'OZ'; }
+  pre.src-plantuml:before { content: 'Plantuml'; }
+  pre.src-processing:before { content: 'Processing.js'; }
+  pre.src-python:before { content: 'Python'; }
+  pre.src-R:before { content: 'R'; }
+  pre.src-ruby:before { content: 'Ruby'; }
+  pre.src-sass:before { content: 'Sass'; }
+  pre.src-scheme:before { content: 'Scheme'; }
+  pre.src-screen:before { content: 'Gnu Screen'; }
+  pre.src-sed:before { content: 'Sed'; }
+  pre.src-sh:before { content: 'shell'; }
+  pre.src-sql:before { content: 'SQL'; }
+  pre.src-sqlite:before { content: 'SQLite'; }
+  /* additional languages in org.el's org-babel-load-languages alist */
+  pre.src-forth:before { content: 'Forth'; }
+  pre.src-io:before { content: 'IO'; }
+  pre.src-J:before { content: 'J'; }
+  pre.src-makefile:before { content: 'Makefile'; }
+  pre.src-maxima:before { content: 'Maxima'; }
+  pre.src-perl:before { content: 'Perl'; }
+  pre.src-picolisp:before { content: 'Pico Lisp'; }
+  pre.src-scala:before { content: 'Scala'; }
+  pre.src-shell:before { content: 'Shell Script'; }
+  pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
+  /* additional language identifiers per "defun org-babel-execute"
+       in ob-*.el */
+  pre.src-cpp:before  { content: 'C++'; }
+  pre.src-abc:before  { content: 'ABC'; }
+  pre.src-coq:before  { content: 'Coq'; }
+  pre.src-groovy:before  { content: 'Groovy'; }
+  /* additional language identifiers from org-babel-shell-names in
+     ob-shell.el: ob-shell is the only babel language using a lambda to put
+     the execution function name together. */
+  pre.src-bash:before  { content: 'bash'; }
+  pre.src-csh:before  { content: 'csh'; }
+  pre.src-ash:before  { content: 'ash'; }
+  pre.src-dash:before  { content: 'dash'; }
+  pre.src-ksh:before  { content: 'ksh'; }
+  pre.src-mksh:before  { content: 'mksh'; }
+  pre.src-posh:before  { content: 'posh'; }
+  /* Additional Emacs modes also supported by the LaTeX listings package */
+  pre.src-ada:before { content: 'Ada'; }
+  pre.src-asm:before { content: 'Assembler'; }
+  pre.src-caml:before { content: 'Caml'; }
+  pre.src-delphi:before { content: 'Delphi'; }
+  pre.src-html:before { content: 'HTML'; }
+  pre.src-idl:before { content: 'IDL'; }
+  pre.src-mercury:before { content: 'Mercury'; }
+  pre.src-metapost:before { content: 'MetaPost'; }
+  pre.src-modula-2:before { content: 'Modula-2'; }
+  pre.src-pascal:before { content: 'Pascal'; }
+  pre.src-ps:before { content: 'PostScript'; }
+  pre.src-prolog:before { content: 'Prolog'; }
+  pre.src-simula:before { content: 'Simula'; }
+  pre.src-tcl:before { content: 'tcl'; }
+  pre.src-tex:before { content: 'TeX'; }
+  pre.src-plain-tex:before { content: 'Plain TeX'; }
+  pre.src-verilog:before { content: 'Verilog'; }
+  pre.src-vhdl:before { content: 'VHDL'; }
+  pre.src-xml:before { content: 'XML'; }
+  pre.src-nxml:before { content: 'XML'; }
+  /* add a generic configuration mode; LaTeX export needs an additional
+     (add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
+  pre.src-conf:before { content: 'Configuration File'; }
+
+  table { border-collapse:collapse; }
+  caption.t-above { caption-side: top; }
+  caption.t-bottom { caption-side: bottom; }
+  td, th { vertical-align:top;  }
+  th.org-right  { text-align: center;  }
+  th.org-left   { text-align: center;   }
+  th.org-center { text-align: center; }
+  td.org-right  { text-align: right;  }
+  td.org-left   { text-align: left;   }
+  td.org-center { text-align: center; }
+  dt { font-weight: bold; }
+  .footpara { display: inline; }
+  .footdef  { margin-bottom: 1em; }
+  .figure { padding: 1em; }
+  .figure p { text-align: center; }
+  .equation-container {
+    display: table;
+    text-align: center;
+    width: 100%;
+  }
+  .equation {
+    vertical-align: middle;
+  }
+  .equation-label {
+    display: table-cell;
+    text-align: right;
+    vertical-align: middle;
+  }
+  .inlinetask {
+    padding: 10px;
+    border: 2px solid gray;
+    margin: 10px;
+    background: #ffffcc;
+  }
+  #org-div-home-and-up
+   { text-align: right; font-size: 70%; white-space: nowrap; }
+  textarea { overflow-x: auto; }
+  .linenr { font-size: smaller }
+  .code-highlighted { background-color: #ffff00; }
+  .org-info-js_info-navigation { border-style: none; }
+  #org-info-js_console-label
+    { font-size: 10px; font-weight: bold; white-space: nowrap; }
+  .org-info-js_search-highlight
+    { background-color: #ffff00; color: #000000; font-weight: bold; }
+  .org-svg { }
+</style>
+<style type="text/css">
+               body {
+                 max-width: 35cm !important;
+               }
+               #content {
+                 max-width: 80em !important;
+                 width: 90%;
+               }
+               </style>
+<link rel="stylesheet" type="text/css" href="https://thomasf.github.io/solarized-css/solarized-dark.min.css" />
+</head>
+<body>
+<div id="content" class="content">
+<h1 class="title">Swapping 3D engine</h1>
+<p>
+Idea is to implement 3D engine that can run world with unlimited
+complexity. To overcome RAM limits and keep good framerate, world is
+divided into cube shaped segments. Those segments are swapped out to
+disk when they are too far away. When you move around the world,
+segments are swapped in on-demand.
+</p>
+
+<p>
+Engine allows user to freely fly around using mouse and keyboard.
+</p>
+
+<p>
+Sexment size is 100x100x100 units. Every segment is stored in its own
+file within the filesystem.
+</p>
+
+
+<div id="org2f73a11" class="figure">
+<p><img src="screenshot.png" alt="screenshot.png" />
+</p>
+</div>
+
+
+<div id="org6cf369b" class="figure">
+<p><img src="screenshot, 2.png" alt="screenshot, 2.png" />
+</p>
+</div>
+</div>
+<div id="postamble" class="status">
+<p class="date">Created: 2025-05-31 la 07:17</p>
+<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
+</div>
+</body>
+</html>
diff --git a/3D GFX/Swapping 3D engine/index.org b/3D GFX/Swapping 3D engine/index.org
new file mode 100755 (executable)
index 0000000..58010e5
--- /dev/null
@@ -0,0 +1,25 @@
+\r
+#+TITLE: Swapping 3D engine\r
+#+LANGUAGE: en\r
+#+LATEX_HEADER: \usepackage[margin=1.0in]{geometry}\r
+#+LATEX_HEADER: \usepackage{parskip}\r
+#+LATEX_HEADER: \usepackage[none]{hyphenat}\r
+\r
+#+OPTIONS: H:20 num:20\r
+#+OPTIONS: author:nil\r
+\r
+\r
+Idea is to implement 3D engine that can run world with unlimited\r
+complexity. To overcome RAM limits and keep good framerate, world is\r
+divided into cube shaped segments. Those segments are swapped out to\r
+disk when they are too far away. When you move around the world,\r
+segments are swapped in on-demand.\r
+\r
+Engine allows user to freely fly around using mouse and keyboard.\r
+\r
+Sexment size is 100x100x100 units. Every segment is stored in its own\r
+file within the filesystem.\r
+\r
+[[file:screenshot.png]]\r
+\r
+[[file:screenshot, 2.png]]\r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR100.3D b/3D GFX/Swapping 3D engine/objects/font/LTR100.3D
new file mode 100755 (executable)
index 0000000..e801017
--- /dev/null
@@ -0,0 +1,40 @@
+ 4  1  0  4  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR101.3D b/3D GFX/Swapping 3D engine/objects/font/LTR101.3D
new file mode 100755 (executable)
index 0000000..ac4241a
--- /dev/null
@@ -0,0 +1,40 @@
+ 2  3  0  2  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR102.3D b/3D GFX/Swapping 3D engine/objects/font/LTR102.3D
new file mode 100755 (executable)
index 0000000..ac95a57
--- /dev/null
@@ -0,0 +1,38 @@
+ 4  1  0  4  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR103.3D b/3D GFX/Swapping 3D engine/objects/font/LTR103.3D
new file mode 100755 (executable)
index 0000000..56b4043
--- /dev/null
@@ -0,0 +1,46 @@
+ 2  3  0  2  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 2  8  0  2  9  0  10 \r
+ 7  8  0  7  9  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 2  9  0  3  9  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR104.3D b/3D GFX/Swapping 3D engine/objects/font/LTR104.3D
new file mode 100755 (executable)
index 0000000..1ddd2d4
--- /dev/null
@@ -0,0 +1,38 @@
+ 1  1  0  1  2  0  10 \r
+ 4  1  0  4  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR105.3D b/3D GFX/Swapping 3D engine/objects/font/LTR105.3D
new file mode 100755 (executable)
index 0000000..508952b
--- /dev/null
@@ -0,0 +1,26 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR106.3D b/3D GFX/Swapping 3D engine/objects/font/LTR106.3D
new file mode 100755 (executable)
index 0000000..213b922
--- /dev/null
@@ -0,0 +1,34 @@
+ 5  1  0  5  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 2  8  0  2  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  9  0  3  9  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  8  0  7  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR107.3D b/3D GFX/Swapping 3D engine/objects/font/LTR107.3D
new file mode 100755 (executable)
index 0000000..1b7f522
--- /dev/null
@@ -0,0 +1,42 @@
+ 1  1  0  1  2  0  10 \r
+ 4  1  0  4  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR108.3D b/3D GFX/Swapping 3D engine/objects/font/LTR108.3D
new file mode 100755 (executable)
index 0000000..a597be1
--- /dev/null
@@ -0,0 +1,20 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR109.3D b/3D GFX/Swapping 3D engine/objects/font/LTR109.3D
new file mode 100755 (executable)
index 0000000..2da5e88
--- /dev/null
@@ -0,0 +1,36 @@
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR110.3D b/3D GFX/Swapping 3D engine/objects/font/LTR110.3D
new file mode 100755 (executable)
index 0000000..588fa51
--- /dev/null
@@ -0,0 +1,34 @@
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR111.3D b/3D GFX/Swapping 3D engine/objects/font/LTR111.3D
new file mode 100755 (executable)
index 0000000..7a05ac4
--- /dev/null
@@ -0,0 +1,36 @@
+ 2  3  0  2  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR112.3D b/3D GFX/Swapping 3D engine/objects/font/LTR112.3D
new file mode 100755 (executable)
index 0000000..115a6c5
--- /dev/null
@@ -0,0 +1,40 @@
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 1  8  0  1  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 1  9  0  2  9  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  9  0  3  9  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR113.3D b/3D GFX/Swapping 3D engine/objects/font/LTR113.3D
new file mode 100755 (executable)
index 0000000..623fcfc
--- /dev/null
@@ -0,0 +1,40 @@
+ 2  3  0  2  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 4  8  0  4  9  0  10 \r
+ 8  8  0  8  9  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  8  0  8  8  0  10 \r
+ 7  9  0  8  9  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR114.3D b/3D GFX/Swapping 3D engine/objects/font/LTR114.3D
new file mode 100755 (executable)
index 0000000..dcb0bef
--- /dev/null
@@ -0,0 +1,32 @@
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR115.3D b/3D GFX/Swapping 3D engine/objects/font/LTR115.3D
new file mode 100755 (executable)
index 0000000..25f6cc6
--- /dev/null
@@ -0,0 +1,40 @@
+ 2  3  0  2  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR116.3D b/3D GFX/Swapping 3D engine/objects/font/LTR116.3D
new file mode 100755 (executable)
index 0000000..783a7b3
--- /dev/null
@@ -0,0 +1,34 @@
+ 3  1  0  3  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR117.3D b/3D GFX/Swapping 3D engine/objects/font/LTR117.3D
new file mode 100755 (executable)
index 0000000..f0c5227
--- /dev/null
@@ -0,0 +1,34 @@
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR118.3D b/3D GFX/Swapping 3D engine/objects/font/LTR118.3D
new file mode 100755 (executable)
index 0000000..bd8b439
--- /dev/null
@@ -0,0 +1,30 @@
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  5  0  8  5  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR119.3D b/3D GFX/Swapping 3D engine/objects/font/LTR119.3D
new file mode 100755 (executable)
index 0000000..7a0cdc4
--- /dev/null
@@ -0,0 +1,34 @@
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR120.3D b/3D GFX/Swapping 3D engine/objects/font/LTR120.3D
new file mode 100755 (executable)
index 0000000..17b3575
--- /dev/null
@@ -0,0 +1,40 @@
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR121.3D b/3D GFX/Swapping 3D engine/objects/font/LTR121.3D
new file mode 100755 (executable)
index 0000000..706a9ac
--- /dev/null
@@ -0,0 +1,42 @@
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 2  8  0  2  9  0  10 \r
+ 7  8  0  7  9  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 2  9  0  3  9  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR122.3D b/3D GFX/Swapping 3D engine/objects/font/LTR122.3D
new file mode 100755 (executable)
index 0000000..68a6c6e
--- /dev/null
@@ -0,0 +1,38 @@
+ 1  3  0  1  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  8  0  7  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR123.3D b/3D GFX/Swapping 3D engine/objects/font/LTR123.3D
new file mode 100755 (executable)
index 0000000..1554dd6
--- /dev/null
@@ -0,0 +1,32 @@
+ 5  1  0  5  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR124.3D b/3D GFX/Swapping 3D engine/objects/font/LTR124.3D
new file mode 100755 (executable)
index 0000000..52cb916
--- /dev/null
@@ -0,0 +1,20 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  8  0  6  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR125.3D b/3D GFX/Swapping 3D engine/objects/font/LTR125.3D
new file mode 100755 (executable)
index 0000000..1c0fbef
--- /dev/null
@@ -0,0 +1,32 @@
+ 2  1  0  2  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR126.3D b/3D GFX/Swapping 3D engine/objects/font/LTR126.3D
new file mode 100755 (executable)
index 0000000..4229ec1
--- /dev/null
@@ -0,0 +1,22 @@
+ 2  1  0  2  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR127.3D b/3D GFX/Swapping 3D engine/objects/font/LTR127.3D
new file mode 100755 (executable)
index 0000000..962efa5
--- /dev/null
@@ -0,0 +1,32 @@
+ 4  2  0  4  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR128.3D b/3D GFX/Swapping 3D engine/objects/font/LTR128.3D
new file mode 100755 (executable)
index 0000000..145a357
--- /dev/null
@@ -0,0 +1,56 @@
+ 3  1  0  3  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 2  8  0  2  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  9  0  3  9  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR129.3D b/3D GFX/Swapping 3D engine/objects/font/LTR129.3D
new file mode 100755 (executable)
index 0000000..981d948
--- /dev/null
@@ -0,0 +1,42 @@
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR130.3D b/3D GFX/Swapping 3D engine/objects/font/LTR130.3D
new file mode 100755 (executable)
index 0000000..8bc967e
--- /dev/null
@@ -0,0 +1,48 @@
+ 5  1  0  5  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR131.3D b/3D GFX/Swapping 3D engine/objects/font/LTR131.3D
new file mode 100755 (executable)
index 0000000..6ece448
--- /dev/null
@@ -0,0 +1,54 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR132.3D b/3D GFX/Swapping 3D engine/objects/font/LTR132.3D
new file mode 100755 (executable)
index 0000000..cf79614
--- /dev/null
@@ -0,0 +1,48 @@
+ 1  1  0  1  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR133.3D b/3D GFX/Swapping 3D engine/objects/font/LTR133.3D
new file mode 100755 (executable)
index 0000000..6854182
--- /dev/null
@@ -0,0 +1,44 @@
+ 1  1  0  1  2  0  10 \r
+ 4  1  0  4  2  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR134.3D b/3D GFX/Swapping 3D engine/objects/font/LTR134.3D
new file mode 100755 (executable)
index 0000000..b21e48e
--- /dev/null
@@ -0,0 +1,40 @@
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR135.3D b/3D GFX/Swapping 3D engine/objects/font/LTR135.3D
new file mode 100755 (executable)
index 0000000..bb4e3cb
--- /dev/null
@@ -0,0 +1,42 @@
+ 2  3  0  2  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 3  8  0  3  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR136.3D b/3D GFX/Swapping 3D engine/objects/font/LTR136.3D
new file mode 100755 (executable)
index 0000000..794ecf8
--- /dev/null
@@ -0,0 +1,56 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR137.3D b/3D GFX/Swapping 3D engine/objects/font/LTR137.3D
new file mode 100755 (executable)
index 0000000..0c38357
--- /dev/null
@@ -0,0 +1,52 @@
+ 1  1  0  1  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR138.3D b/3D GFX/Swapping 3D engine/objects/font/LTR138.3D
new file mode 100755 (executable)
index 0000000..eaa7c4e
--- /dev/null
@@ -0,0 +1,48 @@
+ 1  1  0  1  2  0  10 \r
+ 4  1  0  4  2  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR139.3D b/3D GFX/Swapping 3D engine/objects/font/LTR139.3D
new file mode 100755 (executable)
index 0000000..0082063
--- /dev/null
@@ -0,0 +1,32 @@
+ 2  1  0  2  2  0  10 \r
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR140.3D b/3D GFX/Swapping 3D engine/objects/font/LTR140.3D
new file mode 100755 (executable)
index 0000000..785166a
--- /dev/null
@@ -0,0 +1,40 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR141.3D b/3D GFX/Swapping 3D engine/objects/font/LTR141.3D
new file mode 100755 (executable)
index 0000000..38359b1
--- /dev/null
@@ -0,0 +1,28 @@
+ 1  1  0  1  2  0  10 \r
+ 4  1  0  4  2  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR142.3D b/3D GFX/Swapping 3D engine/objects/font/LTR142.3D
new file mode 100755 (executable)
index 0000000..ad2032d
--- /dev/null
@@ -0,0 +1,52 @@
+ 1  1  0  1  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR143.3D b/3D GFX/Swapping 3D engine/objects/font/LTR143.3D
new file mode 100755 (executable)
index 0000000..fbf6f01
--- /dev/null
@@ -0,0 +1,42 @@
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR144.3D b/3D GFX/Swapping 3D engine/objects/font/LTR144.3D
new file mode 100755 (executable)
index 0000000..f40ecad
--- /dev/null
@@ -0,0 +1,48 @@
+ 5  1  0  5  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR145.3D b/3D GFX/Swapping 3D engine/objects/font/LTR145.3D
new file mode 100755 (executable)
index 0000000..17d2a41
--- /dev/null
@@ -0,0 +1,48 @@
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR146.3D b/3D GFX/Swapping 3D engine/objects/font/LTR146.3D
new file mode 100755 (executable)
index 0000000..591171c
--- /dev/null
@@ -0,0 +1,48 @@
+ 2  1  0  2  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR147.3D b/3D GFX/Swapping 3D engine/objects/font/LTR147.3D
new file mode 100755 (executable)
index 0000000..c189294
--- /dev/null
@@ -0,0 +1,52 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR148.3D b/3D GFX/Swapping 3D engine/objects/font/LTR148.3D
new file mode 100755 (executable)
index 0000000..d402979
--- /dev/null
@@ -0,0 +1,44 @@
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR149.3D b/3D GFX/Swapping 3D engine/objects/font/LTR149.3D
new file mode 100755 (executable)
index 0000000..ed1197e
--- /dev/null
@@ -0,0 +1,40 @@
+ 1  2  0  1  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR150.3D b/3D GFX/Swapping 3D engine/objects/font/LTR150.3D
new file mode 100755 (executable)
index 0000000..859a861
--- /dev/null
@@ -0,0 +1,50 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR151.3D b/3D GFX/Swapping 3D engine/objects/font/LTR151.3D
new file mode 100755 (executable)
index 0000000..ae77dad
--- /dev/null
@@ -0,0 +1,38 @@
+ 1  2  0  1  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR152.3D b/3D GFX/Swapping 3D engine/objects/font/LTR152.3D
new file mode 100755 (executable)
index 0000000..0c05150
--- /dev/null
@@ -0,0 +1,50 @@
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 2  8  0  2  9  0  10 \r
+ 7  8  0  7  9  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 2  9  0  3  9  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR153.3D b/3D GFX/Swapping 3D engine/objects/font/LTR153.3D
new file mode 100755 (executable)
index 0000000..509a938
--- /dev/null
@@ -0,0 +1,52 @@
+ 1  1  0  1  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR154.3D b/3D GFX/Swapping 3D engine/objects/font/LTR154.3D
new file mode 100755 (executable)
index 0000000..e61a78c
--- /dev/null
@@ -0,0 +1,44 @@
+ 1  1  0  1  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR155.3D b/3D GFX/Swapping 3D engine/objects/font/LTR155.3D
new file mode 100755 (executable)
index 0000000..8b455ef
--- /dev/null
@@ -0,0 +1,36 @@
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR156.3D b/3D GFX/Swapping 3D engine/objects/font/LTR156.3D
new file mode 100755 (executable)
index 0000000..c27bfa8
--- /dev/null
@@ -0,0 +1,46 @@
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR157.3D b/3D GFX/Swapping 3D engine/objects/font/LTR157.3D
new file mode 100755 (executable)
index 0000000..b7b7caf
--- /dev/null
@@ -0,0 +1,42 @@
+ 1  1  0  1  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 9  1  0  9  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 8  1  0  9  1  0  10 \r
+ 8  2  0  9  2  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR158.3D b/3D GFX/Swapping 3D engine/objects/font/LTR158.3D
new file mode 100755 (executable)
index 0000000..2c75a85
--- /dev/null
@@ -0,0 +1,50 @@
+ 1  1  0  1  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR159.3D b/3D GFX/Swapping 3D engine/objects/font/LTR159.3D
new file mode 100755 (executable)
index 0000000..7514b13
--- /dev/null
@@ -0,0 +1,40 @@
+ 5  1  0  5  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 2  8  0  2  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  9  0  3  9  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR160.3D b/3D GFX/Swapping 3D engine/objects/font/LTR160.3D
new file mode 100755 (executable)
index 0000000..afaebbf
--- /dev/null
@@ -0,0 +1,44 @@
+ 5  1  0  5  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR161.3D b/3D GFX/Swapping 3D engine/objects/font/LTR161.3D
new file mode 100755 (executable)
index 0000000..28d0234
--- /dev/null
@@ -0,0 +1,28 @@
+ 4  1  0  4  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR162.3D b/3D GFX/Swapping 3D engine/objects/font/LTR162.3D
new file mode 100755 (executable)
index 0000000..0240ffa
--- /dev/null
@@ -0,0 +1,40 @@
+ 5  2  0  5  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR163.3D b/3D GFX/Swapping 3D engine/objects/font/LTR163.3D
new file mode 100755 (executable)
index 0000000..8d473a4
--- /dev/null
@@ -0,0 +1,38 @@
+ 5  2  0  5  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR164.3D b/3D GFX/Swapping 3D engine/objects/font/LTR164.3D
new file mode 100755 (executable)
index 0000000..72d446a
--- /dev/null
@@ -0,0 +1,46 @@
+ 1  2  0  1  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR165.3D b/3D GFX/Swapping 3D engine/objects/font/LTR165.3D
new file mode 100755 (executable)
index 0000000..8fbee8b
--- /dev/null
@@ -0,0 +1,50 @@
+ 1  1  0  1  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR166.3D b/3D GFX/Swapping 3D engine/objects/font/LTR166.3D
new file mode 100755 (executable)
index 0000000..f208090
--- /dev/null
@@ -0,0 +1,36 @@
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR167.3D b/3D GFX/Swapping 3D engine/objects/font/LTR167.3D
new file mode 100755 (executable)
index 0000000..02c4975
--- /dev/null
@@ -0,0 +1,40 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR168.3D b/3D GFX/Swapping 3D engine/objects/font/LTR168.3D
new file mode 100755 (executable)
index 0000000..9b169b6
--- /dev/null
@@ -0,0 +1,34 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR169.3D b/3D GFX/Swapping 3D engine/objects/font/LTR169.3D
new file mode 100755 (executable)
index 0000000..b42c00a
--- /dev/null
@@ -0,0 +1,16 @@
+ 2  4  0  2  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR170.3D b/3D GFX/Swapping 3D engine/objects/font/LTR170.3D
new file mode 100755 (executable)
index 0000000..33c680b
--- /dev/null
@@ -0,0 +1,16 @@
+ 2  4  0  2  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  7  0  7  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR171.3D b/3D GFX/Swapping 3D engine/objects/font/LTR171.3D
new file mode 100755 (executable)
index 0000000..0f1d44b
--- /dev/null
@@ -0,0 +1,50 @@
+ 1  1  0  1  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 3  8  0  3  9  0  10 \r
+ 8  8  0  8  9  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
+ 7  9  0  8  9  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR172.3D b/3D GFX/Swapping 3D engine/objects/font/LTR172.3D
new file mode 100755 (executable)
index 0000000..8bddea3
--- /dev/null
@@ -0,0 +1,46 @@
+ 1  1  0  1  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 7  8  0  7  9  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR173.3D b/3D GFX/Swapping 3D engine/objects/font/LTR173.3D
new file mode 100755 (executable)
index 0000000..4a91a28
--- /dev/null
@@ -0,0 +1,24 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  7  0  7  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR174.3D b/3D GFX/Swapping 3D engine/objects/font/LTR174.3D
new file mode 100755 (executable)
index 0000000..463c329
--- /dev/null
@@ -0,0 +1,44 @@
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR175.3D b/3D GFX/Swapping 3D engine/objects/font/LTR175.3D
new file mode 100755 (executable)
index 0000000..e9c550d
--- /dev/null
@@ -0,0 +1,44 @@
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR176.3D b/3D GFX/Swapping 3D engine/objects/font/LTR176.3D
new file mode 100755 (executable)
index 0000000..6522964
--- /dev/null
@@ -0,0 +1,64 @@
+ 3  1  0  3  2  0  10 \r
+ 4  1  0  4  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  8  0  1  9  0  10 \r
+ 2  8  0  2  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 1  9  0  2  9  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR177.3D b/3D GFX/Swapping 3D engine/objects/font/LTR177.3D
new file mode 100755 (executable)
index 0000000..6e3c67f
--- /dev/null
@@ -0,0 +1,128 @@
+ 2  1  0  2  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 4  1  0  4  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 9  1  0  9  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 9  3  0  9  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 9  7  0  9  8  0  10 \r
+ 1  8  0  1  9  0  10 \r
+ 2  8  0  2  9  0  10 \r
+ 3  8  0  3  9  0  10 \r
+ 4  8  0  4  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 7  8  0  7  9  0  10 \r
+ 8  8  0  8  9  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 1  9  0  2  9  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
+ 7  9  0  8  9  0  10 \r
+ 8  1  0  9  1  0  10 \r
+ 8  2  0  9  2  0  10 \r
+ 8  3  0  9  3  0  10 \r
+ 8  4  0  9  4  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
+ 8  7  0  9  7  0  10 \r
+ 8  8  0  9  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR178.3D b/3D GFX/Swapping 3D engine/objects/font/LTR178.3D
new file mode 100755 (executable)
index 0000000..3a8f20f
--- /dev/null
@@ -0,0 +1,80 @@
+ 1  1  0  1  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 4  1  0  4  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 9  1  0  9  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 9  2  0  9  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 9  3  0  9  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 9  4  0  9  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 9  6  0  9  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 9  7  0  9  8  0  10 \r
+ 2  8  0  2  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 9  8  0  9  9  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  9  0  3  9  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
+ 7  9  0  8  9  0  10 \r
+ 8  1  0  9  1  0  10 \r
+ 8  9  0  9  9  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR179.3D b/3D GFX/Swapping 3D engine/objects/font/LTR179.3D
new file mode 100755 (executable)
index 0000000..f6a2cd7
--- /dev/null
@@ -0,0 +1,20 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 4  8  0  4  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  9  0  6  9  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR180.3D b/3D GFX/Swapping 3D engine/objects/font/LTR180.3D
new file mode 100755 (executable)
index 0000000..ba2bcc3
--- /dev/null
@@ -0,0 +1,26 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 4  8  0  4  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  9  0  6  9  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR181.3D b/3D GFX/Swapping 3D engine/objects/font/LTR181.3D
new file mode 100755 (executable)
index 0000000..35e3118
--- /dev/null
@@ -0,0 +1,32 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 4  8  0  4  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  9  0  6  9  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR182.3D b/3D GFX/Swapping 3D engine/objects/font/LTR182.3D
new file mode 100755 (executable)
index 0000000..01e2f8f
--- /dev/null
@@ -0,0 +1,44 @@
+ 3  1  0  3  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 3  8  0  3  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 8  8  0  8  9  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  9  0  8  9  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR183.3D b/3D GFX/Swapping 3D engine/objects/font/LTR183.3D
new file mode 100755 (executable)
index 0000000..1e0f94e
--- /dev/null
@@ -0,0 +1,28 @@
+ 1  5  0  1  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 3  8  0  3  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 8  8  0  8  9  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  9  0  8  9  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR184.3D b/3D GFX/Swapping 3D engine/objects/font/LTR184.3D
new file mode 100755 (executable)
index 0000000..8e63e20
--- /dev/null
@@ -0,0 +1,28 @@
+ 1  3  0  1  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 4  8  0  4  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  9  0  6  9  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR185.3D b/3D GFX/Swapping 3D engine/objects/font/LTR185.3D
new file mode 100755 (executable)
index 0000000..b039c9a
--- /dev/null
@@ -0,0 +1,50 @@
+ 3  1  0  3  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 3  8  0  3  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 8  8  0  8  9  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  9  0  8  9  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR186.3D b/3D GFX/Swapping 3D engine/objects/font/LTR186.3D
new file mode 100755 (executable)
index 0000000..fac68d2
--- /dev/null
@@ -0,0 +1,40 @@
+ 3  1  0  3  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 3  8  0  3  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 8  8  0  8  9  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  9  0  8  9  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR187.3D b/3D GFX/Swapping 3D engine/objects/font/LTR187.3D
new file mode 100755 (executable)
index 0000000..3d602cb
--- /dev/null
@@ -0,0 +1,42 @@
+ 1  3  0  1  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 3  8  0  3  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 8  8  0  8  9  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  9  0  8  9  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR188.3D b/3D GFX/Swapping 3D engine/objects/font/LTR188.3D
new file mode 100755 (executable)
index 0000000..8fa7098
--- /dev/null
@@ -0,0 +1,38 @@
+ 3  1  0  3  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR189.3D b/3D GFX/Swapping 3D engine/objects/font/LTR189.3D
new file mode 100755 (executable)
index 0000000..0cd5eb6
--- /dev/null
@@ -0,0 +1,32 @@
+ 3  1  0  3  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR190.3D b/3D GFX/Swapping 3D engine/objects/font/LTR190.3D
new file mode 100755 (executable)
index 0000000..dd40100
--- /dev/null
@@ -0,0 +1,26 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  6  0  6  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR191.3D b/3D GFX/Swapping 3D engine/objects/font/LTR191.3D
new file mode 100755 (executable)
index 0000000..b1446fc
--- /dev/null
@@ -0,0 +1,18 @@
+ 1  5  0  1  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 4  8  0  4  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  9  0  6  9  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR192.3D b/3D GFX/Swapping 3D engine/objects/font/LTR192.3D
new file mode 100755 (executable)
index 0000000..7e7021b
--- /dev/null
@@ -0,0 +1,20 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR193.3D b/3D GFX/Swapping 3D engine/objects/font/LTR193.3D
new file mode 100755 (executable)
index 0000000..68ac02f
--- /dev/null
@@ -0,0 +1,26 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR194.3D b/3D GFX/Swapping 3D engine/objects/font/LTR194.3D
new file mode 100755 (executable)
index 0000000..0908537
--- /dev/null
@@ -0,0 +1,24 @@
+ 1  5  0  1  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 4  8  0  4  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR195.3D b/3D GFX/Swapping 3D engine/objects/font/LTR195.3D
new file mode 100755 (executable)
index 0000000..9eed92f
--- /dev/null
@@ -0,0 +1,26 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 4  8  0  4  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR196.3D b/3D GFX/Swapping 3D engine/objects/font/LTR196.3D
new file mode 100755 (executable)
index 0000000..f26d8f5
--- /dev/null
@@ -0,0 +1,18 @@
+ 1  5  0  1  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR197.3D b/3D GFX/Swapping 3D engine/objects/font/LTR197.3D
new file mode 100755 (executable)
index 0000000..84a2312
--- /dev/null
@@ -0,0 +1,32 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 4  8  0  4  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR198.3D b/3D GFX/Swapping 3D engine/objects/font/LTR198.3D
new file mode 100755 (executable)
index 0000000..e5ce811
--- /dev/null
@@ -0,0 +1,32 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 9  3  0  9  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 4  8  0  4  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 8  3  0  9  3  0  10 \r
+ 8  4  0  9  4  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR199.3D b/3D GFX/Swapping 3D engine/objects/font/LTR199.3D
new file mode 100755 (executable)
index 0000000..72cc1a2
--- /dev/null
@@ -0,0 +1,42 @@
+ 3  1  0  3  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 3  8  0  3  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 8  8  0  8  9  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  9  0  8  9  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR200.3D b/3D GFX/Swapping 3D engine/objects/font/LTR200.3D
new file mode 100755 (executable)
index 0000000..17db339
--- /dev/null
@@ -0,0 +1,34 @@
+ 3  1  0  3  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 9  3  0  9  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 8  3  0  9  3  0  10 \r
+ 8  4  0  9  4  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR201.3D b/3D GFX/Swapping 3D engine/objects/font/LTR201.3D
new file mode 100755 (executable)
index 0000000..42542d1
--- /dev/null
@@ -0,0 +1,38 @@
+ 3  3  0  3  4  0  10 \r
+ 9  3  0  9  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 3  8  0  3  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 8  8  0  8  9  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  9  0  8  9  0  10 \r
+ 8  3  0  9  3  0  10 \r
+ 8  4  0  9  4  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR202.3D b/3D GFX/Swapping 3D engine/objects/font/LTR202.3D
new file mode 100755 (executable)
index 0000000..96712e3
--- /dev/null
@@ -0,0 +1,44 @@
+ 3  1  0  3  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 9  3  0  9  4  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 8  3  0  9  3  0  10 \r
+ 8  4  0  9  4  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR203.3D b/3D GFX/Swapping 3D engine/objects/font/LTR203.3D
new file mode 100755 (executable)
index 0000000..f56d3fd
--- /dev/null
@@ -0,0 +1,48 @@
+ 1  3  0  1  4  0  10 \r
+ 9  3  0  9  4  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 3  8  0  3  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 8  8  0  8  9  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  9  0  8  9  0  10 \r
+ 8  3  0  9  3  0  10 \r
+ 8  4  0  9  4  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR204.3D b/3D GFX/Swapping 3D engine/objects/font/LTR204.3D
new file mode 100755 (executable)
index 0000000..aec08e8
--- /dev/null
@@ -0,0 +1,46 @@
+ 3  1  0  3  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 9  3  0  9  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 3  8  0  3  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 8  8  0  8  9  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  9  0  8  9  0  10 \r
+ 8  3  0  9  3  0  10 \r
+ 8  4  0  9  4  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR205.3D b/3D GFX/Swapping 3D engine/objects/font/LTR205.3D
new file mode 100755 (executable)
index 0000000..3101e8e
--- /dev/null
@@ -0,0 +1,36 @@
+ 1  3  0  1  4  0  10 \r
+ 9  3  0  9  4  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 8  3  0  9  3  0  10 \r
+ 8  4  0  9  4  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR206.3D b/3D GFX/Swapping 3D engine/objects/font/LTR206.3D
new file mode 100755 (executable)
index 0000000..819590c
--- /dev/null
@@ -0,0 +1,56 @@
+ 3  1  0  3  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 9  3  0  9  4  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 3  8  0  3  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 8  8  0  8  9  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  9  0  8  9  0  10 \r
+ 8  3  0  9  3  0  10 \r
+ 8  4  0  9  4  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR207.3D b/3D GFX/Swapping 3D engine/objects/font/LTR207.3D
new file mode 100755 (executable)
index 0000000..74674ba
--- /dev/null
@@ -0,0 +1,40 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 9  3  0  9  4  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 8  3  0  9  3  0  10 \r
+ 8  4  0  9  4  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR208.3D b/3D GFX/Swapping 3D engine/objects/font/LTR208.3D
new file mode 100755 (executable)
index 0000000..b5f8341
--- /dev/null
@@ -0,0 +1,34 @@
+ 3  1  0  3  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR209.3D b/3D GFX/Swapping 3D engine/objects/font/LTR209.3D
new file mode 100755 (executable)
index 0000000..2cfaaa1
--- /dev/null
@@ -0,0 +1,42 @@
+ 1  3  0  1  4  0  10 \r
+ 9  3  0  9  4  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 4  8  0  4  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 8  3  0  9  3  0  10 \r
+ 8  4  0  9  4  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR210.3D b/3D GFX/Swapping 3D engine/objects/font/LTR210.3D
new file mode 100755 (executable)
index 0000000..8716a37
--- /dev/null
@@ -0,0 +1,30 @@
+ 1  5  0  1  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 3  8  0  3  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 8  8  0  8  9  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  9  0  8  9  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR211.3D b/3D GFX/Swapping 3D engine/objects/font/LTR211.3D
new file mode 100755 (executable)
index 0000000..f4bc64d
--- /dev/null
@@ -0,0 +1,30 @@
+ 3  1  0  3  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR212.3D b/3D GFX/Swapping 3D engine/objects/font/LTR212.3D
new file mode 100755 (executable)
index 0000000..c93d8ed
--- /dev/null
@@ -0,0 +1,26 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 9  3  0  9  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 8  3  0  9  3  0  10 \r
+ 8  4  0  9  4  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR213.3D b/3D GFX/Swapping 3D engine/objects/font/LTR213.3D
new file mode 100755 (executable)
index 0000000..11d95b9
--- /dev/null
@@ -0,0 +1,28 @@
+ 4  3  0  4  4  0  10 \r
+ 9  3  0  9  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 4  8  0  4  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 8  3  0  9  3  0  10 \r
+ 8  4  0  9  4  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR214.3D b/3D GFX/Swapping 3D engine/objects/font/LTR214.3D
new file mode 100755 (executable)
index 0000000..3e9507b
--- /dev/null
@@ -0,0 +1,26 @@
+ 3  5  0  3  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 3  8  0  3  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 8  8  0  8  9  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  9  0  8  9  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR215.3D b/3D GFX/Swapping 3D engine/objects/font/LTR215.3D
new file mode 100755 (executable)
index 0000000..5dd09bc
--- /dev/null
@@ -0,0 +1,46 @@
+ 3  1  0  3  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 3  8  0  3  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 8  8  0  8  9  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  9  0  8  9  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR216.3D b/3D GFX/Swapping 3D engine/objects/font/LTR216.3D
new file mode 100755 (executable)
index 0000000..8fd55cf
--- /dev/null
@@ -0,0 +1,44 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 9  3  0  9  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 4  8  0  4  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 8  3  0  9  3  0  10 \r
+ 8  4  0  9  4  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR217.3D b/3D GFX/Swapping 3D engine/objects/font/LTR217.3D
new file mode 100755 (executable)
index 0000000..c8c0967
--- /dev/null
@@ -0,0 +1,20 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  6  0  6  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR218.3D b/3D GFX/Swapping 3D engine/objects/font/LTR218.3D
new file mode 100755 (executable)
index 0000000..32d627e
--- /dev/null
@@ -0,0 +1,18 @@
+ 4  5  0  4  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 4  8  0  4  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR219.3D b/3D GFX/Swapping 3D engine/objects/font/LTR219.3D
new file mode 100755 (executable)
index 0000000..538af36
--- /dev/null
@@ -0,0 +1,32 @@
+ 1  1  0  1  2  0  10 \r
+ 9  1  0  9  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 9  2  0  9  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 9  3  0  9  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 9  4  0  9  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 9  6  0  9  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 9  7  0  9  8  0  10 \r
+ 1  8  0  1  9  0  10 \r
+ 9  8  0  9  9  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  9  0  2  9  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  9  0  3  9  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  9  0  8  9  0  10 \r
+ 8  1  0  9  1  0  10 \r
+ 8  9  0  9  9  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR220.3D b/3D GFX/Swapping 3D engine/objects/font/LTR220.3D
new file mode 100755 (executable)
index 0000000..8f9d4a2
--- /dev/null
@@ -0,0 +1,24 @@
+ 1  5  0  1  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 9  6  0  9  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 9  7  0  9  8  0  10 \r
+ 1  8  0  1  9  0  10 \r
+ 9  8  0  9  9  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  9  0  2  9  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  9  0  3  9  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  9  0  8  9  0  10 \r
+ 8  5  0  9  5  0  10 \r
+ 8  9  0  9  9  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR221.3D b/3D GFX/Swapping 3D engine/objects/font/LTR221.3D
new file mode 100755 (executable)
index 0000000..0a78ddf
--- /dev/null
@@ -0,0 +1,24 @@
+ 1  1  0  1  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 1  8  0  1  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  9  0  2  9  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  9  0  3  9  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  9  0  5  9  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR222.3D b/3D GFX/Swapping 3D engine/objects/font/LTR222.3D
new file mode 100755 (executable)
index 0000000..391d2c4
--- /dev/null
@@ -0,0 +1,24 @@
+ 5  1  0  5  2  0  10 \r
+ 9  1  0  9  2  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 9  2  0  9  3  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 9  3  0  9  4  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 9  4  0  9  5  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 9  6  0  9  7  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 9  7  0  9  8  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 9  8  0  9  9  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  9  0  8  9  0  10 \r
+ 8  1  0  9  1  0  10 \r
+ 8  9  0  9  9  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR223.3D b/3D GFX/Swapping 3D engine/objects/font/LTR223.3D
new file mode 100755 (executable)
index 0000000..870a1e1
--- /dev/null
@@ -0,0 +1,24 @@
+ 1  1  0  1  2  0  10 \r
+ 9  1  0  9  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 9  2  0  9  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 9  3  0  9  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 9  4  0  9  5  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 8  1  0  9  1  0  10 \r
+ 8  5  0  9  5  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR224.3D b/3D GFX/Swapping 3D engine/objects/font/LTR224.3D
new file mode 100755 (executable)
index 0000000..4c0ceac
--- /dev/null
@@ -0,0 +1,40 @@
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR225.3D b/3D GFX/Swapping 3D engine/objects/font/LTR225.3D
new file mode 100755 (executable)
index 0000000..9cd067c
--- /dev/null
@@ -0,0 +1,42 @@
+ 2  2  0  2  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR226.3D b/3D GFX/Swapping 3D engine/objects/font/LTR226.3D
new file mode 100755 (executable)
index 0000000..767049d
--- /dev/null
@@ -0,0 +1,30 @@
+ 1  2  0  1  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  4  0  8  4  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR227.3D b/3D GFX/Swapping 3D engine/objects/font/LTR227.3D
new file mode 100755 (executable)
index 0000000..9f6d17d
--- /dev/null
@@ -0,0 +1,36 @@
+ 1  2  0  1  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR228.3D b/3D GFX/Swapping 3D engine/objects/font/LTR228.3D
new file mode 100755 (executable)
index 0000000..1a346d3
--- /dev/null
@@ -0,0 +1,50 @@
+ 1  1  0  1  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR229.3D b/3D GFX/Swapping 3D engine/objects/font/LTR229.3D
new file mode 100755 (executable)
index 0000000..22b26c5
--- /dev/null
@@ -0,0 +1,40 @@
+ 2  2  0  2  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR230.3D b/3D GFX/Swapping 3D engine/objects/font/LTR230.3D
new file mode 100755 (executable)
index 0000000..0fd6ec6
--- /dev/null
@@ -0,0 +1,34 @@
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR231.3D b/3D GFX/Swapping 3D engine/objects/font/LTR231.3D
new file mode 100755 (executable)
index 0000000..ae60755
--- /dev/null
@@ -0,0 +1,32 @@
+ 2  2  0  2  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR232.3D b/3D GFX/Swapping 3D engine/objects/font/LTR232.3D
new file mode 100755 (executable)
index 0000000..42c06bd
--- /dev/null
@@ -0,0 +1,56 @@
+ 1  1  0  1  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR233.3D b/3D GFX/Swapping 3D engine/objects/font/LTR233.3D
new file mode 100755 (executable)
index 0000000..365c15b
--- /dev/null
@@ -0,0 +1,48 @@
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR234.3D b/3D GFX/Swapping 3D engine/objects/font/LTR234.3D
new file mode 100755 (executable)
index 0000000..48bb66a
--- /dev/null
@@ -0,0 +1,48 @@
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR235.3D b/3D GFX/Swapping 3D engine/objects/font/LTR235.3D
new file mode 100755 (executable)
index 0000000..f627767
--- /dev/null
@@ -0,0 +1,50 @@
+ 3  1  0  3  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR236.3D b/3D GFX/Swapping 3D engine/objects/font/LTR236.3D
new file mode 100755 (executable)
index 0000000..aeadc99
--- /dev/null
@@ -0,0 +1,36 @@
+ 2  3  0  2  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 9  4  0  9  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 9  5  0  9  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 8  4  0  9  4  0  10 \r
+ 8  6  0  9  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR237.3D b/3D GFX/Swapping 3D engine/objects/font/LTR237.3D
new file mode 100755 (executable)
index 0000000..a6d5d6a
--- /dev/null
@@ -0,0 +1,44 @@
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR238.3D b/3D GFX/Swapping 3D engine/objects/font/LTR238.3D
new file mode 100755 (executable)
index 0000000..0452f14
--- /dev/null
@@ -0,0 +1,36 @@
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR239.3D b/3D GFX/Swapping 3D engine/objects/font/LTR239.3D
new file mode 100755 (executable)
index 0000000..5c06afb
--- /dev/null
@@ -0,0 +1,40 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR240.3D b/3D GFX/Swapping 3D engine/objects/font/LTR240.3D
new file mode 100755 (executable)
index 0000000..bcd22ca
--- /dev/null
@@ -0,0 +1,48 @@
+ 1  2  0  1  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR241.3D b/3D GFX/Swapping 3D engine/objects/font/LTR241.3D
new file mode 100755 (executable)
index 0000000..81e85e1
--- /dev/null
@@ -0,0 +1,36 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR242.3D b/3D GFX/Swapping 3D engine/objects/font/LTR242.3D
new file mode 100755 (executable)
index 0000000..d7102f0
--- /dev/null
@@ -0,0 +1,36 @@
+ 3  1  0  3  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR243.3D b/3D GFX/Swapping 3D engine/objects/font/LTR243.3D
new file mode 100755 (executable)
index 0000000..abee609
--- /dev/null
@@ -0,0 +1,36 @@
+ 5  1  0  5  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR244.3D b/3D GFX/Swapping 3D engine/objects/font/LTR244.3D
new file mode 100755 (executable)
index 0000000..46a732a
--- /dev/null
@@ -0,0 +1,24 @@
+ 5  1  0  5  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 4  8  0  4  9  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR245.3D b/3D GFX/Swapping 3D engine/objects/font/LTR245.3D
new file mode 100755 (executable)
index 0000000..c5220b2
--- /dev/null
@@ -0,0 +1,22 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  7  0  6  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR246.3D b/3D GFX/Swapping 3D engine/objects/font/LTR246.3D
new file mode 100755 (executable)
index 0000000..b892620
--- /dev/null
@@ -0,0 +1,26 @@
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR247.3D b/3D GFX/Swapping 3D engine/objects/font/LTR247.3D
new file mode 100755 (executable)
index 0000000..a5eb13f
--- /dev/null
@@ -0,0 +1,44 @@
+ 2  2  0  2  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR248.3D b/3D GFX/Swapping 3D engine/objects/font/LTR248.3D
new file mode 100755 (executable)
index 0000000..81e9e8e
--- /dev/null
@@ -0,0 +1,32 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  4  0  8  4  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR249.3D b/3D GFX/Swapping 3D engine/objects/font/LTR249.3D
new file mode 100755 (executable)
index 0000000..c44b33a
--- /dev/null
@@ -0,0 +1,8 @@
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  6  0  6  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR250.3D b/3D GFX/Swapping 3D engine/objects/font/LTR250.3D
new file mode 100755 (executable)
index 0000000..78ba839
--- /dev/null
@@ -0,0 +1,6 @@
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR251.3D b/3D GFX/Swapping 3D engine/objects/font/LTR251.3D
new file mode 100755 (executable)
index 0000000..60e248d
--- /dev/null
@@ -0,0 +1,30 @@
+ 4  1  0  4  2  0  10 \r
+ 9  1  0  9  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 8  1  0  9  1  0  10 \r
+ 8  2  0  9  2  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR252.3D b/3D GFX/Swapping 3D engine/objects/font/LTR252.3D
new file mode 100755 (executable)
index 0000000..3b3c226
--- /dev/null
@@ -0,0 +1,28 @@
+ 1  1  0  1  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  5  0  7  5  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR253.3D b/3D GFX/Swapping 3D engine/objects/font/LTR253.3D
new file mode 100755 (executable)
index 0000000..ceea4a4
--- /dev/null
@@ -0,0 +1,28 @@
+ 2  1  0  2  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR254.3D b/3D GFX/Swapping 3D engine/objects/font/LTR254.3D
new file mode 100755 (executable)
index 0000000..94a0b7d
--- /dev/null
@@ -0,0 +1,18 @@
+ 2  3  0  2  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  7  0  7  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR255.3D b/3D GFX/Swapping 3D engine/objects/font/LTR255.3D
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR32.3D b/3D GFX/Swapping 3D engine/objects/font/LTR32.3D
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR33.3D b/3D GFX/Swapping 3D engine/objects/font/LTR33.3D
new file mode 100755 (executable)
index 0000000..9981886
--- /dev/null
@@ -0,0 +1,24 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  4  0  7  4  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR34.3D b/3D GFX/Swapping 3D engine/objects/font/LTR34.3D
new file mode 100755 (executable)
index 0000000..43a9f9e
--- /dev/null
@@ -0,0 +1,20 @@
+ 2  1  0  2  2  0  10 \r
+ 4  1  0  4  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  4  0  7  4  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR35.3D b/3D GFX/Swapping 3D engine/objects/font/LTR35.3D
new file mode 100755 (executable)
index 0000000..269ce00
--- /dev/null
@@ -0,0 +1,44 @@
+ 2  1  0  2  2  0  10 \r
+ 4  1  0  4  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR36.3D b/3D GFX/Swapping 3D engine/objects/font/LTR36.3D
new file mode 100755 (executable)
index 0000000..9b612b0
--- /dev/null
@@ -0,0 +1,48 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR37.3D b/3D GFX/Swapping 3D engine/objects/font/LTR37.3D
new file mode 100755 (executable)
index 0000000..56432ad
--- /dev/null
@@ -0,0 +1,38 @@
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR38.3D b/3D GFX/Swapping 3D engine/objects/font/LTR38.3D
new file mode 100755 (executable)
index 0000000..9613bc8
--- /dev/null
@@ -0,0 +1,52 @@
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR39.3D b/3D GFX/Swapping 3D engine/objects/font/LTR39.3D
new file mode 100755 (executable)
index 0000000..0ea2822
--- /dev/null
@@ -0,0 +1,12 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  3  0  6  3  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR40.3D b/3D GFX/Swapping 3D engine/objects/font/LTR40.3D
new file mode 100755 (executable)
index 0000000..255496e
--- /dev/null
@@ -0,0 +1,26 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR41.3D b/3D GFX/Swapping 3D engine/objects/font/LTR41.3D
new file mode 100755 (executable)
index 0000000..8096075
--- /dev/null
@@ -0,0 +1,26 @@
+ 2  1  0  2  2  0  10 \r
+ 4  1  0  4  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  6  0  6  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR42.3D b/3D GFX/Swapping 3D engine/objects/font/LTR42.3D
new file mode 100755 (executable)
index 0000000..77a6463
--- /dev/null
@@ -0,0 +1,36 @@
+ 1  2  0  1  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR43.3D b/3D GFX/Swapping 3D engine/objects/font/LTR43.3D
new file mode 100755 (executable)
index 0000000..cf7cff9
--- /dev/null
@@ -0,0 +1,22 @@
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR44.3D b/3D GFX/Swapping 3D engine/objects/font/LTR44.3D
new file mode 100755 (executable)
index 0000000..b17183a
--- /dev/null
@@ -0,0 +1,12 @@
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR45.3D b/3D GFX/Swapping 3D engine/objects/font/LTR45.3D
new file mode 100755 (executable)
index 0000000..a8d42ba
--- /dev/null
@@ -0,0 +1,16 @@
+ 1  4  0  1  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR46.3D b/3D GFX/Swapping 3D engine/objects/font/LTR46.3D
new file mode 100755 (executable)
index 0000000..98ff4ca
--- /dev/null
@@ -0,0 +1,10 @@
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  8  0  6  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR47.3D b/3D GFX/Swapping 3D engine/objects/font/LTR47.3D
new file mode 100755 (executable)
index 0000000..2a000b3
--- /dev/null
@@ -0,0 +1,28 @@
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR48.3D b/3D GFX/Swapping 3D engine/objects/font/LTR48.3D
new file mode 100755 (executable)
index 0000000..fe7bcf2
--- /dev/null
@@ -0,0 +1,48 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR49.3D b/3D GFX/Swapping 3D engine/objects/font/LTR49.3D
new file mode 100755 (executable)
index 0000000..6c57234
--- /dev/null
@@ -0,0 +1,30 @@
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR50.3D b/3D GFX/Swapping 3D engine/objects/font/LTR50.3D
new file mode 100755 (executable)
index 0000000..1af7b90
--- /dev/null
@@ -0,0 +1,50 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR51.3D b/3D GFX/Swapping 3D engine/objects/font/LTR51.3D
new file mode 100755 (executable)
index 0000000..06fc18f
--- /dev/null
@@ -0,0 +1,50 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR52.3D b/3D GFX/Swapping 3D engine/objects/font/LTR52.3D
new file mode 100755 (executable)
index 0000000..78092ac
--- /dev/null
@@ -0,0 +1,32 @@
+ 5  1  0  5  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR53.3D b/3D GFX/Swapping 3D engine/objects/font/LTR53.3D
new file mode 100755 (executable)
index 0000000..51e3c92
--- /dev/null
@@ -0,0 +1,50 @@
+ 1  1  0  1  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR54.3D b/3D GFX/Swapping 3D engine/objects/font/LTR54.3D
new file mode 100755 (executable)
index 0000000..5dbd567
--- /dev/null
@@ -0,0 +1,50 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR55.3D b/3D GFX/Swapping 3D engine/objects/font/LTR55.3D
new file mode 100755 (executable)
index 0000000..74f4a9a
--- /dev/null
@@ -0,0 +1,34 @@
+ 1  1  0  1  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  4  0  8  4  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR56.3D b/3D GFX/Swapping 3D engine/objects/font/LTR56.3D
new file mode 100755 (executable)
index 0000000..c9fa0a2
--- /dev/null
@@ -0,0 +1,52 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR57.3D b/3D GFX/Swapping 3D engine/objects/font/LTR57.3D
new file mode 100755 (executable)
index 0000000..c790ac8
--- /dev/null
@@ -0,0 +1,50 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR58.3D b/3D GFX/Swapping 3D engine/objects/font/LTR58.3D
new file mode 100755 (executable)
index 0000000..2678315
--- /dev/null
@@ -0,0 +1,20 @@
+ 4  2  0  4  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  8  0  7  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR59.3D b/3D GFX/Swapping 3D engine/objects/font/LTR59.3D
new file mode 100755 (executable)
index 0000000..a23d9dd
--- /dev/null
@@ -0,0 +1,20 @@
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 3  8  0  3  9  0  10 \r
+ 5  8  0  5  9  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  8  0  6  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR60.3D b/3D GFX/Swapping 3D engine/objects/font/LTR60.3D
new file mode 100755 (executable)
index 0000000..93c051d
--- /dev/null
@@ -0,0 +1,30 @@
+ 5  1  0  5  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR61.3D b/3D GFX/Swapping 3D engine/objects/font/LTR61.3D
new file mode 100755 (executable)
index 0000000..7334a08
--- /dev/null
@@ -0,0 +1,32 @@
+ 1  3  0  1  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR62.3D b/3D GFX/Swapping 3D engine/objects/font/LTR62.3D
new file mode 100755 (executable)
index 0000000..821766c
--- /dev/null
@@ -0,0 +1,30 @@
+ 2  1  0  2  2  0  10 \r
+ 4  1  0  4  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR63.3D b/3D GFX/Swapping 3D engine/objects/font/LTR63.3D
new file mode 100755 (executable)
index 0000000..4b11d9c
--- /dev/null
@@ -0,0 +1,36 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  4  0  8  4  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR64.3D b/3D GFX/Swapping 3D engine/objects/font/LTR64.3D
new file mode 100755 (executable)
index 0000000..797aa6c
--- /dev/null
@@ -0,0 +1,50 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR65.3D b/3D GFX/Swapping 3D engine/objects/font/LTR65.3D
new file mode 100755 (executable)
index 0000000..faaddfa
--- /dev/null
@@ -0,0 +1,44 @@
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR66.3D b/3D GFX/Swapping 3D engine/objects/font/LTR66.3D
new file mode 100755 (executable)
index 0000000..4b6c653
--- /dev/null
@@ -0,0 +1,48 @@
+ 1  1  0  1  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR67.3D b/3D GFX/Swapping 3D engine/objects/font/LTR67.3D
new file mode 100755 (executable)
index 0000000..2f94d93
--- /dev/null
@@ -0,0 +1,42 @@
+ 3  1  0  3  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR68.3D b/3D GFX/Swapping 3D engine/objects/font/LTR68.3D
new file mode 100755 (executable)
index 0000000..880065c
--- /dev/null
@@ -0,0 +1,44 @@
+ 1  1  0  1  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  6  0  8  6  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR69.3D b/3D GFX/Swapping 3D engine/objects/font/LTR69.3D
new file mode 100755 (executable)
index 0000000..37fddb8
--- /dev/null
@@ -0,0 +1,48 @@
+ 1  1  0  1  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR70.3D b/3D GFX/Swapping 3D engine/objects/font/LTR70.3D
new file mode 100755 (executable)
index 0000000..6b7c9cf
--- /dev/null
@@ -0,0 +1,40 @@
+ 1  1  0  1  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  3  0  8  3  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR71.3D b/3D GFX/Swapping 3D engine/objects/font/LTR71.3D
new file mode 100755 (executable)
index 0000000..eca32d5
--- /dev/null
@@ -0,0 +1,48 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR72.3D b/3D GFX/Swapping 3D engine/objects/font/LTR72.3D
new file mode 100755 (executable)
index 0000000..83489a5
--- /dev/null
@@ -0,0 +1,40 @@
+ 1  1  0  1  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR73.3D b/3D GFX/Swapping 3D engine/objects/font/LTR73.3D
new file mode 100755 (executable)
index 0000000..1e5d7c0
--- /dev/null
@@ -0,0 +1,26 @@
+ 3  1  0  3  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR74.3D b/3D GFX/Swapping 3D engine/objects/font/LTR74.3D
new file mode 100755 (executable)
index 0000000..776b3f4
--- /dev/null
@@ -0,0 +1,32 @@
+ 3  1  0  3  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR75.3D b/3D GFX/Swapping 3D engine/objects/font/LTR75.3D
new file mode 100755 (executable)
index 0000000..db2fdc8
--- /dev/null
@@ -0,0 +1,46 @@
+ 1  1  0  1  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR76.3D b/3D GFX/Swapping 3D engine/objects/font/LTR76.3D
new file mode 100755 (executable)
index 0000000..0176492
--- /dev/null
@@ -0,0 +1,34 @@
+ 1  1  0  1  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR77.3D b/3D GFX/Swapping 3D engine/objects/font/LTR77.3D
new file mode 100755 (executable)
index 0000000..7832c68
--- /dev/null
@@ -0,0 +1,44 @@
+ 1  1  0  1  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR78.3D b/3D GFX/Swapping 3D engine/objects/font/LTR78.3D
new file mode 100755 (executable)
index 0000000..f1281ae
--- /dev/null
@@ -0,0 +1,42 @@
+ 1  1  0  1  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR79.3D b/3D GFX/Swapping 3D engine/objects/font/LTR79.3D
new file mode 100755 (executable)
index 0000000..6e293f9
--- /dev/null
@@ -0,0 +1,44 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR80.3D b/3D GFX/Swapping 3D engine/objects/font/LTR80.3D
new file mode 100755 (executable)
index 0000000..d307dc8
--- /dev/null
@@ -0,0 +1,40 @@
+ 1  1  0  1  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  4  0  8  4  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR81.3D b/3D GFX/Swapping 3D engine/objects/font/LTR81.3D
new file mode 100755 (executable)
index 0000000..424817f
--- /dev/null
@@ -0,0 +1,50 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 6  8  0  6  9  0  10 \r
+ 8  8  0  8  9  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
+ 7  9  0  8  9  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR82.3D b/3D GFX/Swapping 3D engine/objects/font/LTR82.3D
new file mode 100755 (executable)
index 0000000..2c79434
--- /dev/null
@@ -0,0 +1,48 @@
+ 1  1  0  1  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR83.3D b/3D GFX/Swapping 3D engine/objects/font/LTR83.3D
new file mode 100755 (executable)
index 0000000..4f6b2b1
--- /dev/null
@@ -0,0 +1,52 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR84.3D b/3D GFX/Swapping 3D engine/objects/font/LTR84.3D
new file mode 100755 (executable)
index 0000000..cb09b71
--- /dev/null
@@ -0,0 +1,34 @@
+ 2  1  0  2  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  3  0  8  3  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR85.3D b/3D GFX/Swapping 3D engine/objects/font/LTR85.3D
new file mode 100755 (executable)
index 0000000..220ef59
--- /dev/null
@@ -0,0 +1,40 @@
+ 1  1  0  1  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR86.3D b/3D GFX/Swapping 3D engine/objects/font/LTR86.3D
new file mode 100755 (executable)
index 0000000..e47f39c
--- /dev/null
@@ -0,0 +1,38 @@
+ 1  1  0  1  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 4  7  0  4  8  0  10 \r
+ 5  7  0  5  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  5  0  8  5  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR87.3D b/3D GFX/Swapping 3D engine/objects/font/LTR87.3D
new file mode 100755 (executable)
index 0000000..8e76d1d
--- /dev/null
@@ -0,0 +1,44 @@
+ 1  1  0  1  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 1  3  0  1  4  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR88.3D b/3D GFX/Swapping 3D engine/objects/font/LTR88.3D
new file mode 100755 (executable)
index 0000000..e0aa360
--- /dev/null
@@ -0,0 +1,44 @@
+ 1  1  0  1  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 6  7  0  6  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  2  0  8  2  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR89.3D b/3D GFX/Swapping 3D engine/objects/font/LTR89.3D
new file mode 100755 (executable)
index 0000000..b037de4
--- /dev/null
@@ -0,0 +1,36 @@
+ 2  1  0  2  2  0  10 \r
+ 4  1  0  4  2  0  10 \r
+ 6  1  0  6  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 8  3  0  8  4  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 3  7  0  3  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  4  0  8  4  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR90.3D b/3D GFX/Swapping 3D engine/objects/font/LTR90.3D
new file mode 100755 (executable)
index 0000000..c8e42ce
--- /dev/null
@@ -0,0 +1,50 @@
+ 1  1  0  1  2  0  10 \r
+ 8  1  0  8  2  0  10 \r
+ 1  2  0  1  3  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 8  2  0  8  3  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  3  0  2  3  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  6  0  3  6  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  5  0  6  5  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  1  0  8  1  0  10 \r
+ 7  3  0  8  3  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR91.3D b/3D GFX/Swapping 3D engine/objects/font/LTR91.3D
new file mode 100755 (executable)
index 0000000..91b7752
--- /dev/null
@@ -0,0 +1,30 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  2  0  7  2  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 6  8  0  7  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR92.3D b/3D GFX/Swapping 3D engine/objects/font/LTR92.3D
new file mode 100755 (executable)
index 0000000..a5fbdba
--- /dev/null
@@ -0,0 +1,28 @@
+ 1  1  0  1  2  0  10 \r
+ 3  1  0  3  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 3  3  0  3  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  6  0  6  6  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  7  0  7  7  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR93.3D b/3D GFX/Swapping 3D engine/objects/font/LTR93.3D
new file mode 100755 (executable)
index 0000000..4c6475c
--- /dev/null
@@ -0,0 +1,30 @@
+ 2  1  0  2  2  0  10 \r
+ 7  1  0  7  2  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 7  2  0  7  3  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 5  5  0  5  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  2  0  3  2  0  10 \r
+ 2  7  0  3  7  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  2  0  5  2  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  1  0  6  1  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  1  0  7  1  0  10 \r
+ 6  8  0  7  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR94.3D b/3D GFX/Swapping 3D engine/objects/font/LTR94.3D
new file mode 100755 (executable)
index 0000000..15f43e7
--- /dev/null
@@ -0,0 +1,26 @@
+ 4  1  0  4  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 6  2  0  6  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 5  3  0  5  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  5  0  2  5  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 3  2  0  4  2  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 5  2  0  6  2  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR95.3D b/3D GFX/Swapping 3D engine/objects/font/LTR95.3D
new file mode 100755 (executable)
index 0000000..720440f
--- /dev/null
@@ -0,0 +1,18 @@
+ 1  8  0  1  9  0  10 \r
+ 9  8  0  9  9  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 1  9  0  2  9  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 2  9  0  3  9  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 3  9  0  4  9  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 4  9  0  5  9  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 5  9  0  6  9  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 6  9  0  7  9  0  10 \r
+ 7  8  0  8  8  0  10 \r
+ 7  9  0  8  9  0  10 \r
+ 8  8  0  9  8  0  10 \r
+ 8  9  0  9  9  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR96.3D b/3D GFX/Swapping 3D engine/objects/font/LTR96.3D
new file mode 100755 (executable)
index 0000000..e6dfc49
--- /dev/null
@@ -0,0 +1,12 @@
+ 3  1  0  3  2  0  10 \r
+ 5  1  0  5  2  0  10 \r
+ 3  2  0  3  3  0  10 \r
+ 5  2  0  5  3  0  10 \r
+ 4  3  0  4  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 4  1  0  5  1  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR97.3D b/3D GFX/Swapping 3D engine/objects/font/LTR97.3D
new file mode 100755 (executable)
index 0000000..5016e75
--- /dev/null
@@ -0,0 +1,36 @@
+ 2  3  0  2  4  0  10 \r
+ 6  3  0  6  4  0  10 \r
+ 5  4  0  5  5  0  10 \r
+ 7  4  0  7  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 7  5  0  7  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 5  6  0  5  7  0  10 \r
+ 7  6  0  7  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 8  7  0  8  8  0  10 \r
+ 1  6  0  2  6  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  4  0  3  4  0  10 \r
+ 2  5  0  3  5  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  5  0  4  5  0  10 \r
+ 3  6  0  4  6  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  5  0  5  5  0  10 \r
+ 4  6  0  5  6  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  4  0  7  4  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  7  0  8  7  0  10 \r
+ 7  8  0  8  8  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR98.3D b/3D GFX/Swapping 3D engine/objects/font/LTR98.3D
new file mode 100755 (executable)
index 0000000..f2324d2
--- /dev/null
@@ -0,0 +1,40 @@
+ 1  1  0  1  2  0  10 \r
+ 4  1  0  4  2  0  10 \r
+ 2  2  0  2  3  0  10 \r
+ 4  2  0  4  3  0  10 \r
+ 2  3  0  2  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 2  4  0  2  5  0  10 \r
+ 4  4  0  4  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 2  5  0  2  6  0  10 \r
+ 4  5  0  4  6  0  10 \r
+ 6  5  0  6  6  0  10 \r
+ 8  5  0  8  6  0  10 \r
+ 2  6  0  2  7  0  10 \r
+ 4  6  0  4  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 1  7  0  1  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  1  0  2  1  0  10 \r
+ 1  2  0  2  2  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 1  8  0  2  8  0  10 \r
+ 2  1  0  3  1  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  1  0  4  1  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/LTR99.3D b/3D GFX/Swapping 3D engine/objects/font/LTR99.3D
new file mode 100755 (executable)
index 0000000..68cfd33
--- /dev/null
@@ -0,0 +1,38 @@
+ 2  3  0  2  4  0  10 \r
+ 7  3  0  7  4  0  10 \r
+ 1  4  0  1  5  0  10 \r
+ 3  4  0  3  5  0  10 \r
+ 6  4  0  6  5  0  10 \r
+ 8  4  0  8  5  0  10 \r
+ 1  5  0  1  6  0  10 \r
+ 3  5  0  3  6  0  10 \r
+ 1  6  0  1  7  0  10 \r
+ 3  6  0  3  7  0  10 \r
+ 6  6  0  6  7  0  10 \r
+ 8  6  0  8  7  0  10 \r
+ 2  7  0  2  8  0  10 \r
+ 7  7  0  7  8  0  10 \r
+ 1  4  0  2  4  0  10 \r
+ 1  7  0  2  7  0  10 \r
+ 2  3  0  3  3  0  10 \r
+ 2  8  0  3  8  0  10 \r
+ 3  3  0  4  3  0  10 \r
+ 3  4  0  4  4  0  10 \r
+ 3  7  0  4  7  0  10 \r
+ 3  8  0  4  8  0  10 \r
+ 4  3  0  5  3  0  10 \r
+ 4  4  0  5  4  0  10 \r
+ 4  7  0  5  7  0  10 \r
+ 4  8  0  5  8  0  10 \r
+ 5  3  0  6  3  0  10 \r
+ 5  4  0  6  4  0  10 \r
+ 5  7  0  6  7  0  10 \r
+ 5  8  0  6  8  0  10 \r
+ 6  3  0  7  3  0  10 \r
+ 6  5  0  7  5  0  10 \r
+ 6  6  0  7  6  0  10 \r
+ 6  8  0  7  8  0  10 \r
+ 7  4  0  8  4  0  10 \r
+ 7  5  0  8  5  0  10 \r
+ 7  6  0  8  6  0  10 \r
+ 7  7  0  8  7  0  10 \r
diff --git a/3D GFX/Swapping 3D engine/objects/font/mk3dfont.bas b/3D GFX/Swapping 3D engine/objects/font/mk3dfont.bas
new file mode 100755 (executable)
index 0000000..fa50e58
--- /dev/null
@@ -0,0 +1,44 @@
+' 3D font table generator\r
+' made by Svjatoslav Agejenko\r
+' last edit 2004.01\r
+' H-Page: svjatoslav.eu\r
+' E-Mail: svjatoslav@svjatoslav.eu\r
\r
+DECLARE SUB ln (x1!, y1!, x2!, y2!)\r
+SCREEN 13\r
+\r
+FOR a = 32 TO 255\r
+  LOCATE 2, 2\r
+  PRINT CHR$(a)\r
+  n$ = STR$(a)\r
+  IF LEFT$(n$, 1) = " " THEN n$ = RIGHT$(n$, LEN(n$) - 1)\r
+\r
+  n$ = "ltr" + n$ + ".3d"\r
+\r
+  OPEN n$ FOR OUTPUT AS #1\r
+  FOR y = 0 TO 15\r
+    FOR x = 0 TO 15\r
+      c1 = POINT(x, y)\r
+      c2 = POINT(x + 1, y)\r
+      IF c2 <> c1 THEN ln x + 1, y, x + 1, y + 1\r
+    NEXT x\r
+  NEXT y\r
+\r
+  FOR x = 0 TO 15\r
+    FOR y = 0 TO 15\r
+      c1 = POINT(x, y)\r
+      c2 = POINT(x, y + 1)\r
+      IF c2 <> c1 THEN ln x, y + 1, x + 1, y + 1\r
+    NEXT y\r
+  NEXT x\r
+\r
+  CLOSE #1\r
+NEXT a\r
+SCREEN 0\r
+PRINT "done"\r
+SYSTEM\r
+\r
+SUB ln (x1, y1, x2, y2)\r
+  PRINT #1, x1 - 7; y1 - 7; 0; x2 - 7; y2 - 7; 0; 10\r
+END SUB\r
+\r
diff --git a/3D GFX/Swapping 3D engine/qbext.com b/3D GFX/Swapping 3D engine/qbext.com
new file mode 100755 (executable)
index 0000000..ae54fc4
Binary files /dev/null and b/3D GFX/Swapping 3D engine/qbext.com differ
diff --git a/3D GFX/Swapping 3D engine/run.bat b/3D GFX/Swapping 3D engine/run.bat
new file mode 100755 (executable)
index 0000000..2558764
--- /dev/null
@@ -0,0 +1,2 @@
+qbext\r
+qb /run engine.bas
\ No newline at end of file
diff --git a/3D GFX/Swapping 3D engine/screenshot, 2.png b/3D GFX/Swapping 3D engine/screenshot, 2.png
new file mode 100644 (file)
index 0000000..3eca5d1
Binary files /dev/null and b/3D GFX/Swapping 3D engine/screenshot, 2.png differ
diff --git a/3D GFX/Swapping 3D engine/screenshot.png b/3D GFX/Swapping 3D engine/screenshot.png
new file mode 100755 (executable)
index 0000000..d482abb
Binary files /dev/null and b/3D GFX/Swapping 3D engine/screenshot.png differ
diff --git a/3D GFX/qbext.com b/3D GFX/qbext.com
new file mode 100755 (executable)
index 0000000..ae54fc4
Binary files /dev/null and b/3D GFX/qbext.com differ
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..0e259d4
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,121 @@
+Creative Commons Legal Code
+
+CC0 1.0 Universal
+
+    CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
+    LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
+    ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
+    INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
+    REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
+    PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
+    THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
+    HEREUNDER.
+
+Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer
+exclusive Copyright and Related Rights (defined below) upon the creator
+and subsequent owner(s) (each and all, an "owner") of an original work of
+authorship and/or a database (each, a "Work").
+
+Certain owners wish to permanently relinquish those rights to a Work for
+the purpose of contributing to a commons of creative, cultural and
+scientific works ("Commons") that the public can reliably and without fear
+of later claims of infringement build upon, modify, incorporate in other
+works, reuse and redistribute as freely as possible in any form whatsoever
+and for any purposes, including without limitation commercial purposes.
+These owners may contribute to the Commons to promote the ideal of a free
+culture and the further production of creative, cultural and scientific
+works, or to gain reputation or greater distribution for their Work in
+part through the use and efforts of others.
+
+For these and/or other purposes and motivations, and without any
+expectation of additional consideration or compensation, the person
+associating CC0 with a Work (the "Affirmer"), to the extent that he or she
+is an owner of Copyright and Related Rights in the Work, voluntarily
+elects to apply CC0 to the Work and publicly distribute the Work under its
+terms, with knowledge of his or her Copyright and Related Rights in the
+Work and the meaning and intended legal effect of CC0 on those rights.
+
+1. Copyright and Related Rights. A Work made available under CC0 may be
+protected by copyright and related or neighboring rights ("Copyright and
+Related Rights"). Copyright and Related Rights include, but are not
+limited to, the following:
+
+  i. the right to reproduce, adapt, distribute, perform, display,
+     communicate, and translate a Work;
+ ii. moral rights retained by the original author(s) and/or performer(s);
+iii. publicity and privacy rights pertaining to a person's image or
+     likeness depicted in a Work;
+ iv. rights protecting against unfair competition in regards to a Work,
+     subject to the limitations in paragraph 4(a), below;
+  v. rights protecting the extraction, dissemination, use and reuse of data
+     in a Work;
+ vi. database rights (such as those arising under Directive 96/9/EC of the
+     European Parliament and of the Council of 11 March 1996 on the legal
+     protection of databases, and under any national implementation
+     thereof, including any amended or successor version of such
+     directive); and
+vii. other similar, equivalent or corresponding rights throughout the
+     world based on applicable law or treaty, and any national
+     implementations thereof.
+
+2. Waiver. To the greatest extent permitted by, but not in contravention
+of, applicable law, Affirmer hereby overtly, fully, permanently,
+irrevocably and unconditionally waives, abandons, and surrenders all of
+Affirmer's Copyright and Related Rights and associated claims and causes
+of action, whether now known or unknown (including existing as well as
+future claims and causes of action), in the Work (i) in all territories
+worldwide, (ii) for the maximum duration provided by applicable law or
+treaty (including future time extensions), (iii) in any current or future
+medium and for any number of copies, and (iv) for any purpose whatsoever,
+including without limitation commercial, advertising or promotional
+purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
+member of the public at large and to the detriment of Affirmer's heirs and
+successors, fully intending that such Waiver shall not be subject to
+revocation, rescission, cancellation, termination, or any other legal or
+equitable action to disrupt the quiet enjoyment of the Work by the public
+as contemplated by Affirmer's express Statement of Purpose.
+
+3. Public License Fallback. Should any part of the Waiver for any reason
+be judged legally invalid or ineffective under applicable law, then the
+Waiver shall be preserved to the maximum extent permitted taking into
+account Affirmer's express Statement of Purpose. In addition, to the
+extent the Waiver is so judged Affirmer hereby grants to each affected
+person a royalty-free, non transferable, non sublicensable, non exclusive,
+irrevocable and unconditional license to exercise Affirmer's Copyright and
+Related Rights in the Work (i) in all territories worldwide, (ii) for the
+maximum duration provided by applicable law or treaty (including future
+time extensions), (iii) in any current or future medium and for any number
+of copies, and (iv) for any purpose whatsoever, including without
+limitation commercial, advertising or promotional purposes (the
+"License"). The License shall be deemed effective as of the date CC0 was
+applied by Affirmer to the Work. Should any part of the License for any
+reason be judged legally invalid or ineffective under applicable law, such
+partial invalidity or ineffectiveness shall not invalidate the remainder
+of the License, and in such case Affirmer hereby affirms that he or she
+will not (i) exercise any of his or her remaining Copyright and Related
+Rights in the Work or (ii) assert any associated claims and causes of
+action with respect to the Work, in either case contrary to Affirmer's
+express Statement of Purpose.
+
+4. Limitations and Disclaimers.
+
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
+    surrendered, licensed or otherwise affected by this document.
+ b. Affirmer offers the Work as-is and makes no representations or
+    warranties of any kind concerning the Work, express, implied,
+    statutory or otherwise, including without limitation warranties of
+    title, merchantability, fitness for a particular purpose, non
+    infringement, or the absence of latent or other defects, accuracy, or
+    the present or absence of errors, whether or not discoverable, all to
+    the greatest extent permissible under applicable law.
+ c. Affirmer disclaims responsibility for clearing rights of other persons
+    that may apply to the Work or any use thereof, including without
+    limitation any person's Copyright and Related Rights in the Work.
+    Further, Affirmer disclaims responsibility for obtaining any necessary
+    consents, permissions or other rights required for any use of the
+    Work.
+ d. Affirmer understands and acknowledges that Creative Commons is not a
+    party to this document and has no duty or obligation with respect to
+    this CC0 or use of the Work.
diff --git a/Games/Worm/1.lvl b/Games/Worm/1.lvl
new file mode 100644 (file)
index 0000000..6997eeb
--- /dev/null
@@ -0,0 +1,35 @@
+/###################################\r
+/#mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm#\r
+/###################################\r
diff --git a/Games/Worm/10.lvl b/Games/Worm/10.lvl
new file mode 100644 (file)
index 0000000..24198ec
--- /dev/null
@@ -0,0 +1,35 @@
+/######################   ##########\r
+/######################   ##########\r
+/#m                       m       ##\r
+/#m                       m       ##\r
+/#m                       m       ##\r
+/#m       mmmmmmmmmmmmm   m       ##\r
+/#m             m         m       ##\r
+/#m             m         m       ##\r
+/#m             m         m       ##\r
+/#mmmmmmmmmm    m         m       ##\r
+/#m             m         m       ##\r
+/#m             m         m       ##\r
+/#m             m         m       ##\r
+/#m       mmmmmmmmmmmmm   m       ##\r
+/#m                       m       ##\r
+/#m                       m       ##\r
+/#m                       m       ##\r
+/#m               m       m       m#\r
+/#mmmmmmmmmmmmmmmmm       m       ##\r
+/         m       m                 \r
+/         m       m                 \r
+/         m       m                 \r
+/#m       m       mmmmmmmmmmmmmmmmm#\r
+/#m       m       m               m#\r
+/#m       m       m               m#\r
+/#m       m       m               m#\r
+/                 m                 \r
+/                 m                 \r
+/                 m                 \r
+/#mmmmmmmmmmmmmmmmmmmmmmmmmmmmm   m#\r
+/                             m     \r
+/                             m     \r
+/                             m     \r
+/#mmmmmmmmmmmmmmmmmmmmm   mmmmmmmmm#\r
+/######################   ##########\r
diff --git a/Games/Worm/11.lvl b/Games/Worm/11.lvl
new file mode 100644 (file)
index 0000000..aa94d33
--- /dev/null
@@ -0,0 +1,35 @@
+/###################################\r
+/#mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m  m       m         m       m  m#\r
+/#m  mm       m       m       mm  m#\r
+/#m  mmm       m     m       mmm  m#\r
+/#m  m  m       m   m       m  m  m#\r
+/#m  m  m        m m        m  m  m#\r
+/#m  m  m         m        m   m  m#\r
+/#m  m   m                 m   m  m#\r
+/#m  m    m                m   m  m#\r
+/#m  m    m                m   m  m#\r
+/#m  m    m               m    m  m#\r
+/#m  m     m             m     m  m#\r
+/#m  m      m            m     m  m#\r
+/#m  m      m            m     m  m#\r
+/#m  m      m           m      m  m#\r
+/#m  m       m         m       m  m#\r
+/#m  m        m       m        m  m#\r
+/#m  m         m     m         m  m#\r
+/#m  m          m   m          m  m#\r
+/#m  m    m      m m      m    m  m#\r
+/#m  m    mm      m      mm    m  m#\r
+/#m  m    mmm           mmm    m  m#\r
+/#m  m    m  m         m  m    m  m#\r
+/#m  m    m   m       m   m    m  m#\r
+/#m  m    m    m     m    m    m  m#\r
+/#m  m    m     m   m     m    m  m#\r
+/#m  m    m      m m      m    m  m#\r
+/#m  m    m       m       m    m  m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm#\r
+/###################################\r
diff --git a/Games/Worm/2.lvl b/Games/Worm/2.lvl
new file mode 100644 (file)
index 0000000..474800b
--- /dev/null
@@ -0,0 +1,35 @@
+/###################################\r
+/#mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm#\r
+/#m                               mm\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm#\r
+/###################################\r
diff --git a/Games/Worm/3.lvl b/Games/Worm/3.lvl
new file mode 100644 (file)
index 0000000..bfbdba5
--- /dev/null
@@ -0,0 +1,35 @@
+/###########     ###     ###########\r
+/#mmmmmmmmmm     mmm     mmmmmmmmmm#\r
+/#mmmmmmmm                 mmmmmmmm#\r
+/#mmmmmm                     mmmmmm#\r
+/#mmmmm                       mmmmm#\r
+/#mmmm           mmm           mmmm#\r
+/#mmm           mmmmm           mmm#\r
+/mmm            mmmmm            mm#\r
+/#mm             mmm             mm#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/                 m                 \r
+/                 m                 \r
+/                 m                 \r
+/                mmm                \r
+/      mm        mmm        mm      \r
+/#m   mmmm     mmmmmmm     mmmm   m#\r
+/#m   mmmmmmmmmmmmmmmmmmmmmmmmm   m#\r
+/#m   mmmm     mmmmmmm     mmmm   m#\r
+/      mm        mmm        mm      \r
+/                mmm                \r
+/                 m                 \r
+/                 m                 \r
+/                 m                 \r
+/#m               m               m#\r
+/#m               m               m#\r
+/#mm             mmm             mm#\r
+/#mm            mmmmm            mm#\r
+/#mmm           mmmmm           mmm#\r
+/#mmmm           mmm           mmmm#\r
+/#mmmmm                       mmmmm#\r
+/#mmmmmm                     mmmmmm#\r
+/#mmmmmmmm                 mmmmmmmm#\r
+/#mmmmmmmmmm     mmm     mmmmmmmmmm#\r
+/###########     ###     ###########\r
diff --git a/Games/Worm/4.lvl b/Games/Worm/4.lvl
new file mode 100644 (file)
index 0000000..7b64d2b
--- /dev/null
@@ -0,0 +1,35 @@
+/                                   \r
+/                                   \r
+/                                   \r
+/                                   \r
+/                                   \r
+/              mm mm                \r
+/             m     m               \r
+/                                   \r
+/             m     m               \r
+/              mm mm                \r
+/                                   \r
+/                                   \r
+/                                   \r
+/                                   \r
+/                                   \r
+/       mmmmmmmmmmmmmmmmm           \r
+/       m                           \r
+/       m                           \r
+/       m                m          \r
+/       m                m          \r
+/       m                m          \r
+/       mmmmmmmmmmmmmm              \r
+/                    m   m          \r
+/                    m   m          \r
+/                    m   m          \r
+/                    m              \r
+/                    m   m          \r
+/        mmmmmmmmmmmmm   m          \r
+/                        m          \r
+/                                   \r
+/                        m          \r
+/                        m          \r
+/                        m          \r
+/                                   \r
+/                                   \r
diff --git a/Games/Worm/5.lvl b/Games/Worm/5.lvl
new file mode 100644 (file)
index 0000000..73d9bdb
--- /dev/null
@@ -0,0 +1,35 @@
+/################   ################\r
+/#mmmmmmmmmmmmmmm   mmmmmmmmmmmmmmm#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m   #####     #####     ######  m#\r
+/#m   #                        #  m#\r
+/#m   #                        #  m#\r
+/#m   #                        #  m#\r
+/#m   #                        #  m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m   #         #####          #  m#\r
+/     #         #####          #    \r
+/     #         #####          #    \r
+/     #         #####          #    \r
+/#m   #         #####          #  mm\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m   #                        #  m#\r
+/#m   #                        #  m#\r
+/#m   #                        #  m#\r
+/#m   #                        #  m#\r
+/#m   #####     #####      #####  m#\r
+/#m                               mm\r
+/#m                               m#\r
+/#m                               m#\r
+/#mmmmmmmmmmmmmmm   mmmmmmmmmmmmmmm#\r
+/################   ################\r
diff --git a/Games/Worm/6.lvl b/Games/Worm/6.lvl
new file mode 100644 (file)
index 0000000..5bd15b8
--- /dev/null
@@ -0,0 +1,35 @@
+/######  ###################  ######\r
+/#mmmmm  mmmmmmmmmmmmmmmmmmm  #mmmm#\r
+/#m                           #   m#\r
+/#m                           #   m#\r
+/#m                           #   m#\r
+/#m   #########################   m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/######                           mm\r
+/     #                       #     \r
+/     #                       #     \r
+/#m   #                       #   m#\r
+/#m   #                       #   m#\r
+/#m   #           #           #   m#\r
+/#m   #           #           #   m#\r
+/#m   #           #           #   m#\r
+/#m   #        #######        #   m#\r
+/#m   #           #           #   m#\r
+/#m   #           m           #   m#\r
+/#m   #           m           #   m#\r
+/#m   #                       #   m#\r
+/#m   #                       #   m#\r
+/     #                       #     \r
+/     #                       #     \r
+/mm                           ######\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m   #########################   m#\r
+/#m   #                           m#\r
+/#m   #                           m#\r
+/#m   #                           m#\r
+/mmmmm#  mmmmmmmmmmmmmmmmmmm  mmmmm#\r
+/######  ###################  ######\r
diff --git a/Games/Worm/7.lvl b/Games/Worm/7.lvl
new file mode 100644 (file)
index 0000000..2980fb8
--- /dev/null
@@ -0,0 +1,35 @@
+/   #############################   \r
+/   mmmmmmmmmmmmmmmmmmmmmmmmmmmmm   \r
+/                 m                 \r
+/#m               m               m#\r
+/#m               m               m#\r
+/#m   #########################   m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m   #                           m#\r
+/#m   #                       #   m#\r
+/#m   #                       #   m#\r
+/#m   #      mmmmm mmmmm      #   m#\r
+/#m   #      m         m      #   m#\r
+/#m   #      m         m      #   m#\r
+/#m   #      m         m      #   m#\r
+/#m   #      m         m      #   m#\r
+/#mmmm#           m           #mmmm#\r
+/#m   #      m         m      #   m#\r
+/#m   #      m         m      #   m#\r
+/#m   #      m         m      #   m#\r
+/#m   #      m         m      #   m#\r
+/#m   #      mmmmm mmmmm      #   m#\r
+/#m   #                       #   m#\r
+/#m   #                       #   m#\r
+/#m   #                       #   m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m                               m#\r
+/#m   #########################   m#\r
+/#m               m               m#\r
+/#m               m               m#\r
+/                 m                 \r
+/   mmmmmmmmmmmmmmmmmmmmmmmmmmmmm   \r
+/   #############################   \r
diff --git a/Games/Worm/8.lvl b/Games/Worm/8.lvl
new file mode 100644 (file)
index 0000000..d4bdc60
--- /dev/null
@@ -0,0 +1,35 @@
+/###################################\r
+/#mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm#\r
+/#m                               m#\r
+/#m  mmmmm                 mmmmm  m#\r
+/#m mm                         mm m#\r
+/#m m                           m m#\r
+/#m m                           m m#\r
+/#m m                           m m#\r
+/#m m                           m m#\r
+/                                   \r
+/                                   \r
+/#m                               m#\r
+/#m                               m#\r
+/#m        m      mmmm   m        m#\r
+/#m        m  m   m      m        m#\r
+/#m        m  m   m      m        m#\r
+/#m        m  m   m      m        m#\r
+/#m        m  mmmmmmmmm  m        m#\r
+/#m        m      m   m  m        m#\r
+/#m        m      m   m  m        m#\r
+/#m        m      m   m  m        m#\r
+/#m        m   mmmm      m        m#\r
+/#m                               m#\r
+/#m                               m#\r
+/                                   \r
+/                                   \r
+/#m m                           m m#\r
+/#m m                           m m#\r
+/#m m                           m m#\r
+/#m m                           m m#\r
+/#m mm                         mm m#\r
+/#m  mmmmm                 mmmmm  m#\r
+/#m                               m#\r
+/#mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm#\r
+/###################################\r
diff --git a/Games/Worm/9.lvl b/Games/Worm/9.lvl
new file mode 100644 (file)
index 0000000..8ebef51
--- /dev/null
@@ -0,0 +1,35 @@
+/#mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm#\r
+/#mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm#\r
+/                                   \r
+/                                   \r
+/                               m   \r
+/                              mmm  \r
+/                             mmmmm \r
+/                               m   \r
+/                               m   \r
+/                      mmmmmmmmmm   \r
+/                                   \r
+/                                   \r
+/                                   \r
+/                                   \r
+/                                   \r
+/                                   \r
+/ mmmmm    mmmmm    mmmmm    mmmmm  \r
+/ mmmmm    mmmmm    mmmmm    mmmmm  \r
+/                                   \r
+/                                   \r
+/                                   \r
+/                                   \r
+/                                    \r
+/                                    \r
+/                                     \r
+/                                     \r
+/                                    \r
+/                                     \r
+/                                    \r
+/                                   \r
+/                                    \r
+/                                   \r
+/                                   \r
+/#mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm#\r
+/###################################\r
diff --git a/Games/Worm/screencast.webm b/Games/Worm/screencast.webm
new file mode 100644 (file)
index 0000000..9fa029c
Binary files /dev/null and b/Games/Worm/screencast.webm differ
diff --git a/Games/Worm/worm.bas b/Games/Worm/worm.bas
new file mode 100755 (executable)
index 0000000..b040633
--- /dev/null
@@ -0,0 +1,879 @@
+' Game of worms.\r
+'\r
+' Game supports up to 5 players. Any amount of those players can be AI controlled.\r
+'\r
+' Goal for each player is to eat as many fruits as possible while avoiding collisions\r
+' with walls and other worms.\r
+'\r
+' Game has multiple levels. After worms have eaten certain amount of fruits, game\r
+' advances to the next level.\r
+'\r
+' Each worm has limited amount of lives. When worm runs into the wall or\r
+' another worm, it loses one life.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2002, Initial version\r
+' 2024-2005, Improved program readability\r
+\r
+DECLARE FUNCTION cnum$ (a%)\r
+DECLARE SUB putworm (a%)\r
+DECLARE SUB level (a%)\r
+DECLARE SUB showb ()\r
+DECLARE SUB sc2 (x%, y%)\r
+DECLARE SUB ai (a%)\r
+DECLARE SUB autop (a%)\r
+DECLARE SUB prc (a%)\r
+DECLARE SUB dead (a%)\r
+DECLARE SUB add (a%)\r
+DECLARE SUB tkt ()\r
+DECLARE SUB subt (b%)\r
+DECLARE SUB show ()\r
+DECLARE SUB sc (x%, y%)\r
+DEFINT A-Z\r
+\r
+' Shared arrays for the game grid and worms\r
+DIM SHARED buf(0 TO 36, 0 TO 36)\r
+DIM SHARED buf2(0 TO 36, 0 TO 36)\r
+DIM SHARED ussx(1 TO 2000, 1 TO 5)\r
+DIM SHARED ussy(1 TO 2000, 1 TO 5)\r
+DIM SHARED ussp(1 TO 5)\r
+DIM SHARED ussl(1 TO 5)\r
+DIM SHARED usss(1 TO 5)\r
+DIM SHARED ussk(1 TO 2000, 1 TO 5)\r
+DIM SHARED usskp(1 TO 5)\r
+\r
+' Variables for worm positions and game state\r
+DIM SHARED ux(1 TO 5), uy(1 TO 5), uxp(1 TO 5), uyp(1 TO 5)\r
+DIM SHARED mtm\r
+DIM SHARED playerCount\r
+DIM SHARED lives(1 TO 5)\r
+DIM SHARED isAI(1 TO 5)\r
+DIM SHARED ail\r
+DIM SHARED lvl\r
+DIM SHARED elum\r
+DIM SHARED spd\r
+\r
+playerCount = 1\r
+ail = 10\r
+lvl = 1\r
+\r
+' Array defines if player is human (0) or computer (1).\r
+isAI(1) = 0\r
+isAI(2) = 0\r
+isAI(3) = 0\r
+isAI(4) = 0\r
+isAI(5) = 0\r
+\r
+CLS\r
+\r
+INPUT "How many players (1 - 5):", playerCount\r
+INPUT "How many of them are computers:", a\r
+FOR b = playerCount TO playerCount - a + 1 STEP -1\r
+    isAI(b) = 1\r
+NEXT b\r
+\r
+INPUT "How many lives:", elum\r
+INPUT "Speed: (1-slow, 3-ok, 10-very fast)", spd\r
+\r
+start\r
+\r
+level lvl\r
+1\r
+tkt\r
+delay .5 / spd\r
+' spd\r
+IF mtm >= 15 THEN\r
+    mtm = 1\r
+    lvl = lvl + 1\r
+    level lvl\r
+END IF\r
+GOTO 1\r
+\r
+SUB ai (a%)\r
+    ' This subroutine handles the AI logic for computer-controlled worms.\r
+    FOR y = 0 TO 36\r
+        FOR x = 0 TO 36\r
+            buf2(x, y) = 32000\r
+            IF buf(x, y) = 2 THEN buf2(x, y) = 0\r
+            IF buf(x, y) > 9 OR buf(x, y) = 1 THEN buf2(x, y) = -1\r
+        NEXT x\r
+    NEXT y\r
+\r
+    ' Set the target position to the center of the grid.\r
+    IF buf2(16, 16) = 32000 THEN buf2(16, 16) = 15000\r
+\r
+6\r
+    b = 0\r
+    FOR y = 1 TO 35\r
+        FOR x = 1 TO 34\r
+            IF (buf2(x + 1, y) > buf2(x, y) + 1) AND (buf2(x, y) >= 0) THEN\r
+                buf2(x + 1, y) = buf2(x, y) + 1\r
+                b = 1\r
+            END IF\r
+        NEXT x\r
+\r
+        ' Check if moving left is the shortest path.\r
+        FOR x = 35 TO 2 STEP -1\r
+            IF (buf2(x - 1, y) > buf2(x, y) + 1) AND (buf2(x, y) >= 0) THEN\r
+                buf2(x - 1, y) = buf2(x, y) + 1\r
+                b = 1\r
+            END IF\r
+        NEXT x\r
+\r
+        IF (buf2(1, y) > buf2(35, y) + 1) AND (buf2(35, y) >= 0) THEN\r
+            buf2(1, y) = buf2(35, y) + 1\r
+            b = 1\r
+        END IF\r
+\r
+        IF (buf2(35, y) > buf2(1, y) + 1) AND (buf2(1, y) >= 0) THEN\r
+            buf2(35, y) = buf2(1, y) + 1\r
+            b = 1\r
+        END IF\r
+    NEXT y\r
+\r
+    FOR x = 1 TO 35\r
+        FOR y = 1 TO 34\r
+            IF (buf2(x, y + 1) > buf2(x, y) + 1) AND (buf2(x, y) >= 0) THEN\r
+                buf2(x, y + 1) = buf2(x, y) + 1\r
+                b = 1\r
+            END IF\r
+        NEXT y\r
+\r
+        ' Check if moving up is the shortest path.\r
+        FOR y = 35 TO 2 STEP -1\r
+            IF (buf2(x, y - 1) > buf2(x, y) + 1) AND (buf2(x, y) >= 0) THEN\r
+                buf2(x, y - 1) = buf2(x, y) + 1\r
+                b = 1\r
+            END IF\r
+        NEXT y\r
+\r
+        IF (buf2(x, 1) > buf2(x, 35) + 1) AND (buf2(x, 35) >= 0) THEN\r
+            buf2(x, 1) = buf2(x, 35) + 1\r
+            b = 1\r
+        END IF\r
+\r
+        IF (buf2(x, 35) > buf2(x, 1) + 1) AND (buf2(x, 1) >= 0) THEN\r
+            buf2(x, 35) = buf2(x, 1) + 1\r
+            b = 1\r
+        END IF\r
+    NEXT x\r
+\r
+    ' If no shorter path is found, exit the loop.\r
+    IF b = 1 THEN GOTO 6\r
+\r
+    tx = ux(a)\r
+    ty = uy(a)\r
+\r
+    d = 0\r
+7\r
+    b = 32001\r
+    tmpxp = 0\r
+    tmpyp = 0\r
+\r
+    ' Check if moving right is the shortest path.\r
+    IF (buf2(tx - 1, ty) < b) AND (buf2(tx - 1, ty) >= 0) THEN\r
+        b = buf2(tx - 1, ty)\r
+        tmpxp = -1\r
+        tmpyp = 0\r
+        c = 1\r
+    END IF\r
+\r
+    ' Check if moving down is the shortest path.\r
+    IF (buf2(tx, ty - 1) < b) AND (buf2(tx, ty - 1) >= 0) THEN\r
+        b = buf2(tx, ty - 1)\r
+        tmpxp = 0\r
+        tmpyp = -1\r
+        c = 2\r
+    END IF\r
+\r
+    ' Check if moving left is the shortest path.\r
+    IF (buf2(tx + 1, ty) < b) AND (buf2(tx + 1, ty) >= 0) THEN\r
+        b = buf2(tx + 1, ty)\r
+        tmpxp = 1\r
+        tmpyp = 0\r
+        c = 3\r
+    END IF\r
+\r
+    ' Check if moving up is the shortest path.\r
+    IF (buf2(tx, ty + 1) < b) AND (buf2(tx, ty + 1) >= 0) THEN\r
+        b = buf2(tx, ty + 1)\r
+        tmpxp = 0\r
+        tmpyp = 1\r
+        c = 4\r
+    END IF\r
+\r
+    ' If no shorter path is found, set the direction to random.\r
+    IF b = 32001 THEN\r
+        tmpxp = -1\r
+        tmpyp = 0\r
+        c = 1\r
+        b = -1\r
+    END IF\r
+\r
+    buf2(tx, ty) = -1\r
+    d = d + 1\r
+    ussk(d, a) = c\r
+    tx = tx + tmpxp\r
+    ty = ty + tmpyp\r
+\r
+    ' Wrap around the edges of the grid.\r
+    IF tx = 1 THEN tx = 34\r
+    IF ty = 1 THEN ty = 34\r
+    IF tx = 35 THEN tx = 2\r
+    IF ty = 35 THEN ty = 2\r
+\r
+    e = buf2(tx, ty)\r
+    buf2(tx, ty) = -1\r
+\r
+    sc2 tx, ty\r
+\r
+    ' If the worm hits a wall or another worm, stop moving.\r
+    IF d > ail THEN GOTO 8\r
+\r
+    ' If the worm finds food, continue moving.\r
+    IF (e > 0) AND (b > -1) THEN GOTO 7\r
+\r
+8\r
+    d = d + 1\r
+    ussk(d, a) = 5\r
+    usskp(a) = 1\r
+\r
+    showb\r
+END SUB\r
+\r
+SUB autop (a%)\r
+    ' This subroutine handles the movement of computer-controlled worms.\r
+    c = 0\r
+\r
+5\r
+    ' If the worm is not at the end of its path, continue moving.\r
+    IF usskp(a) > 0 THEN\r
+        b = ussk(usskp(a), a)\r
+\r
+        IF b = 1 THEN\r
+            uxp(a) = -1\r
+            uyp(a) = 0\r
+        ELSEIF b = 2 THEN\r
+            uxp(a) = 0\r
+            uyp(a) = -1\r
+        ELSEIF b = 3 THEN\r
+            uxp(a) = 1\r
+            uyp(a) = 0\r
+        ELSEIF b = 4 THEN\r
+            uxp(a) = 0\r
+            uyp(a) = 1\r
+        ELSEIF b = 5 THEN\r
+            ai a\r
+            GOTO 5\r
+        END IF\r
+\r
+        usskp(a) = usskp(a) + 1\r
+    END IF\r
+\r
+    ' Calculate the new position of the worm.\r
+    nx = ux(a) + uxp(a)\r
+    ny = uy(a) + uyp(a)\r
+\r
+    ' Check if the worm hits a wall or another worm.\r
+    b = buf(INT(nx), INT(ny))\r
+\r
+    ' If the worm hits a wall or another worm, recalculate the AI.\r
+    IF (b = 1 OR b > 9) AND (c = 0) THEN\r
+        ai a\r
+        c = 1\r
+        GOTO 5\r
+    END IF\r
+END SUB\r
+\r
+SUB clearTail (playerNumber)\r
+    ' This subroutine takes care of clearing out worm tail.\r
+    ' As worm head advances forward in each frame, this procedure\r
+    ' is responsible for clearing out squares where worm tail moved out\r
+    ' of. Such squares are marked as empty (no longer occupied by worm)\r
+    ' and also correspondingly are erased from the screen.\r
+    a = ussp(playerNumber) - ussl(playerNumber)\r
+\r
+    IF a < 1 THEN\r
+        a = a + 2000\r
+    END IF\r
+\r
+    IF ussx(a, playerNumber) > 0 THEN\r
+        buf(ussx(a, playerNumber), ussy(a, playerNumber)) = 0\r
+\r
+        drawGridCell ussx(a, playerNumber), ussy(a, playerNumber)\r
+\r
+        ussx(a, playerNumber) = 0\r
+    END IF\r
+END SUB\r
+\r
+FUNCTION cnum$ (a%)\r
+    ' This function converts an integer to a string.\r
+    b$ = STR$(a%)\r
+\r
+    ' Remove leading spaces from the string.\r
+    IF LEFT$(b$, 1) = " " THEN\r
+        b$ = RIGHT$(b$, LEN(b$) - 1)\r
+    END IF\r
+\r
+    cnum$ = b$\r
+END FUNCTION\r
+\r
+SUB dead (a%)\r
+    ' This subroutine handles the death of a worm.\r
+    lives(a) = lives(a) - 1\r
+    putworm a\r
+END SUB\r
+\r
+SUB delay (delayInSeconds AS SINGLE)\r
+    ' Since QBasic does not have precise timer suitable for delaying animations,\r
+    ' workaround here is to use SOUND function. Inaudible sound with frequency\r
+    ' of 0 Hz is produced. Second argument for SOUND function is sound duration\r
+    ' that is approximately 1/18'th of the second.\r
+    SOUND 0, delayInSeconds * 18\r
+END SUB\r
+\r
+SUB drawGridCell (x%, y%)\r
+' This subroutine updates one cell on the screen as denoted by its\r
+' X and Y coordinates.\r
+'\r
+' Cell content is red from global 'buf' array and corresponding\r
+' sprite is drawn on the screen.\r
+'\r
+' This procedure is handy because it allows redrawing only parts of the\r
+' screen that were changed and thereby we avoid redrawing entire screen\r
+' for every frame.\r
+\r
+    x1 = x% * 5\r
+\r
+    y1 = y% * 5\r
+\r
+    LINE (x1, y1)-(x1 + 3, y1 + 3), 0, BF\r
+\r
+    SELECT CASE buf(x%, y%)\r
+        CASE 0\r
+            ' Draw an empty space on the grid.\r
+            LINE (x1, y1)-(x1 + 3, y1 + 3), 1, BF\r
+\r
+        CASE 1\r
+            ' Draw a wall on the grid.\r
+            LINE (x1, y1)-(x1 + 3, y1 + 3), 7, BF\r
+\r
+            LINE (x1, y1)-(x1 + 3, y1 + 3), 8, B\r
+\r
+        CASE 2\r
+            ' Draw food on the grid.\r
+            LINE (x1, y1)-(x1 + 3, y1 + 3), 14, BF\r
+\r
+        CASE 10\r
+            ' Draw the head of a worm.\r
+            LINE (x1, y1)-(x1 + 3, y1 + 3), 10, BF\r
+\r
+            PSET (x1, y1), 0\r
+\r
+            PSET (x1 + 3, y1), 0\r
+\r
+            PSET (x1, y1 + 3), 0\r
+\r
+            PSET (x1 + 3, y1 + 3), 0\r
+\r
+        CASE 11\r
+            ' Draw the body of a worm.\r
+            LINE (x1, y1)-(x1 + 3, y1 + 3), 12, BF\r
+\r
+            PSET (x1, y1), 0\r
+\r
+            PSET (x1 + 3, y1), 0\r
+\r
+            PSET (x1, y1 + 3), 0\r
+\r
+            PSET (x1 + 3, y1 + 3), 0\r
+\r
+        CASE 12\r
+            ' Draw the body of a worm.\r
+            LINE (x1, y1)-(x1 + 3, y1 + 3), 13, BF\r
+\r
+            PSET (x1, y1), 0\r
+\r
+            PSET (x1 + 3, y1), 0\r
+\r
+            PSET (x1, y1 + 3), 0\r
+\r
+            PSET (x1 + 3, y1 + 3), 0\r
+\r
+        CASE 13\r
+            ' Draw the body of a worm.\r
+            LINE (x1, y1)-(x1 + 3, y1 + 3), 15, BF\r
+\r
+            PSET (x1, y1), 0\r
+\r
+            PSET (x1 + 3, y1), 0\r
+\r
+            PSET (x1, y1 + 3), 0\r
+\r
+            PSET (x1 + 3, y1 + 3), 0\r
+\r
+        CASE 14\r
+            ' Draw the body of a worm.\r
+            LINE (x1, y1)-(x1 + 3, y1 + 3), 9, BF\r
+\r
+            PSET (x1, y1), 0\r
+\r
+            PSET (x1 + 3, y1), 0\r
+\r
+            PSET (x1, y1 + 3), 0\r
+\r
+            PSET (x1 + 3, y1 + 3), 0\r
+    END SELECT\r
+END SUB\r
+\r
+SUB init\r
+    ' Initialize the game by setting up the first level.\r
+    level 1\r
+END SUB\r
+\r
+SUB level (a%)\r
+    ' This subroutine sets up a new level of the game.\r
+    LOCATE 5, 5\r
+    PRINT "G E T   R E A D Y"\r
+\r
+    LOCATE 7, 5\r
+    PRINT "L E V E L :"; a%\r
+\r
+    ' Display a countdown before starting the level.\r
+    delay 2\r
+\r
+    CLS\r
+\r
+    ' Clear the game grid.\r
+    FOR y = 0 TO 36\r
+        FOR x = 0 TO 36\r
+            buf(x, y) = 0\r
+        NEXT x\r
+    NEXT y\r
+\r
+    ' Set up the walls of the grid.\r
+    FOR x = 0 TO 36\r
+        buf(x, 0) = 1\r
+        buf(x, 36) = 1\r
+        buf(0, x) = 1\r
+        buf(36, x) = 1\r
+    NEXT x\r
+\r
+    ' Load the level from a file.\r
+    b$ = cnum(a%) + ".lvl"\r
+\r
+    OPEN b$ FOR INPUT AS #1\r
+\r
+10\r
+    ' Read the level data line by line.\r
+    IF EOF(1) <> 0 THEN GOTO 11\r
+\r
+    LINE INPUT #1, c$\r
+\r
+    ' If the line starts with a slash, it contains grid data.\r
+    IF LEFT$(c$, 1) = "/" THEN\r
+        d = d + 1\r
+\r
+        IF d > 35 THEN\r
+            GOTO 12\r
+        END IF\r
+\r
+        g = LEN(c$)\r
+        IF g > 36 THEN\r
+            g = 36\r
+        END IF\r
+\r
+        ' Parse the grid data and set up the game grid.\r
+        FOR e = 2 TO g\r
+            f$ = RIGHT$(LEFT$(c$, e), 1)\r
+\r
+            IF f$ = "#" OR f$ = "m" THEN\r
+                buf(e - 1, d) = 1\r
+            ELSE\r
+                buf(e - 1, d) = 0\r
+            END IF\r
+        NEXT e\r
+    END IF\r
+\r
+12\r
+    GOTO 10\r
+\r
+11\r
+    CLOSE #1\r
+\r
+    ' Place food randomly on the grid.\r
+    stuff\r
+\r
+    ' Initialize the worms for each player.\r
+    show\r
+\r
+    FOR b = 1 TO playerCount\r
+        ussl(b) = 0\r
+        putworm b\r
+    NEXT b\r
+\r
+    stat\r
+END SUB\r
+\r
+SUB prc (playerNumber)\r
+' This subroutine handles the main game loop for each player.\r
+   \r
+    clearTail playerNumber\r
+\r
+    ussp(playerNumber) = ussp(playerNumber) + 1\r
+\r
+    ' If the current player has no lives left, no further processing is needed\r
+    IF lives(playerNumber) = 0 THEN\r
+        GOTO 4\r
+    END IF\r
+\r
+    ' If the worm is controlled by AI, recalculate its path.\r
+    IF isAI(playerNumber) = 1 THEN\r
+        autop playerNumber\r
+    END IF\r
+\r
+    ' Move the worm based on user input or AI direction.\r
+    ux(playerNumber) = ux(playerNumber) + uxp(playerNumber)\r
+    uy(playerNumber) = uy(playerNumber) + uyp(playerNumber)\r
+\r
+    ' Wrap around the edges of the grid.\r
+    IF ux(playerNumber) = 35 THEN\r
+        ux(playerNumber) = 2\r
+    END IF\r
+\r
+    IF uy(playerNumber) = 35 THEN\r
+        uy(playerNumber) = 2\r
+    END IF\r
+\r
+    IF ux(playerNumber) = 1 THEN\r
+        ux(playerNumber) = 34\r
+    END IF\r
+\r
+    IF uy(playerNumber) = 1 THEN\r
+        uy(playerNumber) = 34\r
+    END IF\r
+\r
+    x = ux(playerNumber)\r
+    y = uy(playerNumber)\r
+\r
+3\r
+    IF buf(x, y) = 2 THEN\r
+        buf(x, y) = 0\r
+\r
+        drawGridCell x, y\r
+\r
+        stuff\r
+\r
+        ussl(playerNumber) = ussl(playerNumber) + mtm\r
+\r
+        usss(playerNumber) = usss(playerNumber) + mtm\r
+\r
+        FOR b = 1 TO playerCount\r
+            IF (lives(b) > 0) AND (isAI(b) = 1) THEN\r
+                ai b\r
+            END IF\r
+        NEXT b\r
+\r
+        stat\r
+\r
+        GOTO 3\r
+    END IF\r
+\r
+    IF buf(x, y) > 0 THEN\r
+        dead playerNumber\r
+\r
+        GOTO 4\r
+    END IF\r
+\r
+    IF playerNumber = 1 THEN\r
+        buf(x, y) = 10\r
+    ELSEIF playerNumber = 2 THEN\r
+        buf(x, y) = 11\r
+    ELSEIF playerNumber = 3 THEN\r
+        buf(x, y) = 12\r
+    ELSEIF playerNumber = 4 THEN\r
+        buf(x, y) = 13\r
+    ELSEIF playerNumber = 5 THEN\r
+        buf(x, y) = 14\r
+    END IF\r
+\r
+    drawGridCell x, y\r
+\r
+    IF ussp(playerNumber) > 2000 THEN\r
+        ussp(playerNumber) = ussp(playerNumber) - 2000\r
+    END IF\r
+\r
+    ussx(ussp(playerNumber), playerNumber) = x\r
+\r
+    ussy(ussp(playerNumber), playerNumber) = y\r
+\r
+4\r
+END SUB\r
+\r
+SUB putworm (a%)\r
+    ' This subroutine initializes a new worm for a player.\r
+    b = ussl(a%)\r
+\r
+    ' Move the worm back to its starting position.\r
+    FOR c = b TO 1 STEP -1\r
+        ussl(a%) = c\r
+\r
+        clearTail a%\r
+    NEXT c\r
+\r
+9\r
+    uy(a%) = INT(RND * 30 + 2)\r
+\r
+    ux(a%) = INT(RND * 10 + 5)\r
+\r
+    ' Ensure that the worm starts in an empty space.\r
+    FOR b = ux(a%) TO ux(a%) + 10\r
+        IF buf(b, uy(a%)) <> 0 THEN\r
+            GOTO 9\r
+        END IF\r
+    NEXT b\r
+\r
+    ' Set the initial direction of the worm.\r
+    uxp(a%) = 1\r
+\r
+    uyp(a%) = 0\r
+\r
+    ussl(a%) = 3\r
+\r
+    stat\r
+END SUB\r
+\r
+SUB sc2 (x%, y%)\r
+    ' This subroutine draws a worm on the game grid for AI pathfinding.\r
+    ' LOCATE 1, 1\r
+    ' PRINT x%, y%\r
+\r
+    ' x1 = x% * 5 + 2\r
+\r
+    ' y1 = y% * 5 + 2\r
+\r
+    ' PSET (x1, y1), 15\r
+\r
+    ' a$ = INPUT$(1)\r
+END SUB\r
+\r
+SUB show\r
+    ' This subroutine draws the entire game grid.\r
+    FOR y = 1 TO 35\r
+        FOR x = 1 TO 35\r
+            drawGridCell x, y\r
+        NEXT x\r
+    NEXT y\r
+END SUB\r
+\r
+SUB showb\r
+GOTO 15\r
+FOR x = 1 TO 35\r
+FOR y = 1 TO 35\r
+\r
+LINE (x * 2 + 200, y * 2 + 100)-(x * 2 + 201, y * 2 + 101), buf2(x, y) MOD 255, BF\r
+NEXT y\r
+NEXT x\r
+15\r
+'a$ = INPUT$(1)\r
+END SUB\r
+\r
+SUB start\r
+    ' Initialize the game screen and settings.\r
+    SCREEN 13\r
+\r
+    RANDOMIZE TIMER\r
+\r
+    uy(1) = 5\r
+\r
+    uy(2) = 10\r
+\r
+    uy(3) = 15\r
+\r
+    uy(4) = 20\r
+\r
+    uy(5) = 25\r
+\r
+    FOR a = 1 TO playerCount\r
+        ux(a) = 15\r
+\r
+        uxp(a) = 1\r
+\r
+        uyp(a) = 0\r
+\r
+        ussp(a) = 0\r
+\r
+        ussl(a) = 3\r
+\r
+        lives(a) = elum\r
+\r
+        usss(a) = 0\r
+\r
+        usskp(a) = 1\r
+\r
+        ussk(1, a) = 5\r
+    NEXT a\r
+\r
+    mtm = 0\r
+END SUB\r
+\r
+SUB stat\r
+    ' This subroutine displays the current game statistics.\r
+    LOCATE 1, 25\r
+\r
+    PRINT mtm\r
+\r
+    FOR a = 1 TO 5\r
+        COLOR 15\r
+\r
+        LOCATE 2 + a, 24\r
+\r
+        PRINT RIGHT$(STR$(a), 1)\r
+\r
+        COLOR 10\r
+\r
+        LOCATE 2 + a, 26\r
+\r
+        IF isAI(a) = 1 THEN\r
+            PRINT "*"\r
+        ELSE\r
+            PRINT "-"\r
+        END IF\r
+\r
+        COLOR 12\r
+\r
+        LOCATE 2 + a, 27\r
+\r
+        b$ = STR$(usss(a))\r
+\r
+        PRINT RIGHT$(b$, LEN(b$) - 1)\r
+\r
+        COLOR 13\r
+\r
+        LOCATE 2 + a, 30\r
+\r
+        b$ = STR$(lives(a))\r
+\r
+        PRINT RIGHT$(b$, LEN(b$) - 1)\r
+    NEXT a\r
+\r
+    COLOR 10\r
+\r
+    LOCATE 8, 26\r
+\r
+    PRINT "AI"\r
+\r
+    COLOR 12\r
+\r
+    LOCATE 2, 27\r
+\r
+    PRINT "Score"\r
+\r
+    COLOR 13\r
+\r
+    LOCATE 8, 30\r
+\r
+    PRINT "Lives"\r
+\r
+    LOCATE 1, 30\r
+\r
+    PRINT "Level:"; lvl\r
+END SUB\r
+\r
+SUB stuff\r
+    ' This subroutine places food randomly on the game grid.\r
+2\r
+    x = INT(RND * 33 + 2)\r
+\r
+    y = INT(RND * 33 + 2)\r
+\r
+    IF buf(x, y) = 0 THEN\r
+        buf(x, y) = 2\r
+\r
+        drawGridCell x, y\r
+    ELSE\r
+        GOTO 2\r
+    END IF\r
+\r
+    mtm = mtm + 1\r
+\r
+    stat\r
+END SUB\r
+\r
+SUB tkt\r
+    ' This subroutine handles user input and AI recalculation.\r
+    a$ = INKEY$\r
+\r
+    IF a$ = CHR$(27) THEN\r
+        SYSTEM\r
+    END IF\r
+\r
+    IF (a$ = CHR$(0) + "M") AND (uxp(1) <> -1) THEN\r
+        uxp(1) = 1\r
+\r
+        uyp(1) = 0\r
+    END IF\r
+\r
+    IF (a$ = CHR$(0) + "K") AND (uxp(1) <> 1) THEN\r
+        uxp(1) = -1\r
+\r
+        uyp(1) = 0\r
+    END IF\r
+\r
+    IF (a$ = CHR$(0) + "P") AND (uyp(1) <> -1) THEN\r
+        uxp(1) = 0\r
+\r
+        uyp(1) = 1\r
+    END IF\r
+\r
+    IF (a$ = CHR$(0) + "H") AND (uyp(1) <> 1) THEN\r
+        uxp(1) = 0\r
+\r
+        uyp(1) = -1\r
+    END IF\r
+\r
+    IF (a$ = "d") AND (uxp(2) <> -1) THEN\r
+        uxp(2) = 1\r
+\r
+        uyp(2) = 0\r
+    END IF\r
+\r
+    IF (a$ = "a") AND (uxp(2) <> 1) THEN\r
+        uxp(2) = -1\r
+\r
+        uyp(2) = 0\r
+    END IF\r
+\r
+    IF (a$ = "s") AND (uyp(2) <> -1) THEN\r
+        uxp(2) = 0\r
+\r
+        uyp(2) = 1\r
+    END IF\r
+\r
+    IF (a$ = "w") AND (uyp(2) <> 1) THEN\r
+        uxp(2) = 0\r
+\r
+        uyp(2) = -1\r
+    END IF\r
+\r
+    b = VAL(a$)\r
+\r
+    IF b > 0 THEN\r
+        IF isAI(b) = 1 THEN\r
+            isAI(b) = 0\r
+        ELSE\r
+            isAI(b) = 1\r
+        END IF\r
+\r
+        stat\r
+    END IF\r
+\r
+    FOR a = 1 TO playerCount\r
+        prc a\r
+    NEXT a\r
+END SUB\r
diff --git a/Games/checkers.bas b/Games/checkers.bas
new file mode 100755 (executable)
index 0000000..ce99d90
--- /dev/null
@@ -0,0 +1,534 @@
+' Game of checkers.
+'
+' This program is free software: released under Creative Commons Zero (CC0) license
+' by Svjatoslav Agejenko.
+' Email: svjatoslav@svjatoslav.eu
+' Homepage: http://www.svjatoslav.eu
+'
+' Changelog:
+' 1998, Initial version
+' 2025, Improved program readability
+'
+' Usage:
+'   keys: w a z s - move around
+'   ENTER key - pick piece on the desk and place it to new location
+
+DECLARE SUB CheckPossibleMoves()
+DECLARE SUB HandleMovement()
+DECLARE SUB GameLoop()
+DECLARE SUB HandleInput()
+DECLARE SUB UpdateDisplay()
+DEFINT A-Z
+
+DIM SHARED boardState(-100 TO 300) AS INTEGER
+' 0 - black piece
+' 1 - white piece
+' 3 - Empty square that piece is allowed to move to
+' 4 - Empty square that is not reachable according to the game rules
+'
+' Cell address calculation (row 1--10, col 1--10):
+' cell address = ((row - 1) * 20) + col
+
+
+DIM SHARED moveMade AS INTEGER
+DIM SHARED hasMove AS INTEGER
+DIM SHARED cursorImage(1000)
+DIM SHARED cursorX, cursorY
+SCREEN 2
+
+
+CLS
+' Draw cursor image and store it into array for quick drawing on the screen
+LINE (1, 1)-(10, 1)
+LINE (1, 1)-(1, 5)
+LINE (10, 1)-(6, 2)
+LINE (6, 2)-(10, 4)
+LINE (10, 4)-(8, 5)
+LINE (8, 5)-(4, 3)
+LINE (4, 3)-(1, 5)
+PAINT (2, 2), 1
+GET (1, 1)-(10, 5), cursorImage
+
+CLS
+' Draw the checkerboard grid
+FOR col = 0 TO 10
+    LINE ((col * 40) + 20, 10)-((col * 40) + 20, 189), 1
+NEXT col
+
+FOR row = 0 TO 20
+    LINE (20, (row * 18) + 9)-(420, (row * 18) + 9), 1
+NEXT row
+
+' Initialize the board state to empty squares
+FOR cell = 1 TO 200
+    boardState(cell) = 4
+NEXT cell
+
+' Draw the initial checkerboard pattern.
+' (alternating squares to create the checkerboard)
+
+FOR row = 2 TO 10 STEP 2
+    FOR col = 1 TO 10 STEP 2
+        PAINT ((col * 40) + 5, (row * 18) + 5)
+    NEXT col
+NEXT row
+
+FOR row = 1 TO 10 STEP 2
+    FOR col = 2 TO 10 STEP 2
+        PAINT ((col * 40) + 5, (row * 18) + 5)
+    NEXT col
+NEXT row
+
+' Place the white pieces on the board
+FOR row = 2 TO 4 STEP 2
+    FOR col = 1 TO 10 STEP 2
+        boardState(((row - 1) * 20) + col) = 1
+    NEXT col
+NEXT row
+
+FOR row = 1 TO 4 STEP 2
+    FOR col = 2 TO 10 STEP 2
+        boardState(((row - 1) * 20) + col) = 1
+    NEXT col
+NEXT row
+
+' Place the black pieces on the board
+FOR row = 8 TO 10 STEP 2
+    FOR col = 1 TO 10 STEP 2
+        boardState(((row - 1) * 20) + col) = 0
+    NEXT col
+NEXT row
+
+FOR row = 7 TO 10 STEP 2
+    FOR col = 2 TO 10 STEP 2
+        boardState(((row - 1) * 20) + col) = 0
+    NEXT col
+NEXT row
+
+FOR col = 2 TO 10 STEP 2
+    boardState(80 + col) = 3
+NEXT col
+
+FOR col = 1 TO 10 STEP 2
+    boardState(100 + col) = 3
+NEXT col
+
+UpdateDisplay
+moveMade = 1
+GameLoop
+
+SUB UpdateDisplay
+    ' Draw the pieces on the board
+    FOR row = 1 TO 10
+        FOR col = 1 TO 10
+            pieceType = boardState(((row - 1) * 20) + col)
+            SELECT CASE pieceType
+                CASE 1
+                    CIRCLE (col * 40, row * 18), 17, 1
+                    PAINT (col * 40, row * 18), 1
+                    CIRCLE (col * 40, row * 18), 17, 0
+                    CIRCLE (col * 40, row * 18), 16, 0
+                    LINE ((col * 40) - 16, row * 18)-((col * 40) + 16, row * 18), 0
+                CASE 0
+                    CIRCLE (col * 40, row * 18), 17, 0
+                    PAINT (col * 40, row * 18), 0
+                    CIRCLE (col * 40, row * 18), 17, 1
+                    CIRCLE (col * 40, row * 18), 15, 1
+                    CIRCLE (col * 40, row * 18), 3, 1
+                    CIRCLE (col * 40, row * 18), 7, 1
+                    LINE ((col * 40) - 16, row * 18)-((col * 40) + 16, row * 18), 0
+                CASE 3
+                    PAINT (col * 40, row * 18), 1
+            END SELECT
+        NEXT col
+    NEXT row
+END SUB
+
+SUB CheckPossibleMoves
+    ' Checks if there are any possible moves on the board
+    hasMove = 0
+    FOR cell = 1 TO 200
+        ' Check for possible jumps in all directions
+        IF boardState(cell) = 0 AND boardState(cell - 21) = 1 AND boardState(cell - 42) = 3 THEN hasMove = 1
+        IF boardState(cell) = 0 AND boardState(cell - 19) = 1 AND boardState(cell - 38) = 3 THEN hasMove = 1
+        IF boardState(cell) = 0 AND boardState(cell + 21) = 1 AND boardState(cell + 42) = 3 THEN hasMove = 1
+        IF boardState(cell) = 0 AND boardState(cell + 19) = 1 AND boardState(cell + 38) = 3 THEN hasMove = 1
+    NEXT cell
+END SUB
+
+SUB GameLoop
+    4
+    HandleInput
+    HandleMovement
+    CheckPossibleMoves
+    IF hasMove = 1 THEN SOUND 1234, 2
+    GOTO 4
+END SUB
+
+SUB HandleMovement
+3
+' Check for possible jumps where a AI can eat 2 pieces at once
+FOR cell = 1 TO 200
+  IF boardState(cell) = 1 AND boardState(cell + 21) = 0 AND boardState(cell + 42) = 3 AND boardState(cell + 61) = 0 AND boardState(cell + 80) = 3 THEN
+    boardState(cell) = 3: boardState(cell + 21) = 3: boardState(cell + 42) = 1
+    moveMade = 1
+    UpdateDisplay
+    GOTO 3
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell + 21) = 0 AND boardState(cell + 42) = 3 AND boardState(cell + 23) = 0 AND boardState(cell + 4) = 3 THEN
+    boardState(cell) = 3: boardState(cell + 21) = 3 : boardState(cell + 42) = 1
+    moveMade = 1
+    UpdateDisplay
+    GOTO 3
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell + 19) = 0 AND boardState(cell + 38) = 3 AND boardState(cell + 59) = 0 AND boardState(cell + 80) = 3 THEN
+    boardState(cell) = 3: boardState(cell + 19) = 3 : boardState(cell + 38) = 1
+
+    moveMade = 1
+    UpdateDisplay
+    GOTO 3
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell + 19) = 0 AND boardState(cell + 38) = 3 AND boardState(cell + 17) = 0 AND boardState(cell - 4) = 3 THEN
+    boardState(cell) = 3: boardState(cell + 19) = 3 : boardState(cell + 38) = 1
+
+    moveMade = 1
+    UpdateDisplay
+    GOTO 3
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell + 21) = 0 AND boardState(cell + 42) = 3 AND boardState(cell + 63) = 0 AND boardState(cell + 84) = 3 THEN
+    boardState(cell) = 3: boardState(cell + 21) = 3 : boardState(cell + 42) = 1
+
+    moveMade = 1
+    UpdateDisplay
+    GOTO 3
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell + 19) = 0 AND boardState(cell + 38) = 3 AND boardState(cell + 57) = 0 AND boardState(cell + 76) = 3 THEN
+    boardState(cell) = 3: boardState(cell + 19) = 3 : boardState(cell + 38) = 1
+
+    moveMade = 1
+    UpdateDisplay
+    GOTO 3
+  END IF
+
+  IF boardState(cell) = 1 AND boardState(cell - 21) = 0 AND boardState(cell - 42) = 3 AND boardState(cell - 61) = 0 AND boardState(cell - 80) = 3 THEN
+    boardState(cell) = 3: boardState(cell - 21) = 3 : boardState(cell - 42) = 1
+
+    moveMade = 1
+    UpdateDisplay
+    GOTO 3
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell - 21) = 0 AND boardState(cell - 42) = 3 AND boardState(cell - 23) = 0 AND boardState(cell - 4) = 3 THEN
+    boardState(cell) = 3: boardState(cell - 21) = 3 : boardState(cell - 42) = 1
+
+    moveMade = 1
+    UpdateDisplay
+    GOTO 3
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell - 19) = 0 AND boardState(cell - 38) = 3 AND boardState(cell - 59) = 0 AND boardState(cell - 80) = 3 THEN
+    boardState(cell) = 3: boardState(cell - 19) = 3 : boardState(cell - 38) = 1
+
+    moveMade = 1
+    UpdateDisplay
+    GOTO 3
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell - 19) = 0 AND boardState(cell - 38) = 3 AND boardState(cell - 17) = 0 AND boardState(cell + 4) = 3 THEN
+    boardState(cell) = 3: boardState(cell - 19) = 3 : boardState(cell - 38) = 1
+
+    moveMade = 1
+    UpdateDisplay
+    GOTO 3
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell - 21) = 0 AND boardState(cell - 42) = 3 AND boardState(cell - 63) = 0 AND boardState(cell - 84) = 3 THEN
+    boardState(cell) = 3: boardState(cell - 21) = 3 : boardState(cell - 42) = 1
+
+    moveMade = 1
+    UpdateDisplay
+    GOTO 3
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell - 19) = 0 AND boardState(cell - 38) = 3 AND boardState(cell - 57) = 0 AND boardState(cell - 76) = 3 THEN
+    boardState(cell) = 3: boardState(cell - 19) = 3 : boardState(cell - 38) = 1
+
+    moveMade = 1
+    UpdateDisplay
+    GOTO 3
+  END IF
+NEXT cell
+
+' Check for possible single moves (single eating)
+FOR cell = 1 TO 200
+  IF boardState(cell) = 1 AND boardState(cell + 21) = 0 AND boardState(cell + 42) = 3 THEN
+    boardState(cell) = 3: boardState(cell + 21) = 3 : boardState(cell + 42) = 1
+
+    GOTO 2
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell + 19) = 0 AND boardState(cell + 38) = 3 THEN
+    boardState(cell) = 3: boardState(cell + 19) = 3 : boardState(cell + 38) = 1
+
+    GOTO 2
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell - 21) = 0 AND boardState(cell - 42) = 3 THEN
+    boardState(cell) = 3: boardState(cell - 21) = 3 : boardState(cell - 42) = 1
+
+    GOTO 2
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell - 19) = 0 AND boardState(cell - 38) = 3 THEN
+    boardState(cell) = 3: boardState(cell - 19) = 3 : boardState(cell - 38) = 1
+
+    GOTO 2
+  END IF
+NEXT cell
+
+' Check for possible defensive moves (to protect own pieces)
+FOR cell = 1 TO 200
+  IF boardState(cell) = 1 AND boardState(cell + 19) = 3 AND boardState(cell + 21) = 3 AND boardState(cell + 40) = 1 AND boardState(cell + 38) = 3 AND boardState(cell + 61) = 0 THEN
+    boardState(cell) = 3: boardState(cell + 19) = 1
+
+    GOTO 2
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell + 19) = 3 AND boardState(cell + 21) = 0 AND boardState(cell + 40) = 1 AND boardState(cell + 38) = 3 AND boardState(cell + 61) = 0 THEN
+    boardState(cell) = 3: boardState(cell + 19) = 1
+
+    GOTO 2
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell + 19) = 3 AND boardState(cell + 21) = 3 AND boardState(cell + 40) = 1 AND boardState(cell + 38) = 1 AND boardState(cell + 61) = 0 THEN
+    boardState(cell) = 3: boardState(cell + 19) = 1
+
+    GOTO 2
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell + 19) = 3 AND boardState(cell + 21) = 0 AND boardState(cell + 40) = 1 AND boardState(cell + 38) = 1 AND boardState(cell + 61) = 0 THEN
+    boardState(cell) = 3: boardState(cell + 19) = 1
+
+    GOTO 2
+  END IF
+
+  IF boardState(cell - 2) = 1 AND boardState(cell + 19) = 3 AND boardState(cell) = 3 AND boardState(cell + 40) = 1 AND boardState(cell + 38) = 3 AND boardState(cell + 61) = 0 THEN
+    boardState(cell - 2) = 3: boardState(cell + 19) = 1
+
+    GOTO 2
+  END IF
+  IF boardState(cell - 2) = 1 AND boardState(cell + 19) = 3 AND boardState(cell) = 1 AND boardState(cell + 40) = 1 AND boardState(cell + 38) = 3 AND boardState(cell + 61) = 0 THEN
+    boardState(cell - 2) = 3: boardState(cell + 19) = 1
+
+    GOTO 2
+  END IF
+  IF boardState(cell - 2) = 1 AND boardState(cell + 19) = 3 AND boardState(cell) = 3 AND boardState(cell + 40) = 1 AND boardState(cell + 38) = 1 AND boardState(cell + 61) = 0 THEN
+    boardState(cell - 2) = 3: boardState(cell + 19) = 1
+
+    GOTO 2
+  END IF
+  IF boardState(cell - 2) = 1 AND boardState(cell + 19) = 3 AND boardState(cell) = 1 AND boardState(cell + 40) = 1 AND boardState(cell + 38) = 1 AND boardState(cell + 61) = 0 THEN
+    boardState(cell - 2) = 3: boardState(cell + 19) = 1
+
+    GOTO 2
+  END IF
+NEXT cell
+
+' Check for possible moves to the board edges (to protect own pieces)
+FOR cell = 1 TO 200
+  IF boardState(cell) = 1 AND boardState(cell + 2) = 4 AND boardState(cell + 21) = 3 THEN
+    boardState(cell) = 3: boardState(cell + 21) = 1
+
+    GOTO 2
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell - 2) = 4 AND boardState(cell + 19) = 3 THEN
+    boardState(cell) = 3: boardState(cell + 19) = 1
+
+    GOTO 2
+  END IF
+NEXT cell
+
+' Check for possible moves to the corner (safe moves)
+FOR cell = 1 TO 200
+  IF boardState(cell) = 1 AND boardState(cell + 19) = 3 AND boardState(cell + 38) = 3 AND boardState(cell + 40) = 3 THEN
+    boardState(cell) = 3: boardState(cell + 19) = 1
+
+    GOTO 2
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell + 21) = 3 AND boardState(cell + 42) = 3 AND boardState(cell + 40) = 3 THEN
+    boardState(cell) = 3: boardState(cell + 21) = 1
+
+    GOTO 2
+  END IF
+
+  IF boardState(cell) = 1 AND boardState(cell + 19) = 3 AND boardState(cell + 38) = 1 AND boardState(cell + 40) = 3 THEN
+    boardState(cell) = 3: boardState(cell + 19) = 1
+
+    GOTO 2
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell + 21) = 3 AND boardState(cell + 42) = 1 AND boardState(cell + 40) = 3 THEN
+    boardState(cell) = 3: boardState(cell + 21) = 1
+
+    GOTO 2
+  END IF
+
+  IF boardState(cell) = 1 AND boardState(cell + 19) = 3 AND boardState(cell + 38) = 3 AND boardState(cell + 40) = 1 THEN
+    boardState(cell) = 3: boardState(cell + 19) = 1
+
+    GOTO 2
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell + 21) = 3 AND boardState(cell + 42) = 3 AND boardState(cell + 40) = 1 THEN
+    boardState(cell) = 3: boardState(cell + 21) = 1
+
+    GOTO 2
+  END IF
+
+  IF boardState(cell) = 1 AND boardState(cell + 19) = 3 AND boardState(cell + 38) = 1 AND boardState(cell + 40) = 1 THEN
+    boardState(cell) = 3: boardState(cell + 19) = 1
+
+    GOTO 2
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell + 21) = 3 AND boardState(cell + 42) = 1 AND boardState(cell + 40) = 1 THEN
+    boardState(cell) = 3: boardState(cell + 21) = 1
+
+    GOTO 2
+  END IF
+NEXT cell
+
+' Check for any remaining moves that can be made
+FOR cell = 1 TO 200
+  IF boardState(cell) = 1 AND boardState(cell + 21) = 3 THEN
+    boardState(cell) = 3: boardState(cell + 21) = 1
+
+    GOTO 2
+  END IF
+  IF boardState(cell) = 1 AND boardState(cell + 19) = 3 THEN
+    boardState(cell) = 3: boardState(cell + 19) = 1
+
+    GOTO 2
+  END IF
+NEXT cell
+LOCATE 4, 5
+PRINT " Y O U   W O N !"
+END
+GOTO 3
+2
+UpdateDisplay
+9
+END SUB
+
+SUB HandleInput
+    DIM tempImage(1000)
+
+    inputPhase = 1
+
+    5
+    cursorX = ax1
+    cursorY = ax2
+
+    7
+    IF inputPhase = 1 THEN
+        LOCATE 1, 60
+        PRINT "From where ?"
+    END IF
+    IF inputPhase = 2 THEN
+        LOCATE 1, 60
+        PRINT "To where ?  "
+    END IF
+
+
+    selectedCell = (((cursorY \ 18) - 1) * 20) + (cursorX \ 40)
+    'LOCATE 2, 60
+    'PRINT selectedCell
+
+    GET (cursorX, cursorY)-(cursorX + 10, cursorY + 10), tempImage
+    PUT (cursorX, cursorY), cursorImage, PSET
+
+    key$ = INPUT$(1)
+    PUT (cursorX, cursorY), tempImage, PSET
+
+    IF inputPhase = 2 AND key$ = CHR$(13) THEN
+        destinationCell = selectedCell
+        cursorX = ax1
+        cursorY = ax2
+        GOTO 8
+    END IF
+    IF inputPhase = 1 AND key$ = CHR$(13) THEN
+        sourceCell = selectedCell
+        inputPhase = 2
+    END IF
+
+    IF key$ = "q" THEN
+        END
+    END IF
+    IF key$ = "s" THEN
+        cursorX = cursorX + 40
+    END IF
+    IF key$ = "a" THEN
+        cursorX = cursorX - 40
+    END IF
+    IF key$ = "w" THEN
+        cursorY = cursorY - 18
+    END IF
+    IF key$ = "z" THEN
+        cursorY = cursorY + 18
+    END IF
+
+    IF cursorX < 1 THEN
+        cursorX = 1
+    END IF
+
+    IF cursorY < 1 THEN
+        cursorY = 1
+    END IF
+
+    GOTO 7
+
+    8
+    moveMade = 1
+
+    'LOCATE 3, 60
+    'PRINT sourceCell; "-"; destinationCell
+
+    10
+
+    ' This section controls the movement of pieces on the board
+    IF sourceCell = destinationCell + 19 AND boardState(sourceCell) = 0 AND boardState(destinationCell) = 3 THEN
+        BEEP
+        SWAP boardState(sourceCell), boardState(destinationCell)
+    END IF
+    IF sourceCell = destinationCell + 21 AND boardState(sourceCell) = 0 AND boardState(destinationCell) = 3 THEN
+        BEEP
+        SWAP boardState(sourceCell), boardState(destinationCell)
+    END IF
+
+    captureMade = 0
+
+    IF sourceCell = destinationCell + 42 AND boardState(sourceCell) = 0 AND boardState(destinationCell) = 3 AND boardState(destinationCell + 21) = 1 THEN
+        BEEP
+        SWAP boardState(sourceCell), boardState(destinationCell)
+        boardState(destinationCell + 21) = 3
+        captureMade = 1
+    END IF
+    IF sourceCell = destinationCell + 38 AND boardState(sourceCell) = 0 AND boardState(destinationCell) = 3 AND boardState(destinationCell + 19) = 1 THEN
+        BEEP
+        SWAP boardState(sourceCell), boardState(destinationCell)
+        boardState(destinationCell + 19) = 3
+        captureMade = 1
+    END IF
+    IF sourceCell = destinationCell - 42 AND boardState(sourceCell) = 0 AND boardState(destinationCell) = 3 AND boardState(destinationCell - 21) = 1 THEN
+        BEEP
+        SWAP boardState(sourceCell), boardState(destinationCell)
+        boardState(destinationCell - 21) = 3
+        captureMade = 1
+    END IF
+    IF sourceCell = destinationCell - 38 AND boardState(sourceCell) = 0 AND boardState(destinationCell) = 3 AND boardState(destinationCell - 19) = 1 THEN
+        BEEP
+        SWAP boardState(sourceCell), boardState(destinationCell)
+        boardState(destinationCell - 19) = 3
+        captureMade = 1
+    END IF
+
+    UpdateDisplay
+
+    IF captureMade = 1 THEN
+        CheckPossibleMoves
+        IF hasMove = 1 THEN
+            SOUND 1234, 1
+            inputPhase = 2
+            sourceCell = destinationCell
+            GOTO 5
+        END IF
+    END IF
+
+    6
+END SUB
diff --git a/Games/checkers2.bas b/Games/checkers2.bas
new file mode 100755 (executable)
index 0000000..ca58775
--- /dev/null
@@ -0,0 +1,501 @@
+' Game of checkers. Supports basic moves. Incomplete.
+'
+' This program is free software: released under Creative Commons Zero (CC0) license
+' by Svjatoslav Agejenko.
+' Email: svjatoslav@svjatoslav.eu
+' Homepage: http://www.svjatoslav.eu
+'
+' Changelog:
+' 2001, Initial version
+' 2024, Improved program readability
+
+DECLARE SUB compki (m%, h%, x1%, y1%)
+DECLARE SUB compgo2 (h%)
+DECLARE SUB compgo (h%)
+DECLARE SUB humngo (h%)
+DefInt A-Z
+
+DECLARE SUB thinkc ()
+DECLARE SUB thinkh ()
+DECLARE SUB cmd (a$)
+DECLARE SUB freet ()
+DECLARE SUB prn (x%, y%, c%, a$)
+DECLARE SUB msg (a$, c)
+DECLARE SUB getfnt ()
+DECLARE SUB playg ()
+DECLARE SUB geth ()
+DECLARE SUB start ()
+DECLARE SUB mklau ()
+DECLARE SUB showr (x, y)
+DECLARE SUB show ()
+Dim Shared font(0 To 7, 0 To 7, 0 To 255)
+Dim Shared siz, fi, ri, rs
+Dim Shared stri$
+Dim Shared humx1, humy1, humx2, humy2
+Dim Shared sug, smax
+Dim Shared npos As Long
+Dim Shared cx1, cy1, cx2, cy2
+
+siz = 6 ' Board size
+fi = 0
+ri = 2
+smax = 3 ' thinking depth
+
+Dim Shared lau(-1 To siz + 2, -1 To siz + 2)
+
+start
+mklau
+show
+playg
+
+Sub cmd (a$)
+    mitus = 0
+    Dim sona$(1 To 10)
+    For b = 1 To 10
+        sona$(b) = ""
+    Next b
+
+    d = 1
+    e = 1
+    For b = 1 To Len(a$)
+        c$ = Right$(Left$(a$, b), 1)
+        If c$ = " " Then
+            If e = 0 Then d = d + 1: e = 1
+            GoTo 4
+        End If
+        e = 0
+        sona$(d) = sona$(d) + c$
+        4
+    Next b
+    If e = 1 Then d = d - 1
+    mitus = d
+
+    Select Case sona$(1)
+        Case "m"
+            If humx1 > 0 Then msg "Move replaced.", 14
+
+            humx1 = Asc(Left$(sona$(2), 1)) - 64
+            If humx1 > 32 Then humx1 = humx1 - 32
+            humy1 = Val(Right$(sona$(2), Len(sona$(2)) - 1))
+            humx2 = Asc(Left$(sona$(3), 1)) - 64
+            If humx2 > 32 Then humx2 = humx2 - 32
+            humy2 = Val(Right$(sona$(3), Len(sona$(2)) - 1))
+
+        Case "h"
+            msg "h - display help screen", 14
+            msg "q - to quit", 14
+            msg "m <from> <to> - make move", 14
+            msg "n - no. positions processed", 14
+
+        Case "q"
+            System
+
+        Case "n"
+            b$ = "positions processed:" + Str$(npos)
+            msg b$, 14
+
+    End Select
+
+End Sub
+
+Sub compgo (h)
+    If sug > smax Then h = 0: GoTo 6
+    sug = sug + 1
+    npos = npos + 1
+    freet
+    If sug = 1 Then h1 = -2000 Else h1 = -1000
+
+    'cx1 = x: cy1 = y: cx2 = x - 1: cy2 = y + 1
+    b = 0
+    c = 0
+    m = 0
+    For y = 1 To siz ' check for eating
+        For x = 1 To siz
+            If lau(x, y) = 1 Then
+                8
+                If (lau(x - 1, y + 1) = 2) And (lau(x - 2, y + 2) = 0) Then
+                    Swap lau(x, y), lau(x - 2, y + 2)
+                    lau(x - 1, y + 1) = 0
+                    compki m1, h2, x - 2, y + 2
+                    lau(x - 1, y + 1) = 2
+                    Swap lau(x, y), lau(x - 2, y + 2)
+                    m1 = m1 + 1
+                    If m1 > m Then m = m1: h1 = -1000
+                    If m1 = m Then
+                        If h2 + 1 > h1 Then
+                            h1 = h2 + 1
+                            If npos = 1 Then cx1 = x: cy1 = y: cx2 = x - 2: cy2 = y + 2
+                        End If
+                    End If
+                    b = 1
+                End If
+
+                If (lau(x + 1, y + 1) = 2) And (lau(x + 2, y + 2) = 0) Then
+                    Swap lau(x, y), lau(x + 2, y + 2)
+                    lau(x + 1, y + 1) = 0
+                    compki m1, h2, x + 2, y + 2
+                    lau(x + 1, y + 1) = 2
+                    Swap lau(x, y), lau(x + 2, y + 2)
+                    m1 = m1 + 1
+                    If m1 > m Then m = m1: h1 = -1000
+                    If m1 = m Then
+                        If h2 + 1 > h1 Then
+                            h1 = h2 + 1
+                            If npos = 1 Then cx1 = x: cy1 = y: cx2 = x + 2: cy2 = y + 2
+                        End If
+                    End If
+                    b = 1
+                End If
+
+                If (lau(x - 1, y - 1) = 2) And (lau(x - 2, y - 2) = 0) Then
+                    Swap lau(x, y), lau(x - 2, y - 2)
+                    lau(x - 1, y - 1) = 0
+                    compki m1, h2, x - 2, y - 2
+                    lau(x - 1, y - 1) = 2
+                    Swap lau(x, y), lau(x - 2, y - 2)
+                    m1 = m1 + 1
+                    If m1 > m Then m = m1: h1 = -1000
+                    If m1 = m Then
+                        If h2 + 1 > h1 Then
+                            h1 = h2 + 1
+                            If npos = 1 Then cx1 = x: cy1 = y: cx2 = x - 2: cy2 = y - 2
+                        End If
+                    End If
+                    b = 1
+                End If
+
+                If (lau(x + 1, y - 1) = 2) And (lau(x + 2, y - 2) = 0) Then
+                    Swap lau(x, y), lau(x + 2, y - 2)
+                    lau(x + 1, y - 1) = 0
+                    compki m1, h2, x + 2, y - 2
+                    lau(x + 1, y - 1) = 2
+                    Swap lau(x, y), lau(x + 2, y - 2)
+                    m1 = m1 + 1
+                    If m1 > m Then m = m1: h1 = -1000
+                    If m1 = m Then
+                        If h2 + 1 > h1 Then
+                            h1 = h2 + 1
+                            If npos = 1 Then cx1 = x: cy1 = y: cx2 = x + 2: cy2 = y - 2
+                        End If
+                    End If
+                    b = 1
+                End If
+
+                If c = 1 Then GoTo 9
+            End If
+        Next x
+    Next y
+
+    9
+    If (b = 1) And (npos = 1) Then
+        cx3 = (cx1 + cx2) / 2
+        cy3 = (cy1 + cy2) / 2
+        lau(cx3, cy3) = 0
+        showr cx3, cy3
+
+        Swap lau(cx1, cy1), lau(cx2, cy2)
+        showr cx1, cy1
+        showr cx2, cy2
+        msg "NJAM!", 10
+        x = cx2
+        y = cy2
+        c = 1
+        b = 0
+        GoTo 8
+    End If
+    If c = 1 Then
+        cx1 = 1: cy1 = 1: cx2 = 1: cy2 = 1
+        GoTo 10
+    End If
+
+    If sug = 1 Then
+        msg "Cannot eat.", 4
+        msg Str$(h1), 4
+    End If
+
+    For y = 1 To siz ' unuseful move
+        For x = 1 To siz
+            If lau(x, y) = 1 Then
+                If lau(x - 1, y + 1) = 0 Then
+                    Swap lau(x, y), lau(x - 1, y + 1)
+                    humngo h2
+                    Swap lau(x, y), lau(x - 1, y + 1)
+                    If h2 > h1 Then
+                        h1 = h2
+                        If sug = 1 Then cx1 = x: cy1 = y: cx2 = x - 1: cy2 = y + 1
+                    End If
+                End If
+
+                If lau(x + 1, y + 1) = 0 Then
+                    Swap lau(x, y), lau(x + 1, y + 1)
+                    humngo h2
+                    Swap lau(x, y), lau(x + 1, y + 1)
+                    If h2 > h1 Then
+                        h1 = h2
+                        If sug = 1 Then cx1 = x: cy1 = y: cx2 = x + 1: cy2 = y + 1
+                    End If
+                End If
+
+            End If
+        Next x
+    Next y
+    h = h1
+    10
+    sug = sug - 1
+    6
+End Sub
+
+Sub compki (m, h, x1, y1)
+    h1 = 0
+
+    For y = 1 To siz
+        For x = 1 To siz
+        Next x
+    Next y
+    h = h1
+
+End Sub
+
+Sub freet
+    a$ = InKey$
+    If a$ = "" Then
+    Else
+        If a$ = Chr$(8) Then
+            If Len(stri$) > 0 Then
+                stri$ = Left$(stri$, Len(stri$) - 1): GoTo 3
+            End If
+        End If
+        If a$ = Chr$(13) Then
+            If Len(stri$) > 0 Then
+                msg stri$, 7
+                cmd stri$
+                stri$ = ""
+            End If
+            GoTo 3
+        End If
+        stri$ = stri$ + a$
+        3
+        Line (400, 468)-(639, 479), 1, BF
+        prn 405, 469, 14, stri$
+    End If
+End Sub
+
+Sub getfnt
+    Screen 13
+    For a = 0 To 255
+        If (a > 5) And (a < 17) Then GoTo 2
+        Locate 1, 1
+        Print Chr$(a)
+        2
+        For y = 0 To 7
+            For x = 0 To 7
+                font(x, y, a) = Point(x, y)
+            Next x
+        Next y
+    Next a
+
+End Sub
+
+Sub humngo (h)
+    npos = npos + 1
+    h1 = 1000
+
+    For y = siz To 1 Step -1
+        For x = siz To 1 Step -1
+            If lau(x, y) = 2 Then
+                If lau(x - 1, y - 1) = 0 Then
+                    Swap lau(x, y), lau(x - 1, y - 1)
+                    compgo h2
+                    Swap lau(x, y), lau(x - 1, y - 1)
+                    If h2 < h1 Then h1 = h2
+                End If
+
+                If lau(x + 1, y - 1) = 0 Then
+                    Swap lau(x, y), lau(x + 1, y - 1)
+                    compgo h2
+                    Swap lau(x, y), lau(x + 1, y - 1)
+                    If h2 < h1 Then h1 = h2
+                End If
+
+                If (lau(x - 1, y - 1) = 1) And (lau(x - 2, y - 2) = 0) Then
+                    Swap lau(x, y), lau(x - 2, y - 2)
+                    lau(x - 1, y - 1) = 0
+                    humngo h2
+                    lau(x - 1, y - 1) = 1
+                    Swap lau(x, y), lau(x - 2, y - 2)
+                    If h2 - 1 < h1 Then h1 = h2 - 1
+                End If
+
+                If (lau(x + 1, y - 1) = 1) And (lau(x + 2, y - 2) = 0) Then
+                    Swap lau(x, y), lau(x + 2, y - 2)
+                    lau(x + 1, y - 1) = 0
+                    humngo h2
+                    lau(x + 1, y - 1) = 1
+                    Swap lau(x, y), lau(x + 2, y - 2)
+                    If h2 - 1 < h1 Then h1 = h2 - 1
+                End If
+
+            End If
+        Next x
+    Next y
+    h = h1
+End Sub
+
+Sub mklau
+    For y = -1 To siz + 2
+        For x = -1 To siz + 2
+            lau(x, y) = -1
+        Next x
+    Next y
+
+    For y = 1 To siz
+        For x = 1 To siz
+            lau(x, y) = 0
+        Next x
+    Next y
+
+    For y = 1 To ri
+        For x = 1 To siz
+            If (x + y + fi) / 2 = Int((x + y + fi) / 2) Then
+                lau(x, y) = 1
+            End If
+        Next x
+    Next y
+
+    For y = siz - ri + 1 To siz
+        For x = 1 To siz
+            If (x + y + fi) / 2 = Int((x + y + fi) / 2) Then
+                lau(x, y) = 2
+            End If
+        Next x
+    Next y
+
+End Sub
+
+Sub msg (a$, c)
+    Dim buf(1 To 10000)
+    For x = 400 To 630 Step 40
+        Get (x, 8)-(x + 39, 467), buf(1)
+        Put (x, 0), buf(1), PSet
+    Next x
+    Line (400, 460)-(639, 467), 0, BF
+    prn 405, 460, c, a$
+End Sub
+
+Sub playg
+    'GOTO 7
+    1
+    thinkc
+    show
+    7
+    thinkh
+    show
+    GoTo 1
+
+End Sub
+
+Sub prn (x, y, c, a$)
+    x1 = x
+    y1 = y
+    For a = 1 To Len(a$)
+        b = Asc(Right$(Left$(a$, a), 1))
+        For y2 = 0 To 7
+            For x2 = 0 To 7
+                If font(x2, y2, b) > 0 Then PSet (x2 + x1, y2 + y1), c
+            Next x2
+        Next y2
+        x1 = x1 + 8
+    Next a
+End Sub
+
+Sub show
+    For y = 1 To siz
+        For x = 1 To siz
+            showr x, y
+        Next x
+    Next y
+
+    sp = rs / 2
+    For x = 1 To siz
+        prn ((x - 1) * rs + 12 + sp), 2, 10, Chr$(64 + x)
+        prn ((x - 1) * rs + 12 + sp), siz * rs + 11, 10, Chr$(64 + x)
+    Next x
+
+    For y = 1 To siz
+        a$ = Str$(y)
+        a$ = Right$(a$, Len(a$) - 1)
+        prn 15 - (Len(a$) * 8), (y - 1) * rs + sp + 7, 10, a$
+        prn (siz * rs + 16), (y - 1) * rs + sp + 7, 10, a$
+    Next y
+
+End Sub
+
+Sub showr (x, y)
+    If (x + y + fi) / 2 = Int((x + y + fi) / 2) Then c = 8 Else c = 7
+    x1 = (x - 1) * rs + 15
+    y1 = (y - 1) * rs + 10
+    Line (x1, y1)-(x1 + rs - 1, y1 + rs - 1), c, BF
+
+    If lau(x, y) > 0 Then
+        sp = rs / 2
+        If lau(x, y) = 1 Then c1 = 15 Else c1 = 14
+        Circle (x1 + sp, y1 + sp), sp - 1, c1
+        Paint (x1 + sp, y1 + sp), c1
+    End If
+End Sub
+
+Sub start
+    getfnt
+    Screen 12
+    Line (399, 0)-(399, 479), 13
+    msg "Type 'h' for help.", 14
+
+    rs = Int(370 / siz)
+
+End Sub
+
+Sub thinkc
+    msg "Computer turn.", 14
+    sug = 0
+    npos = 0
+    cx1 = -1
+
+    compgo h
+    cmd "n"
+    If cx1 = -1 Then msg "You won!", 10: msg "--------", 10: System
+
+    If h <= -2 Then msg "Oh no...", 10
+    If h = -1 Then msg "Oops!", 10
+    If h = 1 Then msg "Yess! I will eat soon!", 10
+    If h >= 2 Then msg "HA HA HA YOU ARE IN TROUBLE!", 10
+
+    If Abs(cx1 - cx2) = 2 Then
+        cx3 = (cx1 + cx2) / 2
+        cy3 = (cy1 + cy2) / 2
+        lau(cx3, cy3) = 0
+        showr cx3, cy3
+    End If
+
+    Swap lau(cx1, cy1), lau(cx2, cy2)
+    showr cx1, cy1
+    showr cx2, cy2
+
+End Sub
+
+Sub thinkh
+    msg "Your turn.", 14
+    5
+    freet
+    If humx1 = 0 Then GoTo 5
+    Swap lau(humx2, humy2), lau(humx1, humy1)
+    showr humx1, humy1
+    showr humx2, humy2
+    If Abs(humx1 - humx2) = 2 Then
+        cx3 = (humx1 + humx2) / 2
+        cy3 = (humy1 + humy2) / 2
+        lau(cx3, cy3) = 0
+        showr cx3, cy3
+    End If
+
+    humx1 = 0
+End Sub
diff --git a/Games/checkers2.png b/Games/checkers2.png
new file mode 100644 (file)
index 0000000..9b4dbf4
Binary files /dev/null and b/Games/checkers2.png differ
diff --git a/Math/3dlife.dat b/Math/3dlife.dat
new file mode 100644 (file)
index 0000000..17b0e10
--- /dev/null
@@ -0,0 +1,13 @@
+.....#.#.....\r
+...##...##...\r
+..#.......#..\r
+.#..##.##..#.\r
+.#.#.....#.#.\r
+#..#.###.#..#\r
+.....#.#.....\r
+#..#.###.#..#\r
+.#.#.....#.#.\r
+.#..##.##..#.\r
+..#.......#..\r
+...##...##...\r
+.....#.#.....\r
diff --git a/Math/Game of life in 3D.bas b/Math/Game of life in 3D.bas
new file mode 100755 (executable)
index 0000000..70652ec
--- /dev/null
@@ -0,0 +1,363 @@
+' Program renders rotating 3D animation from cubes.
+' Cubes appear and disappear according to Conway's Game of Life rules.
+'
+' This program is free software: released under Creative Commons Zero (CC0) license
+' by Svjatoslav Agejenko.
+' Email: svjatoslav@svjatoslav.eu
+' Homepage: http://www.svjatoslav.eu
+'
+' Changelog:
+' ~2000, Initial version
+' 2024 - 2025, Improved program readability
+
+DECLARE SUB PlaceCube (xCoordinate!, yCoordinate!, zCoordinate!)
+DECLARE SUB DrawScene ()
+DECLARE SUB Generate3DScene ()
+DECLARE SUB UpdateCollisionData ()
+DECLARE SUB InitializeGame ()
+
+DIM SHARED totalPoints, totalLines, currentPointCount, currentLineCount
+DIM SHARED pointXCoordinates(1 TO 3000), pointYCoordinates(1 TO 3000), pointZCoordinates(1 TO 3000)
+DIM SHARED renderedPointXCoordinates(1 TO 7000), renderedPointYCoordinates(1 TO 7000)
+DIM SHARED previousRenderedPointXCoordinates(0 TO 9000), previousRenderedPointYCoordinates(0 TO 9000)
+DIM SHARED previousPointCount, previousLineCount
+DIM SHARED lineVertex1Indices(1 TO 3800), lineVertex2Indices(1 TO 3800), lineColorValues(1 TO 3800)
+DIM SHARED previousLineVertex1Indices(1 TO 3800), previousLineVertex2Indices(1 TO 3800)
+DIM SHARED cameraPositionX, cameraPositionY, cameraPositionZ
+DIM SHARED previousCameraPositionX, previousCameraPositionY, previousCameraPositionZ
+DIM SHARED rotationAngle1, rotationAngle2
+DIM SHARED rotationAngle1String, rotationAngle2String
+DIM SHARED currentFrameCount
+DIM SHARED currentGameOfLifeGrid(1 TO 50, 1 TO 50)
+DIM SHARED nextGameOfLifeGrid(1 TO 50, 1 TO 50)
+
+' Main program
+InitializeGame
+rotationAngle1 = 1.5
+
+10
+currentFrameCount = currentFrameCount + 1
+Generate3DScene
+DrawScene
+
+cameraPositionX = SIN(currentFrameCount / 20) * 12
+cameraPositionY = SIN(currentFrameCount / 50) * 10 + 15
+cameraPositionZ = COS(currentFrameCount / 20) * 12
+rotationAngle1 = rotationAngle1 - .05
+rotationAngle2 = 2.2 + SIN(currentFrameCount / 50) / 2
+
+inputKey$ = INKEY$
+IF inputKey$ <> "" THEN SYSTEM
+GOTO 10
+
+SUB Generate3DScene
+    ' This subroutine generates 3D scene of cubes based on the current state of the Game of Life grid.
+    ' It iterates over the grid and places cubes where the grid cells are alive.
+    ' It also updates the grid based on Conway's Game of Life rules every 10 frames.
+
+    currentPointCount = totalPoints
+    currentLineCount = totalLines
+
+    FOR y = 1 TO 50
+        FOR x = 1 TO 50
+            IF currentGameOfLifeGrid(x, y) = 1 THEN
+                value = ABS(x - 26) + ABS(y - 26) + currentFrameCount
+                PlaceCube x - 25, SIN(value / 5) * 5, y - 25
+            END IF
+        NEXT x
+    NEXT y
+
+    IF currentFrameCount \ 10 = currentFrameCount / 10 THEN ' activate every 10-th frame to update grid
+        FOR y = 2 TO 49
+            FOR x = 2 TO 49
+                neighborCount = currentGameOfLifeGrid(x - 1, y - 1)
+                neighborCount = neighborCount + currentGameOfLifeGrid(x, y - 1)
+                neighborCount = neighborCount + currentGameOfLifeGrid(x + 1, y - 1)
+                neighborCount = neighborCount + currentGameOfLifeGrid(x - 1, y)
+                neighborCount = neighborCount + currentGameOfLifeGrid(x + 1, y)
+                neighborCount = neighborCount + currentGameOfLifeGrid(x - 1, y + 1)
+                neighborCount = neighborCount + currentGameOfLifeGrid(x, y + 1)
+                neighborCount = neighborCount + currentGameOfLifeGrid(x + 1, y + 1)
+
+                IF currentGameOfLifeGrid(x, y) = 1 THEN
+                    IF (neighborCount > 3) OR (neighborCount < 2) THEN
+                        nextGameOfLifeGrid(x, y) = 0
+                    ELSE
+                        nextGameOfLifeGrid(x, y) = 1
+                    END IF
+                ELSE
+                    IF neighborCount = 3 THEN
+                        nextGameOfLifeGrid(x, y) = 1
+                    ELSE
+                        nextGameOfLifeGrid(x, y) = 0
+                    END IF
+                END IF
+            NEXT x
+        NEXT y
+
+        FOR y = 1 TO 50
+            FOR x = 1 TO 50
+                currentGameOfLifeGrid(x, y) = nextGameOfLifeGrid(x, y)
+            NEXT x
+        NEXT y
+    END IF
+END SUB
+
+SUB InitializeEnvironment
+    ' This subroutine initializes the environment by creating a grid of points and lines.
+    ' It sets up the initial state of the points and lines arrays.
+
+    FOR z = -5 TO 5
+        FOR x = -5 TO 5
+            currentPointCount = currentPointCount + 1
+            pointXCoordinates(currentPointCount) = x
+            pointYCoordinates(currentPointCount) = 0
+            pointZCoordinates(currentPointCount) = z
+
+            IF x > -5 THEN
+                currentLineCount = currentLineCount + 1
+                lineVertex1Indices(currentLineCount) = currentPointCount
+                lineVertex2Indices(currentLineCount) = currentPointCount - 1
+                lineColorValues(currentLineCount) = 1
+            END IF
+
+            IF z > -5 THEN
+                currentLineCount = currentLineCount + 1
+                lineVertex1Indices(currentLineCount) = currentPointCount
+                lineVertex2Indices(currentLineCount) = currentPointCount - 10
+                lineColorValues(currentLineCount) = 1
+            END IF
+        NEXT x
+    NEXT z
+
+    totalPoints = currentPointCount
+    totalLines = currentLineCount
+END SUB
+
+SUB PlaceCube (xCoordinate, yCoordinate, zCoordinate)
+    ' This subroutine places a cube at the specified coordinates (xCoordinate, yCoordinate, zCoordinate).
+    ' It defines the vertices and edges of the cube and stores them in the respective arrays.
+
+    colorValue = 3
+
+    ' Define the edges of the cube
+    currentLineCount = currentLineCount + 1
+    lineVertex1Indices(currentLineCount) = currentPointCount + 1
+    lineVertex2Indices(currentLineCount) = currentPointCount + 2
+    lineColorValues(currentLineCount) = colorValue
+
+    currentLineCount = currentLineCount + 1
+    lineVertex1Indices(currentLineCount) = currentPointCount + 2
+    lineVertex2Indices(currentLineCount) = currentPointCount + 3
+    lineColorValues(currentLineCount) = colorValue
+
+    currentLineCount = currentLineCount + 1
+    lineVertex1Indices(currentLineCount) = currentPointCount + 3
+    lineVertex2Indices(currentLineCount) = currentPointCount + 4
+    lineColorValues(currentLineCount) = colorValue
+
+    currentLineCount = currentLineCount + 1
+    lineVertex1Indices(currentLineCount) = currentPointCount + 4
+    lineVertex2Indices(currentLineCount) = currentPointCount + 1
+    lineColorValues(currentLineCount) = colorValue
+
+    currentLineCount = currentLineCount + 1
+    lineVertex1Indices(currentLineCount) = currentPointCount + 5
+    lineVertex2Indices(currentLineCount) = currentPointCount + 6
+    lineColorValues(currentLineCount) = colorValue
+
+    currentLineCount = currentLineCount + 1
+    lineVertex1Indices(currentLineCount) = currentPointCount + 6
+    lineVertex2Indices(currentLineCount) = currentPointCount + 7
+    lineColorValues(currentLineCount) = colorValue
+
+    currentLineCount = currentLineCount + 1
+    lineVertex1Indices(currentLineCount) = currentPointCount + 7
+    lineVertex2Indices(currentLineCount) = currentPointCount + 8
+    lineColorValues(currentLineCount) = colorValue
+
+    currentLineCount = currentLineCount + 1
+    lineVertex1Indices(currentLineCount) = currentPointCount + 8
+    lineVertex2Indices(currentLineCount) = currentPointCount + 5
+    lineColorValues(currentLineCount) = colorValue
+
+    currentLineCount = currentLineCount + 1
+    lineVertex1Indices(currentLineCount) = currentPointCount + 1
+    lineVertex2Indices(currentLineCount) = currentPointCount + 5
+    lineColorValues(currentLineCount) = colorValue
+
+    currentLineCount = currentLineCount + 1
+    lineVertex1Indices(currentLineCount) = currentPointCount + 2
+    lineVertex2Indices(currentLineCount) = currentPointCount + 6
+    lineColorValues(currentLineCount) = colorValue
+
+    currentLineCount = currentLineCount + 1
+    lineVertex1Indices(currentLineCount) = currentPointCount + 3
+    lineVertex2Indices(currentLineCount) = currentPointCount + 7
+    lineColorValues(currentLineCount) = colorValue
+
+    currentLineCount = currentLineCount + 1
+    lineVertex1Indices(currentLineCount) = currentPointCount + 4
+    lineVertex2Indices(currentLineCount) = currentPointCount + 8
+    lineColorValues(currentLineCount) = colorValue
+
+    ' Define the vertices of the cube
+    currentPointCount = currentPointCount + 1
+    pointXCoordinates(currentPointCount) = xCoordinate - .5
+    pointYCoordinates(currentPointCount) = yCoordinate
+    pointZCoordinates(currentPointCount) = zCoordinate - .5
+
+    currentPointCount = currentPointCount + 1
+    pointXCoordinates(currentPointCount) = xCoordinate + .5
+    pointYCoordinates(currentPointCount) = yCoordinate
+    pointZCoordinates(currentPointCount) = zCoordinate - .5
+
+    currentPointCount = currentPointCount + 1
+    pointXCoordinates(currentPointCount) = xCoordinate + .5
+    pointYCoordinates(currentPointCount) = yCoordinate
+    pointZCoordinates(currentPointCount) = zCoordinate + .5
+
+    currentPointCount = currentPointCount + 1
+    pointXCoordinates(currentPointCount) = xCoordinate - .5
+    pointYCoordinates(currentPointCount) = yCoordinate
+    pointZCoordinates(currentPointCount) = zCoordinate + .5
+
+    currentPointCount = currentPointCount + 1
+    pointXCoordinates(currentPointCount) = xCoordinate - .5
+    pointYCoordinates(currentPointCount) = yCoordinate + 1
+    pointZCoordinates(currentPointCount) = zCoordinate - .5
+
+    currentPointCount = currentPointCount + 1
+    pointXCoordinates(currentPointCount) = xCoordinate + .5
+    pointYCoordinates(currentPointCount) = yCoordinate + 1
+    pointZCoordinates(currentPointCount) = zCoordinate - .5
+
+    currentPointCount = currentPointCount + 1
+    pointXCoordinates(currentPointCount) = xCoordinate + .5
+    pointYCoordinates(currentPointCount) = yCoordinate + 1
+    pointZCoordinates(currentPointCount) = zCoordinate + .5
+
+    currentPointCount = currentPointCount + 1
+    pointXCoordinates(currentPointCount) = xCoordinate - .5
+    pointYCoordinates(currentPointCount) = yCoordinate + 1
+    pointZCoordinates(currentPointCount) = zCoordinate + .5
+END SUB
+
+SUB DrawScene
+    ' This subroutine renders the scene by transforming the 3D coordinates of the points to 2D screen coordinates
+    ' and drawing the lines between the points. It uses trigonometric functions to rotate and project the 3D points onto the 2D screen.
+
+    sineAngle1 = SIN(rotationAngle1)
+    cosineAngle1 = COS(rotationAngle1)
+    sineAngle2 = SIN(rotationAngle2)
+    cosineAngle2 = COS(rotationAngle2)
+
+    FOR index = 1 TO currentPointCount
+        x = pointXCoordinates(index) + cameraPositionX
+        y = pointYCoordinates(index) - cameraPositionY
+        z = pointZCoordinates(index) + cameraPositionZ
+
+        transformedX = x * sineAngle1 - z * cosineAngle1
+        transformedZ = x * cosineAngle1 + z * sineAngle1
+        transformedY = y * sineAngle2 - transformedZ * cosineAngle2
+        transformedZ2 = y * cosineAngle2 + transformedZ * sineAngle2
+
+        IF transformedZ2 < .5 THEN
+            renderedPointXCoordinates(index) = -1
+        ELSE
+            renderedPointXCoordinates(index) = 320 + (transformedX / transformedZ2 * 400)
+            renderedPointYCoordinates(index) = 240 - (transformedY / transformedZ2 * 400)
+        END IF
+    NEXT index
+
+    FOR index = 1 TO currentLineCount
+        vertex1 = previousLineVertex1Indices(index)
+        vertex2 = previousLineVertex2Indices(index)
+
+        IF previousRenderedPointXCoordinates(vertex1) = -1 OR previousRenderedPointXCoordinates(vertex2) = -1 THEN
+        ELSE
+            LINE (previousRenderedPointXCoordinates(vertex1), previousRenderedPointYCoordinates(vertex1))-(previousRenderedPointXCoordinates(vertex2), previousRenderedPointYCoordinates(vertex2)), 0
+        END IF
+
+        vertex1 = lineVertex1Indices(index)
+        vertex2 = lineVertex2Indices(index)
+
+        IF renderedPointXCoordinates(vertex1) = -1 OR renderedPointXCoordinates(vertex2) = -1 THEN
+        ELSE
+            LINE (renderedPointXCoordinates(vertex1), renderedPointYCoordinates(vertex1))-(renderedPointXCoordinates(vertex2), renderedPointYCoordinates(vertex2)), lineColorValues(index)
+        END IF
+    NEXT index
+
+    IF currentLineCount < previousLineCount THEN
+        FOR index = currentLineCount + 1 TO previousLineCount
+            vertex1 = previousLineVertex1Indices(index)
+            vertex2 = previousLineVertex2Indices(index)
+
+            IF previousRenderedPointXCoordinates(vertex1) = -1 OR previousRenderedPointXCoordinates(vertex2) = -1 THEN
+            ELSE
+                LINE (previousRenderedPointXCoordinates(vertex1), previousRenderedPointYCoordinates(vertex1))-(previousRenderedPointXCoordinates(vertex2), previousRenderedPointYCoordinates(vertex2)), 0
+            END IF
+        NEXT index
+    END IF
+
+    FOR index = 1 TO currentPointCount
+        previousRenderedPointXCoordinates(index) = renderedPointXCoordinates(index)
+        previousRenderedPointYCoordinates(index) = renderedPointYCoordinates(index)
+    NEXT index
+
+    previousPointCount = currentPointCount
+
+    FOR index = 1 TO currentLineCount
+        previousLineVertex1Indices(index) = lineVertex1Indices(index)
+        previousLineVertex2Indices(index) = lineVertex2Indices(index)
+    NEXT index
+
+    previousLineCount = currentLineCount
+END SUB
+
+SUB InitializeGame
+    ' This subroutine initializes the game by setting up the screen, initializing the points and lines arrays,
+    ' and loading the initial state of the Game of Life grid from a file.
+
+    SCREEN 12
+    totalPoints = 0
+    totalLines = 0
+    currentPointCount = totalPoints
+    currentLineCount = totalLines
+    gridSize = 50
+
+    cameraPositionX = 4
+    cameraPositionY = 15
+    cameraPositionZ = 17
+    rotationAngle1 = ATN(1) / 2 - .29
+    rotationAngle2 = rotationAngle1 + 1
+
+    FOR index = 1 TO 1000
+        lineColorValues(index) = 4
+    NEXT index
+
+    FOR index = 1 TO 1000
+        previousLineVertex1Indices(index) = 1
+        previousLineVertex2Indices(index) = 1
+    NEXT index
+
+    OPEN "3dlife.dat" FOR INPUT AS #1
+    y = 20
+
+20
+    IF EOF(1) <> 0 THEN GOTO 30
+    x = 20
+    LINE INPUT #1, inputLine$
+
+    FOR characterIndex = 1 TO LEN(inputLine$)
+        currentChar$ = RIGHT$(LEFT$(inputLine$, characterIndex), 1)
+        IF currentChar$ = "#" THEN currentGameOfLifeGrid(x, y) = 1
+        x = x + 1
+    NEXT characterIndex
+
+    y = y + 1
+    GOTO 20
+
+30
+    CLOSE #1
+END SUB
diff --git a/Math/Game of life in 3D.webm b/Math/Game of life in 3D.webm
new file mode 100644 (file)
index 0000000..2b7e1ed
Binary files /dev/null and b/Math/Game of life in 3D.webm differ
diff --git a/Math/Game of life/1 b/Math/Game of life/1
new file mode 100644 (file)
index 0000000..b411c92
--- /dev/null
@@ -0,0 +1,50 @@
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+........####......................................\r
+.......#....#.....................................\r
+........####......................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+................................#######...........\r
+...............................#.......#..........\r
+................................#######...........\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+........#####.....................................\r
+.......#.....#....................................\r
+........#####.....................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+................................######............\r
+...............................#......#...........\r
+................................######............\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
diff --git a/Math/Game of life/10 b/Math/Game of life/10
new file mode 100644 (file)
index 0000000..08af0fb
--- /dev/null
@@ -0,0 +1,50 @@
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+........................###.......................\r
+.....................#.......#....................\r
+....................#.........#...................\r
+........................###.......................\r
+.......................#...#......................\r
+...................#..#.....#..#..................\r
+...................#..#.....#..#..................\r
+...................#..#.....#..#..................\r
+.......................#...#......................\r
+........................###.......................\r
+....................#.........#...................\r
+.....................#.......#....................\r
+........................###.......................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
diff --git a/Math/Game of life/11 b/Math/Game of life/11
new file mode 100644 (file)
index 0000000..5b8cf86
--- /dev/null
@@ -0,0 +1,50 @@
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+........................###.......................\r
+.....................#...#...#....................\r
+....................##...#...##...................\r
+......................#.###.#.....................\r
+.......................#...#......................\r
+...................#..#.....#..#..................\r
+...................####.....####..................\r
+...................#..#.....#..#..................\r
+.......................#...#......................\r
+......................#.###.#.....................\r
+....................##...#...##...................\r
+.....................#...#...#....................\r
+........................###.......................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
diff --git a/Math/Game of life/2 b/Math/Game of life/2
new file mode 100644 (file)
index 0000000..b5ebe02
--- /dev/null
@@ -0,0 +1,50 @@
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+...............##.................................\r
+...............#..................................\r
+.................#................................\r
+.............#####................................\r
+.............#....................................\r
+...........##...##................................\r
+.......##.#....##.#.##............................\r
+........#.#....##.#.#.............................\r
+.......#..##....#.#..#............................\r
+........##..#.#....##.............................\r
+..........#.#######...............................\r
+..........#.......#...............................\r
+...........#######................................\r
+..................................................\r
+.............###..................................\r
+............#..#..................................\r
+............##..................##................\r
+...............................#..#.##............\r
+...............................#.##.#.#...........\r
+..............................##..#.#.#...........\r
+.............................#..#.#...#.##........\r
+.............................##.#.#...#..#........\r
+................................#.#.#..##.........\r
+................................#.#.##.#..........\r
+.................................##.#..#..........\r
+.....................................##...........\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
diff --git a/Math/Game of life/3 b/Math/Game of life/3
new file mode 100644 (file)
index 0000000..f904a0b
--- /dev/null
@@ -0,0 +1,50 @@
+..................................................\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+..................................................\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+..................................................\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+..................................................\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+..................................................\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+..................................................\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+..................................................\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+..................................................\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+..................................................\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+..................................................\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+..................................................\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+..................................................\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+..................................................\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.##..\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+.##.##.##.##.##.##.##.##.##.##.##.##..............\r
+.##.##.##.##.##.##.##.##.##.##.##.##..............\r
+...........................................###....\r
+.##.##.##.##.##.##.##.##.##.##.##.##.......#......\r
+.##.##.##.##.##.##.##.##.##.##.##.##........#.....\r
+..................................................\r
+..................................................\r
diff --git a/Math/Game of life/4 b/Math/Game of life/4
new file mode 100644 (file)
index 0000000..da991a7
--- /dev/null
@@ -0,0 +1,50 @@
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+........................#.........................\r
+.......................###........................\r
+.......................#.#........................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
diff --git a/Math/Game of life/5 b/Math/Game of life/5
new file mode 100644 (file)
index 0000000..064f56e
--- /dev/null
@@ -0,0 +1,50 @@
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..............................#...................\r
+.............................###..................\r
+...............................#..................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
diff --git a/Math/Game of life/6 b/Math/Game of life/6
new file mode 100644 (file)
index 0000000..fc66375
--- /dev/null
@@ -0,0 +1,50 @@
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+......###.....#...#...#...#...#...#...#...#.......\r
+......#.#.....#...#...#...#...#...#...#...#.......\r
+......###.....#...#...#...#...#...#...#...#.......\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+.............#..#..#..#..#..#..#..#..#............\r
+.............#..#..#..#..#..#..#..#..#............\r
+.............#..#..#..#..#..#..#..#..#............\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
diff --git a/Math/Game of life/7 b/Math/Game of life/7
new file mode 100644 (file)
index 0000000..e008167
--- /dev/null
@@ -0,0 +1,50 @@
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+.......###........................................\r
+.........#........................................\r
+........#.........................................\r
+..................................................\r
+........................................###.......\r
+........................................#.........\r
+.........................................#........\r
+..................................................\r
+..................................................\r
+..................................................\r
diff --git a/Math/Game of life/8 b/Math/Game of life/8
new file mode 100644 (file)
index 0000000..bb71aee
--- /dev/null
@@ -0,0 +1,50 @@
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................#.#.#.#.#.#.....................\r
+.................#.#.#.#.#.#.#....................\r
+..................#.#.#.#.#.#.....................\r
+.................#.#.#.#.#.#.#....................\r
+..................#.#.#.#.#.#.....................\r
+.................#.#.#.#.#.#.#....................\r
+..................#.#.#.#.#.#.....................\r
+.................#.#.#.#.#.#.#....................\r
+..................#.#.#.#.#.#.....................\r
+.................#.#.#.#.#.#.#....................\r
+..................#.#.#.#.#.#.....................\r
+.................#.#.#.#.#.#.#....................\r
+..................#.#.#.#.#.#.....................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
diff --git a/Math/Game of life/9 b/Math/Game of life/9
new file mode 100644 (file)
index 0000000..ded468e
--- /dev/null
@@ -0,0 +1,50 @@
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+....................................##............\r
+..................................##..#...........\r
+............#####.................#..##...........\r
+..........#.......#................##.............\r
+.........#.........#..............................\r
+.............###..................................\r
+........#...#...#...#.............................\r
+........#..#.....#..#.............................\r
+........#..#.....#..#.............................\r
+........#..#.....#..#.............................\r
+........#...#...#...#.............................\r
+.............###..................................\r
+.........#.........#..............................\r
+..........#.......#...............................\r
+............#####.................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+...................................#####..........\r
+.................................##.....##........\r
+................................#.........#.......\r
+................................#...###...#.......\r
+...............................#...#...#...#......\r
+...............................#..#.....#..#......\r
+...............................#..#.....#..#......\r
+........#......................#..#.....#..#......\r
+........##.##..................#...#...#...#......\r
+............#...................#...###...#.......\r
+................................#.........#.......\r
+.................................##.....##........\r
+...................................#####..........\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
diff --git a/Math/Game of life/Game of life.bas b/Math/Game of life/Game of life.bas
new file mode 100755 (executable)
index 0000000..ae7adf4
--- /dev/null
@@ -0,0 +1,454 @@
+' Conway's Game of Life.\r
+' It has world editor, and can save/load worlds.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2001, Initial version\r
+' 2024 - 2025, Improved program readability\r
+\r
+' Usage:\r
+'\r
+' Observation Mode\r
+' ----------------\r
+'\r
+' Purpose: Observation mode is the primary mode of the program where\r
+' you can observe the simulation of Conway's Game of Life. In this\r
+' mode, the grid evolves according to the rules of the Game of Life,\r
+' and you can control the simulation's progression, speed, and other\r
+' aspects.\r
+\r
+' Available Keys:\r
+'\r
+'     x: Run the simulation for 10,000 cycles. This allows you to\r
+'     observe the long-term behavior of the grid without manually\r
+'     advancing each step.\r
+'\r
+'     s: Run the simulation for a specified number of cycles. You will\r
+'     be prompted to enter the number of cycles you want to advance.\r
+'\r
+'     n: Run the simulation for 1 cycle. This allows you to step\r
+'     through the simulation one generation at a time.\r
+'\r
+'     z: Stop running the simulation. This halts the automatic\r
+'     advancement of cycles, allowing you to observe the current state\r
+'     of the grid.\r
+'\r
+'     c: Clear all cells in the grid. This resets the grid to a blank\r
+'     state, with all cells set to dead.\r
+'\r
+'     w: Write the current state of the grid to a file. You will be\r
+'     prompted to enter a filename. The grid state will be saved in a\r
+'     format that can be loaded later.\r
+'\r
+'     l: Load a grid state from a file. You will be prompted to enter\r
+'     the filename of the saved grid state. The grid will be loaded\r
+'     and displayed.\r
+'\r
+'     e: Switch to edit mode. This allows you to manually edit the\r
+'     grid, toggle cells on/off, and perform other editing functions.\r
+'\r
+'     q: Quit the program. This exits the simulation and returns you\r
+'     to the operating system.\r
+'\r
+'\r
+' Edit Mode\r
+' ---------\r
+'\r
+' Purpose: Edit mode allows you to manually edit the grid. You can\r
+' toggle individual cells on or off, move around the grid, and perform\r
+' other editing functions. This mode is useful for setting up initial\r
+' conditions, creating specific patterns, or making adjustments to the\r
+' grid.\r
+'\r
+'Available Keys:\r
+'\r
+'    Cursor Keys (Arrow Keys): Move the cursor around the grid. The\r
+'    cursor highlights the current cell, allowing you to toggle it on\r
+'    or off.\r
+'\r
+'    4, 8, 6, 2: Move the cursor around the grid in large jumps. These\r
+'    keys allow you to quickly navigate to different areas of the\r
+'    grid.\r
+'\r
+'    s: Switch to select mode. This allows you to select a region of\r
+'    the grid for copying or cutting.\r
+'\r
+'    v: Paste the contents of the copy buffer to the current cursor\r
+'    position. This is useful for duplicating patterns or restoring\r
+'    cut regions.\r
+'\r
+'    SPACE: Toggle the current cell on or off. If the cell is alive,\r
+'    it will be set to dead, and vice versa.\r
+'\r
+'    ESC: Return to observing mode. This exits edit mode and returns\r
+'    you to the primary observation mode, where you can observe the\r
+'    simulation.\r
+'\r
+'\r
+' Select Mode\r
+' -----------\r
+'\r
+' Purpose: Select mode is a sub-mode of edit mode that allows you to\r
+' select a region of the grid. You can copy or cut the selected\r
+' region, which can then be pasted elsewhere in the grid.\r
+'\r
+' Available Keys:\r
+'\r
+'     Cursor Keys (Arrow Keys): Adjust the selection rectangle. You\r
+'     can resize the selection by moving the cursor.\r
+'\r
+'     4, 8, 6, 2: Adjust the selection rectangle in large jumps. These\r
+'     keys allow you to quickly resize the selection.\r
+'\r
+'     c: Copy the selected region to the copy buffer. The selected\r
+'     region remains intact on the grid.\r
+'\r
+'     x: Cut the selected region to the copy buffer. The selected\r
+'     region is cleared from the grid and copied to the buffer.\r
+'\r
+'     ESC: Return to edit mode. This exits select mode and returns you\r
+'     to edit mode, where you can continue editing the grid.\r
+'\r
+\r
+DECLARE SUB LoadGridFromFile ()\r
+DECLARE SUB SaveGridToFile ()\r
+DECLARE SUB DisplayCopyBuffer ()\r
+DEFINT A-Z\r
+DECLARE SUB EnterSelectMode (gridX, gridY)\r
+DECLARE SUB ClearGridBuffers ()\r
+DECLARE SUB EnterEditMode ()\r
+DECLARE SUB DisplayGridState ()\r
+DECLARE SUB ClearScreenLine ()\r
+DECLARE SUB ProcessLifeGeneration ()\r
+DECLARE SUB InitializeSimulation ()\r
+\r
+DIM SHARED gridBufferA(1 TO 50, 1 TO 50)\r
+DIM SHARED gridBufferB(1 TO 50, 1 TO 50)\r
+DIM SHARED currentBuffer\r
+DIM SHARED generationCount\r
+DIM SHARED autoAdvanceCount\r
+DIM SHARED copyBuffer(0 TO 50, 0 TO 50)\r
+DIM SHARED copyBufferWidth, copyBufferHeight\r
+\r
+InitializeSimulation\r
+\r
+1\r
+ProcessLifeGeneration\r
+generationCount = generationCount + 1\r
+\r
+2\r
+LOCATE 1, 27\r
+PRINT "frame:" + STR$(generationCount) + "   "\r
+LOCATE 2, 27\r
+PRINT "skip:" + STR$(autoAdvanceCount) + "   "\r
+userInput$ = INKEY$\r
+\r
+IF userInput$ = "s" THEN\r
+    LOCATE 5, 27\r
+    INPUT "skip ", autoAdvanceCount\r
+    ClearScreenLine\r
+END IF\r
+\r
+IF userInput$ = "q" THEN\r
+    SYSTEM\r
+END IF\r
+\r
+IF userInput$ = "n" THEN GOTO 1\r
+IF userInput$ = "c" THEN ClearGridBuffers\r
+IF userInput$ = "e" THEN EnterEditMode\r
+IF userInput$ = "z" THEN autoAdvanceCount = 0\r
+IF userInput$ = "x" THEN autoAdvanceCount = 10000\r
+IF userInput$ = "w" THEN SaveGridToFile\r
+IF userInput$ = "l" THEN LoadGridFromFile\r
+\r
+IF autoAdvanceCount > 0 THEN\r
+    autoAdvanceCount = autoAdvanceCount - 1\r
+    GOTO 1\r
+END IF\r
+\r
+GOTO 2\r
+\r
+SUB ClearGridBuffers\r
+' Clears the grid buffers and resets the simulation counters.\r
+FOR gridY = 1 TO 50\r
+    FOR gridX = 1 TO 50\r
+        gridBufferA(gridX, gridY) = 0\r
+        gridBufferB(gridX, gridY) = 0\r
+    NEXT gridX\r
+NEXT gridY\r
+currentBuffer = 0\r
+generationCount = 0\r
+autoAdvanceCount = 0\r
+DisplayGridState\r
+END SUB\r
+\r
+SUB ClearScreenLine\r
+' Clears a specific line on the screen.\r
+LOCATE 5, 27\r
+PRINT "              "\r
+END SUB\r
+\r
+SUB DisplayGridState\r
+' Displays the current state of the grid.\r
+FOR gridY = 1 TO 50\r
+    FOR gridX = 1 TO 50\r
+        IF currentBuffer = 0 THEN cellState = gridBufferA(gridX, gridY) ELSE cellState = gridBufferB(gridX, gridY)\r
+        IF cellState = 0 THEN cellState = 1 ELSE cellState = 10\r
+        LINE (gridX * 4, gridY * 4)-(gridX * 4 + 2, gridY * 4 + 2), cellState, BF\r
+    NEXT gridX\r
+NEXT gridY\r
+END SUB\r
+\r
+SUB EnterEditMode\r
+' Allows the user to edit the grid manually.\r
+cursorX = 25\r
+cursorY = 25\r
+\r
+3\r
+IF cursorX < 1 THEN cursorX = 1\r
+IF cursorY < 1 THEN cursorY = 1\r
+IF cursorX > 50 THEN cursorX = 50\r
+IF cursorY > 49 THEN cursorY = 49\r
+\r
+IF currentBuffer = 0 THEN cellState = gridBufferA(cursorX, cursorY) ELSE cellState = gridBufferB(cursorX, cursorY)\r
+IF cellState = 0 THEN cellState = 1 ELSE cellState = 10\r
+LINE (cursorX * 4, cursorY * 4)-(cursorX * 4 + 2, cursorY * 4 + 2), cellState, BF\r
+LINE (cursorX * 4 - 1, cursorY * 4 - 1)-(cursorX * 4 + 3, cursorY * 4 + 3), 14, B\r
+\r
+4\r
+userInput$ = INKEY$\r
+IF userInput$ = "" THEN GOTO 4\r
+LINE (cursorX * 4 - 1, cursorY * 4 - 1)-(cursorX * 4 + 3, cursorY * 4 + 3), 0, B\r
+\r
+' Handle cursor movement\r
+IF userInput$ = CHR$(0) + "M" THEN cursorX = cursorX + 1 ' Right arrow\r
+IF userInput$ = CHR$(0) + "K" THEN cursorX = cursorX - 1 ' Left arrow\r
+IF userInput$ = CHR$(0) + "P" THEN cursorY = cursorY + 1 ' Down arrow\r
+IF userInput$ = CHR$(0) + "H" THEN cursorY = cursorY - 1 ' Up arrow\r
+\r
+' Handle large jumps\r
+IF userInput$ = "6" THEN cursorX = cursorX + 8\r
+IF userInput$ = "4" THEN cursorX = cursorX - 8\r
+IF userInput$ = "2" THEN cursorY = cursorY + 8\r
+IF userInput$ = "8" THEN cursorY = cursorY - 8\r
+\r
+IF userInput$ = CHR$(27) THEN GOTO 5 ' ESC key to exit edit mode\r
+IF userInput$ = "s" THEN EnterSelectMode cursorX, cursorY\r
+\r
+' Paste from copy buffer\r
+IF userInput$ = "v" THEN\r
+    FOR pasteY = 0 TO copyBufferHeight\r
+        FOR pasteX = 0 TO copyBufferWidth\r
+            cellState = copyBuffer(pasteX, pasteY)\r
+            gridX = pasteX + cursorX\r
+            gridY = pasteY + cursorY\r
+            IF (gridX < 50) AND (gridY < 50) THEN\r
+                IF currentBuffer = 0 THEN gridBufferA(gridX, gridY) = cellState ELSE gridBufferB(gridX, gridY) = cellState\r
+            END IF\r
+        NEXT pasteX\r
+    NEXT pasteY\r
+    DisplayGridState\r
+END IF\r
+\r
+' Toggle cell on/off\r
+IF userInput$ = " " THEN\r
+    IF currentBuffer = 0 THEN cellState = gridBufferA(cursorX, cursorY) ELSE cellState = gridBufferB(cursorX, cursorY)\r
+    IF cellState = 1 THEN cellState = 0 ELSE cellState = 1\r
+    IF currentBuffer = 0 THEN gridBufferA(cursorX, cursorY) = cellState ELSE gridBufferB(cursorX, cursorY) = cellState\r
+END IF\r
+\r
+GOTO 3\r
+\r
+5\r
+END SUB\r
+\r
+SUB InitializeSimulation\r
+' Initializes the screen and buffers.\r
+SCREEN 13\r
+RANDOMIZE TIMER\r
+copyBufferWidth = 0\r
+copyBufferHeight = 0\r
+ClearGridBuffers\r
+END SUB\r
+\r
+SUB LoadGridFromFile\r
+' Loads a grid state from a file.\r
+ClearGridBuffers\r
+LOCATE 5, 27\r
+INPUT "file ", fileName$\r
+ClearScreenLine\r
+gridY = 1\r
+OPEN fileName$ FOR INPUT AS #1\r
+\r
+9\r
+IF EOF(1) <> 0 THEN GOTO 10\r
+LINE INPUT #1, fileLine$\r
+FOR gridX = 1 TO LEN(fileLine$)\r
+    fileChar$ = RIGHT$(LEFT$(fileLine$, gridX), 1)\r
+    IF fileChar$ = "#" THEN cellState = 1 ELSE cellState = 0\r
+    IF currentBuffer = 0 THEN gridBufferA(gridX, gridY) = cellState ELSE gridBufferB(gridX, gridY) = cellState\r
+NEXT gridX\r
+gridY = gridY + 1\r
+GOTO 9\r
+\r
+10\r
+CLOSE #1\r
+DisplayGridState\r
+END SUB\r
+\r
+SUB ProcessLifeGeneration\r
+' Processes one generation of Conway's Game of Life.\r
+IF currentBuffer = 0 THEN\r
+    FOR gridY = 2 TO 48\r
+        FOR gridX = 2 TO 49\r
+            IF gridBufferA(gridX - 1, gridY - 1) = 1 THEN neighborCount = 1 ELSE neighborCount = 0\r
+            IF gridBufferA(gridX, gridY - 1) = 1 THEN neighborCount = neighborCount + 1\r
+            IF gridBufferA(gridX + 1, gridY - 1) = 1 THEN neighborCount = neighborCount + 1\r
+            IF gridBufferA(gridX - 1, gridY) = 1 THEN neighborCount = neighborCount + 1\r
+            IF gridBufferA(gridX + 1, gridY) = 1 THEN neighborCount = neighborCount + 1\r
+            IF gridBufferA(gridX - 1, gridY + 1) = 1 THEN neighborCount = neighborCount + 1\r
+            IF gridBufferA(gridX, gridY + 1) = 1 THEN neighborCount = neighborCount + 1\r
+            IF gridBufferA(gridX + 1, gridY + 1) = 1 THEN neighborCount = neighborCount + 1\r
+\r
+            ' Apply Game of Life rules\r
+            IF gridBufferA(gridX, gridY) = 1 THEN\r
+                IF neighborCount = 2 OR neighborCount = 3 THEN gridBufferB(gridX, gridY) = 1 ELSE gridBufferB(gridX, gridY) = 0\r
+            ELSE\r
+                IF neighborCount = 3 THEN gridBufferB(gridX, gridY) = 1 ELSE gridBufferB(gridX, gridY) = 0\r
+            END IF\r
+        NEXT gridX\r
+    NEXT gridY\r
+    currentBuffer = 1\r
+    DisplayGridState\r
+ELSE ' Process second half of the grid\r
+    FOR gridY = 2 TO 48\r
+        FOR gridX = 2 TO 49\r
+            IF gridBufferB(gridX - 1, gridY - 1) = 1 THEN neighborCount = 1 ELSE neighborCount = 0\r
+            IF gridBufferB(gridX, gridY - 1) = 1 THEN neighborCount = neighborCount + 1\r
+            IF gridBufferB(gridX + 1, gridY - 1) = 1 THEN neighborCount = neighborCount + 1\r
+            IF gridBufferB(gridX - 1, gridY) = 1 THEN neighborCount = neighborCount + 1\r
+            IF gridBufferB(gridX + 1, gridY) = 1 THEN neighborCount = neighborCount + 1\r
+            IF gridBufferB(gridX - 1, gridY + 1) = 1 THEN neighborCount = neighborCount + 1\r
+            IF gridBufferB(gridX, gridY + 1) = 1 THEN neighborCount = neighborCount + 1\r
+            IF gridBufferB(gridX + 1, gridY + 1) = 1 THEN neighborCount = neighborCount + 1\r
+\r
+            ' Apply Game of Life rules\r
+            IF gridBufferB(gridX, gridY) = 1 THEN\r
+                IF neighborCount = 2 OR neighborCount = 3 THEN gridBufferA(gridX, gridY) = 1 ELSE gridBufferA(gridX, gridY) = 0\r
+            ELSE\r
+                IF neighborCount = 3 THEN gridBufferA(gridX, gridY) = 1 ELSE gridBufferA(gridX, gridY) = 0\r
+            END IF\r
+        NEXT gridX\r
+    NEXT gridY\r
+    currentBuffer = 0\r
+    DisplayGridState\r
+END IF\r
+END SUB\r
+\r
+SUB EnterSelectMode (gridX, gridY)\r
+' Allows the user to select a region of the grid.\r
+cursorX = gridX * 4 - 1 ' Calculate initial x position for selection rectangle\r
+cursorY = gridY * 4 - 1 ' Calculate initial y position for selection rectangle\r
+selectionEndX = gridX + 2 ' Initialize end x position for selection rectangle\r
+selectionEndY = gridY + 2 ' Initialize end y position for selection rectangle\r
+\r
+6\r
+selectionRightEdge = selectionEndX * 4 + 3 ' Calculate right edge of selection rectangle\r
+selectionBottomEdge = selectionEndY * 4 + 3 ' Calculate bottom edge of selection rectangle\r
+\r
+' Draw selection rectangle\r
+LINE (cursorX, cursorY)-(selectionRightEdge, selectionBottomEdge), 14, B\r
+\r
+8\r
+userInput$ = INKEY$\r
+IF userInput$ = "" THEN GOTO 8\r
+\r
+' Erase selection rectangle\r
+LINE (cursorX, cursorY)-(selectionRightEdge, selectionBottomEdge), 0, B\r
+\r
+' Handle cursor movement\r
+IF userInput$ = CHR$(0) + "M" THEN selectionEndX = selectionEndX + 1 ' Right arrow\r
+IF userInput$ = CHR$(0) + "K" THEN selectionEndX = selectionEndX - 1 ' Left arrow\r
+IF userInput$ = CHR$(0) + "P" THEN selectionEndY = selectionEndY + 1 ' Down arrow\r
+IF userInput$ = CHR$(0) + "H" THEN selectionEndY = selectionEndY - 1 ' Up arrow\r
+\r
+' Handle large jumps\r
+IF userInput$ = "6" THEN selectionEndX = selectionEndX + 8\r
+IF userInput$ = "4" THEN selectionEndX = selectionEndX - 8\r
+IF userInput$ = "2" THEN selectionEndY = selectionEndY + 8\r
+IF userInput$ = "8" THEN selectionEndY = selectionEndY - 8\r
+\r
+IF userInput$ = CHR$(27) THEN GOTO 7 ' ESC key to exit select mode\r
+\r
+IF userInput$ = "c" THEN\r
+    copyBufferWidth = selectionEndX - gridX ' Calculate size of selection rectangle\r
+    copyBufferHeight = selectionEndY - gridY\r
+    FOR sourceY = gridY TO selectionEndY\r
+        FOR sourceX = gridX TO selectionEndX\r
+            IF currentBuffer = 0 THEN cellState = gridBufferA(sourceX, sourceY) ELSE cellState = gridBufferB(sourceX, sourceY)\r
+            copyBuffer(sourceX - gridX, sourceY - gridY) = cellState ' Copy selection to buffer\r
+        NEXT sourceX\r
+    NEXT sourceY\r
+    DisplayCopyBuffer ' Display copied selection\r
+END IF\r
+\r
+IF userInput$ = "x" THEN\r
+    copyBufferWidth = selectionEndX - gridX ' Calculate size of selection rectangle\r
+    copyBufferHeight = selectionEndY - gridY\r
+    FOR sourceY = gridY TO selectionEndY\r
+        FOR sourceX = gridX TO selectionEndX\r
+            IF currentBuffer = 0 THEN cellState = gridBufferA(sourceX, sourceY): gridBufferA(sourceX, sourceY) = 0 ELSE cellState = gridBufferB(sourceX, sourceY): gridBufferB(sourceX, sourceY) = 0 ' Clear selection\r
+            copyBuffer(sourceX - gridX, sourceY - gridY) = cellState ' Copy cleared selection to buffer\r
+        NEXT sourceX\r
+    NEXT sourceY\r
+    DisplayCopyBuffer ' Display cut selection\r
+    DisplayGridState ' Update grid\r
+END IF\r
+\r
+GOTO 6\r
+\r
+7\r
+END SUB\r
+\r
+SUB DisplayCopyBuffer\r
+' Displays the contents of the copy buffer.\r
+cursorX = copyBufferWidth ' Calculate width of copied selection\r
+IF cursorX > 15 THEN cursorX = 15\r
+cursorY = copyBufferHeight ' Calculate height of copied selection\r
+IF cursorY > 15 THEN cursorY = 15\r
+\r
+' Draw copy buffer rectangle\r
+LINE (204, 99)-(319, 199), 0, BF\r
+LINE (204, 99)-(208 + 4 * cursorX, 103 + 4 * cursorY), 14, B\r
+\r
+FOR bufferY = 0 TO cursorY ' Iterate over copied selection\r
+    FOR bufferX = 0 TO cursorX\r
+        cellState = copyBuffer(bufferX, bufferY) ' Get color of cell in copy buffer\r
+        IF cellState = 0 THEN cellState = 1 ELSE cellState = 10 ' Convert to display color\r
+        LINE (bufferX * 4 + 205, bufferY * 4 + 100)-(bufferX * 4 + 2 + 205, bufferY * 4 + 2 + 100), cellState, BF ' Draw cell in copy buffer\r
+    NEXT bufferX\r
+NEXT bufferY\r
+END SUB\r
+\r
+SUB SaveGridToFile\r
+' Saves the current grid state to a file.\r
+LOCATE 5, 27\r
+INPUT "file ", fileName$\r
+ClearScreenLine\r
+OPEN fileName$ FOR OUTPUT AS #1\r
+\r
+FOR gridY = 1 TO 50\r
+    fileLine$ = "" ' Initialize line string\r
+    FOR gridX = 1 TO 50\r
+        IF currentBuffer = 0 THEN cellState = gridBufferA(gridX, gridY) ELSE cellState = gridBufferB(gridX, gridY)\r
+        IF cellState = 0 THEN fileLine$ = fileLine$ + "." ELSE fileLine$ = fileLine$ + "#" ' Convert to file format\r
+    NEXT gridX\r
+    PRINT #1, fileLine$ ' Write line to file\r
+NEXT gridY\r
+\r
+CLOSE #1\r
+END SUB\r
diff --git a/Math/Game of life/e b/Math/Game of life/e
new file mode 100644 (file)
index 0000000..1ca8715
--- /dev/null
@@ -0,0 +1,50 @@
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+.................####.............####............\r
+.....................#...........#................\r
+...................####.........#.................\r
+.......................#...#...#..................\r
+........................#.#.#.#...................\r
+.................#########...#########............\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
+..................................................\r
diff --git a/Math/Game of life/index.html b/Math/Game of life/index.html
new file mode 100644 (file)
index 0000000..ce986cd
--- /dev/null
@@ -0,0 +1,12 @@
+<HTML>\r
+<HEAD><TITLE>life</TITLE></HEAD>\r
+\r
+<BODY text=#A0A0ff vLink=#0000ff aLink=#0000ff link=#0000ff bgColor=#000000>\r
+\r
+<CENTER><H1>life</H1></CENTER>\r
+<BR>Conway's game of life. Simple editor with copy and paste\r
+functionality and simulator.\r
+\r
+<BR><IMG SRC="sshot.png">\r
+</BODY>\r
+</HTML>
\ No newline at end of file
diff --git a/Math/Game of life/screenshot.png b/Math/Game of life/screenshot.png
new file mode 100644 (file)
index 0000000..f1ca1c7
Binary files /dev/null and b/Math/Game of life/screenshot.png differ
diff --git a/Math/Lottery/Lottery analysis.bas b/Math/Lottery/Lottery analysis.bas
new file mode 100755 (executable)
index 0000000..59870ad
--- /dev/null
@@ -0,0 +1,303 @@
+DECLARE SUB loadData ()\r
+DECLARE SUB predictNextDraw ()\r
+DECLARE SUB parseDrawNumbers (drawString$)\r
+DECLARE SUB displayDotGraph ()\r
+DECLARE SUB waitForUserInput ()\r
+DECLARE SUB displayLineGraph ()\r
+DECLARE SUB displayCombinatoricsGraph ()\r
+DECLARE SUB displayMenu ()\r
+DECLARE SUB startProgram ()\r
+' Program to analyze lottery winning numbers.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+'\r
+'\r
+' This program is designed to analyze lottery winning numbers. It\r
+' provides various graphical representations and statistical insights\r
+' based on historical lottery data. The program offers a simple\r
+' menu-driven interface to visualize and analyze the data.\r
+'\r
+' Features:\r
+'\r
+'     Data Loading: The program loads historical lottery data from a\r
+'     text file named "loto.txt". Each line in the file represents a\r
+'     single draw, with numbers separated by spaces.\r
+'\r
+'     Graphical Representations:\r
+'\r
+'         Dot Graph: Displays the lottery numbers as dots on a graph,\r
+'         with vertical lines representing each draw.\r
+'\r
+'         Line Graph: Shows a dynamic line graph connecting\r
+'         consecutive lottery numbers, providing a visual\r
+'         representation of number trends over time.\r
+'\r
+'         Combinatorics Graph: Graph is fitted to every possible\r
+'         resolution. If there are patterns in data, they would likely\r
+'         be visible it some resolutions.\r
+'\r
+'     Statistical Analysis: Analyzes the last 10 draws to predict the\r
+'     most frequent numbers and identifies numbers that have appeared\r
+'     least recently.\r
+'\r
+'\r
+' Input File Format: The input file loto.txt should be formatted as\r
+' follows:\r
+'\r
+'     Each line represents a single lottery draw.\r
+'\r
+'     The first number on each line is the draw sequence number.\r
+'\r
+'     The subsequent numbers are the lottery numbers drawn, separated\r
+'     by spaces. 6 numbers per draw.\r
+'\r
+' Example:\r
+'\r
+' 1 7 15 16 23 34 38\r
+' 2 2 15 17 25 37 40\r
+' 3 9 16 18 23 25 45\r
+' ...\r
+' 500 4 15 16 24 30 46\r
+'\r
+'\r
+'\r
+' Changelog:\r
+' 2001, Initial version\r
+' 2024 - 2025, Improved program readability\r
+\r
+\r
+DEFINT A-Y\r
+\r
+DIM SHARED totalDraws, drawNumbers$(1 TO 50)\r
+DIM SHARED lotteryNumbers(1 TO 500, 1 TO 7)\r
+DIM SHARED currentDraw\r
+\r
+startProgram\r
+loadData\r
+\r
+displayMenu\r
+\r
+SUB displayCombinatoricsGraph\r
+    CLS\r
+    PAINT (1, 1), 3\r
+    DIM buffer(1 TO 48)\r
+    DIM buffer2(1 TO 20000)\r
+\r
+    totalNumbers = 0\r
+\r
+    ' Prepare data for drawing\r
+    FOR drawIndex = 1 TO currentDraw\r
+        FOR number = 1 TO 48\r
+            buffer(number) = 0\r
+        NEXT number\r
+\r
+        FOR numberPosition = 2 TO 7\r
+            buffer(lotteryNumbers(drawIndex, numberPosition)) = 10\r
+        NEXT numberPosition\r
+\r
+        FOR number = 1 TO 48\r
+            totalNumbers = totalNumbers + 1\r
+            buffer2(totalNumbers) = buffer(number)\r
+        NEXT number\r
+    NEXT drawIndex\r
+\r
+    ' Draw the graph\r
+    FOR yAxisValue = 2 TO 400\r
+        xAxisValue = 0\r
+        FOR xPosition = 1 TO 639\r
+            FOR yPosition = 1 TO yAxisValue\r
+                xAxisValue = xAxisValue + 1\r
+                IF xAxisValue > totalNumbers THEN GOTO skipDrawing\r
+                PSET (xPosition, yPosition), buffer2(xAxisValue)\r
+            NEXT yPosition\r
+        NEXT xPosition\r
+skipDrawing:\r
+\r
+        LINE (xPosition + 1, 1)-(xPosition + 1, yAxisValue), 14\r
+        LINE (xPosition + 1, yPosition)-(xPosition + 4, yPosition), 12\r
+\r
+        IF INKEY$ <> "" THEN GOTO 1\r
+    NEXT yAxisValue\r
+\r
+waitForUserInput\r
+1\r
+END SUB\r
+\r
+SUB displayDotGraph\r
+    CLS\r
+    LINE (0, 0)-(600, 0), 1\r
+    LINE (0, 49)-(600, 49), 1\r
+    LINE (0, 50)-(600, 50), 1\r
+    LINE (0, 48 * 6 + 51)-(600, 48 * 6 + 51), 1\r
+\r
+    ' Draw vertical lines for each draw and plot numbers\r
+    FOR drawIndex = 1 TO currentDraw\r
+        totalNumbers = 0\r
+        FOR numberPosition = 2 TO 7\r
+            totalNumbers = totalNumbers + lotteryNumbers(drawIndex, numberPosition)\r
+            PSET (drawIndex, lotteryNumbers(drawIndex, numberPosition)), 15\r
+        NEXT numberPosition\r
+        LINE (drawIndex, totalNumbers + 50)-(drawIndex, 24 * 6 + 50), 10\r
+    NEXT drawIndex\r
+\r
+    waitForUserInput\r
+END SUB\r
+\r
+SUB displayLineGraph\r
+    CLS\r
+    DIM buffer(1 TO 20000)\r
+\r
+    ' Draw lines connecting consecutive lottery numbers\r
+    FOR x = 1 TO currentDraw - 1\r
+        FOR numberPosition = 2 TO 7\r
+            LINE (600, lotteryNumbers(x, numberPosition))-(610, lotteryNumbers(x + 1, numberPosition)), 3\r
+        NEXT numberPosition\r
+        LINE (600, 1)-(600, 48), 1\r
+        SOUND 0, 2\r
+\r
+        ' Scroll the screen to the left\r
+        GET (10, 1)-(610, 50), buffer(1)\r
+        PUT (1, 1), buffer(1), PSET\r
+        LINE (601, 1)-(610, 50), 0, BF\r
+\r
+        IF INKEY$ <> "" GOTO 5\r
+    NEXT x\r
+\r
+    waitForUserInput\r
+5\r
+END SUB\r
+\r
+SUB displayMenu\r
+menuLoop:\r
+    CLS\r
+\r
+7\r
+    LOCATE 1, 1\r
+\r
+    PRINT "           Lottery statistics analysis"\r
+\r
+    PRINT "1 - Dot graph"\r
+    PRINT "2 - Line graph"\r
+    PRINT "3 - Combinatorics"\r
+    PRINT "4 - Statistics"\r
+    PRINT "5 - Exit program"\r
+\r
+    userInput$ = INPUT$(1)\r
+\r
+    IF userInput$ = "1" THEN displayDotGraph\r
+    IF userInput$ = "2" THEN displayLineGraph\r
+    IF userInput$ = "3" THEN displayCombinatoricsGraph\r
+    IF userInput$ = "4" THEN predictNextDraw: GOTO 7\r
+    IF userInput$ = "5" THEN SYSTEM\r
+\r
+    GOTO menuLoop\r
+\r
+END SUB\r
+\r
+SUB loadData\r
+    PRINT "One moment..."\r
+\r
+    currentDraw = 0\r
+    OPEN "loto.txt" FOR INPUT AS #1\r
+\r
+loadNextLine:\r
+    IF EOF(1) <> 0 THEN GOTO endOfFile\r
+\r
+    LINE INPUT #1, drawString$\r
+    parseDrawNumbers drawString$\r
+\r
+    currentDraw = currentDraw + 1\r
+\r
+    ' Parse and store lottery numbers\r
+    FOR numberPosition = 1 TO 7\r
+        lotteryNumbers(currentDraw, numberPosition) = VAL(drawNumbers$(numberPosition))\r
+    NEXT numberPosition\r
+\r
+    GOTO loadNextLine\r
+\r
+endOfFile:\r
+    CLOSE #1\r
+\r
+    CLS\r
+END SUB\r
+\r
+SUB parseDrawNumbers (drawString$)\r
+    totalDraws = 0\r
+\r
+    numberIndex = 1\r
+    FOR charPosition = 1 TO LEN(drawString$)\r
+        currentChar$ = RIGHT$(LEFT$(drawString$, charPosition), 1)\r
+        IF currentChar$ = " " THEN\r
+            numberIndex = 1\r
+        ELSE\r
+            IF numberIndex = 1 THEN\r
+                totalDraws = totalDraws + 1\r
+                drawNumbers$(totalDraws) = ""\r
+                numberIndex = 0\r
+            END IF\r
+            drawNumbers$(totalDraws) = drawNumbers$(totalDraws) + currentChar$\r
+        END IF\r
+    NEXT charPosition\r
+\r
+END SUB\r
+\r
+SUB predictNextDraw\r
+    DIM buffer(1 TO 48)\r
+    PRINT "During the last 10 draws:"\r
+\r
+    ' Count occurrences of each number in the last 10 draws\r
+    FOR drawIndex = currentDraw - 10 TO currentDraw\r
+        FOR numberPosition = 2 TO 7\r
+            buffer(lotteryNumbers(drawIndex, numberPosition)) = buffer(lotteryNumbers(drawIndex, numberPosition)) + 1\r
+        NEXT numberPosition\r
+    NEXT drawIndex\r
+\r
+    ' Print the most frequent numbers\r
+    FOR position = 1 TO 6\r
+        maxCount = 0\r
+        FOR number = 1 TO 48\r
+            IF buffer(number) > maxCount THEN\r
+                maxCount = buffer(number)\r
+                mostFrequentNumber = number\r
+            END IF\r
+        NEXT number\r
+        PRINT mostFrequentNumber; " appeared: "; maxCount; " times"\r
+        buffer(mostFrequentNumber) = 0\r
+    NEXT position\r
+\r
+    PRINT "--------------------------------------"\r
+\r
+    ' Find when each number last appeared\r
+    FOR drawIndex = 1 TO currentDraw\r
+        FOR numberPosition = 2 TO 7\r
+            buffer(lotteryNumbers(drawIndex, numberPosition)) = drawIndex\r
+        NEXT numberPosition\r
+    NEXT drawIndex\r
+\r
+    FOR position = 1 TO 6\r
+        minAppearances = 30000\r
+        FOR number = 1 TO 48\r
+            IF buffer(number) < minAppearances THEN\r
+                minAppearances = buffer(number)\r
+                leastRecentNumber = number\r
+            END IF\r
+        NEXT number\r
+        PRINT leastRecentNumber; " appeared last time: "; currentDraw - minAppearances; " draws ago"\r
+        buffer(leastRecentNumber) = 30000\r
+    NEXT position\r
+\r
+END SUB\r
+\r
+SUB startProgram\r
+    SCREEN 12\r
+\r
+END SUB\r
+\r
+SUB waitForUserInput\r
+    userInput$ = INPUT$(1)\r
+\r
+END SUB\r
diff --git a/Math/Lottery/loto.txt b/Math/Lottery/loto.txt
new file mode 100644 (file)
index 0000000..f7238f1
--- /dev/null
@@ -0,0 +1,281 @@
+1 2 10 13 25 32 48\r
+2 1 3 15 27 33 40\r
+3 9 16 18 23 25 45\r
+4 2 3 15 21 27 45\r
+5 3 5 8 13 29 39\r
+6 5 11 20 22 27 41\r
+7 6 9 12 13 39 45\r
+8 3 18 21 28 37 38\r
+9 5 13 16 36 37 39\r
+10 4 15 16 24 30 46\r
+11 1 7 10 25 32 38\r
+12 2 15 17 25 37 40\r
+13 9 16 18 23 25 45\r
+14 2 3 15 21 27 45\r
+15 3 5 8 13 29 39\r
+16 5 11 20 22 27 41\r
+17 6 9 12 13 39 45\r
+18 3 18 21 28 37 38\r
+19 5 13 16 36 37 39\r
+20 4 15 16 24 30 46\r
+21 1 7 10 25 32 38\r
+22 2 15 17 25 37 40\r
+23 9 16 18 23 25 45\r
+24 2 3 15 21 27 45\r
+25 3 5 8 13 29 39\r
+26 5 11 20 22 27 41\r
+27 6 9 12 13 39 45\r
+28 3 18 21 28 37 38\r
+29 5 13 16 36 37 39\r
+30 4 15 16 24 30 46\r
+31 1 7 10 25 32 38\r
+32 2 15 17 25 37 40\r
+33 9 16 18 23 25 45\r
+34 2 3 15 21 27 45\r
+35 3 5 8 13 29 39\r
+36 5 11 20 22 27 41\r
+37 6 9 12 13 39 45\r
+38 3 18 21 28 37 38\r
+39 5 13 16 36 37 39\r
+40 4 15 16 24 30 46\r
+41 1 7 10 25 32 38\r
+42 2 15 17 25 37 40\r
+43 9 16 18 23 25 45\r
+44 2 3 15 21 27 45\r
+45 3 5 8 13 29 39\r
+46 5 11 20 22 27 41\r
+47 6 9 12 13 39 45\r
+48 3 18 21 28 37 38\r
+49 5 13 16 36 37 39\r
+50 4 15 16 24 30 46\r
+51 1 7 10 25 32 38\r
+52 2 15 17 25 37 40\r
+53 9 16 18 23 25 45\r
+54 2 3 15 21 27 45\r
+55 3 5 8 13 29 39\r
+56 5 11 20 22 27 41\r
+57 6 9 12 13 39 45\r
+58 3 18 21 28 37 38\r
+59 5 13 16 36 37 39\r
+60 4 15 16 24 30 46\r
+61 1 7 10 25 32 38\r
+62 2 15 17 25 37 40\r
+63 9 16 18 23 25 45\r
+64 2 3 15 21 27 45\r
+65 3 5 8 13 29 39\r
+66 5 11 20 22 27 41\r
+67 6 9 12 13 39 45\r
+68 3 18 21 28 37 38\r
+69 5 13 16 36 37 39\r
+70 4 15 16 24 30 46\r
+71 1 7 10 25 32 38\r
+72 2 15 17 25 37 40\r
+73 9 16 18 23 25 45\r
+74 2 3 15 21 27 45\r
+75 3 5 8 13 29 39\r
+76 5 11 20 22 27 41\r
+77 6 9 12 13 39 45\r
+78 3 18 21 28 37 38\r
+79 5 13 16 36 37 39\r
+80 4 15 16 24 30 46\r
+81 1 7 10 25 32 38\r
+82 2 15 17 25 37 40\r
+83 9 16 18 23 25 45\r
+84 2 3 15 21 27 45\r
+85 3 5 8 13 29 39\r
+86 5 11 20 22 27 41\r
+87 6 9 12 13 39 45\r
+88 3 18 21 28 37 38\r
+89 5 13 16 36 37 39\r
+90 4 15 16 24 30 46\r
+91 1 7 10 25 32 38\r
+92 2 15 17 25 37 40\r
+93 9 16 18 23 25 45\r
+94 2 3 15 21 27 45\r
+95 3 5 8 13 29 39\r
+96 5 11 20 22 27 41\r
+97 6 9 12 13 39 45\r
+98 3 18 21 28 37 38\r
+99 5 13 16 36 37 39\r
+100 4 15 16 24 30 46\r
+101 1 7 10 25 32 38\r
+102 2 15 17 25 37 40\r
+103 9 16 18 23 25 45\r
+104 2 3 15 21 27 45\r
+105 3 5 8 13 29 39\r
+106 5 11 20 22 27 41\r
+107 6 9 12 13 39 45\r
+108 3 18 21 28 37 38\r
+109 5 13 16 36 37 39\r
+110 4 15 16 24 30 46\r
+111 1 7 10 25 32 38\r
+112 2 15 17 25 37 40\r
+113 9 16 18 23 25 45\r
+114 2 3 15 21 27 45\r
+115 3 5 8 13 29 39\r
+116 5 11 20 22 27 41\r
+117 6 9 12 13 39 45\r
+118 3 18 21 28 37 38\r
+119 5 13 16 36 37 39\r
+120 4 15 16 24 30 46\r
+121 1 7 10 25 32 38\r
+122 2 15 17 25 37 40\r
+123 9 16 18 23 25 45\r
+124 2 3 15 21 27 45\r
+125 3 5 8 13 29 39\r
+126 5 11 20 22 27 41\r
+127 6 9 12 13 39 45\r
+128 3 18 21 28 37 38\r
+129 5 13 16 36 37 39\r
+130 4 15 16 24 30 46\r
+131 1 7 10 25 32 38\r
+132 2 15 17 25 37 40\r
+133 9 16 18 23 25 45\r
+134 2 3 15 21 27 45\r
+135 3 5 8 13 29 39\r
+136 5 11 20 22 27 41\r
+137 6 9 12 13 39 45\r
+138 3 18 21 28 37 38\r
+139 5 13 16 36 37 39\r
+140 4 15 16 24 30 46\r
+141 1 7 10 25 32 38\r
+142 2 15 17 25 37 40\r
+143 9 16 18 23 25 45\r
+144 2 3 15 21 27 45\r
+145 3 5 8 13 29 39\r
+146 5 11 20 22 27 41\r
+147 6 9 12 13 39 45\r
+148 3 18 21 28 37 38\r
+149 5 13 16 36 37 39\r
+150 4 15 16 24 30 46\r
+151 1 7 10 25 32 38\r
+152 2 15 17 25 37 40\r
+153 9 16 18 23 25 45\r
+154 2 3 15 21 27 45\r
+155 3 5 8 13 29 39\r
+156 5 11 20 22 27 41\r
+157 6 9 12 13 39 45\r
+158 3 18 21 28 37 38\r
+159 5 13 16 36 37 39\r
+160 4 15 16 24 30 46\r
+161 1 7 10 25 32 38\r
+162 2 15 17 25 37 40\r
+163 9 16 18 23 25 45\r
+164 2 3 15 21 27 45\r
+165 3 5 8 13 29 39\r
+166 5 11 20 22 27 41\r
+167 6 9 12 13 39 45\r
+168 3 18 21 28 37 38\r
+169 5 13 16 36 37 39\r
+170 4 15 16 24 30 46\r
+171 1 7 10 25 32 38\r
+172 2 15 17 25 37 40\r
+173 9 16 18 23 25 45\r
+174 2 3 15 21 27 45\r
+175 3 5 8 13 29 39\r
+176 5 11 20 22 27 41\r
+177 6 9 12 13 39 45\r
+178 3 18 21 28 37 38\r
+179 5 13 16 36 37 39\r
+180 4 15 16 24 30 46\r
+181 1 7 10 25 32 38\r
+182 2 15 17 25 37 40\r
+183 9 16 18 23 25 45\r
+184 2 3 15 21 27 45\r
+185 3 5 8 13 29 39\r
+186 5 11 20 22 27 41\r
+187 6 9 12 13 39 45\r
+188 3 18 21 28 37 38\r
+189 5 13 16 36 37 39\r
+190 4 15 16 24 30 46\r
+191 1 7 10 25 32 38\r
+192 2 15 17 25 37 40\r
+193 9 16 18 23 25 45\r
+194 2 3 15 21 27 45\r
+195 3 5 8 13 29 39\r
+196 5 11 20 22 27 41\r
+197 6 9 12 13 39 45\r
+198 3 18 21 28 37 38\r
+199 5 13 16 36 37 39\r
+200 4 15 16 24 30 46\r
+201 1 7 10 25 32 38\r
+202 2 15 17 25 37 40\r
+203 9 16 18 23 25 45\r
+204 2 3 15 21 27 45\r
+205 3 5 8 13 29 39\r
+206 5 11 20 22 27 41\r
+207 6 9 12 13 39 45\r
+208 3 18 21 28 37 38\r
+209 5 13 16 36 37 39\r
+210 4 15 16 24 30 46\r
+211 1 7 10 25 32 38\r
+212 2 15 17 25 37 40\r
+213 9 16 18 23 25 45\r
+214 2 3 15 21 27 45\r
+215 3 5 8 13 29 39\r
+216 5 11 20 22 27 41\r
+217 6 9 12 13 39 45\r
+218 3 18 21 28 37 38\r
+219 5 13 16 36 37 39\r
+220 4 15 16 24 30 46\r
+221 1 7 10 25 32 38\r
+222 2 15 17 25 37 40\r
+223 9 16 18 23 25 45\r
+224 2 3 15 21 27 45\r
+225 3 5 8 13 29 39\r
+226 5 11 20 22 27 41\r
+227 6 9 12 13 39 45\r
+228 3 18 21 28 37 38\r
+229 5 13 16 36 37 39\r
+230 4 15 16 24 30 46\r
+231 1 7 10 25 32 38\r
+232 2 15 17 25 37 40\r
+233 9 16 18 23 25 45\r
+234 2 3 15 21 27 45\r
+235 3 5 8 13 29 39\r
+236 5 11 20 22 27 41\r
+237 6 9 12 13 39 45\r
+238 3 18 21 28 37 38\r
+239 5 13 16 36 37 39\r
+240 4 15 16 24 30 46\r
+241 1 7 10 25 32 38\r
+242 2 15 17 25 37 40\r
+243 9 16 18 23 25 45\r
+244 2 3 15 21 27 45\r
+245 3 5 8 13 29 39\r
+246 5 11 20 22 27 41\r
+247 6 9 12 13 39 45\r
+248 3 18 21 28 37 38\r
+249 5 13 16 36 37 39\r
+250 4 15 16 24 30 46\r
+251 1 7 10 25 32 38\r
+252 2 15 17 25 37 40\r
+253 9 16 18 23 25 45\r
+254 2 3 15 21 27 45\r
+255 3 5 8 13 29 39\r
+256 5 11 20 22 27 41\r
+257 6 9 12 13 39 45\r
+258 3 18 21 28 37 38\r
+259 5 13 16 36 37 39\r
+260 4 15 16 24 30 46\r
+261 1 7 10 25 32 38\r
+262 2 15 17 25 37 40\r
+263 9 16 18 23 25 45\r
+264 2 3 15 21 27 45\r
+265 3 5 8 13 29 39\r
+266 5 11 20 22 27 41\r
+267 6 9 12 13 39 45\r
+268 3 18 21 28 37 38\r
+269 5 13 16 36 37 39\r
+270 4 15 16 24 30 46\r
+271 1 7 10 25 32 38\r
+272 2 15 17 25 37 40\r
+273 9 16 18 23 25 45\r
+274 2 3 15 21 27 45\r
+275 3 5 8 13 29 39\r
+276 5 11 20 22 27 41\r
+277 6 9 12 13 39 45\r
+278 3 18 21 28 37 38\r
+279 5 13 16 36 37 39\r
+280 4 15 16 24 30 46\r
+281 1 7 10 25 32 38\r
diff --git a/Math/Lottery/screenshot, 1.png b/Math/Lottery/screenshot, 1.png
new file mode 100644 (file)
index 0000000..5595096
Binary files /dev/null and b/Math/Lottery/screenshot, 1.png differ
diff --git a/Math/Lottery/screenshot, 2.png b/Math/Lottery/screenshot, 2.png
new file mode 100644 (file)
index 0000000..dcf804b
Binary files /dev/null and b/Math/Lottery/screenshot, 2.png differ
diff --git a/Math/Lottery/screenshot, 3.png b/Math/Lottery/screenshot, 3.png
new file mode 100644 (file)
index 0000000..24f796e
Binary files /dev/null and b/Math/Lottery/screenshot, 3.png differ
diff --git a/Math/Multiplication trainer.bas b/Math/Multiplication trainer.bas
new file mode 100644 (file)
index 0000000..1be28bf
--- /dev/null
@@ -0,0 +1,188 @@
+' Program to teach and test multiplication.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+\r
+' Changelog:\r
+' 2000, Initial version\r
+' 2024, Improved program readability\r
+\r
+DECLARE SUB showGreetingAndSetup ()\r
+DEFINT A-Y\r
+DECLARE SUB getUserInputAndDisplayQuestions ()\r
+DIM SHARED userName$\r
+DIM SHARED numberOfQuestions\r
+\r
+showGreetingAndSetup\r
+getUserInputAndDisplayQuestions\r
+\r
+SUB getUserInputAndDisplayQuestions\r
+RANDOMIZE TIMER\r
+\r
+numberOfAttempts = 0\r
+incorrectAnswers = 0\r
+correctAnswers = 0\r
+PRINT "How much is:"\r
+4\r
+numberOfAttempts = numberOfAttempts + 1\r
+IF numberOfAttempts > numberOfQuestions THEN GOTO 6\r
+\r
+' Generate random numbers for multiplication\r
+multiplier1 = RND * 9\r
+multiplier2 = RND * 9\r
+question$ = STR$(multiplier1) + " X" + STR$(multiplier2)\r
+PRINT "    "\r
+PRINT question$\r
+\r
+5\r
+INPUT userAnswer$\r
+\r
+' Handle invalid inputs\r
+IF LEFT$(userAnswer$, 6) = "don't know" THEN\r
+    PRINT "Try at least !"\r
+    GOTO 5\r
+END IF\r
+\r
+' Convert input to number\r
+IF userAnswer$ = "0" THEN\r
+    userAnswer = 0\r
+    GOTO 10\r
+ELSE\r
+    userAnswer = VAL(userAnswer$)\r
+    IF userAnswer = 0 THEN userAnswer = -1\r
+END IF\r
+\r
+10\r
+\r
+' Check if the answer is correct\r
+IF multiplier1 * multiplier2 = userAnswer THEN\r
+    correctAnswers = correctAnswers + 1\r
+    PRINT "Correct !"\r
+ELSE\r
+    PRINT "Wrong !"\r
+    PRINT "Correct answer is ", multiplier1 * multiplier2\r
+    incorrectAnswers = incorrectAnswers + 1\r
+END IF\r
+\r
+GOTO 4\r
+\r
+6\r
+PRINT "-------------------------"\r
+COLOR 2\r
+PRINT "Incorrect answers: ", incorrectAnswers\r
+\r
+' Calculate the score\r
+scorePercentage = correctAnswers / numberOfQuestions * 100\r
+\r
+grade = 1\r
+\r
+' Determine the grade\r
+IF scorePercentage >= 25 THEN grade = 2\r
+IF scorePercentage >= 50 THEN grade = 3\r
+IF scorePercentage >= 70 THEN grade = 4\r
+IF scorePercentage >= 90 THEN grade = 5\r
+\r
+COLOR 14\r
+PRINT "Your grade is: "; grade\r
+END SUB\r
+\r
+DEFINT Z\r
+SUB showGreetingAndSetup\r
+\r
+' Clear the screen and set up graphics mode\r
+CLS\r
+SCREEN 13\r
+LOCATE 2, 1\r
+PRINT "     Math teaching program"\r
+\r
+' Draw a simple background pattern\r
+FOR y = 3 TO 20\r
+    FOR x = 0 TO 320\r
+        IF POINT(x, y) > 0 THEN\r
+            colorIndex = y + 56\r
+        ELSE\r
+            colorIndex = 31 - y / 2\r
+        END IF\r
+        PSET (x, y), colorIndex\r
+    NEXT x\r
+NEXT y\r
+\r
+' Get user input for their name\r
+LOCATE 5, 1\r
+COLOR 7\r
+INPUT "Enter your name ", userName$\r
+LOCATE 5, 1\r
+COLOR 8\r
+PRINT "Enter your name " + userName$\r
+\r
+' Greet the user\r
+LOCATE 6, 1\r
+COLOR 7\r
+PRINT "Hello " + userName$ + "!"\r
+\r
+8\r
+LOCATE 7, 1\r
+COLOR 8\r
+PRINT SPACE$(35)\r
+COLOR 7\r
+LOCATE 7, 1\r
+INPUT "How many questions would you like ? ", numberOfQuestions\r
+LOCATE 7, 1\r
+COLOR 8\r
+PRINT SPACE$(35)\r
+LOCATE 7, 1\r
+COLOR 8\r
+PRINT "How many questions would you like? " + STR$(numberOfQuestions)\r
+\r
+' Validate the number of questions\r
+IF numberOfQuestions < 5 THEN\r
+    PRINT "That would be too easy !"\r
+    GOTO 8\r
+END IF\r
+\r
+IF numberOfQuestions > 30 THEN\r
+    PRINT "That would be too hard !"\r
+    GOTO 8\r
+END IF\r
+\r
+PRINT "I will ask you some math questions."\r
+PRINT "Press any button when you are ready..."\r
+\r
+' Initialize color palette\r
+FOR a = 200 TO 230\r
+    OUT &H3C8, a\r
+    OUT &H3C9, a - 200\r
+    OUT &H3C9, 0\r
+    OUT &H3C9, 0\r
+NEXT\r
+\r
+' Initialize color array\r
+DIM colorArray(1 TO 32)\r
+\r
+currentColorIndex = 4\r
+colorChangeDirection = 1\r
+\r
+2\r
+FOR a = 0 TO 31\r
+    ' Draw vertical lines with decreasing brightness\r
+    LINE (a * 10, 170)-(a * 10 + 10, 190), 200 + colorArray(a + 1), BF\r
+    colorArray(a + 1) = colorArray(a + 1) - 1\r
+    IF colorArray(a + 1) < 0 THEN colorArray(a + 1) = 0\r
+NEXT a\r
+\r
+' Change the color index\r
+currentColorIndex = currentColorIndex + colorChangeDirection\r
+IF currentColorIndex > 30 OR currentColorIndex < 3 THEN colorChangeDirection = -colorChangeDirection\r
+colorArray(currentColorIndex) = 30\r
+SOUND 0, 1\r
+\r
+' Check if user is ready\r
+IF INKEY$ <> "" THEN GOTO 3\r
+GOTO 2\r
+\r
+3\r
+CLS\r
+END SUB\r
+\r
diff --git a/Math/Multiplication trainer.png b/Math/Multiplication trainer.png
new file mode 100644 (file)
index 0000000..7ea027a
Binary files /dev/null and b/Math/Multiplication trainer.png differ
diff --git a/Math/Plotting/2D graph plot.bas b/Math/Plotting/2D graph plot.bas
new file mode 100755 (executable)
index 0000000..cc6d4ff
--- /dev/null
@@ -0,0 +1,85 @@
+' 2D Graph Plotter.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.12, Created initial version\r
+' 2024.08, Updated for better readability and maintainability\r
+\r
+\r
+DECLARE SUB InitializeGraphicsEnvironment ()\r
+DECLARE SUB PlotPoint (x1 AS SINGLE, y1 AS SINGLE, x2 AS SINGLE, y2 AS SINGLE, colorCode AS INTEGER)\r
+\r
+' Scaling factor for the graph\r
+DIM SHARED scaleFactor AS INTEGER\r
+scaleFactor = 100\r
+\r
+' Initialize the graphics environment\r
+InitializeGraphicsEnvironment\r
+\r
+' Set the origin of the graph\r
+DIM originX AS SINGLE\r
+DIM originY AS SINGLE\r
+originX = -320 / scaleFactor\r
+originY = 0\r
+\r
+' Loop to plot each point on the graph based on the formula\r
+DIM currentX AS SINGLE\r
+DIM currentY AS SINGLE\r
+FOR currentX = -320 / scaleFactor TO 320 / scaleFactor STEP 1 / scaleFactor\r
+    ' Function to calculate y-value based on x-value\r
+    currentY = 1 - (COS(currentX * 2)) + (SIN(currentX * 2))   ' User-defined formula\r
+\r
+    ' Plot the point and update the origin for the next segment\r
+    PlotPoint currentX, currentY, originX, originY, 14\r
+    originX = currentX\r
+    originY = currentY\r
+NEXT currentX\r
+\r
+' Subroutine to initialize the graphics window and grid\r
+SUB InitializeGraphicsEnvironment\r
+    SCREEN 12\r
+\r
+    ' Draw horizontal grid lines\r
+    DIM horizontalGridStep AS SINGLE\r
+    FOR horizontalGridStep = -320 TO 320\r
+        IF horizontalGridStep / scaleFactor = horizontalGridStep \ scaleFactor THEN\r
+            LINE (horizontalGridStep + 320, 0)-(horizontalGridStep + 320, 479), 1\r
+        END IF\r
+    NEXT horizontalGridStep\r
+\r
+    ' Draw vertical grid lines\r
+    DIM verticalGridStep AS SINGLE\r
+    FOR verticalGridStep = -240 TO 240\r
+        IF verticalGridStep / scaleFactor = verticalGridStep \ scaleFactor THEN\r
+            LINE (0, verticalGridStep + 240)-(639, verticalGridStep + 240), 1\r
+        END IF\r
+    NEXT verticalGridStep\r
+\r
+    ' Draw the central axis lines\r
+    LINE (0, 240)-(639, 240), 3\r
+    LINE (320, 0)-(320, 479), 3\r
+END SUB\r
+\r
+' Subroutine to plot a point on the graph\r
+SUB PlotPoint (x AS SINGLE, y AS SINGLE, x1 AS SINGLE, y1 AS SINGLE, colorCode AS INTEGER)\r
+    ' Convert graph coordinates to screen pixel coordinates\r
+    DIM screenX1 AS INTEGER\r
+    DIM screenY1 AS INTEGER\r
+    DIM screenX2 AS INTEGER\r
+    DIM screenY2 AS INTEGER\r
+\r
+    screenX1 = (x * scaleFactor) + 320\r
+    screenY1 = 240 - (y * scaleFactor)\r
+    screenX2 = (x1 * scaleFactor) + 320\r
+    screenY2 = 240 - (y1 * scaleFactor)\r
+\r
+    ' Check if the point is within the screen boundaries before plotting\r
+    IF screenX1 >= 0 AND screenY1 >= 0 AND screenX1 <= 639 AND screenY1 <= 479 AND screenX2 >= 0 AND screenY2 >= 0 AND screenX2 <= 639 AND screenY2 <= 479 THEN\r
+        LINE (screenX1, screenY1)-(screenX2, screenY2), colorCode\r
+    END IF\r
+END SUB\r
+\r
diff --git a/Math/Plotting/2D graph plot.png b/Math/Plotting/2D graph plot.png
new file mode 100644 (file)
index 0000000..ad022d9
Binary files /dev/null and b/Math/Plotting/2D graph plot.png differ
diff --git a/Math/Plotting/3D graph.bas b/Math/Plotting/3D graph.bas
new file mode 100644 (file)
index 0000000..105d4a4
--- /dev/null
@@ -0,0 +1,427 @@
+DECLARE SUB formula (x!, y!, z!)\r
+DECLARE SUB graaf ()\r
+DECLARE SUB mkgr3 (x1!, y1!, z1!)\r
+DECLARE SUB mkgr2 (x1!, y1!, z1!)\r
+DECLARE SUB mkgr (x1!, y1!, z1!)\r
+DECLARE SUB start ()\r
+DECLARE SUB getcor ()\r
+DECLARE SUB nait3d ()\r
+' 3D heightmap explorer. Allows to visualize heightmap for arbitrary function.\r
+' Inspect and edit function "formula" to visualize alternative mathematical functions.\r
+\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+\r
+' Changelog:\r
+' 2002, Initial version\r
+' 2024.09, Improved program readability\r
+\r
+' Keyboard controls:\r
+' Cursor keys - move around\r
+' -           - fly up\r
+' +           - fly down\r
+' ESC         - exit program\r
+\r
+' Type your formula to sub module "formula".\r
+' X & Y are surface coordinates. Z must be formula\r
+' result, indicating height. "tm" variable counts\r
+' frames. Use it in your formula to make graph moving in time.\r
+\r
+DIM SHARED vertexX(4000), vertexY(4000), vertexZ(4000)\r
+DIM SHARED x(4000), y(4000), z(4000)\r
+\r
+DIM SHARED xo(4000), yo(4000), zo(4000)\r
+DIM SHARED linePoint1(4000), linePoint2(4000)\r
+DIM SHARED lineColor(4000)\r
+DIM SHARED vertexCount, lineCount\r
+DIM SHARED tmvertexCount, tmlineCount, tm\r
+DIM SHARED myx, myy, myz, mye, myk\r
+\r
+myx = 520\r
+myy = -250\r
+myz = -1000\r
+tm = 0\r
+\r
+ON ERROR GOTO 3\r
+start\r
+\r
+nait3d\r
+\r
+3\r
+PRINT "Kuskil programmis l�ks mingi arv �le lubatud piiride!!!"\r
+RESUME\r
+\r
+' This subroutine initializes the coordinate system and sets up the grid.\r
+SUB getcor\r
+    c = 12\r
+\r
+    ' Create background 2D grids along every axis in 3D space\r
+    ' to help viewer perceive scale.\r
+    mkgr -500, 0, 0\r
+    mkgr2 0, 0, 500\r
+    mkgr3 0, -500, 0\r
+\r
+    ' Place center-crossing pink lines across every axis (3D cross).\r
+    ' This is to help viewer to see where zero point on the graph is.\r
+\r
+    ' Add vertices for the 3D cross.\r
+    vertexX(vertexCount + 1) = 0\r
+    vertexY(vertexCount + 1) = -500\r
+    vertexZ(vertexCount + 1) = 0\r
+\r
+    vertexX(vertexCount + 2) = 0\r
+    vertexY(vertexCount + 2) = 500\r
+    vertexZ(vertexCount + 2) = 0\r
+\r
+    vertexX(vertexCount + 3) = -500\r
+    vertexY(vertexCount + 3) = 0\r
+    vertexZ(vertexCount + 3) = 0\r
+\r
+    vertexX(vertexCount + 4) = 500\r
+    vertexY(vertexCount + 4) = 0\r
+    vertexZ(vertexCount + 4) = 0\r
+\r
+    vertexX(vertexCount + 5) = 0\r
+    vertexY(vertexCount + 5) = 0\r
+    vertexZ(vertexCount + 5) = -500\r
+\r
+    vertexX(vertexCount + 6) = 0\r
+    vertexY(vertexCount + 6) = 0\r
+    vertexZ(vertexCount + 6) = 500\r
+\r
+    ' Add lines for the 3D cross.\r
+    linePoint1(lineCount + 1) = vertexCount + 1\r
+    linePoint2(lineCount + 1) = vertexCount + 2\r
+    lineColor(lineCount + 1) = c\r
+\r
+    linePoint1(lineCount + 2) = vertexCount + 3\r
+    linePoint2(lineCount + 2) = vertexCount + 4\r
+    lineColor(lineCount + 2) = c\r
+\r
+    linePoint1(lineCount + 3) = vertexCount + 5\r
+    linePoint2(lineCount + 3) = vertexCount + 6\r
+    lineColor(lineCount + 3) = c\r
+\r
+    ' Update the vertex and line counts\r
+    vertexCount = vertexCount + 6\r
+    lineCount = lineCount + 3\r
+    tmvertexCount = vertexCount\r
+    tmlineCount = lineCount\r
+END SUB\r
+\r
+' This subroutine generates a grid of points based on the formula\r
+SUB graaf\r
+    c = 14\r
+\r
+    d = 0\r
+    e = 0\r
+    FOR x = -500 TO 500 STEP 50\r
+        FOR z = -500 TO 500 STEP 50\r
+\r
+            ' Increment the vertex count and add a new vertex\r
+            d = d + 1\r
+            vertexX(vertexCount + d) = x\r
+            formula x / 50, z / 50, y   ' evaluate formula that we want to visualize\r
+            vertexY(vertexCount + d) = y * 50\r
+            vertexZ(vertexCount + d) = z\r
+\r
+            ' Connect current point on the grid with neighbors\r
+            IF z > -500 THEN\r
+                e = e + 1\r
+                linePoint1(lineCount + e) = vertexCount + d\r
+                linePoint2(lineCount + e) = vertexCount + d - 1\r
+                lineColor(lineCount + e) = c\r
+            END IF\r
+\r
+            IF x > -500 THEN\r
+                e = e + 1\r
+                linePoint1(lineCount + e) = vertexCount + d\r
+                linePoint2(lineCount + e) = vertexCount + d - 21\r
+                lineColor(lineCount + e) = c\r
+            END IF\r
+\r
+        NEXT z\r
+    NEXT x\r
+\r
+    ' Update the vertex and line counts\r
+    vertexCount = vertexCount + d\r
+    lineCount = lineCount + e\r
+END SUB\r
+\r
+' This subroutine generates a measuring grid in the ZY plane.\r
+SUB mkgr (x1, y1, z1)\r
+    c = 3\r
+\r
+    d = 0\r
+    e = 0\r
+    FOR z = -500 TO 500 STEP 100\r
+        FOR y = -500 TO 500 STEP 100\r
+\r
+            ' Increment the vertex count and add a new vertex\r
+            d = d + 1\r
+            vertexX(vertexCount + d) = x1\r
+            vertexY(vertexCount + d) = y1 + y\r
+            vertexZ(vertexCount + d) = z1 + z\r
+\r
+            ' Add lines to the line array if necessary\r
+            IF y > -500 THEN\r
+                e = e + 1\r
+                linePoint1(lineCount + e) = vertexCount + d\r
+                linePoint2(lineCount + e) = vertexCount + d - 1\r
+                lineColor(lineCount + e) = c\r
+            END IF\r
+\r
+            IF z > -500 THEN\r
+                e = e + 1\r
+                linePoint1(lineCount + e) = vertexCount + d\r
+                linePoint2(lineCount + e) = vertexCount + d - 11\r
+                lineColor(lineCount + e) = c\r
+            END IF\r
+\r
+        NEXT y\r
+    NEXT z\r
+\r
+    ' Update the vertex and line counts\r
+    vertexCount = vertexCount + d\r
+    lineCount = lineCount + e\r
+END SUB\r
+\r
+' This subroutine generates a measuring grid XY plane.\r
+SUB mkgr2 (x1, y1, z1)\r
+    c = 3\r
+\r
+    d = 0\r
+    e = 0\r
+    FOR x = -500 TO 500 STEP 100\r
+        FOR y = -500 TO 500 STEP 100\r
+\r
+            ' Increment the vertex count and add a new vertex\r
+            d = d + 1\r
+            vertexX(vertexCount + d) = x1 + x\r
+            vertexY(vertexCount + d) = y1 + y\r
+            vertexZ(vertexCount + d) = z1\r
+\r
+            ' Add lines to the line array if necessary\r
+            IF y > -500 THEN\r
+                e = e + 1\r
+                linePoint1(lineCount + e) = vertexCount + d\r
+                linePoint2(lineCount + e) = vertexCount + d - 1\r
+                lineColor(lineCount + e) = c\r
+            END IF\r
+\r
+            IF x > -500 THEN\r
+                e = e + 1\r
+                linePoint1(lineCount + e) = vertexCount + d\r
+                linePoint2(lineCount + e) = vertexCount + d - 11\r
+                lineColor(lineCount + e) = c\r
+            END IF\r
+\r
+        NEXT y\r
+    NEXT x\r
+\r
+    ' Update the vertex and line counts\r
+    vertexCount = vertexCount + d\r
+    lineCount = lineCount + e\r
+END SUB\r
+\r
+' This subroutine generates a measuring grid in the XZ plane.\r
+SUB mkgr3 (x1, y1, z1)\r
+    c = 3\r
+\r
+    d = 0\r
+    e = 0\r
+    FOR x = -500 TO 500 STEP 100\r
+        FOR z = -500 TO 500 STEP 100\r
+\r
+            ' Increment the vertex count and add a new vertex\r
+            d = d + 1\r
+            vertexX(vertexCount + d) = x1 + x\r
+            vertexY(vertexCount + d) = y1\r
+            vertexZ(vertexCount + d) = z\r
+\r
+            ' Add lines to the line array if necessary\r
+            IF z > -500 THEN\r
+                e = e + 1\r
+                linePoint1(lineCount + e) = vertexCount + d\r
+                linePoint2(lineCount + e) = vertexCount + d - 1\r
+                lineColor(lineCount + e) = c\r
+            END IF\r
+\r
+            IF x > -500 THEN\r
+                e = e + 1\r
+                linePoint1(lineCount + e) = vertexCount + d\r
+                linePoint2(lineCount + e) = vertexCount + d - 11\r
+                lineColor(lineCount + e) = c\r
+            END IF\r
+\r
+        NEXT z\r
+    NEXT x\r
+\r
+    ' Update the vertex and line counts\r
+    vertexCount = vertexCount + d\r
+    lineCount = lineCount + e\r
+END SUB\r
+\r
+' This subroutine renders the 3D scene.\r
+SUB nait3d\r
+\r
+1\r
+vertexCount = tmvertexCount\r
+lineCount = tmlineCount\r
+tm = tm + 1\r
+graaf\r
+\r
+myx = myx + SIN(deg1) * mye\r
+myz = myz + COS(deg1) * mye\r
+\r
+myx = myx + COS(deg1) * myk\r
+myz = myz - SIN(deg1) * myk\r
+\r
+myy = myy + myyp\r
+\r
+deg1 = deg1 + d1\r
+Deg2 = Deg2 + d2\r
+\r
+C1 = COS(deg1): S1 = SIN(deg1)\r
+C2 = COS(Deg2): S2 = SIN(Deg2)\r
+\r
+' Transform the vertices to 3D space\r
+FOR a = 1 TO vertexCount\r
+\r
+    xo = vertexX(a) - myx\r
+    yo = -vertexY(a) - myy\r
+    zo = vertexZ(a) - myz\r
+\r
+    ' Apply rotation transformations\r
+    x1 = (xo * C1 - zo * S1)\r
+    z1 = (xo * S1 + zo * C1)\r
+\r
+    y1 = (yo * C2 - z1 * S2)\r
+    z2 = (yo * S2 + z1 * C2)\r
+\r
+    ' Project the vertices onto the 2D screen\r
+    xo(a) = x(a)\r
+    yo(a) = y(a)\r
+\r
+    IF z2 < 20 THEN\r
+        x(a) = -1\r
+    ELSE\r
+        x(a) = 320 + (x1 / z2 * 500)\r
+        y(a) = 240 + (y1 / z2 * 500)\r
+    END IF\r
+NEXT\r
+\r
+' Draw the lines on the screen\r
+FOR a = 1 TO lineCount\r
+    p1 = linePoint1(a)\r
+    p2 = linePoint2(a)\r
+\r
+    ' Skip drawing if either point is off-screen\r
+    IF xo(p1) = -1 OR xo(p2) = -1 THEN\r
+        ' Do nothing\r
+    ELSE\r
+        ' erase line at previous position\r
+        LINE (xo(p1), yo(p1))-(xo(p2), yo(p2)), 0\r
+        ' draw line at new position\r
+        LINE (x(p1), y(p1))-(x(p2), y(p2)), lineColor(a)\r
+    END IF\r
+\r
+NEXT\r
+\r
+' Handle keyboard input\r
+K$ = INKEY$\r
+IF K$ <> "" THEN\r
+\r
+    SELECT CASE K$\r
+\r
+        CASE CHR$(0) + "P"\r
+            mye = mye - 3\r
+\r
+        CASE CHR$(0) + "H"\r
+            mye = mye + 3\r
+\r
+        CASE CHR$(0) + "M"\r
+            myk = myk + 3\r
+\r
+        CASE CHR$(0) + "K"\r
+            myk = myk - 3\r
+\r
+        CASE "+"\r
+            myyp = myyp + 5\r
+\r
+        CASE "-"\r
+            myyp = myyp - 5\r
+\r
+        CASE "6"\r
+            d1 = d1 + .01\r
+\r
+        CASE "4"\r
+            d1 = d1 - .01\r
+\r
+        CASE "8"\r
+            d2 = d2 - .01\r
+\r
+        CASE "2"\r
+            d2 = d2 + .01\r
+\r
+        CASE " "\r
+            d1 = d1 / 2\r
+            d2 = d2 / 2\r
+            d3 = d3 / 2\r
+            mye = mye / 2\r
+            myk = myk / 2\r
+            myyp = myyp / 2\r
+\r
+        CASE "q"\r
+            SYSTEM\r
+\r
+        CASE CHR$(27)\r
+            SYSTEM\r
+\r
+    END SELECT\r
+END IF\r
+\r
+GOTO 1\r
+END SUB\r
+\r
+' This subroutine initializes the graphics and sets up the program.\r
+SUB start\r
+SCREEN 12\r
+CLS\r
+\r
+FOR a = 1 TO 4000\r
+    lineColor(a) = 15\r
+NEXT a\r
+\r
+vertexCount = 0\r
+lineCount = 0\r
+\r
+getcor\r
+\r
+END SUB\r
+\r
+' This subroutine calculates the height of a point based on the formula\r
+SUB formula (x, y, z)\r
+z = 0\r
+v = SQR(x * x + y * y) ' v = distance from center, some formulas need it.\r
+\r
+' Apply the formula to calculate the height\r
+z = z + SIN(x + y) * SIN(tm / 10) ' diagonal lines\r
+z = z + (SQR((15 + v) * (15 - v)) - 10) ' top of the ball\r
+\r
+' As you see, multiple formulas can be enabled simultaneously.\r
+' Few more example formulas that you can uncomment and enable.\r
+' z = z + RND * 1                                ' noise\r
+' z = z + SIN((y + tm) / 2)                      ' forward moving wave\r
+' z = z + SIN(v / 2) * 2                         ' circular waves\r
+' z = z - SQR(v * 6)                             ' sharp peak\r
+' z = z + SIN(y / 1.5) / 1.5 + COS(x / 1.5) / 1.5' custom 1\r
+' z = z + SIN(y / 1.5) * COS(x / 1.5) / 1.5      ' custom 2\r
+' z = z + INT(SIN(1.5 * x * SIN(tm / 10))) * 3   ' custom 3\r
+' z = z - INT(v / 5) * 3 + 3                     ' custom 4\r
+' z = z + 3 * ((-INT((x - .3) / 20) * INT((23 + x - ABS(y * 1.2)) / 15)) + -INT(-y / 20) * -INT(-x / 20) * INT(-((x - 2) * (x - 2) + (y * 1.2 - 4) * (y * 1.2 - 4)) / 2000 + 1.01) + -INT(y / 20) * -INT(-x / 20) * INT(-((x - 2) * (x - 2) + (y * 1.2 + 4) * (y * 1.2 + 4)) / 2000 + 1.01)) ' heart\r
+\r
+END SUB\r
+\r
diff --git a/Math/Plotting/3D graph.png b/Math/Plotting/3D graph.png
new file mode 100644 (file)
index 0000000..a25dbb6
Binary files /dev/null and b/Math/Plotting/3D graph.png differ
diff --git a/Math/Plotting/Deriviative calculator.bas b/Math/Plotting/Deriviative calculator.bas
new file mode 100755 (executable)
index 0000000..37b96e6
--- /dev/null
@@ -0,0 +1,87 @@
+' Program that computes and plots arbitrary mathematical function on a 2D graph.\r
+' Also it computes and plots the derivative of the function.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 200?, Initial version\r
+' 2024.09, Improved program readability\r
+\r
+\r
+DECLARE SUB Initialize ()\r
+DECLARE SUB PlotPoint (x, y, x1, y1, c!)\r
+DIM SHARED scaleFactor\r
+\r
+scaleFactor = 50        ' Scale factor for the graph\r
+Initialize\r
+\r
+oldX = -320 / scaleFactor\r
+oldY = 0\r
+\r
+FOR x = -320 / scaleFactor TO 320 / scaleFactor STEP 1 / scaleFactor\r
+\r
+    ' Calculate the function value (replace with your desired formula)\r
+    t = x ^ 3 - (3 * x)\r
+\r
+    PlotPoint x, t, oldX, prevY, 10\r
+    y = (t - prevY) * scaleFactor\r
+    prevY = t\r
+\r
+    PlotPoint x, y, oldX, oldY, 14\r
+    oldX = x\r
+    oldY = y\r
+NEXT x\r
+\r
+SUB Initialize\r
+    SCREEN 12\r
+\r
+    ' Draw vertical grid lines\r
+    FOR x = -320 TO 320\r
+        IF x / scaleFactor = x \ scaleFactor THEN LINE (x + 320, 0)-(x + 320, 479), 1\r
+    NEXT x\r
+\r
+    ' Draw horizontal grid lines\r
+    FOR y = -240 TO 240\r
+        IF y / scaleFactor = y \ scaleFactor THEN LINE (0, y + 240)-(639, y + 240), 1\r
+    NEXT y\r
+\r
+    ' Draw thicker vertical grid lines for every 5th unit\r
+    FOR x = -320 TO 320\r
+        IF x / (scaleFactor * 5) = x \ (scaleFactor * 5) THEN LINE (x + 320, 0)-(x + 320, 479), 4\r
+    NEXT x\r
+\r
+    ' Draw thicker horizontal grid lines for every 5th unit\r
+    FOR y = -240 TO 240\r
+        IF y / (scaleFactor * 5) = y \ (scaleFactor * 5) THEN LINE (0, y + 240)-(639, y + 240), 4\r
+    NEXT y\r
+\r
+    ' Draw x-axis and y-axis\r
+    LINE (0, 240)-(639, 240), 3\r
+    LINE (320, 0)-(320, 479), 3\r
+END SUB\r
+\r
+SUB PlotPoint (x, y, x1, y1, c)\r
+\r
+    x2 = (x * scaleFactor) + 320\r
+    y2 = 240 - (y * scaleFactor)\r
+    x3 = (x1 * scaleFactor) + 320\r
+    y3 = 240 - (y1 * scaleFactor)\r
+\r
+    ' Check if the points are within the screen boundaries\r
+    IF x2 < 0 THEN GOTO Skip\r
+    IF y2 < 0 THEN GOTO Skip\r
+    IF x2 > 639 THEN GOTO Skip\r
+    IF y2 > 479 THEN GOTO Skip\r
+    IF x3 < 0 THEN GOTO Skip\r
+    IF y3 < 0 THEN GOTO Skip\r
+    IF x3 > 639 THEN GOTO Skip\r
+    IF y3 > 479 THEN GOTO Skip\r
+\r
+    ' Draw a line between the two points with the specified color\r
+    LINE (x2, y2)-(x3, y3), c\r
+\r
+Skip:\r
+END SUB\r
diff --git a/Math/Plotting/Deriviative calculator.png b/Math/Plotting/Deriviative calculator.png
new file mode 100644 (file)
index 0000000..5c49948
Binary files /dev/null and b/Math/Plotting/Deriviative calculator.png differ
diff --git a/Math/Plotting/Sine and cosine table.bas b/Math/Plotting/Sine and cosine table.bas
new file mode 100755 (executable)
index 0000000..c4202c7
--- /dev/null
@@ -0,0 +1,106 @@
+' SIN & COS table generator\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.12, Initial version.\r
+' 2024.08, Updated code readability.\r
+\r
+\r
+' Screen dimensions and video mode settings\r
+screenWidth = 640\r
+screenHeight = 480\r
+videoMode = 12 ' Video mode switch (0 for text mode, non-zero for graphics mode)\r
+stringSize = 0 ' String size for text mode\r
+\r
+' Adjust screen dimensions for a more accurate representation\r
+screenWidth = screenWidth / 11.3\r
+screenHeight = screenHeight / 11.7\r
+\r
+' Determine string size based on video mode\r
+IF stringSize = 0 THEN\r
+    SELECT CASE videoMode\r
+        CASE 12, 11\r
+            stringSize = 16\r
+\r
+        CASE 9, 10\r
+            stringSize = 14\r
+\r
+        CASE 1, 13, 2, 7, 8\r
+            stringSize = 8\r
+    END SELECT\r
+ELSE\r
+    GOTO InitializeScreen\r
+END IF\r
+\r
+InitializeScreen:\r
+SCREEN videoMode\r
+\r
+' Draw grid and label axes\r
+FOR gridLine = 1 TO 10\r
+    ' Draw horizontal grid lines\r
+    LINE (0, gridLine * screenHeight)-(screenWidth * 10, gridLine * screenHeight), 8\r
+\r
+    ' Draw vertical grid lines\r
+    LINE (gridLine * screenWidth, 0)-(gridLine * screenWidth, screenHeight * 10), 8\r
+\r
+    ' Label horizontal axis with numbers\r
+    textRow = 10 * screenHeight / stringSize + 2\r
+    textCol = gridLine * screenWidth / 8 + 1\r
+    LOCATE textRow, textCol\r
+    PRINT CHR$(gridLine + 48);\r
+NEXT gridLine\r
+\r
+' Label the end of the horizontal axis\r
+LOCATE 10 * screenHeight / stringSize + 2, screenWidth * 10 / 8\r
+PRINT "10";\r
+\r
+' Label special points on the vertical axis\r
+LOCATE 1 * screenHeight / stringSize + 1, screenWidth * 10 / 8 + 3\r
+PRINT "-1";\r
+LOCATE 5 * screenHeight / stringSize + 1, screenWidth * 10 / 8 + 3\r
+PRINT "0";\r
+LOCATE 10 * screenHeight / stringSize, screenWidth * 10 / 8 + 3\r
+PRINT "1";\r
+\r
+' Draw central horizontal and vertical lines\r
+LINE (0, screenHeight * 5 + 1)-(screenWidth * 10, screenHeight * 5 + 1), 14\r
+LINE (5 * screenWidth + 1, 0)-(5 * screenWidth + 1, 10 * screenHeight), 14\r
+\r
+' Plot SIN function\r
+FOR angle = 0 TO 10 STEP .05\r
+    xPosition = angle * screenWidth\r
+    yPosition = SIN(angle) * screenHeight * 5 + screenHeight * 5\r
+    IF angle > 0 THEN LINE (xPositionPrev, yPositionPrev)-(xPosition, yPosition), 15\r
+    xPositionPrev = xPosition\r
+    yPositionPrev = yPosition\r
+NEXT angle\r
+\r
+' Label the SIN curve\r
+textRow = yPosition / stringSize + 1\r
+textCol = screenWidth * 10 / 8\r
+LOCATE textRow, textCol\r
+PRINT "sin";\r
+\r
+' Plot COS function\r
+FOR angle = 0 TO 10 STEP .05\r
+    xPosition = angle * screenWidth\r
+    yPosition = COS(angle) * screenHeight * 5 + screenHeight * 5\r
+    IF angle > 0 THEN LINE (xPositionPrev, yPositionPrev)-(xPosition, yPosition), 12\r
+    xPositionPrev = xPosition\r
+    yPositionPrev = yPosition\r
+NEXT angle\r
+\r
+' Label the COS curve\r
+textRow = yPosition / stringSize + 1\r
+textCol = screenWidth * 10 / 8\r
+LOCATE textRow, textCol\r
+PRINT "cos";\r
+\r
+' Wait for user input before exiting\r
+a$ = INPUT$(1)\r
+SYSTEM\r
+\r
diff --git a/Math/Plotting/Sine and cosine table.png b/Math/Plotting/Sine and cosine table.png
new file mode 100644 (file)
index 0000000..e717cfa
Binary files /dev/null and b/Math/Plotting/Sine and cosine table.png differ
diff --git a/Math/Simulation/Explosion/Explosion simulator.bas b/Math/Simulation/Explosion/Explosion simulator.bas
new file mode 100755 (executable)
index 0000000..73fe672
--- /dev/null
@@ -0,0 +1,240 @@
+' Program to simulate shock waves propagation in gas.\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003, Initial version\r
+' 2024 - 2025, Improved program readability\r
+\r
+DECLARE SUB SetLocalPressure(xCoord!, yCoord!, pressureValue!)\r
+DECLARE SUB DrawBoundaryLine(startX!, startY!, endX!, endY!)\r
+DIM SHARED wallBoundary\r
+wallBoundary = 9980 ' Special value indicating solid wall boundaries\r
+\r
+' Shared arrays for fluid simulation:\r
+DIM SHARED pressureGrid(1 TO 100, 1 TO 100) ' Stores pressure values at each grid point\r
+DIM SHARED horizontalVelocity(1 TO 100, 1 TO 100) ' Stores horizontal velocity components\r
+DIM SHARED verticalVelocity(1 TO 100, 1 TO 100) ' Stores vertical velocity components\r
+DIM SHARED horizontalPressureChange(1 TO 100, 1 TO 100) ' Stores x-direction pressure change at each grid point\r
+DIM SHARED verticalPressureChange(1 TO 100, 1 TO 100) ' Stores y-direction pressure change at each grid point\r
+\r
+SCREEN 13\r
+PAINT (1, 1), 1\r
+SetupInitialConditions\r
+\r
+1 ' Main simulation loop\r
+\r
+    ' Check if any key is pressed; if so, exit the program\r
+    IF INKEY$ <> "" THEN SYSTEM\r
+\r
+    ' Display pressure values in a grid at the bottom of the screen.\r
+    FOR gridY = 2 TO 99\r
+        FOR gridX = 2 TO 99\r
+            IF pressureGrid(gridX, gridY) = wallBoundary THEN\r
+                ' Set velocities to zero for wall boundaries\r
+                horizontalVelocity(gridX - 1, gridY) = 0\r
+                verticalVelocity(gridX, gridY - 1) = 0\r
+                horizontalVelocity(gridX, gridY) = 0\r
+                verticalVelocity(gridX, gridY) = 0\r
+                GOTO 3 ' Skip further calculations for this grid point if it's a wall\r
+            END IF\r
+\r
+            ' Apply gravitation by subtracting pressure from vertical speed\r
+            verticalVelocity(gridX, gridY) = verticalVelocity(gridX, gridY) - (pressureGrid(gridX, gridY) / 500)\r
+\r
+            IF pressureGrid(gridX + 1, gridY) = wallBoundary THEN\r
+                horizontalVelocity(gridX, gridY) = 0 ' Set horizontal speed to zero if there's a wall to the right\r
+                GOTO 2 ' Skip further calculations for this grid point if there's a wall to the right\r
+            END IF\r
+\r
+            ' Calculate x-direction speed based on pressure difference and previous speed\r
+            horizontalVelocity(gridX, gridY) = (pressureGrid(gridX + 1, gridY) - pressureGrid(gridX, gridY)) / 20 + horizontalVelocity(gridX, gridY)\r
+\r
+2 ' Label for skipping further calculations if there's a wall to the right\r
+            IF pressureGrid(gridX, gridY + 1) = wallBoundary THEN\r
+                verticalVelocity(gridX, gridY) = 0 ' Set vertical speed to zero if there's a wall below\r
+                GOTO 3 ' Skip further calculations for this grid point if there's a wall below\r
+            END IF\r
+\r
+            ' Calculate y-direction speed based on pressure difference and previous speed\r
+            verticalVelocity(gridX, gridY) = (pressureGrid(gridX, gridY + 1) - pressureGrid(gridX, gridY)) / 20 + verticalVelocity(gridX, gridY)\r
+\r
+3 ' Label for skipping further calculations if there's a wall below or above\r
+        NEXT gridX\r
+    NEXT gridY\r
+\r
+4 ' Negative pressure correction loop\r
+    negativePressureFlag = 0 ' Initialize negative pressure flag to zero\r
+    FOR gridY = 2 TO 99\r
+        FOR gridX = 2 TO 99\r
+            pressureDifference = pressureGrid(gridX, gridY) + horizontalVelocity(gridX, gridY) + verticalVelocity(gridX, gridY) - horizontalVelocity(gridX - 1, gridY) - verticalVelocity(gridX, gridY - 1)\r
+\r
+            IF pressureDifference = 0 OR ((pressureDifference < 0) AND (pressureDifference > -.0001)) THEN\r
+                ' If difference in pressure is zero or slightly negative, set speeds to zero\r
+                IF horizontalVelocity(gridX, gridY) < 0 THEN\r
+                    horizontalVelocity(gridX, gridY) = 0\r
+                END IF\r
+                IF verticalVelocity(gridX, gridY) < 0 THEN\r
+                    verticalVelocity(gridX, gridY) = 0\r
+                END IF\r
+                IF horizontalVelocity(gridX - 1, gridY) > 0 THEN\r
+                    horizontalVelocity(gridX - 1, gridY) = 0\r
+                END IF\r
+                IF verticalVelocity(gridX, gridY - 1) > 0 THEN\r
+                    verticalVelocity(gridX, gridY - 1) = 0\r
+                END IF\r
+            END IF\r
+\r
+            ' If pressure difference is negative\r
+            IF pressureDifference < 0 THEN\r
+                IF horizontalVelocity(gridX, gridY) < 0 THEN\r
+                    horizontalVelocity(gridX, gridY) = horizontalVelocity(gridX, gridY) / 1.5 ' Divide horizontal speed by 1.5 if negative\r
+                END IF\r
+                IF verticalVelocity(gridX, gridY) < 0 THEN\r
+                    verticalVelocity(gridX, gridY) = verticalVelocity(gridX, gridY) / 1.5 ' Divide vertical speed by 1.5 if negative\r
+                END IF\r
+                IF horizontalVelocity(gridX - 1, gridY) > 0 THEN\r
+                    horizontalVelocity(gridX - 1, gridY) = horizontalVelocity(gridX - 1, gridY) / 1.5 ' Divide horizontal speed by 1.5 if positive\r
+                END IF\r
+                IF verticalVelocity(gridX, gridY - 1) > 0 THEN\r
+                    verticalVelocity(gridX, gridY - 1) = verticalVelocity(gridX, gridY - 1) / 1.5 ' Divide vertical speed by 1.5 if positive\r
+                END IF\r
+                negativePressureFlag = 1 ' Set negative pressure flag to one\r
+                ' Display negative pressure value at the bottom of the screen\r
+                LOCATE 20, 1\r
+                PRINT pressureDifference\r
+            END IF\r
+        NEXT gridX\r
+    NEXT gridY\r
+\r
+    IF negativePressureFlag = 1 THEN GOTO 4 ' If negative pressure was detected, repeat this loop to correct speeds\r
+\r
+' Update pressure based on velocity\r
+FOR gridY = 2 TO 99\r
+    FOR gridX = 2 TO 99\r
+        ' Update pressure based on speed in the x-direction\r
+        IF horizontalVelocity(gridX, gridY) > 0 THEN\r
+            horizontalPressureChange(gridX - 1, gridY) = ((pressureGrid(gridX, gridY) * horizontalVelocity(gridX - 1, gridY)) + (horizontalVelocity(gridX, gridY) * horizontalVelocity(gridX, gridY))) / (pressureGrid(gridX, gridY) + horizontalVelocity(gridX, gridY)) - horizontalVelocity(gridX - 1, gridY)\r
+        END IF\r
+\r
+        ' Update pressure based on speed in the y-direction\r
+        IF verticalVelocity(gridX, gridY) > 0 THEN\r
+            verticalPressureChange(gridX, gridY - 1) = ((pressureGrid(gridX, gridY) * verticalVelocity(gridX, gridY - 1)) + (verticalVelocity(gridX, gridY) * verticalVelocity(gridX, gridY))) / (pressureGrid(gridX, gridY) + verticalVelocity(gridX, gridY)) - verticalVelocity(gridX, gridY - 1)\r
+        END IF\r
+\r
+        ' Handle negative speeds in the x-direction\r
+        IF horizontalVelocity(gridX - 1, gridY) < 0 THEN\r
+            horizontalPressureChange(gridX, gridY) = ((pressureGrid(gridX, gridY) * horizontalVelocity(gridX, gridY)) - (horizontalVelocity(gridX - 1, gridY) * horizontalVelocity(gridX - 1, gridY))) / (pressureGrid(gridX, gridY) - horizontalVelocity(gridX - 1, gridY)) - horizontalVelocity(gridX, gridY)\r
+        END IF\r
+\r
+        ' Handle negative speeds in the y-direction\r
+        IF verticalVelocity(gridX, gridY - 1) < 0 THEN\r
+            verticalPressureChange(gridX, gridY) = ((pressureGrid(gridX, gridY) * verticalVelocity(gridX, gridY)) - (verticalVelocity(gridX, gridY - 1) * verticalVelocity(gridX, gridY - 1))) / (pressureGrid(gridX, gridY) - verticalVelocity(gridX, gridY - 1)) - verticalVelocity(gridX, gridY)\r
+        END IF\r
+    NEXT gridX\r
+NEXT gridY\r
+\r
+' Update pressure grid based on velocities\r
+FOR gridY = 2 TO 99\r
+    FOR gridX = 2 TO 99\r
+        ' Update pressure based on speed in the x-direction\r
+        pressureGrid(gridX + 1, gridY) = pressureGrid(gridX + 1, gridY) - horizontalVelocity(gridX, gridY)\r
+\r
+        ' Update pressure based on speed in the y-direction\r
+        pressureGrid(gridX, gridY + 1) = pressureGrid(gridX, gridY + 1) - verticalVelocity(gridX, gridY)\r
+\r
+        ' Add x and y speeds to pressure\r
+        pressureGrid(gridX, gridY) = pressureGrid(gridX, gridY) + horizontalVelocity(gridX, gridY)\r
+        pressureGrid(gridX, gridY) = pressureGrid(gridX, gridY) + verticalVelocity(gridX, gridY)\r
+    NEXT gridX\r
+NEXT gridY\r
+\r
+' Update velocities based on pressure changes\r
+FOR gridY = 2 TO 99\r
+    FOR gridX = 2 TO 99\r
+        ' Update speed based on previous speed in the x-direction\r
+        horizontalVelocity(gridX, gridY) = horizontalVelocity(gridX, gridY) + horizontalPressureChange(gridX, gridY)\r
+\r
+        ' Reset pressure change to zero for next iteration\r
+        horizontalPressureChange(gridX, gridY) = 0\r
+\r
+        ' Update speed based on previous speed in the y-direction\r
+        verticalVelocity(gridX, gridY) = verticalVelocity(gridX, gridY) + verticalPressureChange(gridX, gridY)\r
+\r
+        ' Reset pressure change to zero for next iteration\r
+        verticalPressureChange(gridX, gridY) = 0\r
+    NEXT gridX\r
+NEXT gridY\r
+\r
+' Draw the grid based on pressure values\r
+FOR gridY = 1 TO 100\r
+    FOR gridX = 1 TO 100\r
+        ' Draw pixel based on pressure value\r
+        PSET (gridX, gridY), pressureGrid(gridX, gridY) + 16\r
+    NEXT gridX\r
+NEXT gridY\r
+\r
+GOTO 1 ' Repeat the main simulation loop\r
+\r
+SUB DrawBoundaryLine (startX!, startY!, endX!, endY!)\r
+    ' Draws a straight line between two points in the pressure grid\r
+    ' All points along the line are set to wallBoundary value\r
+    ' Uses linear interpolation for smooth line drawing\r
+    maxSteps = ABS(startX - endX)\r
+    IF ABS(startY - endY) > maxSteps THEN maxSteps = ABS(startY - endY)\r
+    deltaX = endX - startX\r
+    deltaY = endY - startY\r
+    FOR stepCount = 0 TO maxSteps\r
+        ' Calculate interpolated coordinates\r
+        interpX = deltaX * stepCount / maxSteps + startX\r
+        interpY = deltaY * stepCount / maxSteps + startY\r
+        ' Mark this point as a wall boundary\r
+        pressureGrid(interpX, interpY) = wallBoundary\r
+    NEXT stepCount\r
+END SUB\r
+\r
+SUB SetLocalPressure (xCoord!, yCoord!, pressureValue!)\r
+    ' Sets a 2x2 block of cells to specified pressure value\r
+    ' Creates localized pressure disturbances in simulation\r
+    pressureGrid(xCoord, yCoord) = pressureValue\r
+    pressureGrid(xCoord + 1, yCoord) = pressureValue\r
+    pressureGrid(xCoord, yCoord + 1) = pressureValue\r
+    pressureGrid(xCoord + 1, yCoord + 1) = pressureValue\r
+END SUB\r
+\r
+SUB SetupInitialConditions\r
+    ' Sets up initial conditions for the simulation:\r
+    ' - Initializes all pressure and velocity arrays\r
+    ' - Places initial pressure disturbances\r
+    ' - Creates boundary walls\r
+    FOR yIndex = 1 TO 100\r
+        FOR xIndex = 1 TO 100\r
+            ' Initialize pressure and velocity variables\r
+            pressureGrid(xIndex, yIndex) = 3\r
+            horizontalVelocity(xIndex, yIndex) = 0\r
+            verticalVelocity(xIndex, yIndex) = 0\r
+            horizontalPressureChange(xIndex, yIndex) = 0\r
+            verticalPressureChange(xIndex, yIndex) = 0\r
+        NEXT xIndex\r
+    NEXT yIndex\r
+\r
+    ' Create initial pressure spots\r
+    FOR yIndex = 30 TO 60\r
+        FOR xIndex = 10 TO 50\r
+            SetLocalPressure xIndex, yIndex, 30\r
+        NEXT xIndex\r
+    NEXT yIndex\r
+\r
+    ' Draw boundary lines\r
+    DrawBoundaryLine 2, 2, 2, 99\r
+    DrawBoundaryLine 99, 2, 99, 99\r
+    DrawBoundaryLine 2, 99, 99, 99\r
+    DrawBoundaryLine 2, 2, 99, 2\r
+\r
+    ' Draw additional lines for testing\r
+    FOR xIndex = 5 TO 40 STEP 5\r
+        DrawBoundaryLine xIndex, 80, xIndex + 50, 80 - xIndex\r
+    NEXT xIndex\r
+END SUB\r
diff --git a/Math/Simulation/Explosion/index.html b/Math/Simulation/Explosion/index.html
new file mode 100644 (file)
index 0000000..e0410d6
--- /dev/null
@@ -0,0 +1,17 @@
+<HTML>\r
+<HEAD><TITLE>explode</TITLE></HEAD>\r
+\r
+<BODY>\r
+\r
+<CENTER><H1>explode</H1></CENTER>\r
+<BR>\r
+<BR>\r
+<BR>Simulates air flow.\r
+Air tries to spread equally around space,\r
+while having is inertial farces, mass and gravitation.\r
+Simulation animates shock waves propagation on\r
+flat space after explosion.\r
+\r
+<BR><IMG SRC="sshot.png">\r
+</BODY>\r
+</HTML>
\ No newline at end of file
diff --git a/Math/Simulation/Explosion/screenshot.png b/Math/Simulation/Explosion/screenshot.png
new file mode 100644 (file)
index 0000000..80089b6
Binary files /dev/null and b/Math/Simulation/Explosion/screenshot.png differ
diff --git a/Math/Simulation/Gravity in 2D.bas b/Math/Simulation/Gravity in 2D.bas
new file mode 100755 (executable)
index 0000000..3bebaeb
--- /dev/null
@@ -0,0 +1,59 @@
+' Gravitation Simulation\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' This program simulates the gravitational pull of a central mass\r
+' on a small object in two-dimensional space. The simulation is\r
+' visualized on the screen with the central mass as a large circle\r
+' and the orbiting object as a smaller circle.\r
+'\r
+' Changelog:\r
+' 2001,    Initial version\r
+' 2024 - 2025, Improved code readability\r
+\r
+DEFDBL A-Z  ' Declare all variables as double precision for accuracy\r
+SCREEN 12    ' Set the graphics mode to 640x480 resolution, 16 colors\r
+\r
+' Initialize position and velocity of the orbiting object\r
+objX = -200    ' X-coordinate of the object\r
+objY = 0       ' Y-coordinate of the object\r
+objVelX = -1   ' X-velocity (speed) of the object\r
+objVelY = 3     ' Y-velocity (speed) of the object\r
+\r
+' Draw the central mass as a large circle\r
+CIRCLE (320, 240), 100, 3\r
+\r
+' Main simulation loop\r
+DO\r
+\r
+    ' Check for user input and exit if any key is pressed\r
+    IF INKEY$ <> "" THEN SYSTEM\r
+\r
+    ' Draw a small circle to represent the orbiting object\r
+    CIRCLE (objX + 320, objY + 240), 2, 14\r
+\r
+    ' Update the position of the orbiting object\r
+    objX = objX + objVelX\r
+    objY = objY + objVelY\r
+\r
+    ' Calculate the distance from the central mass\r
+    dist = SQR(objX * objX + objY * objY)\r
+\r
+    ' Calculate the gravitational acceleration towards the center\r
+    gravAccel = 20 / dist   ' Gravitational constant for this simulation\r
+\r
+    ' Adjust velocities based on gravitational pull and distance\r
+    objVelX = objVelX + (gravAccel * (-objX) / dist)\r
+    objVelY = objVelY + (gravAccel * (-objY) / dist)\r
+\r
+    ' Draw a line to show the object's trajectory\r
+    LINE (objX + 320, objY + 240)-(320, 240), 1\r
+   \r
+   \r
+    SOUND 0, .1\r
+\r
+LOOP\r
+\r
diff --git a/Math/Simulation/Gravity in 2D.png b/Math/Simulation/Gravity in 2D.png
new file mode 100644 (file)
index 0000000..51de6bf
Binary files /dev/null and b/Math/Simulation/Gravity in 2D.png differ
diff --git a/Math/Simulation/Gravity in 3D.bas b/Math/Simulation/Gravity in 3D.bas
new file mode 100755 (executable)
index 0000000..0efdb9d
--- /dev/null
@@ -0,0 +1,129 @@
+' Program to simulate gravitational forces between atoms.\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.12, Initial version\r
+' 2024.08, Improved program readability\r
+\r
+DECLARE SUB Gravitate ()\r
+DECLARE SUB AddAtom (x AS SINGLE, y AS SINGLE, z AS SINGLE, size AS SINGLE)\r
+DECLARE SUB DisplaySystem ()\r
+\r
+DIM SHARED atomX(1 TO 100)\r
+DIM SHARED atomY(1 TO 100)\r
+DIM SHARED atomZ(1 TO 100)\r
+DIM SHARED atomXSpeed(1 TO 100)\r
+DIM SHARED atomYSpeed(1 TO 100)\r
+DIM SHARED atomZSpeed(1 TO 100)\r
+DIM SHARED atomSize(1 TO 100)\r
+DIM SHARED countOfAtoms\r
+DIM SHARED myX, myY, myZ\r
+DIM SHARED oldAtomX(1 TO 100)\r
+DIM SHARED oldAtomY(1 TO 100)\r
+DIM SHARED oldAtomSize(1 TO 100)\r
+\r
+myX = 0\r
+myY = 0\r
+myZ = -5\r
+countOfAtoms = 0\r
+\r
+SCREEN 13\r
+\r
+' Initialize the system with a random distribution of atoms\r
+FOR a = 1 TO 30\r
+    AddAtom RND * 6 - 3, RND * 6 - 3, RND * 4, 50\r
+NEXT a\r
+\r
+' Main loop to display and update the system\r
+1\r
+    DisplaySystem\r
+    Gravitate\r
+    IF INKEY$ <> "" THEN SYSTEM ' Exit on any key press\r
+   \r
+    ' Delay animation\r
+    SOUND 0, 1\r
+GOTO 1\r
+\r
+SUB AddAtom (x, y, z, size)\r
+    ' Increment the atom count\r
+    countOfAtoms = countOfAtoms + 1\r
+\r
+    ' Store the new atom's position and size\r
+    atomX(countOfAtoms) = x\r
+    atomY(countOfAtoms) = y\r
+    atomZ(countOfAtoms) = z\r
+    atomSize(countOfAtoms) = size\r
+\r
+    ' Initialize the speed of the new atom to zero\r
+    atomXSpeed(countOfAtoms) = 0\r
+    atomYSpeed(countOfAtoms) = 0\r
+    atomZSpeed(countOfAtoms) = 0\r
+END SUB\r
+\r
+SUB DisplaySystem\r
+    FOR a = 1 TO countOfAtoms\r
+        ' Calculate the relative position of each atom\r
+        x = atomX(a) - myX\r
+        y = atomY(a) - myY\r
+        z = atomZ(a) - myZ\r
+\r
+        ' Project the 3D positions onto a 2D screen\r
+        x1 = x / z * 100 + 160\r
+        y1 = y / z * 100 + 100\r
+\r
+        ' Erase the old atom position and draw the new one\r
+        CIRCLE (oldAtomX(a), oldAtomY(a)), oldAtomSize(a), 0\r
+        CIRCLE (x1, y1), atomSize(a) / z, 15\r
+\r
+        ' Update the old positions for the next frame\r
+        oldAtomX(a) = x1\r
+        oldAtomY(a) = y1\r
+        oldAtomSize(a) = atomSize(a) / z\r
+    NEXT a\r
+END SUB\r
+\r
+SUB Gravitate\r
+    DIM pxs, pys, pzs\r
+\r
+    FOR a = 1 TO countOfAtoms\r
+        ' Get the current atom's position\r
+        x = atomX(a)\r
+        y = atomY(a)\r
+        z = atomZ(a)\r
+\r
+        ' Initialize gravitational forces to zero\r
+        pxs = 0\r
+        pys = 0\r
+        pzs = 0\r
+\r
+        FOR b = 1 TO countOfAtoms\r
+            IF b = a THEN GOTO 2 ' Skip self-gravitation\r
+\r
+            ' Calculate the distance between atoms\r
+            v = SQR((atomX(b) - x) ^ 2 + (atomY(b) - y) ^ 2 + (atomZ(b) - z) ^ 2)\r
+            v2 = 1 / (v - 1)\r
+\r
+            ' Accumulate gravitational forces from other atoms\r
+            pxs = pxs + (atomX(b) - x) / v2 / 10000\r
+            pys = pys + (atomY(b) - y) / v2 / 10000\r
+            pzs = pzs + (atomZ(b) - z) / v2 / 10000\r
+\r
+2          NEXT b\r
+\r
+        ' Update the atom's velocity with the accumulated forces\r
+        atomXSpeed(a) = atomXSpeed(a) / 1.01 + pxs\r
+        atomYSpeed(a) = atomYSpeed(a) / 1.01 + pys\r
+        atomZSpeed(a) = atomZSpeed(a) / 1.01 + pzs\r
+    NEXT a\r
+\r
+    ' Update the positions of all atoms based on their velocities\r
+    FOR a = 1 TO countOfAtoms\r
+        atomX(a) = atomX(a) + atomXSpeed(a)\r
+        atomY(a) = atomY(a) + atomYSpeed(a)\r
+        atomZ(a) = atomZ(a) + atomZSpeed(a)\r
+    NEXT a\r
+END SUB\r
+\r
diff --git a/Math/Simulation/Gravity in 3D.webm b/Math/Simulation/Gravity in 3D.webm
new file mode 100644 (file)
index 0000000..c941ab8
Binary files /dev/null and b/Math/Simulation/Gravity in 3D.webm differ
diff --git a/Math/Simulation/Interference.BAS b/Math/Simulation/Interference.BAS
new file mode 100755 (executable)
index 0000000..6252cf5
--- /dev/null
@@ -0,0 +1,51 @@
+' Program simulates interference between two slightly different frequencies\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' ?, Initial version\r
+' 2024-2025, Improved program readability\r
+\r
+DECLARE SUB GetFrequency ()\r
+DECLARE SUB Start ()\r
+DECLARE FUNCTION GetY! (t!)\r
+\r
+SCREEN 12\r
+1\r
+\r
+' Check for user input and exit if any key is pressed\r
+IF INKEY$ <> "" THEN SYSTEM\r
+\r
+frame = frame + 1\r
+FOR x = 0 TO 639\r
+\r
+    oldY1 = y1\r
+    oldY2 = y2\r
+    oldY3 = y3\r
+\r
+    ' Calculate new Y values for the waves\r
+    ' First wave: simple sine wave\r
+    y1 = SIN(frame + x / 4) * 20 + 150\r
+\r
+    ' Second wave: same but with additional phase shift that increases with x\r
+    ' This creates a slight frequency difference\r
+    y2 = SIN(frame + x / 4 + (x / 50)) * 20 + 150\r
+\r
+    ' Third line: sum of both waves to show interference pattern\r
+    y3 = y1 + y2\r
+\r
+    ' Clear the previous frame by drawing black vertical line\r
+    LINE (x, 0)-(x, 479), 0\r
+\r
+    ' Draw new lines for each wave\r
+    LINE (x - 1, oldY1)-(x, y1), 1   ' Blue wave\r
+    LINE (x - 1, oldY2)-(x, y2), 2   ' Green wave\r
+    LINE (x - 1, oldY3)-(x, y3), 15  ' White combined wave\r
+\r
+NEXT x\r
+GOTO 1\r
+\r
+\r
diff --git a/Math/Simulation/Interference.webm b/Math/Simulation/Interference.webm
new file mode 100644 (file)
index 0000000..2b2b15d
Binary files /dev/null and b/Math/Simulation/Interference.webm differ
diff --git a/Math/Simulation/Interferogram.BAS b/Math/Simulation/Interferogram.BAS
new file mode 100755 (executable)
index 0000000..1378bf9
--- /dev/null
@@ -0,0 +1,52 @@
+' Program simulates lot of frequencies interfering with itself.\r
+' As a result, interferogram is produced.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' ?, Initial version\r
+' 2024 - 2025, Improved program readability\r
+\r
+' Set graphics mode (640x480 with 16 colors)\r
+SCREEN 12\r
+\r
+' Start drawing from the leftmost pixel\r
+PSET (0, 0)\r
+\r
+' Loop through all horizontal positions on screen\r
+FOR currentXPosition = 0 TO 639\r
+\r
+    ' Calculate frequency scaling factor based on position\r
+    ' This creates a gradient effect in the interference pattern\r
+    frequencyScalingFactor = (currentXPosition - 320) / 5000 + 1\r
+\r
+    ' Initialize accumulated signal value\r
+    totalSignalValue = 0\r
+\r
+    ' Sample the signal at multiple time steps to calculate interference\r
+    FOR currentTimeStep = 1 TO 5000 STEP 5\r
+        ' Generate two sine waves:\r
+        ' y1 - base frequency wave\r
+        ' y2 - frequency scaled wave (based on horizontal position)\r
+        baseWave = SIN(currentTimeStep)\r
+        scaledWave = SIN(currentTimeStep * frequencyScalingFactor)\r
+\r
+        ' Calculate interference by summing the waves and taking absolute value\r
+        totalSignalValue = totalSignalValue + ABS(baseWave + scaledWave)\r
+    NEXT currentTimeStep\r
+\r
+    ' Normalize the signal value\r
+    normalizedSignalValue = totalSignalValue / 5\r
+\r
+    ' Limit the value to screen boundaries\r
+    IF normalizedSignalValue > 470 THEN normalizedSignalValue = 470\r
+    IF normalizedSignalValue < 0 THEN normalizedSignalValue = 0\r
+\r
+    ' Draw a line from previous position to current position\r
+    LINE -(currentXPosition, 479 - normalizedSignalValue), 15\r
+\r
+NEXT currentXPosition\r
+\r
diff --git a/Math/Simulation/Interferogram.png b/Math/Simulation/Interferogram.png
new file mode 100644 (file)
index 0000000..b433b07
Binary files /dev/null and b/Math/Simulation/Interferogram.png differ
diff --git a/Math/Simulation/Surface tension.bas b/Math/Simulation/Surface tension.bas
new file mode 100755 (executable)
index 0000000..096acaa
--- /dev/null
@@ -0,0 +1,101 @@
+' Program simulates water spill and subsequent surface tension effects\r
+' that try to round out sharp edges through cellular automata rules.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.12, Initial version\r
+' 2024 - 2025, Improved program readability\r
+\r
+DEFINT A-Z\r
+WIDTH 80, 50\r
+VIEW PRINT 1 TO 50\r
+RANDOMIZE TIMER\r
+CLS\r
+\r
+' Create two grids for double buffering technique\r
+' This prevents visual artifacts during updates\r
+DIM SHARED currentGrid(1 TO 80, 1 TO 50)\r
+DIM SHARED nextGrid(1 TO 80, 1 TO 50)\r
+\r
+' Initialize grid with random water (1) and empty space (0)\r
+FOR row = 1 TO 50\r
+    FOR column = 1 TO 80\r
+        currentGrid(column, row) = INT(RND * 2)\r
+    NEXT column\r
+NEXT row\r
+\r
+'================================================================================\r
+' MAIN SIMULATION LOOP\r
+' Continuously calculates next state based on surface tension rules\r
+' Uses cellular automata approach with Moore neighborhood (8 neighbors)\r
+'================================================================================\r
+1\r
+\r
+' Check for user input and exit if any key is pressed\r
+IF INKEY$ <> "" THEN SYSTEM\r
+\r
+FOR row = 2 TO 49\r
+    FOR column = 2 TO 79\r
+        ' Count live cells around current position (Moore neighborhood)\r
+        ' This includes all 8 surrounding cells forming a square around it\r
+        neighborTotal = currentGrid(column - 1, row - 1)\r
+        neighborTotal = neighborTotal + currentGrid(column, row - 1)\r
+        neighborTotal = neighborTotal + currentGrid(column + 1, row - 1)\r
+        neighborTotal = neighborTotal + currentGrid(column - 1, row)\r
+        neighborTotal = neighborTotal + currentGrid(column + 1, row)\r
+        neighborTotal = neighborTotal + currentGrid(column - 1, row + 1)\r
+        neighborTotal = neighborTotal + currentGrid(column, row + 1)\r
+        neighborTotal = neighborTotal + currentGrid(column + 1, row + 1)\r
+\r
+        ' Apply surface tension rules:\r
+        ' 1. Water cell (value 1) survives only if surrounded by moderate density\r
+        ' 2. Empty space (value 0) becomes water if surrounded by high density\r
+        IF currentGrid(column, row) = 1 THEN\r
+            IF neighborTotal > 3 THEN\r
+                nextGrid(column, row) = 1\r
+            ELSE\r
+                nextGrid(column, row) = 0\r
+            END IF\r
+        ELSE\r
+            IF neighborTotal > 4 THEN\r
+                nextGrid(column, row) = 1\r
+            ELSE\r
+                nextGrid(column, row) = 0\r
+            END IF\r
+        END IF\r
+    NEXT column\r
+NEXT row\r
+\r
+' UPDATE DISPLAY AND SWAP BUFFERS\r
+' Renders the simulation state to screen using ASCII characters and prepares\r
+' for next iteration by swapping active/inactive grids\r
+FOR row = 1 TO 50\r
+    FOR column = 1 TO 80\r
+        ' Transfer calculated state from working buffer to display buffer\r
+        cellState = nextGrid(column, row)\r
+        currentGrid(column, row) = cellState\r
+\r
+        ' Visual representation: # for water, . for empty space\r
+        LOCATE row, column\r
+        IF cellState = 0 THEN\r
+            PRINT ".";\r
+        ELSE\r
+            PRINT "#"\r
+        END IF\r
+    NEXT column\r
+NEXT row\r
+\r
+'================================================================================\r
+' FRAME RATE CONTROL\r
+' Creates approximately 60 frames per second using inaudible sound workaround\r
+' Actual frequency value of 0 creates short delay without producing sound\r
+'================================================================================\r
+SOUND 0, 3\r
+\r
+' Return to start of simulation loop\r
+GOTO 1\r
+\r
diff --git a/Math/Simulation/Surface tension.png b/Math/Simulation/Surface tension.png
new file mode 100644 (file)
index 0000000..181c764
Binary files /dev/null and b/Math/Simulation/Surface tension.png differ
diff --git a/Math/Simulation/Wave 1.bas b/Math/Simulation/Wave 1.bas
new file mode 100755 (executable)
index 0000000..4baad40
--- /dev/null
@@ -0,0 +1,60 @@
+' Program simulate wave propagation across surface.\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.12, Initial version\r
+' 2024 - 2025, Improved program readability\r
+\r
+SCREEN 13\r
+\r
+DIM SHARED yHigh(1 TO 300)      ' surface height\r
+DIM SHARED yVelocity(1 TO 300)  ' surface movement direction and velocity\r
+\r
+' Initialize the arrays\r
+FOR x = 1 TO 300\r
+    yVelocity(x) = 0\r
+    yHigh(x) = 100\r
+NEXT x\r
+\r
+' Create an initial wave shape\r
+FOR x = 140 TO 160\r
+    yHigh(x) = 150\r
+NEXT x\r
+\r
+' Main simulation loop\r
+1 :\r
+    ' Draw the wave\r
+    FOR x = 1 TO 300\r
+        LINE (x, 0)-(x, 200 - yHigh(x)), 0\r
+        LINE (x, 200 - yHigh(x))-(x, 200), 15\r
+    NEXT x\r
+\r
+    ' Calculate the average height of neighboring points\r
+    FOR x = 10 TO 290\r
+        avgHeight = (yHigh(x - 1) + yHigh(x + 1) + yHigh(x + 2) + yHigh(x - 2)) / 4\r
+        ' Update the smooth wave height\r
+        yVelocity(x) = yVelocity(x) + (avgHeight - yHigh(x)) / 5\r
+        ' Apply a damping factor\r
+        yVelocity(x) = yVelocity(x) / 1.01\r
+    NEXT x\r
+\r
+    ' Update the wave height based on the smooth values\r
+    FOR x = 10 TO 290\r
+        yHigh(x) = yHigh(x) + yVelocity(x)\r
+        ' Apply smoothing to neighboring points\r
+        yHigh(x - 1) = yHigh(x - 1) + yVelocity(x) / 2\r
+        yHigh(x + 1) = yHigh(x + 1) + yVelocity(x) / 2\r
+    NEXT x\r
+\r
+    ' Play a sound\r
+    SOUND 0, .5\r
+\r
+    ' Check for user input to exit\r
+    IF INKEY$ <> "" THEN SYSTEM\r
+\r
+' Loop back to the start of the simulation loop\r
+GOTO 1\r
+\r
diff --git a/Math/Simulation/Wave 1.png b/Math/Simulation/Wave 1.png
new file mode 100644 (file)
index 0000000..44294d2
Binary files /dev/null and b/Math/Simulation/Wave 1.png differ
diff --git a/Math/Simulation/Wave 2.bas b/Math/Simulation/Wave 2.bas
new file mode 100755 (executable)
index 0000000..2b4e81f
--- /dev/null
@@ -0,0 +1,59 @@
+' Program renders 2D surface of a water. Water surface is disturbed by random rain droplets.\r
+' Program simulates and visualizes propagating waves on the water surface.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003, Initial version\r
+' 2024 - 2025, Improved program readability\r
+\r
+SCREEN 13\r
+\r
+DIM SHARED surfaceHeight(1 TO 300)\r
+DIM SHARED verticalMovementSpeed(1 TO 300)\r
+\r
+FOR x = 1 TO 300\r
+    verticalMovementSpeed(x) = 0\r
+    surfaceHeight(x) = 50\r
+NEXT x\r
+\r
+' Main loop\r
+1\r
+\r
+CLS\r
+FOR x = 1 TO 300\r
+    ' Draw the current wave height at each point\r
+    PSET (x, 200 - surfaceHeight(x)), 31\r
+NEXT x\r
+\r
+' Calculate new wave heights based on neighboring points\r
+FOR x = 10 TO 290\r
+    averageNeighborHeights = (surfaceHeight(x - 1) + surfaceHeight(x + 1) + surfaceHeight(x + 2) + surfaceHeight(x - 2)) / 4\r
+    verticalMovementSpeed(x) = verticalMovementSpeed(x) + (averageNeighborHeights - surfaceHeight(x)) / 5\r
+    ' Smooth the new wave heights\r
+    verticalMovementSpeed(x) = verticalMovementSpeed(x) / 1.01\r
+NEXT x\r
+\r
+' Update the current wave heights with the newly calculated values\r
+FOR x = 10 TO 290\r
+    surfaceHeight(x) = surfaceHeight(x) + verticalMovementSpeed(x)\r
+NEXT x\r
+\r
+' Randomly generate a new wave at the start point\r
+IF RND * 100 < 2 THEN\r
+    newWaveIndex = RND * 200\r
+    waveAmplitude = RND * 10 + 2\r
+    FOR x = 0 TO 3.14 STEP 3.14 / waveAmplitude\r
+        surfaceHeight(newWaveIndex) = surfaceHeight(newWaveIndex) + SIN(x) * waveAmplitude * 3\r
+        newWaveIndex = newWaveIndex + 1\r
+    NEXT x\r
+END IF\r
+\r
+' Check for user input to exit the program\r
+IF INKEY$ <> "" THEN SYSTEM\r
+\r
+' Go back to the main loop\r
+GOTO 1\r
diff --git a/Math/Simulation/Wave 2.png b/Math/Simulation/Wave 2.png
new file mode 100644 (file)
index 0000000..abd173f
Binary files /dev/null and b/Math/Simulation/Wave 2.png differ
diff --git a/Math/Sine computation.bas b/Math/Sine computation.bas
new file mode 100755 (executable)
index 0000000..8a85efc
--- /dev/null
@@ -0,0 +1,52 @@
+' Sine calculator without relying on built-in trigonometry functions.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.12, Initial version\r
+' 2024 - 2025, Improved program readability.\r
+'\r
+' This program calculates the sine of an angle without using the\r
+' built-in SIN function. Then it plots the calculated sine wave\r
+' alongside the built-in sine wave for comparison. There is\r
+' intentional vertical 1 pixel offset between the two waves so that we\r
+' can see them simultaneously.\r
+\r
+SCREEN 12\r
+\r
+' Draw a horizontal baseline\r
+LINE (0, 240)-(640, 240), 15\r
+\r
+' Initialize variables for the sine wave calculation\r
+' r represents the current value of the sine approximation\r
+' r1 represents the rate of change of the sine approximation\r
+LET radius = 0\r
+LET rateOfChange = 1\r
+\r
+' Iterate over each horizontal pixel to calculate and plot the sine values\r
+FOR angleDegrees = 1 TO 639\r
+    ' Calculate the actual sine value using the built-in SIN function\r
+    ' for comparison.\r
+    ' Scale and translate the sine wave to fit within the screen coordinates.\r
+    LET trueSineY = SIN(angleDegrees / 100) * 100 + 240\r
+    PSET (angleDegrees, trueSineY), 15\r
+\r
+    ' Update the rate of change and the radius (sine approximation)\r
+    ' This is a simple implementation of the differential equation\r
+    ' that defines the sine function, effectively integrating over time\r
+    LET rateOfChange = rateOfChange + ((0 - radius) / 10000)\r
+    LET radius = radius + rateOfChange\r
+\r
+    ' Calculate the approximate sine value using our own method\r
+    ' Offset the plot by 241 pixels to display below the true sine wave\r
+    LET approxSineY = radius\r
+    PSET (angleDegrees, approxSineY + 241), 12\r
+NEXT angleDegrees\r
+\r
+' Wait for a key press before ending the program\r
+PRINT "Press any key to exit."\r
+DO UNTIL INKEY$ <> ""\r
+LOOP\r
diff --git a/Math/Sine computation.png b/Math/Sine computation.png
new file mode 100644 (file)
index 0000000..86fc66c
Binary files /dev/null and b/Math/Sine computation.png differ
diff --git a/Math/Truth table calculator/img/screenshot, 1.png b/Math/Truth table calculator/img/screenshot, 1.png
new file mode 100644 (file)
index 0000000..b2a4218
Binary files /dev/null and b/Math/Truth table calculator/img/screenshot, 1.png differ
diff --git a/Math/Truth table calculator/img/screenshot, 2.png b/Math/Truth table calculator/img/screenshot, 2.png
new file mode 100644 (file)
index 0000000..e64bc42
Binary files /dev/null and b/Math/Truth table calculator/img/screenshot, 2.png differ
diff --git a/Math/Truth table calculator/img/screenshot, 3.png b/Math/Truth table calculator/img/screenshot, 3.png
new file mode 100644 (file)
index 0000000..c5b9612
Binary files /dev/null and b/Math/Truth table calculator/img/screenshot, 3.png differ
diff --git a/Math/Truth table calculator/index.html b/Math/Truth table calculator/index.html
new file mode 100644 (file)
index 0000000..89a2606
--- /dev/null
@@ -0,0 +1,1683 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<!-- 2025-05-31 la 07:09 -->
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+<meta name="viewport" content="width=device-width, initial-scale=1" />
+<title>Truth table calculator</title>
+<meta name="generator" content="Org Mode" />
+<style>
+  #content { max-width: 60em; margin: auto; }
+  .title  { text-align: center;
+             margin-bottom: .2em; }
+  .subtitle { text-align: center;
+              font-size: medium;
+              font-weight: bold;
+              margin-top:0; }
+  .todo   { font-family: monospace; color: red; }
+  .done   { font-family: monospace; color: green; }
+  .priority { font-family: monospace; color: orange; }
+  .tag    { background-color: #eee; font-family: monospace;
+            padding: 2px; font-size: 80%; font-weight: normal; }
+  .timestamp { color: #bebebe; }
+  .timestamp-kwd { color: #5f9ea0; }
+  .org-right  { margin-left: auto; margin-right: 0px;  text-align: right; }
+  .org-left   { margin-left: 0px;  margin-right: auto; text-align: left; }
+  .org-center { margin-left: auto; margin-right: auto; text-align: center; }
+  .underline { text-decoration: underline; }
+  #postamble p, #preamble p { font-size: 90%; margin: .2em; }
+  p.verse { margin-left: 3%; }
+  pre {
+    border: 1px solid #e6e6e6;
+    border-radius: 3px;
+    background-color: #f2f2f2;
+    padding: 8pt;
+    font-family: monospace;
+    overflow: auto;
+    margin: 1.2em;
+  }
+  pre.src {
+    position: relative;
+    overflow: auto;
+  }
+  pre.src:before {
+    display: none;
+    position: absolute;
+    top: -8px;
+    right: 12px;
+    padding: 3px;
+    color: #555;
+    background-color: #f2f2f299;
+  }
+  pre.src:hover:before { display: inline; margin-top: 14px;}
+  /* Languages per Org manual */
+  pre.src-asymptote:before { content: 'Asymptote'; }
+  pre.src-awk:before { content: 'Awk'; }
+  pre.src-authinfo::before { content: 'Authinfo'; }
+  pre.src-C:before { content: 'C'; }
+  /* pre.src-C++ doesn't work in CSS */
+  pre.src-clojure:before { content: 'Clojure'; }
+  pre.src-css:before { content: 'CSS'; }
+  pre.src-D:before { content: 'D'; }
+  pre.src-ditaa:before { content: 'ditaa'; }
+  pre.src-dot:before { content: 'Graphviz'; }
+  pre.src-calc:before { content: 'Emacs Calc'; }
+  pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
+  pre.src-fortran:before { content: 'Fortran'; }
+  pre.src-gnuplot:before { content: 'gnuplot'; }
+  pre.src-haskell:before { content: 'Haskell'; }
+  pre.src-hledger:before { content: 'hledger'; }
+  pre.src-java:before { content: 'Java'; }
+  pre.src-js:before { content: 'Javascript'; }
+  pre.src-latex:before { content: 'LaTeX'; }
+  pre.src-ledger:before { content: 'Ledger'; }
+  pre.src-lisp:before { content: 'Lisp'; }
+  pre.src-lilypond:before { content: 'Lilypond'; }
+  pre.src-lua:before { content: 'Lua'; }
+  pre.src-matlab:before { content: 'MATLAB'; }
+  pre.src-mscgen:before { content: 'Mscgen'; }
+  pre.src-ocaml:before { content: 'Objective Caml'; }
+  pre.src-octave:before { content: 'Octave'; }
+  pre.src-org:before { content: 'Org mode'; }
+  pre.src-oz:before { content: 'OZ'; }
+  pre.src-plantuml:before { content: 'Plantuml'; }
+  pre.src-processing:before { content: 'Processing.js'; }
+  pre.src-python:before { content: 'Python'; }
+  pre.src-R:before { content: 'R'; }
+  pre.src-ruby:before { content: 'Ruby'; }
+  pre.src-sass:before { content: 'Sass'; }
+  pre.src-scheme:before { content: 'Scheme'; }
+  pre.src-screen:before { content: 'Gnu Screen'; }
+  pre.src-sed:before { content: 'Sed'; }
+  pre.src-sh:before { content: 'shell'; }
+  pre.src-sql:before { content: 'SQL'; }
+  pre.src-sqlite:before { content: 'SQLite'; }
+  /* additional languages in org.el's org-babel-load-languages alist */
+  pre.src-forth:before { content: 'Forth'; }
+  pre.src-io:before { content: 'IO'; }
+  pre.src-J:before { content: 'J'; }
+  pre.src-makefile:before { content: 'Makefile'; }
+  pre.src-maxima:before { content: 'Maxima'; }
+  pre.src-perl:before { content: 'Perl'; }
+  pre.src-picolisp:before { content: 'Pico Lisp'; }
+  pre.src-scala:before { content: 'Scala'; }
+  pre.src-shell:before { content: 'Shell Script'; }
+  pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
+  /* additional language identifiers per "defun org-babel-execute"
+       in ob-*.el */
+  pre.src-cpp:before  { content: 'C++'; }
+  pre.src-abc:before  { content: 'ABC'; }
+  pre.src-coq:before  { content: 'Coq'; }
+  pre.src-groovy:before  { content: 'Groovy'; }
+  /* additional language identifiers from org-babel-shell-names in
+     ob-shell.el: ob-shell is the only babel language using a lambda to put
+     the execution function name together. */
+  pre.src-bash:before  { content: 'bash'; }
+  pre.src-csh:before  { content: 'csh'; }
+  pre.src-ash:before  { content: 'ash'; }
+  pre.src-dash:before  { content: 'dash'; }
+  pre.src-ksh:before  { content: 'ksh'; }
+  pre.src-mksh:before  { content: 'mksh'; }
+  pre.src-posh:before  { content: 'posh'; }
+  /* Additional Emacs modes also supported by the LaTeX listings package */
+  pre.src-ada:before { content: 'Ada'; }
+  pre.src-asm:before { content: 'Assembler'; }
+  pre.src-caml:before { content: 'Caml'; }
+  pre.src-delphi:before { content: 'Delphi'; }
+  pre.src-html:before { content: 'HTML'; }
+  pre.src-idl:before { content: 'IDL'; }
+  pre.src-mercury:before { content: 'Mercury'; }
+  pre.src-metapost:before { content: 'MetaPost'; }
+  pre.src-modula-2:before { content: 'Modula-2'; }
+  pre.src-pascal:before { content: 'Pascal'; }
+  pre.src-ps:before { content: 'PostScript'; }
+  pre.src-prolog:before { content: 'Prolog'; }
+  pre.src-simula:before { content: 'Simula'; }
+  pre.src-tcl:before { content: 'tcl'; }
+  pre.src-tex:before { content: 'TeX'; }
+  pre.src-plain-tex:before { content: 'Plain TeX'; }
+  pre.src-verilog:before { content: 'Verilog'; }
+  pre.src-vhdl:before { content: 'VHDL'; }
+  pre.src-xml:before { content: 'XML'; }
+  pre.src-nxml:before { content: 'XML'; }
+  /* add a generic configuration mode; LaTeX export needs an additional
+     (add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
+  pre.src-conf:before { content: 'Configuration File'; }
+
+  table { border-collapse:collapse; }
+  caption.t-above { caption-side: top; }
+  caption.t-bottom { caption-side: bottom; }
+  td, th { vertical-align:top;  }
+  th.org-right  { text-align: center;  }
+  th.org-left   { text-align: center;   }
+  th.org-center { text-align: center; }
+  td.org-right  { text-align: right;  }
+  td.org-left   { text-align: left;   }
+  td.org-center { text-align: center; }
+  dt { font-weight: bold; }
+  .footpara { display: inline; }
+  .footdef  { margin-bottom: 1em; }
+  .figure { padding: 1em; }
+  .figure p { text-align: center; }
+  .equation-container {
+    display: table;
+    text-align: center;
+    width: 100%;
+  }
+  .equation {
+    vertical-align: middle;
+  }
+  .equation-label {
+    display: table-cell;
+    text-align: right;
+    vertical-align: middle;
+  }
+  .inlinetask {
+    padding: 10px;
+    border: 2px solid gray;
+    margin: 10px;
+    background: #ffffcc;
+  }
+  #org-div-home-and-up
+   { text-align: right; font-size: 70%; white-space: nowrap; }
+  textarea { overflow-x: auto; }
+  .linenr { font-size: smaller }
+  .code-highlighted { background-color: #ffff00; }
+  .org-info-js_info-navigation { border-style: none; }
+  #org-info-js_console-label
+    { font-size: 10px; font-weight: bold; white-space: nowrap; }
+  .org-info-js_search-highlight
+    { background-color: #ffff00; color: #000000; font-weight: bold; }
+  .org-svg { }
+</style>
+<style type="text/css">
+* {    border-color: #657b83;}a {    color: #268bd2 !important;}a:visited {    color: #6c71c4 !important;}body {    background-color: #002b36 !important;    color: #839496 !important;    font-family: Libre Baskerville, serif;}html {    background-color: #002b36 !important;}input,textarea {    background-color: #073642 !important;    color: #839496 !important;}blockquote,code,pre {    background-color: #073642 !important;    border: 1px solid #094352 !important;    border-radius: 2px;    box-shadow: none;    color: #839496 !important;}code {    font-size: 1.2em;}img {    margin: 0.5em;}.buttons {    background-color: #073642 !important;    color: #93a1a1 !important;    font-family: sans-serif;    font-size: 1.5rem;}.hsReviewPanel {    display: none;}.title {    border: 0;}#postamble {    display: none;}#banner {    text-align: center;}#tabs {    background-color: #073642 !important;    float: left;    margin: 0px 0px 20px 0px;    padding: 0;    width: 100%;    font-family: sans-serif;}#tabs ul {    margin: 0;    padding: 0;}#tabs li {    float: left;    list-style-type: none;    margin: 0px 2px 0px 0px;    padding: 0px 0px 0px 0px;    white-space: nowrap;}#tabs li a {    display: block;    font-size: 120%;    font-weight: bold;    margin: 0;    padding: 4px 10px 4px 10px;    text-decoration: none;}#tabs li a:hover {    color: #90c5eb !important;}#tabs li.ui-tabs-active a {    background-color: #094352 !important;    color: #59a9e1 !important;}#content {    clear: both;    width: 80%;}#content > p {    margin: 1em;}#content > div > h2 {    margin: 0.25rem;}#postamble {    text-align: right;}blockquote {    background-color: #073642 !important;    padding-left: 0.75em;    padding-right: 0.75em;    padding-top: 0.01em;    padding-bottom: 0.01em;    overflow: hidden;    margin-left: 0;}.outline-text-2,.outline-text-3,.outline-text-4,.outline-text-5,.outline-text-6 {    padding-left: 4%;}.outline-3 {    padding-left: 4%;}.outline-4 {    padding-left: 4%;}.outline-5 {    padding-left: 4%;}.outline-6 {    padding-left: 4%;}h1,h2,h3,h4,h5,h6 {    font-family: sans-serif;    border-bottom: 2px solid;    border-color: #094352 !important;}a:hover {    text-decoration: underline;}#search {    display: block;    float: right;}.tag {    background-color: #002b36 !important;    color: #93a1a1 !important;    border: 0px;}.tag span {    background-color: #094352 !important;    margin: 0.25em;    padding: 0.25em;}#table-of-contents {    display: table;    float: right;}#table-of-contents h2 {    display: none;}#table-of-contents li {    list-style-type: none;}#table-of-contents a:hover {    text-decoration: underline;}#minitoc {    background-color: #073642 !important;    position: fixed;    top: 0px;    right: -5px;    padding: 0.5em;    z-index: 200;    width: 18%;    word-wrap: normal;    overflow: hidden;}#minitoc ul {    margin: 0.5em;    padding-left: 1em;}#minitoc h2 {    margin-top: 0;    margin-bottom: 0;    font-size: 110%;}#minitoc a {    display: block;    font-family: sans-serif;    text-decoration: none;}#minitoc a:hover {    text-decoration: underline;}/* #minitoc a { *//*   display: none; *//* } */#minitoc:hover a {    display: block;}#toTop {    top: -100px;    position: fixed;    text-align: center;    z-index: 999;    display: none;}#toTop:hover {    text-decoration: underline;}#left-panel-wrapper {    display: none;    position: fixed;    z-index: 200;}#left-panel-contents {    display: none;    position: fixed;    text-align: left;    top: 0;    z-index: 200;}#left-panel-button {    transform: rotate(90deg);    left: -23px;    position: fixed;    top: 50%;    z-index: 200;}#right-panel-wrapper {    position: fixed;    z-index: 200;}#right-panel-contents {    display: none;    z-index: 200;    position: fixed;    text-align: left;    top: 0;}.snippet-copy-to-clipboard {    display: none;    position: absolute;    left: 50px;    top: 50px;}.org-ol > li,.org-dl > dt {    margin-top: 0.5em;}.org-ul {    margin-top: 1em;    margin-bottom: 1em;}.org-ul li {    margin-top: 0.5em;}.org-ul > li > a {    font-family: sans-serif;}
+</style>
+<style type="text/css">
+/* hideshow.css --- HideShow CSS file *//* Copyright (C) 2014 All Right Reserved, Fabrice Niessen *//* This file is free software: you can redistribute it and/or *//* modify it under the terms of the GNU General Public License as *//* published by the Free Software Foundation, either version 3 of *//* the License, or (at your option) any later version. *//* This file is distributed in the hope that it will be useful, *//* but WITHOUT ANY WARRANTY; without even the implied warranty of *//* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *//* GNU General Public License for more details. *//* Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> *//* URL: https://github.com/fniessen/hide-show/ *//* Version: 20140912.1722 */.hsExpanded.hsAnchor {background: #EE7700;}.buttons {    padding: 0px 7px 13px 0px;    background: #0A3F69;}.hsButton {    color: white;    float: right;    font-size: 70%;    margin-left: 10px;}    .hsButton:hover {        text-decoration: underline;        cursor: pointer;    }.ellipsis {    color: #999999;    /* background-color: #FFF8C0; */    /* float: right; */    margin-left: 0.6em;}.hsReview {    border: 1px solid #A4A4A4;    background-color: white;    z-index: 500; /* must be greater then z-index of hsOverlay */    position: relative; /* required for z-index to work */}#hsOverlay {    width: 100%;    height: 100%;    position: fixed;    left: 0px;    top: 0px;    background-color: #000;    opacity: .70;    z-index: 250; /* must be greater than any other z-index (except the one for .hsReview */}.hsReviewPanel {    background-color: #757176;    color: white;    line-height: 1.1em;    margin: 10px 0px;    padding: 10px;    position: fixed;    width: auto;    bottom: 0px;    right: 0px;    z-index: 501;    text-align: center;}    .hsReviewPanel.hsReviewing {        display: none;    }    .hsReviewPanel:hover {        cursor: pointer;    }.hsReviewingPanel {    background-color: white;    color: #757176;    line-height: 1.1em;    margin: 10px 0px;    padding: 10px;    position: fixed;    width: auto;    bottom: 0px;    right: 0px;    z-index: 501;    text-align: center;}.hsReviewButton:hover {    cursor: pointer;}.hsUnselectable {    -webkit-touch-callout: none;    -webkit-user-select: none;    -khtml-user-select: none;    -moz-user-select: none;    -ms-user-select: none;    user-select: none;}
+</style>
+<style type="text/css">
+.org-bold { /* bold */ font-weight: bold; }.org-bold-italic { /* bold-italic */ font-weight: bold; font-style: italic; }.org-buffer-menu-buffer { /* buffer-menu-buffer */ font-weight: bold; }.org-builtin { /* font-lock-builtin-face */ color: #7a378b; }.org-button { /* button */ text-decoration: underline; }.org-calendar-today { /* calendar-today */ text-decoration: underline; }.org-change-log-acknowledgement { /* change-log-acknowledgement */ color: #b22222; }.org-change-log-conditionals { /* change-log-conditionals */ color: #a0522d; }.org-change-log-date { /* change-log-date */ color: #8b2252; }.org-change-log-email { /* change-log-email */ color: #a0522d; }.org-change-log-file { /* change-log-file */ color: #0000ff; }.org-change-log-function { /* change-log-function */ color: #a0522d; }.org-change-log-list { /* change-log-list */ color: #a020f0; }.org-change-log-name { /* change-log-name */ color: #008b8b; }.org-comint-highlight-input { /* comint-highlight-input */ font-weight: bold; }.org-comint-highlight-prompt { /* comint-highlight-prompt */ color: #00008b; }.org-comment { /* font-lock-comment-face */ color: #b22222; }.org-comment-delimiter { /* font-lock-comment-delimiter-face */ color: #b22222; }.org-completions-annotations { /* completions-annotations */ font-style: italic; }.org-completions-common-part { /* completions-common-part */ color: #000000; background-color: #ffffff; }.org-completions-first-difference { /* completions-first-difference */ font-weight: bold; }.org-constant { /* font-lock-constant-face */ color: #008b8b; }.org-diary { /* diary */ color: #ff0000; }.org-diff-context { /* diff-context */ color: #7f7f7f; }.org-diff-file-header { /* diff-file-header */ background-color: #b3b3b3; font-weight: bold; }.org-diff-function { /* diff-function */ background-color: #cccccc; }.org-diff-header { /* diff-header */ background-color: #cccccc; }.org-diff-hunk-header { /* diff-hunk-header */ background-color: #cccccc; }.org-diff-index { /* diff-index */ background-color: #b3b3b3; font-weight: bold; }.org-diff-nonexistent { /* diff-nonexistent */ background-color: #b3b3b3; font-weight: bold; }.org-diff-refine-change { /* diff-refine-change */ background-color: #d9d9d9; }.org-dired-directory { /* dired-directory */ color: #0000ff; }.org-dired-flagged { /* dired-flagged */ color: #ff0000; font-weight: bold; }.org-dired-header { /* dired-header */ color: #228b22; }.org-dired-ignored { /* dired-ignored */ color: #7f7f7f; }.org-dired-mark { /* dired-mark */ color: #008b8b; }.org-dired-marked { /* dired-marked */ color: #ff0000; font-weight: bold; }.org-dired-perm-write { /* dired-perm-write */ color: #b22222; }.org-dired-symlink { /* dired-symlink */ color: #a020f0; }.org-dired-warning { /* dired-warning */ color: #ff0000; font-weight: bold; }.org-doc { /* font-lock-doc-face */ color: #8b2252; }.org-escape-glyph { /* escape-glyph */ color: #a52a2a; }.org-file-name-shadow { /* file-name-shadow */ color: #7f7f7f; }.org-flyspell-duplicate { /* flyspell-duplicate */ color: #cdad00; font-weight: bold; text-decoration: underline; }.org-flyspell-incorrect { /* flyspell-incorrect */ color: #ff4500; font-weight: bold; text-decoration: underline; }.org-fringe { /* fringe */ background-color: #f2f2f2; }.org-function-name { /* font-lock-function-name-face */ color: #0000ff; }.org-header-line { /* header-line */ color: #333333; background-color: #e5e5e5; }.org-help-argument-name { /* help-argument-name */ font-style: italic; }.org-highlight { /* highlight */ background-color: #b4eeb4; }.org-holiday { /* holiday */ background-color: #ffc0cb; }.org-isearch { /* isearch */ color: #b0e2ff; background-color: #cd00cd; }.org-isearch-fail { /* isearch-fail */ background-color: #ffc1c1; }.org-italic { /* italic */ font-style: italic; }.org-keyword { /* font-lock-keyword-face */ color: #a020f0; }.org-lazy-highlight { /* lazy-highlight */ background-color: #afeeee; }.org-link { /* link */ color: #0000ff; text-decoration: underline; }.org-link-visited { /* link-visited */ color: #8b008b; text-decoration: underline; }.org-log-edit-header { /* log-edit-header */ color: #a020f0; }.org-log-edit-summary { /* log-edit-summary */ color: #0000ff; }.org-log-edit-unknown-header { /* log-edit-unknown-header */ color: #b22222; }.org-match { /* match */ background-color: #ffff00; }.org-next-error { /* next-error */ background-color: #eedc82; }.org-nobreak-space { /* nobreak-space */ color: #a52a2a; text-decoration: underline; }.org-org-archived { /* org-archived */ color: #7f7f7f; }.org-org-block { /* org-block */ color: #7f7f7f; }.org-org-block-begin-line { /* org-block-begin-line */ color: #b22222; }.org-org-block-end-line { /* org-block-end-line */ color: #b22222; }.org-org-checkbox { /* org-checkbox */ font-weight: bold; }.org-org-checkbox-statistics-done { /* org-checkbox-statistics-done */ color: #228b22; font-weight: bold; }.org-org-checkbox-statistics-todo { /* org-checkbox-statistics-todo */ color: #ff0000; font-weight: bold; }.org-org-clock-overlay { /* org-clock-overlay */ background-color: #ffff00; }.org-org-code { /* org-code */ color: #7f7f7f; }.org-org-column { /* org-column */ background-color: #e5e5e5; }.org-org-column-title { /* org-column-title */ background-color: #e5e5e5; font-weight: bold; text-decoration: underline; }.org-org-date { /* org-date */ color: #a020f0; text-decoration: underline; }.org-org-document-info { /* org-document-info */ color: #191970; }.org-org-document-info-keyword { /* org-document-info-keyword */ color: #7f7f7f; }.org-org-document-title { /* org-document-title */ color: #191970; font-size: 144%; font-weight: bold; }.org-org-done { /* org-done */ color: #228b22; font-weight: bold; }.org-org-drawer { /* org-drawer */ color: #0000ff; }.org-org-ellipsis { /* org-ellipsis */ color: #b8860b; text-decoration: underline; }.org-org-footnote { /* org-footnote */ color: #a020f0; text-decoration: underline; }.org-org-formula { /* org-formula */ color: #b22222; }.org-org-headline-done { /* org-headline-done */ color: #bc8f8f; }.org-org-hide { /* org-hide */ color: #ffffff; }.org-org-latex-and-export-specials { /* org-latex-and-export-specials */ color: #8b4513; }.org-org-level-1 { /* org-level-1 */ color: #0000ff; }.org-org-level-2 { /* org-level-2 */ color: #a0522d; }.org-org-level-3 { /* org-level-3 */ color: #a020f0; }.org-org-level-4 { /* org-level-4 */ color: #b22222; }.org-org-level-5 { /* org-level-5 */ color: #228b22; }.org-org-level-6 { /* org-level-6 */ color: #008b8b; }.org-org-level-7 { /* org-level-7 */ color: #7a378b; }.org-org-level-8 { /* org-level-8 */ color: #8b2252; }.org-org-link { /* org-link */ color: #0000ff; text-decoration: underline; }.org-org-meta-line { /* org-meta-line */ color: #b22222; }.org-org-mode-line-clock { /* org-mode-line-clock */ color: #000000; background-color: #bfbfbf; }.org-org-mode-line-clock-overrun { /* org-mode-line-clock-overrun */ color: #000000; background-color: #ff0000; }.org-org-quote { /* org-quote */ color: #7f7f7f; }.org-org-scheduled { /* org-scheduled */ color: #006400; }.org-org-scheduled-previously { /* org-scheduled-previously */ color: #b22222; }.org-org-scheduled-today { /* org-scheduled-today */ color: #006400; }.org-org-sexp-date { /* org-sexp-date */ color: #a020f0; }.org-org-special-keyword { /* org-special-keyword */ color: #a020f0; }.org-org-table { /* org-table */ color: #0000ff; }.org-org-tag { /* org-tag */ font-weight: bold; }.org-org-target { /* org-target */ text-decoration: underline; }.org-org-time-grid { /* org-time-grid */ color: #b8860b; }.org-org-todo { /* org-todo */ color: #ff0000; font-weight: bold; }.org-org-upcoming-deadline { /* org-upcoming-deadline */ color: #b22222; }.org-org-verbatim { /* org-verbatim */ color: #7f7f7f; }.org-org-verse { /* org-verse */ color: #7f7f7f; }.org-org-warning { /* org-warning */ color: #ff0000; font-weight: bold; }.org-outline-1 { /* outline-1 */ color: #0000ff; }.org-outline-2 { /* outline-2 */ color: #a0522d; }.org-outline-3 { /* outline-3 */ color: #a020f0; }.org-outline-4 { /* outline-4 */ color: #b22222; }.org-outline-5 { /* outline-5 */ color: #228b22; }.org-outline-6 { /* outline-6 */ color: #008b8b; }.org-outline-7 { /* outline-7 */ color: #7a378b; }.org-outline-8 { /* outline-8 */ color: #8b2252; }.org-preprocessor { /* font-lock-preprocessor-face */ color: #7a378b; }.org-query-replace { /* query-replace */ color: #b0e2ff; background-color: #cd00cd; }.org-regexp-grouping-backslash { /* font-lock-regexp-grouping-backslash */ font-weight: bold; }.org-regexp-grouping-construct { /* font-lock-regexp-grouping-construct */ font-weight: bold; }.org-region { /* region */ background-color: #eedc82; }.org-secondary-selection { /* secondary-selection */ background-color: #ffff00; }.org-shadow { /* shadow */ color: #7f7f7f; }.org-show-paren-match { /* show-paren-match */ background-color: #40e0d0; }.org-show-paren-mismatch { /* show-paren-mismatch */ color: #ffffff; background-color: #a020f0; }.org-string { /* font-lock-string-face */ color: #8b2252; }.org-tool-bar { /* tool-bar */ color: #000000; background-color: #bfbfbf; }.org-tooltip { /* tooltip */ color: #000000; background-color: #ffffe0; }.org-trailing-whitespace { /* trailing-whitespace */ background-color: #ff0000; }.org-type { /* font-lock-type-face */ color: #228b22; }.org-underline { /* underline */ text-decoration: underline; }.org-variable-name { /* font-lock-variable-name-face */ color: #a0522d; }.org-warning { /* font-lock-warning-face */ color: #ff0000; font-weight: bold; }.org-widget-button { /* widget-button */ font-weight: bold; }.org-widget-button-pressed { /* widget-button-pressed */ color: #ff0000; }.org-widget-documentation { /* widget-documentation */ color: #006400; }.org-widget-field { /* widget-field */ background-color: #d9d9d9; }.org-widget-inactive { /* widget-inactive */ color: #7f7f7f; }.org-widget-single-line-field { /* widget-single-line-field */ background-color: #d9d9d9; }
+</style>
+<script type="text/javascript">
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML="  <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n});
+</script>
+<script type="text/javascript">
+(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="<a name='"+x+"'></a><div name='"+x+"'></div>",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&&gt(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Nt=/^(?:checkbox|radio)$/i,Ct=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l)}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=ln(e,t),Pt.detach()),Gt[e]=n),n}function ln(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}b.each(["height","width"],function(e,n){b.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(b.css(e,"display"))?b.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,i),i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=b.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===b.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,n){return n?b.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,n){b.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?b(e).position()[n]+"px":r):t}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!b.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||b.css(e,"display"))},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(b.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Nt.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],o=function(e,t){t=b.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==b.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}b.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,yn,vn=b.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Cn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=b.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=a.href}catch(Ln){yn=o.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(b.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(u){var l;return o[u]=!0,b.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||a||o[c]?a?!(l=c):t:(n.dataTypes.unshift(c),s(c),!1)}),l}return s(n.dataTypes[0])||!o["*"]&&s("*")}function Mn(e,n){var r,i,o=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}b.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),b.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&b.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?b("<div>").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{},y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.done,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader("Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(jn,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}});function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);while("*"===l[0])l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"!==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.noop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.text=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Qn[t]||[]).concat(Qn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;for(;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.cssHooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};return r.duration=b.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in b.fx.speeds?b.fx.speeds[r.duration]:b.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){b.isFunction(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},b.timers=[],b.fx=rr.prototype.init,b.fx.tick=function(){var e,n=b.timers,r=0;for(Xn=b.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||b.fx.stop(),Xn=t},b.fx.timer=function(e){e()&&b.timers.push(e)&&b.fx.start()},b.fx.interval=13,b.fx.start=function(){Un||(Un=setInterval(b.fx.tick,b.fx.interval))},b.fx.stop=function(){clearInterval(Un),Un=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fx.step={},b.expr&&b.expr.filters&&(b.expr.filters.animated=function(e){return b.grep(b.timers,function(t){return e===t.elem}).length}),b.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){b.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,b.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},b.offset={setOffset:function(e,t,n){var r=b.css(e,"position");"static"===r&&(e.style.position="relative");var i=b(e),o=i.offset(),a=b.css(e,"top"),s=b.css(e,"left"),u=("absolute"===r||"fixed"===r)&&b.inArray("auto",[a,s])>-1,l={},c={},p,f;u?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),b.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(l.top=t.top-o.top+p),null!=t.left&&(l.left=t.left-o.left+f),"using"in t?t.using.call(e,l):i.css(l)}},b.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===b.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),b.nodeName(e[0],"html")||(n=e.offset()),n.top+=b.css(e[0],"borderTopWidth",!0),n.left+=b.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-b.css(r,"marginTop",!0),left:t.left-n.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||o.documentElement;while(e&&!b.nodeName(e,"html")&&"static"===b.css(e,"position"))e=e.offsetParent;return e||o.documentElement})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);b.fn[e]=function(i){return b.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?b(a).scrollLeft():o,r?o:b(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return b.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}b.each({Height:"height",Width:"width"},function(e,n){b.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){b.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return b.access(this,function(n,r,i){var o;return b.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?b.css(n,r,s):b.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=b,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return b})})(window);
+</script>
+<script type="text/javascript">
+;(function($){var l=location.href.replace(/#.*/,'');var g=$.localScroll=function(a){$('body').localScroll(a)};g.defaults={duration:1e3,axis:'y',event:'click',stop:true,target:window,reset:true};g.hash=function(a){if(location.hash){a=$.extend({},g.defaults,a);a.hash=false;if(a.reset){var e=a.duration;delete a.duration;$(a.target).scrollTo(0,a);a.duration=e}i(0,location,a)}};$.fn.localScroll=function(b){b=$.extend({},g.defaults,b);return b.lazy?this.bind(b.event,function(a){var e=$([a.target,a.target.parentNode]).filter(d)[0];if(e)i(a,e,b)}):this.find('a,area').filter(d).bind(b.event,function(a){i(a,this,b)}).end().end();function d(){return!!this.href&&!!this.hash&&this.href.replace(this.hash,'')==l&&(!b.filter||$(this).is(b.filter))}};function i(a,e,b){var d=e.hash.slice(1),f=document.getElementById(d)||document.getElementsByName(d)[0];if(!f)return;if(a)a.preventDefault();var h=$(b.target);if(b.lock&&h.is(':animated')||b.onBefore&&b.onBefore.call(b,a,f,h)===false)return;if(b.stop)h.stop(true);if(b.hash){var j=f.id==d?'id':'name',k=$('<a> </a>').attr(j,d).css({position:'absolute',top:$(window).scrollTop(),left:$(window).scrollLeft()});f[j]='';$('body').prepend(k);location=e.hash;k.remove();f[j]=d}h.scrollTo(f,b).trigger('notify.serialScroll',[f])}})(jQuery);
+</script>
+<script type="text/javascript">
+;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
+</script>
+<script type="text/javascript">
+(function(a){a.fn.zclip=function(c){if(typeof c=="object"&&!c.length){var b=a.extend({path:"ZeroClipboard.swf",copy:null,beforeCopy:null,afterCopy:null,clickAfter:true,setHandCursor:true,setCSSEffects:true},c);return this.each(function(){var e=a(this);if(e.is(":visible")&&(typeof b.copy=="string"||a.isFunction(b.copy))){ZeroClipboard.setMoviePath(b.path);var d=new ZeroClipboard.Client();if(a.isFunction(b.copy)){e.bind("zClip_copy",b.copy)}if(a.isFunction(b.beforeCopy)){e.bind("zClip_beforeCopy",b.beforeCopy)}if(a.isFunction(b.afterCopy)){e.bind("zClip_afterCopy",b.afterCopy)}d.setHandCursor(b.setHandCursor);d.setCSSEffects(b.setCSSEffects);d.addEventListener("mouseOver",function(f){e.trigger("mouseenter")});d.addEventListener("mouseOut",function(f){e.trigger("mouseleave")});d.addEventListener("mouseDown",function(f){e.trigger("mousedown");if(!a.isFunction(b.copy)){d.setText(b.copy)}else{d.setText(e.triggerHandler("zClip_copy"))}if(a.isFunction(b.beforeCopy)){e.trigger("zClip_beforeCopy")}});d.addEventListener("complete",function(f,g){if(a.isFunction(b.afterCopy)){e.trigger("zClip_afterCopy")}else{if(g.length>500){g=g.substr(0,500)+"...\n\n("+(g.length-500)+" characters not shown)"}e.removeClass("hover");alert("Copied text to clipboard:\n\n "+g)}if(b.clickAfter){e.trigger("click")}});d.glue(e[0],e.parent()[0]);a(window).bind("load resize",function(){d.reposition()})}})}else{if(typeof c=="string"){return this.each(function(){var f=a(this);c=c.toLowerCase();var e=f.data("zclipId");var d=a("#"+e+".zclip");if(c=="remove"){d.remove();f.removeClass("active hover")}else{if(c=="hide"){d.hide();f.removeClass("active hover")}else{if(c=="show"){d.show()}}}})}}}})(jQuery);var ZeroClipboard={version:"1.0.7",clients:{},moviePath:"ZeroClipboard.swf",nextId:1,$:function(a){if(typeof(a)=="string"){a=document.getElementById(a)}if(!a.addClass){a.hide=function(){this.style.display="none"};a.show=function(){this.style.display=""};a.addClass=function(b){this.removeClass(b);this.className+=" "+b};a.removeClass=function(d){var e=this.className.split(/\s+/);var b=-1;for(var c=0;c<e.length;c++){if(e[c]==d){b=c;c=e.length}}if(b>-1){e.splice(b,1);this.className=e.join(" ")}return this};a.hasClass=function(b){return !!this.className.match(new RegExp("\\s*"+b+"\\s*"))}}return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(d,b,c){var a=this.clients[d];if(a){a.receiveEvent(b,c)}},register:function(b,a){this.clients[b]=a},getDOMObjectPosition:function(c,a){var b={left:0,top:0,width:c.width?c.width:c.offsetWidth,height:c.height?c.height:c.offsetHeight};if(c&&(c!=a)){b.left+=c.offsetLeft;b.top+=c.offsetTop}return b},Client:function(a){this.handlers={};this.id=ZeroClipboard.nextId++;this.movieId="ZeroClipboardMovie_"+this.id;ZeroClipboard.register(this.id,this);if(a){this.glue(a)}}};ZeroClipboard.Client.prototype={id:0,ready:false,movie:null,clipText:"",handCursorEnabled:true,cssEffects:true,handlers:null,glue:function(d,b,e){this.domElement=ZeroClipboard.$(d);var f=99;if(this.domElement.style.zIndex){f=parseInt(this.domElement.style.zIndex,10)+1}if(typeof(b)=="string"){b=ZeroClipboard.$(b)}else{if(typeof(b)=="undefined"){b=document.getElementsByTagName("body")[0]}}var c=ZeroClipboard.getDOMObjectPosition(this.domElement,b);this.div=document.createElement("div");this.div.className="zclip";this.div.id="zclip-"+this.movieId;$(this.domElement).data("zclipId","zclip-"+this.movieId);var a=this.div.style;a.position="absolute";a.left=""+c.left+"px";a.top=""+c.top+"px";a.width=""+c.width+"px";a.height=""+c.height+"px";a.zIndex=f;if(typeof(e)=="object"){for(addedStyle in e){a[addedStyle]=e[addedStyle]}}b.appendChild(this.div);this.div.innerHTML=this.getHTML(c.width,c.height)},getHTML:function(d,a){var c="";var b="id="+this.id+"&width="+d+"&height="+a;if(navigator.userAgent.match(/MSIE/)){var e=location.href.match(/^https/i)?"https://":"http://";c+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+e+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+d+'" height="'+a+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+b+'"/><param name="wmode" value="transparent"/></object>'}else{c+='<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+d+'" height="'+a+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+b+'" wmode="transparent" />'}return c},hide:function(){if(this.div){this.div.style.left="-2000px"}},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.domElement=null;this.div=null}},reposition:function(c){if(c){this.domElement=ZeroClipboard.$(c);if(!this.domElement){this.hide()}}if(this.domElement&&this.div){var b=ZeroClipboard.getDOMObjectPosition(this.domElement);var a=this.div.style;a.left=""+b.left+"px";a.top=""+b.top+"px"}},setText:function(a){this.clipText=a;if(this.ready){this.movie.setText(a)}},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");if(!this.handlers[a]){this.handlers[a]=[]}this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a;if(this.ready){this.movie.setHandCursor(a)}},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(d,f){d=d.toString().toLowerCase().replace(/^on/,"");switch(d){case"load":this.movie=document.getElementById(this.movieId);if(!this.movie){var c=this;setTimeout(function(){c.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){var c=this;setTimeout(function(){c.receiveEvent("load",null)},100);this.ready=true;return}this.ready=true;try{this.movie.setText(this.clipText)}catch(h){}try{this.movie.setHandCursor(this.handCursorEnabled)}catch(h){}break;case"mouseover":if(this.domElement&&this.cssEffects){this.domElement.addClass("hover");if(this.recoverActive){this.domElement.addClass("active")}}break;case"mouseout":if(this.domElement&&this.cssEffects){this.recoverActive=false;if(this.domElement.hasClass("active")){this.domElement.removeClass("active");this.recoverActive=true}this.domElement.removeClass("hover")}break;case"mousedown":if(this.domElement&&this.cssEffects){this.domElement.addClass("active")}break;case"mouseup":if(this.domElement&&this.cssEffects){this.domElement.removeClass("active");this.recoverActive=false}break}if(this.handlers[d]){for(var b=0,a=this.handlers[d].length;b<a;b++){var g=this.handlers[d][b];if(typeof(g)=="function"){g(this,f)}else{if((typeof(g)=="object")&&(g.length==2)){g[0][g[1]](this,f)}else{if(typeof(g)=="string"){window[g](this,f)}}}}}}};
+</script>
+<script type="text/javascript">
+(function(t,e){function i(e,i){var n,o,a,r=e.nodeName.toLowerCase();return"area"===r?(n=e.parentNode,o=n.name,e.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap=#"+o+"]")[0],!!a&&s(a)):!1):(/input|select|textarea|button|object/.test(r)?!e.disabled:"a"===r?e.href||i:i)&&s(e)}function s(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var n=0,o=/^ui-id-\d+$/;t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({focus:function(e){return function(i,s){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),s&&s.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var s,n,o=t(this[0]);o.length&&o[0]!==document;){if(s=o.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(n=parseInt(o.css("zIndex"),10),!isNaN(n)&&0!==n))return n;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var s=t.attr(e,"tabindex"),n=isNaN(s);return(n||s>=0)&&i(e,!n)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(i,s){function n(e,i,s,n){return t.each(o,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),n&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===s?["Left","Right"]:["Top","Bottom"],a=s.toLowerCase(),r={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+s]=function(i){return i===e?r["inner"+s].call(this):this.each(function(){t(this).css(a,n(this,i)+"px")})},t.fn["outer"+s]=function(e,i){return"number"!=typeof e?r["outer"+s].call(this,e):this.each(function(){t(this).css(a,n(this,e,!0,i)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i){var s,n=t.plugins[e];if(n&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(s=0;n.length>s;s++)t.options[n[s][0]]&&n[s][1].apply(t.element,i)}},hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)}})})(jQuery),function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),s===e)return o[i]===e?null:o[i];o[i]=s}else{if(s===e)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})}(jQuery),function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,o="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!o&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),i.containment&&this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i,s=this,n=!1,o=!1;for(t.ui.ddmanager&&!this.options.dropBehaviour&&(o=t.ui.ddmanager.drop(this,e)),this.dropped&&(o=this.dropped,this.dropped=!1),i=this.element[0];i&&(i=i.parentNode);)i===document&&(n=!0);return n||"original"!==this.options.helper?("invalid"===this.options.revert&&!o||"valid"===this.options.revert&&o||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,o)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){s._trigger("stop",e)!==!1&&s._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;if("parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=["document"===n.containment?0:t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,"document"===n.containment?0:t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,("document"===n.containment?0:t(window).scrollLeft())+t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,("document"===n.containment?0:t(window).scrollTop())+(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||n.containment.constructor===Array)n.containment.constructor===Array&&(this.containment=n.containment);else{if(i=t(n.containment),s=i[0],!s)return;e="hidden"!==t(s).css("overflow"),this.containment=[(parseInt(t(s).css("borderLeftWidth"),10)||0)+(parseInt(t(s).css("paddingLeft"),10)||0),(parseInt(t(s).css("borderTopWidth"),10)||0)+(parseInt(t(s).css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(t(s).css("borderRightWidth"),10)||0)-(parseInt(t(s).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(t(s).css("borderBottomWidth"),10)||0)-(parseInt(t(s).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i}},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n,o,a=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName),l=e.pageX,c=e.pageY;return this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(c=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(c=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,c=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,o=t.extend({},i,{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,o))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var o=!1,a=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==a&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(a.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(document).scrollTop()<s.scrollSensitivity?n=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(n=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(document).scrollLeft()<s.scrollSensitivity?n=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(n=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=t(this),s=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(e,i){var s,n,o,a,r,h,l,c,u,d,p=t(this).data("ui-draggable"),f=p.options,g=f.snapTolerance,m=i.offset.left,v=m+p.helperProportions.width,_=i.offset.top,b=_+p.helperProportions.height;for(u=p.snapElements.length-1;u>=0;u--)r=p.snapElements[u].left,h=r+p.snapElements[u].width,l=p.snapElements[u].top,c=l+p.snapElements[u].height,m>r-g&&h+g>m&&_>l-g&&c+g>_||m>r-g&&h+g>m&&b>l-g&&c+g>b||v>r-g&&h+g>v&&_>l-g&&c+g>_||v>r-g&&h+g>v&&b>l-g&&c+g>b?("inner"!==f.snapMode&&(s=g>=Math.abs(l-b),n=g>=Math.abs(c-_),o=g>=Math.abs(r-v),a=g>=Math.abs(h-m),s&&(i.position.top=p._convertPositionTo("relative",{top:l-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||o||a,"outer"!==f.snapMode&&(s=g>=Math.abs(l-_),n=g>=Math.abs(c-b),o=g>=Math.abs(r-m),a=g>=Math.abs(h-v),s&&(i.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||n||o||a||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=s||n||o||a||d):(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"1.10.2",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(i)?i:function(t){return t.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},t.ui.ddmanager.droppables[e.scope]=t.ui.ddmanager.droppables[e.scope]||[],t.ui.ddmanager.droppables[e.scope].push(this),e.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,i,s){if(!i.offset)return!1;var n,o,a=(t.positionAbs||t.position.absolute).left,r=a+t.helperProportions.width,h=(t.positionAbs||t.position.absolute).top,l=h+t.helperProportions.height,c=i.offset.left,u=c+i.proportions.width,d=i.offset.top,p=d+i.proportions.height;switch(s){case"fit":return a>=c&&u>=r&&h>=d&&p>=l;case"intersect":return a+t.helperProportions.width/2>c&&u>r-t.helperProportions.width/2&&h+t.helperProportions.height/2>d&&p>l-t.helperProportions.height/2;case"pointer":return n=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,o=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,e(o,d,i.proportions.height)&&e(n,c,i.proportions.width);case"touch":return(h>=d&&p>=h||l>=d&&p>=l||d>h&&l>p)&&(a>=c&&u>=a||r>=c&&u>=r||c>a&&r>u);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions.height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions={width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight})}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=t.ui.intersect(e,this,this.options.tolerance),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n}),o.length&&(s=t.data(o[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}}(jQuery),function(t){function e(t){return parseInt(t,10)||0}function i(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,s,n,o,a=this,r=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),o="ui-resizable-"+s,n=t("<div class='ui-resizable-handle "+o+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeClass("ui-resizable-autohide"),a._handles.show())}).mouseleave(function(){r.disabled||a.resizing||(t(this).addClass("ui-resizable-autohide"),a._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,o,a=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=e(this.helper.css("left")),n=e(this.helper.css("top")),a.containment&&(s+=t(a.containment).scrollLeft()||0,n+=t(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var i,s=this.helper,n={},o=this.originalMousePosition,a=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,c=this.size.height,u=e.pageX-o.left||0,d=e.pageY-o.top||0,p=this._change[a];return p?(i=p.apply(this,[e,u,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==c&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,h=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,s,n,o,a,r=this.options;a={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=a.minHeight*this.aspectRatio,n=a.minWidth/this.aspectRatio,s=a.maxHeight*this.aspectRatio,o=a.maxWidth/this.aspectRatio,e>a.minWidth&&(a.minWidth=e),n>a.minHeight&&(a.minHeight=n),a.maxWidth>s&&(a.maxWidth=s),a.maxHeight>o&&(a.maxHeight=o)),this._vBoundaries=a},_updateCache:function(t){this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,s=this.size,n=this.axis;return i(t.height)?t.width=t.height*this.aspectRatio:i(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(s.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(s.height-t.height),t.left=e.left+(s.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,s=this.axis,n=i(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=i(t.height)&&e.maxHeight&&e.maxHeight<t.height,a=i(t.width)&&e.minWidth&&e.minWidth>t.width,r=i(t.height)&&e.minHeight&&e.minHeight>t.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(s),u=/nw|ne|n/.test(s);return a&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),a&&c&&(t.left=h-e.minWidth),n&&c&&(t.left=h-e.maxWidth),r&&u&&(t.top=l-e.minHeight),o&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,s,n,o=this.helper||this.element;for(t=0;this._proportionallyResizeElements.length>t;t++){if(n=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],e=0;i.length>e;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(s[e],10)||0);n.css({height:o.height()-this.borderDif[0]-this.borderDif[2]||0,width:o.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&t.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,o,a,r,h,l=t(this).data("ui-resizable"),c=l.options,u=l.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(l.containerElement=t(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(p),s=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){s[t]=e(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,o=l.containerSize.height,a=l.containerSize.width,r=t.ui.hasScroll(p,"left")?p.scrollWidth:a,h=t.ui.hasScroll(p)?p.scrollHeight:o,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(e){var i,s,n,o,a=t(this).data("ui-resizable"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio),a.position.top=a._helper?h.top:0),a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top,i=Math.abs((a._helper?a.offset.left-u.left:a.offset.left-u.left)+a.sizeDiff.width),s=Math.abs((a._helper?a.offset.top-u.top:a.offset.top-h.top)+a.sizeDiff.height),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o&&(i-=a.parentData.left),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):t.each(i.alsoResize,function(t){s(t)})},resize:function(e,i){var s=t(this).data("ui-resizable"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0},h=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),o={},a=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(a,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(o[e]=i||null)}),e.css(o)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):t.each(n.alsoResize,function(t,e){h(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,c=Math.round((s.width-n.width)/h)*h,u=Math.round((s.height-n.height)/l)*l,d=n.width+c,p=n.height+u,f=i.maxWidth&&d>i.maxWidth,g=i.maxHeight&&p>i.maxHeight,m=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=h),v&&(p+=l),f&&(d-=h),g&&(p-=l),/^(se|s|e)$/.test(a)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.top=o.top-u):/^(sw)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.left=o.left-c):(e.size.width=d,e.size.height=p,e.position.top=o.top-u,e.position.left=o.left-c)}})}(jQuery),function(t){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.2",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):undefined}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||o>i.right||i.top>h||a>i.bottom):"fit"===n.tolerance&&(l=i.left>o&&r>i.right&&i.top>a&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):undefined}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-t(document).scrollTop()<a.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-a.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<a.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+a.scrollSpeed)),e.pageX-t(document).scrollLeft()<a.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-a.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<a.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u=s+l>r&&h>s+l&&e+c>o&&a>e+c;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?u:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,o=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return n?this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&s||"left"===o&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,s,n,o,a=[],r=[],h=this._connectWith();if(h&&e)for(i=h.length-1;i>=0;i--)for(n=t(h[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&r.push([t.isFunction(o.options.items)?o.options.items.call(o.element):t(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(r.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=r.length-1;i>=0;i--)r[i][0].each(function(){a.push(this)});return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t(e.document[0].createElement(s)).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?n.append("<td colspan='99'>&#160;</td>"):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,o,a,r,h,l,c,u,d,p,f=null,g=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],g=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(a=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[o][l]-c)&&(d=!0,u+=this.items[o][l]),a>Math.abs(u-c)&&(a=Math.abs(u-c),r=this.items[o],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[g].element,!0),this._trigger("change",s,this._uiHash()),this.containers[g]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})}(jQuery),function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function s(e,i){var s,n,a={};for(s in i)n=i[s],e[s]!==n&&(o[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(a[s]=n));return a}var n=["add","remove","toggle"],o={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.map(function(){var e=t(this);return{el:e,start:i(this)}}),o=function(){t.each(n,function(t,i){e[i]&&a[i+"Class"](e[i])})},o(),l=l.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,o,a,r){return"boolean"==typeof n||n===e?o?t.effects.animateClass.call(this,n?{add:s}:{remove:s},o,a,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,o,a)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.2",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,o;for(o=0;s.length>o;o++)null!==s[o]&&(n=t.data(i+s[o]),n===e&&(n=""),t.css(s[o],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(o)&&o.call(n[0]),t.isFunction(e)&&e()}var n=t(this),o=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):a.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,o=i.queue,a=t.effects.effect[i.effect];return t.fx.off||!a?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):o===!1?this.each(e):this.queue(o||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()}(jQuery),function(t){var e=0,i={},s={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",s.height=s.paddingTop=s.paddingBottom=s.borderTopWidth=s.borderBottomWidth="show",t.widget("ui.accordion",{version:"1.10.2",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t(),content:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),undefined):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),"disabled"===t&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e),undefined)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),o.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),(e.active===!1&&e.collapsible===!0||!this.headers.length)&&(e.active=!1,this.active=t()),e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,s=this.options,n=s.heightStyle,o=this.element.parent(),a=this.accordionId="ui-accordion-"+(this.element.attr("id")||++e);this.active=this._findActive(s.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(e){var i=t(this),s=i.attr("id"),n=i.next(),o=n.attr("id");s||(s=a+"-header-"+e,i.attr("id",s)),o||(o=a+"-panel-"+e,n.attr("id",o)),i.attr("aria-controls",o),n.attr("aria-labelledby",s)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(s.event),"fill"===n?(i=o.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(i=0,this.headers.next().each(function(){i=Math.max(i,t(this).css("height","").height())}).height(i))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n[0]===s[0],a=o&&i.collapsible,r=a?t():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:a?t():n,newPanel:r};e.preventDefault(),o&&!i.collapsible||this._trigger("beforeActivate",e,l)===!1||(i.active=a?!1:this.headers.index(n),this.active=o?t():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),o||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-expanded":"false","aria-hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?s.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(t,e,n){var o,a,r,h=this,l=0,c=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},d=c&&u.down||u,p=function(){h._toggleComplete(n)};return"number"==typeof d&&(r=d),"string"==typeof d&&(a=d),a=a||d.easing||u.easing,r=r||d.duration||u.duration,e.length?t.length?(o=t.show().outerHeight(),e.animate(i,{duration:r,easing:a,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(s,{duration:r,easing:a,complete:p,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?l+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(o-e.outerHeight()-l),l=0)}}),undefined):e.animate(i,r,a,p):t.animate(s,r,a,p)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}})}(jQuery),function(t){var e=0;t.widget("ui.autocomplete",{version:"1.10.2",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o?!0:a?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,undefined;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:case o.NUMPAD_ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,s.preventDefault(),undefined;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),undefined):(this._searchTimeout(t),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(t),this._change(t),undefined)}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({input:t(),role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:s})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):undefined},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=this,i=++e;return function(s){i===e&&t.__response(s),t.pending--,t.pending||t.element.removeClass("ui-autocomplete-loading")}},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[t](e),undefined):(this.search(null,e),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})}(jQuery),function(t){var e,i,s,n,o="ui-button ui-widget ui-state-default ui-corner-all",a="ui-state-hover ui-state-active ",r="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",h=function(){var e=t(this).find(":ui-button");setTimeout(function(){e.button("refresh")},1)},l=function(e){var i=e.name,s=e.form,n=t([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?t(s).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),n};t.widget("ui.button",{version:"1.10.2",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var a=this,r=this.options,c="checkbox"===this.type||"radio"===this.type,u=c?"":"ui-state-active",d="ui-state-focus";null===r.label&&(r.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(o).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===e&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||t(this).removeClass(u)}).bind("click"+this.eventNamespace,function(t){r.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){a.buttonElement.addClass(d)}).bind("blur"+this.eventNamespace,function(){a.buttonElement.removeClass(d)}),c&&(this.element.bind("change"+this.eventNamespace,function(){n||a.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){r.disabled||(n=!1,i=t.pageX,s=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){r.disabled||(i!==t.pageX||s!==t.pageY)&&(n=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return r.disabled||n?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled||n)return!1;t(this).addClass("ui-state-active"),a.buttonElement.attr("aria-pressed","true");var e=a.element[0];l(e).not(e).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return r.disabled?!1:(t(this).addClass("ui-state-active"),e=this,a.document.one("mouseup",function(){e=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return r.disabled?!1:(t(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(e){return r.disabled?!1:((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",r.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(o+" "+a+" "+r).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(e?this.element.prop("disabled",!0):this.element.prop("disabled",!1),undefined):(this._resetButton(),undefined)},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?l(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var e=this.buttonElement.removeClass(r),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,o=[];s.primary||s.secondary?(this.options.text&&o.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(o.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):o.push("ui-button-text-only"),e.addClass(o.join(" "))}}),t.widget("ui.buttonset",{version:"1.10.2",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(t,e){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.dpDiv=s(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function s(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(o.inline?e.parent()[0]:o.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))})}function n(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}t.extend(t.ui,{datepicker:{version:"1.10.2"}});var o,a="datepicker",r=(new Date).getTime();t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return n(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,a,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,a,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,o,r){var h,l,c,u,d,p=this._dialogInst;return p||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},t.data(this._dialogInput[0],a,p)),n(p.settings,o||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],a,p),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,a);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,a),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,a);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,a);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,a)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,s,o){var a,r,h,l,c=this._getInst(i);return 2===arguments.length&&"string"==typeof s?"defaults"===s?t.extend({},t.datepicker._defaults):c?"all"===s?t.extend({},c.settings):this._get(c,s):null:(a=s||{},"string"==typeof s&&(a={},a[s]=o),c&&(this._curInst===c&&this._hideDatepicker(),r=this._getDateDatepicker(i,!0),h=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),n(c.settings,a),null!==h&&a.dateFormat!==e&&a.minDate===e&&(c.settings.minDate=this._formatDate(c,h)),null!==l&&a.dateFormat!==e&&a.maxDate===e&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in a&&(a.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),this._autoSize(c),this._setDate(c,r),this._updateAlternate(c),this._updateDatepicker(c)),e)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(i){var s,n,o=t.datepicker._getInst(i.target);return t.datepicker._get(o,"constrainInput")?(s=t.datepicker._possibleChars(t.datepicker._get(o,"dateFormat")),n=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">n||!s||s.indexOf(n)>-1):e},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,s,o,a,r,h,l;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),s=t.datepicker._get(i,"beforeShow"),o=s?s.apply(e,[e,i]):{},o!==!1&&(n(i.settings,o),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),a=!1,t(e).parents().each(function(){return a|="fixed"===t(this).css("position"),!a}),r={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),r=t.datepicker._checkOffset(i,r,a),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":a?"fixed":"absolute",display:"none",left:r.left+"px",top:r.top+"px"}),i.inline||(h=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?i.dpDiv.show(h,t.datepicker._get(i,"showOptions"),l):i.dpDiv[h||"show"](h?l:null),i.input.is(":visible")&&!i.input.is(":disabled")&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,o=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,s=this._getNumberOfMonths(e),n=s[1],a=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&e.input[0]!==document.activeElement&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_getBorders:function(t){var e=function(t){return{thin:1,medium:2,thick:3}[t]||t};return[parseFloat(e(t.css("border-left-width"))),parseFloat(e(t.css("border-top-width")))]},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,r=this._curInst;!r||e&&r!==t.data(e,a)||this._datepickerShowing&&(i=this._get(r,"showAnim"),s=this._get(r,"duration"),n=function(){t.datepicker._tidyDialog(r)},t.effects&&(t.effects.effect[i]||t.effects[i])?r.dpDiv.hide(i,t.datepicker._get(r,"showOptions"),s,n):r.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(r,"onClose"),o&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).each(function(){t(this).val(n)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(i,s,n){if(null==i||null==s)throw"Invalid arguments";if(s="object"==typeof s?""+s:s+"",""===s)return null;var o,a,r,h,l=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,p=(n?n.dayNames:null)||this._defaults.dayNames,f=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,g=(n?n.monthNames:null)||this._defaults.monthNames,m=-1,v=-1,_=-1,b=-1,y=!1,w=function(t){var e=i.length>o+1&&i.charAt(o+1)===t;return e&&o++,e},k=function(t){var e=w(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n=RegExp("^\\d{1,"+i+"}"),o=s.substring(l).match(n);if(!o)throw"Missing number at position "+l;return l+=o[0].length,parseInt(o[0],10)},x=function(i,n,o){var a=-1,r=t.map(w(i)?o:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(r,function(t,i){var n=i[1];return s.substr(l,n.length).toLowerCase()===n.toLowerCase()?(a=i[0],l+=n.length,!1):e}),-1!==a)return a+1;throw"Unknown name at position "+l},D=function(){if(s.charAt(l)!==i.charAt(o))throw"Unexpected literal at position "+l;l++};for(o=0;i.length>o;o++)if(y)"'"!==i.charAt(o)||w("'")?D():y=!1;else switch(i.charAt(o)){case"d":_=k("d");break;case"D":x("D",d,p);break;case"o":b=k("o");break;case"m":v=k("m");break;case"M":v=x("M",f,g);break;case"y":m=k("y");break;case"@":h=new Date(k("@")),m=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"!":h=new Date((k("!")-this._ticksTo1970)/1e4),m=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"'":w("'")?D():y=!0;break;default:D()}if(s.length>l&&(r=s.substr(l),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=m?0:-100)),b>-1)for(v=1,_=b;;){if(a=this._getDaysInMonth(m,v-1),a>=_)break;v++,_-=a}if(h=this._daylightSavingAdjust(new Date(m,v-1,_)),h.getFullYear()!==m||h.getMonth()+1!==v||h.getDate()!==_)throw"Invalid date";return h},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?e.getFullYear():(10>e.getYear()%100?"0":"")+e.getYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,i){return t.settings[i]!==e?t.settings[i]:this._defaults[i]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}l=h.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){window["DP_jQuery_"+r].datepicker._adjustDate(s,-i,"M")},next:function(){window["DP_jQuery_"+r].datepicker._adjustDate(s,+i,"M")},hide:function(){window["DP_jQuery_"+r].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+r].datepicker._gotoToday(s)},selectDay:function(){return window["DP_jQuery_"+r].datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return window["DP_jQuery_"+r].datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return window["DP_jQuery_"+r].datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,v,_,b,y,w,k,x,D,C,I,P,T,M,S,z,A,H,N,E,W,O,F,R,j=new Date,L=this._daylightSavingAdjust(new Date(j.getFullYear(),j.getMonth(),j.getDate())),Y=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),V=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),q=this._get(t,"showCurrentAtPos"),Q=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],$=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-q,te=t.drawYear;if(0>Z&&(Z+=12,te--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=G&&G>e?G:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-Q,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":V?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+Q,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":V?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?$:L,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),_=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,D=0;U[1]>D;D++){if(C=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),I=" ui-corner-all",P="",X){if(P+="<div class='ui-datepicker-group",U[1]>1)switch(D){case 0:P+=" ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case U[1]-1:P+=" ui-datepicker-group-last",I=" ui-corner-"+(Y?"left":"right");break;default:P+=" ui-datepicker-group-middle",I=""}P+="'>"}for(P+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,te,G,J,k>0||D>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",T=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)M=(w+c)%7,T+="<th"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[M]+"'>"+p[M]+"</span></th>";for(P+=T+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),z=(this._getFirstDayOfMonth(te,Z)-c+7)%7,A=Math.ceil((z+S)/7),H=X?this.maxRows>A?this.maxRows:A:A,this.maxRows=H,N=this._daylightSavingAdjust(new Date(te,Z,1-z)),E=0;H>E;E++){for(P+="<tr>",W=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(N)+"</td>":"",w=0;7>w;w++)O=m?m.apply(t.input?t.input[0]:null,[N]):[!0,""],F=N.getMonth()!==Z,R=F&&!_||!O[0]||G&&G>N||J&&N>J,W+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(N.getTime()===C.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===N.getTime()&&b.getTime()===C.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!v?"":" "+O[1]+(N.getTime()===$.getTime()?" "+this._currentClass:"")+(N.getTime()===L.getTime()?" ui-datepicker-today":""))+"'"+(F&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"&#39;")+"'")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+N.getMonth()+"' data-year='"+N.getFullYear()+"'")+">"+(F&&!v?"&#xa0;":R?"<span class='ui-state-default'>"+N.getDate()+"</span>":"<a class='ui-state-default"+(N.getTime()===L.getTime()?" ui-state-highlight":"")+(N.getTime()===$.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+N.getDate()+"</a>")+"</td>",N.setDate(N.getDate()+1),N=this._daylightSavingAdjust(N);P+=W+"</tr>"}Z++,Z>11&&(Z=0,te++),P+="</tbody></table>"+(X?"</div>"+(U[0]>0&&D===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=P}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(_||(b+=y+(!o&&m&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),_&&(b+=(!o&&m&&v?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.2",window["DP_jQuery_"+r]=t}(jQuery),function(t){var e={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.10.2",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||t(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),undefined;if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(n.focus(1),e.preventDefault()):(s.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(e.element[0],arguments)},o={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,t("<button></button>",s).button(o).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){s.position=[o.position.left-i.document.scrollLeft(),o.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){s.height=t(this).height(),s.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(s){var n=this,o=!1,a={};t.each(s,function(t,s){n._setOption(t,s),t in e&&(o=!0),t in i&&(a[t]=s)}),o&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",a)},_setOption:function(t,e){var i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=n.is(":data(ui-draggable)"),i&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(s=n.is(":data(ui-resizable)"),s&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(s){e._allowInteraction(s)||(s.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,s=[],n=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(s=i.split?i.split(" "):[i[0],i[1]],1===s.length&&(s[1]=s[0]),t.each(["left","top"],function(t,e){+s[t]===s[t]&&(n[t]=s[t],s[t]=e)}),i={my:s[0]+(0>n[0]?n[0]:"+"+n[0])+" "+s[1]+(0>n[1]?n[1]:"+"+n[1]),at:s.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})}(jQuery),function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var o,a,r,h=t(this),l=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(h,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",g=i.test(u),m={},v="show"===c;h.parent().is(".ui-effects-wrapper")?t.effects.save(h.parent(),l):t.effects.save(h,l),h.show(),o=t.effects.createWrapper(h).css({overflow:"hidden"}),a=o[p](),r=parseFloat(o.css(f))||0,m[p]=v?a:0,g||(h.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[f]=v?r:a+r),v&&(o.css(p,0),g||o.css(f,r+a)),o.animate(m,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&h.hide(),t.effects.restore(h,l),t.effects.removeWrapper(h),n()}})}}(jQuery),function(t){t.effects.effect.bounce=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(a,e.mode||"effect"),l="hide"===h,c="show"===h,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||l?1:0),g=e.duration/f,m=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=a.queue(),y=b.length;for((c||l)&&r.push("opacity"),t.effects.save(a,r),a.show(),t.effects.createWrapper(a),d||(d=a["top"===v?"outerHeight":"outerWidth"]()/3),c&&(o={opacity:1},o[v]=0,a.css("opacity",0).css(v,_?2*-d:2*d).animate(o,g,m)),l&&(d/=Math.pow(2,p-1)),o={},o[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,a.animate(n,g,m).animate(o,g,m),d=l?2*d:d/2;l&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,a.animate(n,g,m)),a.queue(function(){l&&a.hide(),t.effects.restore(a,r),t.effects.removeWrapper(a),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),a.dequeue()}}(jQuery),function(t){t.effects.effect.clip=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(a,e.mode||"hide"),l="show"===h,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(a,r),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n="IMG"===a[0].tagName?s:a,o=n[d](),l&&(n.css(d,0),n.css(p,o/2)),f[d]=l?o:0,f[p]=l?0:o/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){l||a.hide(),t.effects.restore(a,r),t.effects.removeWrapper(a),i()}})}}(jQuery),function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","opacity","height","width"],a=t.effects.setMode(n,e.mode||"hide"),r="show"===a,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,o),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===c?-s:s),u[l]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})}}(jQuery),function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),g||p.hide(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*_,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*v,l=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*v,top:-o*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(g?l*v:0),top:h+(g?c*_:0),opacity:g?0:1}).animate({left:r+(g?0:l*v),top:h+(g?0:c*_),opacity:g?1:0},e.duration||500,e.easing,s)}}(jQuery),function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}}(jQuery),function(t){t.effects.effect.fold=function(e,i){var s,n,o=t(this),a=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(o,e.mode||"hide"),h="show"===r,l="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=h!==d,f=p?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(o,a),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[l?0:1]),h&&s.css(d?{height:0,width:c}:{height:c,width:0}),m[f[0]]=h?n[0]:c,v[f[1]]=h?n[1]:0,s.animate(m,g,e.easing).animate(v,g,e.easing,function(){l&&o.hide(),t.effects.restore(o,a),t.effects.removeWrapper(o),i()})}}(jQuery),function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],o=t.effects.setMode(s,e.mode||"show"),a={backgroundColor:s.css("backgroundColor")};"hide"===o&&(a.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&s.hide(),t.effects.restore(s,n),i()}})}}(jQuery),function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),o=t.effects.setMode(n,e.mode||"show"),a="show"===o,r="hide"===o,h=a||"hide"===o,l=2*(e.times||5)+(h?1:0),c=e.duration/l,u=0,d=n.queue(),p=d.length;for((a||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;l>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,l+1))),n.dequeue()}}(jQuery),function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),o="hide"===n,a=parseInt(e.percent,10)||150,r=a/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:o?a:100,from:o?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),o=t.effects.setMode(s,e.mode||"effect"),a=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===o?0:100),r=e.direction||"both",h=e.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?a/100:1,x:"vertical"!==r?a/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==o&&(n.origin=h||["middle","center"],n.restore=!0),n.from=e.from||("show"===o?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*c.y,width:l.width*c.x,outerHeight:l.outerHeight*c.y,outerWidth:l.outerWidth*c.x},n.fade&&("show"===o&&(n.from.opacity=0,n.to.opacity=1),"hide"===o&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(a,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=a.css("position"),_=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&a.show(),s={height:a.height(),width:a.width(),outerHeight:a.outerHeight(),outerWidth:a.outerWidth()},"toggle"===e.mode&&"show"===p?(a.from=e.to||b,a.to=e.from||s):(a.from=e.from||("show"===p?b:s),a.to=e.to||("hide"===p?b:s)),o={from:{y:a.from.height/s.height,x:a.from.width/s.width},to:{y:a.to.height/s.height,x:a.to.width/s.width}},("box"===g||"both"===g)&&(o.from.y!==o.to.y&&(_=_.concat(u),a.from=t.effects.setTransition(a,u,o.from.y,a.from),a.to=t.effects.setTransition(a,u,o.to.y,a.to)),o.from.x!==o.to.x&&(_=_.concat(d),a.from=t.effects.setTransition(a,d,o.from.x,a.from),a.to=t.effects.setTransition(a,d,o.to.x,a.to))),("content"===g||"both"===g)&&o.from.y!==o.to.y&&(_=_.concat(c).concat(l),a.from=t.effects.setTransition(a,c,o.from.y,a.from),a.to=t.effects.setTransition(a,c,o.to.y,a.to)),t.effects.save(a,_),a.show(),t.effects.createWrapper(a),a.css("overflow","hidden").css(a.from),m&&(n=t.effects.getBaseline(m,s),a.from.top=(s.outerHeight-a.outerHeight())*n.y,a.from.left=(s.outerWidth-a.outerWidth())*n.x,a.to.top=(s.outerHeight-a.to.outerHeight)*n.y,a.to.left=(s.outerWidth-a.to.outerWidth)*n.x),a.css(a.from),("content"===g||"both"===g)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),l=r.concat(u).concat(d),a.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,l),i.from={height:s.height*o.from.y,width:s.width*o.from.x,outerHeight:s.outerHeight*o.from.y,outerWidth:s.outerWidth*o.from.x},i.to={height:s.height*o.to.y,width:s.width*o.to.x,outerHeight:s.height*o.to.y,outerWidth:s.width*o.to.x},o.from.y!==o.to.y&&(i.from=t.effects.setTransition(i,u,o.from.y,i.from),i.to=t.effects.setTransition(i,u,o.to.y,i.to)),o.from.x!==o.to.x&&(i.from=t.effects.setTransition(i,d,o.from.x,i.from),i.to=t.effects.setTransition(i,d,o.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,l)})})),a.animate(a.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===a.to.opacity&&a.css("opacity",a.from.opacity),"hide"===p&&a.hide(),t.effects.restore(a,_),f||("static"===v?a.css({position:"relative",top:a.to.top,left:a.to.left}):t.each(["top","left"],function(t,e){a.css(e,function(e,i){var s=parseInt(i,10),n=t?a.to.left:a.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(a),i()}})}}(jQuery),function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","height","width"],a=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",h=e.distance||20,l=e.times||3,c=2*l+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},g={},m={},v=n.queue(),_=v.length;for(t.effects.save(n,o),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+h,g[d]=(p?"+=":"-=")+2*h,m[d]=(p?"-=":"+=")+2*h,n.animate(f,u,e.easing),s=1;l>s;s++)n.animate(g,u,e.easing).animate(m,u,e.easing);n.animate(g,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}}(jQuery),function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","width","height"],a=t.effects.setMode(n,e.mode||"show"),r="show"===a,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u={};t.effects.save(n,o),n.show(),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,c?isNaN(s)?"-"+s:-s:s),u[l]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})}}(jQuery),function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}}(jQuery),function(t){t.widget("ui.menu",{version:"1.10.2",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(e),i.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,o,a,r,h=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:h=!1,n=this.previousFilter||"",o=String.fromCharCode(e.keyCode),a=!1,clearTimeout(this.filterTimer),o===n?a=!0:o=n+o,r=RegExp("^"+i(o),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=a&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(o=String.fromCharCode(e.keyCode),r=RegExp("^"+i(o),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})}(jQuery),function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var o,a=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(o!==e)return o;var i,s,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=n.children()[0];return t("body").append(n),i=a.offsetWidth,n.css("overflow","scroll"),s=a.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),o=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var o,p,g,m,v,_,b=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),k=(e.collision||"flip").split(" "),x={};return _=n(b),b[0].preventDefault&&(e.at="left top"),p=_.width,g=_.height,m=_.offset,v=t.extend({},m),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),x[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=g:"center"===e.at[1]&&(v.top+=g/2),o=i(x.at,p,g),v.left+=o[0],v.top+=o[1],this.each(function(){var n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),_=s(this,"marginTop"),D=u+f+s(this,"marginRight")+w.width,C=d+_+s(this,"marginBottom")+w.height,I=t.extend({},v),P=i(x.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?I.left-=u:"center"===e.my[0]&&(I.left-=u/2),"bottom"===e.my[1]?I.top-=d:"center"===e.my[1]&&(I.top-=d/2),I.left+=P[0],I.top+=P[1],t.support.offsetFractions||(I.left=h(I.left),I.top=h(I.top)),n={marginLeft:f,marginTop:_},t.each(["left","top"],function(i,s){t.ui.position[k[i]]&&t.ui.position[k[i]][s](I,{targetWidth:p,targetHeight:g,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:D,collisionHeight:C,offset:[o[0]+P[0],o[1]+P[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t){var i=m.left-I.left,s=i+p-u,n=m.top-I.top,o=n+g-d,h={target:{element:b,left:m.left,top:m.top,width:p,height:g},element:{element:c,left:I.left,top:I.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>o?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(h.horizontal="center"),d>g&&g>r(n+o)&&(h.vertical="middle"),h.important=a(r(i),r(s))>a(r(n),r(o))?"horizontal":"vertical",e.using.call(this,t,h)}),c.offset(t.extend(I,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-o-n;e.collisionWidth>o?h>0&&0>=l?(i=t.left+h+e.collisionWidth-o-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+o-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=a(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,o=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-o-n;e.collisionHeight>o?h>0&&0>=l?(i=t.top+h+e.collisionHeight-o-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+o-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=a(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,a=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-a-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-a-o,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,a=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-a-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-a-o,t.top+p+f+g>c&&(0>s||r(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-h,t.top+p+f+g>u&&(i>0||u>r(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,o,a=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(a?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)e.style[o]=s[o];e.appendChild(r),i=a||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()}(jQuery),function(t,e){t.widget("ui.progressbar",{version:"1.10.2",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})}(jQuery),function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.2",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=t([])},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,o.addClass("ui-state-active").focus(),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,o;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,o=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),o!==!1&&this.values(e,i,!0))):i!==this.value()&&(o=this._trigger("slide",t,{handle:this.handles[e],value:i}),o!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,o,a,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(a=this.options.step,n=o=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:o=this._valueMin();break;case t.ui.keyCode.END:o=this._valueMax();break;case t.ui.keyCode.PAGE_UP:o=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:o=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;o=this._trimAlignValue(n+a);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;o=this._trimAlignValue(n-a)}this._slide(i,r,o)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})}(jQuery),function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.2",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>&#9660;</span>"+"</a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}(jQuery),function(t,e){function i(){return++n}function s(t){return t.hash.length>1&&decodeURIComponent(t.href.replace(o,""))===decodeURIComponent(location.href.replace(o,""))}var n=0,o=/#.*$/;t.widget("ui.tabs",{version:"1.10.2",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,o){return t(o).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),o=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:o=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,o),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var o,a,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");s(n)?(o=n.hash,a=e.element.find(e._sanitizeSelector(o))):(r=e._tabId(l),o="#"+r,a=e.element.find(o),a.length||(a=e._createPanel(r),a.insertAfter(e.panels[i-1]||e.tablist)),a.attr("aria-live","polite")),a.length&&(e.panels=e.panels.add(a)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":o.substring(1),"aria-labelledby":h}),a.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,h=r?t():this._getPanelForTab(o),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():o,newPanel:h};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,o=this.tabs.eq(e),a=o.find(".ui-tabs-anchor"),r=this._getPanelForTab(o),h={tab:o,panel:r};s(a[0])||(this.xhr=t.ajax(this._ajaxSettings(a,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(o.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),o.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})}(jQuery),function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.2",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=o),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function o(t){l.of=t,a.is(":hidden")||a.position(l)}var a,r,h,l=t.extend({},this.options.position);if(n){if(a=this._find(s),a.length)return a.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),a=this._tooltip(s),e(s,a.attr("id")),a.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):a.position(t.extend({of:s},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){a.is(":visible")&&(o(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:a}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(a)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),o.stop(!0),this._hide(o,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:o}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})}(jQuery);
+</script>
+<script type="text/javascript">
+!function(a,b){"use strict";function c(c,g){var h=this;h.$el=a(c),h.el=c,h.id=e++,h.$window=a(b),h.$document=a(document),h.$el.bind("destroyed",a.proxy(h.teardown,h)),h.$clonedHeader=null,h.$originalHeader=null,h.isSticky=!1,h.hasBeenSticky=!1,h.leftOffset=null,h.topOffset=null,h.init=function(){h.$el.each(function(){var b=a(this);b.css("padding",0),h.$originalHeader=a("thead:first",this),h.$clonedHeader=h.$originalHeader.clone(),b.trigger("clonedHeader."+d,[h.$clonedHeader]),h.$clonedHeader.addClass("tableFloatingHeader"),h.$clonedHeader.css("display","none"),h.$originalHeader.addClass("tableFloatingHeaderOriginal"),h.$originalHeader.after(h.$clonedHeader),h.$printStyle=a('<style type="text/css" media="print">.tableFloatingHeader{display:none !important;}.tableFloatingHeaderOriginal{position:static !important;}</style>'),a("head").append(h.$printStyle)}),h.setOptions(g),h.updateWidth(),h.toggleHeaders(),h.bind()},h.destroy=function(){h.$el.unbind("destroyed",h.teardown),h.teardown()},h.teardown=function(){h.isSticky&&h.$originalHeader.css("position","static"),a.removeData(h.el,"plugin_"+d),h.unbind(),h.$clonedHeader.remove(),h.$originalHeader.removeClass("tableFloatingHeaderOriginal"),h.$originalHeader.css("visibility","visible"),h.$printStyle.remove(),h.el=null,h.$el=null},h.bind=function(){h.$scrollableArea.on("scroll."+d,h.toggleHeaders),h.isWindowScrolling||(h.$window.on("scroll."+d+h.id,h.setPositionValues),h.$window.on("resize."+d+h.id,h.toggleHeaders)),h.$scrollableArea.on("resize."+d,h.toggleHeaders),h.$scrollableArea.on("resize."+d,h.updateWidth)},h.unbind=function(){h.$scrollableArea.off("."+d,h.toggleHeaders),h.isWindowScrolling||(h.$window.off("."+d+h.id,h.setPositionValues),h.$window.off("."+d+h.id,h.toggleHeaders)),h.$scrollableArea.off("."+d,h.updateWidth)},h.toggleHeaders=function(){h.$el&&h.$el.each(function(){var b,c=a(this),d=h.isWindowScrolling?isNaN(h.options.fixedOffset)?h.options.fixedOffset.outerHeight():h.options.fixedOffset:h.$scrollableArea.offset().top+(isNaN(h.options.fixedOffset)?0:h.options.fixedOffset),e=c.offset(),f=h.$scrollableArea.scrollTop()+d,g=h.$scrollableArea.scrollLeft(),i=h.isWindowScrolling?f>e.top:d>e.top,j=(h.isWindowScrolling?f:0)<e.top+c.height()-h.$clonedHeader.height()-(h.isWindowScrolling?0:d);i&&j?(b=e.left-g+h.options.leftOffset,h.$originalHeader.css({position:"fixed","margin-top":h.options.marginTop,left:b,"z-index":3}),h.leftOffset=b,h.topOffset=d,h.$clonedHeader.css("display",""),h.isSticky||(h.isSticky=!0,h.updateWidth()),h.setPositionValues()):h.isSticky&&(h.$originalHeader.css("position","static"),h.$clonedHeader.css("display","none"),h.isSticky=!1,h.resetWidth(a("td,th",h.$clonedHeader),a("td,th",h.$originalHeader)))})},h.setPositionValues=function(){var a=h.$window.scrollTop(),b=h.$window.scrollLeft();!h.isSticky||0>a||a+h.$window.height()>h.$document.height()||0>b||b+h.$window.width()>h.$document.width()||h.$originalHeader.css({top:h.topOffset-(h.isWindowScrolling?0:a),left:h.leftOffset-(h.isWindowScrolling?0:b)})},h.updateWidth=function(){if(h.isSticky){h.$originalHeaderCells||(h.$originalHeaderCells=a("th,td",h.$originalHeader)),h.$clonedHeaderCells||(h.$clonedHeaderCells=a("th,td",h.$clonedHeader));var b=h.getWidth(h.$clonedHeaderCells);h.setWidth(b,h.$clonedHeaderCells,h.$originalHeaderCells),h.$originalHeader.css("width",h.$clonedHeader.width())}},h.getWidth=function(c){var d=[];return c.each(function(c){var e,f=a(this);if("border-box"===f.css("box-sizing"))e=f[0].getBoundingClientRect().width;else{var g=a("th",h.$originalHeader);if("collapse"===g.css("border-collapse"))if(b.getComputedStyle)e=parseFloat(b.getComputedStyle(this,null).width);else{var i=parseFloat(f.css("padding-left")),j=parseFloat(f.css("padding-right")),k=parseFloat(f.css("border-width"));e=f.outerWidth()-i-j-k}else e=f.width()}d[c]=e}),d},h.setWidth=function(a,b,c){b.each(function(b){var d=a[b];c.eq(b).css({"min-width":d,"max-width":d})})},h.resetWidth=function(b,c){b.each(function(b){var d=a(this);c.eq(b).css({"min-width":d.css("min-width"),"max-width":d.css("max-width")})})},h.setOptions=function(c){h.options=a.extend({},f,c),h.$scrollableArea=a(h.options.scrollableArea),h.isWindowScrolling=h.$scrollableArea[0]===b},h.updateOptions=function(a){h.setOptions(a),h.unbind(),h.bind(),h.updateWidth(),h.toggleHeaders()},h.init()}var d="stickyTableHeaders",e=0,f={fixedOffset:0,leftOffset:0,marginTop:0,scrollableArea:b};a.fn[d]=function(b){return this.each(function(){var e=a.data(this,"plugin_"+d);e?"string"==typeof b?e[b].apply(e):e.updateOptions(b):"destroy"!==b&&a.data(this,"plugin_"+d,new c(this,b))})}}(jQuery,window);
+</script>
+<script type="text/javascript">
+// darksun.js --- darksun JS file
+//
+// Copyright (C) 2011-2016 All Right Reserved, Fabrice Niessen
+//
+// This file is free software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation, either version 3 of
+// the License, or (at your option) any later version.
+//
+// This file is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")>
+// URL: https://github.com/fniessen/org-html-themes/
+// Version: 20140515.1841
+
+$(function() {
+$('p').
+html(function(index, old) {
+return old.replace('FIXME',
+'<span class="fixme">FIXME</span>');
+});
+$('p').
+html(function(index, old) {
+return old.replace('XXX',
+'<span class="fixme">XXX</span>');
+});
+});
+
+// Remove leading section number
+$(function() {
+$('.section-number-2').text("");
+for (var i = 3; i <= 5; i++) {
+$('.section-number-' + i).each(function() {
+$(this).text($(this).text().replace(/^[0-9]+\./g, ""));
+});
+}
+});
+
+$(function() {
+$('<div id="minitoc" class="dontprint"></div>').prependTo('body');
+});
+
+// generate contents of minitoc
+function generateMiniToc(divId) {
+$('#minitoc-content').empty().append('<h2>In this section</h2><ul></ul>');
+$('#' + divId).find('h3').each(function(i) {
+// [2018-09-03 Mon 03:48] Get text up to non-breaking space,
+// to omit the tags.  If there are no tags, there will be no
+// &nbsp;, so get all the text.  (This fixes a bug in the
+// original code.)
+let text = null;
+let pos = $(this).text().search(/ | ►/);
+if (pos > 0) {
+text = $(this).text().substring(0, pos);
+}
+else {
+text = $(this).text();
+}
+$("#minitoc-content>ul").append("<li><a href='#" + $(this).attr("id") + "'>"
++ text + "</a></li>");
+});
+// Ensure that the target is expanded (hideShow)
+$('#minitoc-content a[href^="#"]').click(function() {
+var href = $(this).attr('href');
+hsExpandAnchor(href);
+});
+}
+
+// display tabs
+function tabifySections() {
+
+// hide TOC (if present)
+$('#table-of-contents').hide();
+
+// grab the list of `h2' from the page
+var allSections = [];
+$('h2')
+.each(function() {
+// Remove TODO keywords and tags (contained in spans)
+var tabText = $(this).clone().find('span').remove().end()
+.text().trim();
+var tabId = $(this).parent().attr('id');
+if (tabText) {
+// - remove heading number (all leading digits)
+// - remove progress logging (between square brackets)
+// - remove leading and trailing spaces
+tabText = tabText.replace(/^\d+\s+/, '').replace(/\[[\d/%]+\]/, '').trim();
+
+allSections.push({
+text: tabText,
+id: tabId
+});
+}
+});
+
+// create the tab links
+var tabs = $('<ul id="tabs"></ul>');
+for (i = 0; i < allSections.length; i++) {
+var item = allSections[i];
+html = $('<li><a href="#' + item.id + '">' + item.text + '</a></li>');
+tabs.append(html);
+}
+
+// insert tabs menu after title (`h1'), or at the beginning of the content
+if($('.title').length !== 0) {
+$('.title').after(tabs);
+}
+else {
+$('#content').prepend(tabs);
+}
+}
+
+function selectTabAndScroll(href) {
+// At this point we assume that href is local (starts with #)
+// alert(href);
+
+// Find the tab to activate
+var targetTab = $(href).closest('.ui-tabs-panel');
+var targetTabId = targetTab.attr('id');
+var targetTabAriaLabel = targetTab.attr('aria-labelledby');
+
+var targetTabIndex = $("#content ul li")
+.index($('[aria-labelledby="' + targetTabAriaLabel + '"]'));
+
+// Activate target tab
+$('#content').tabs('option', 'active', targetTabIndex);
+
+// Rebuild minitoc
+generateMiniToc(targetTabId);
+
+// Set the location hash
+// document.location.hash = href;
+
+// Scroll to top if href was a tab
+if (href == '#' + targetTabId) {
+// alert(targetTabId);
+$.scrollTo(0);
+}
+// Scroll to href if href was not a tab
+else {
+$.scrollTo(href);
+}
+}
+
+$(document).ready(function() {
+$('#preamble').remove();
+$('#table-of-contents').remove();
+
+// Initialize hideShow
+hsInit();
+
+// Prepare for tabs
+tabifySections();
+
+// Build the tabs from the #content div
+$('#content').tabs();
+
+// Set default animation
+$('#content').tabs('option', 'show', true);
+
+// Rebuild minitoc when a tab is activated
+$('#content').tabs({
+activate: function(event, ui) {
+var divId = ui.newTab.attr('aria-controls');
+generateMiniToc(divId);
+}
+});
+
+// Required to get the link of the tab in URL
+$('#content ul').localScroll({
+target: '#content',
+duration: 0,
+hash: true
+});
+
+// Handle hash in URL
+if ($('#content') && document.location.hash) {
+hsExpandAnchor(document.location.hash);
+selectTabAndScroll(document.location.hash);
+}
+// If no hash, build the minitoc anyway for selected tab
+else {
+var divId = $('#content div[aria-expanded=true]').attr('id');
+generateMiniToc(divId);
+}
+
+// Handle click on internal links
+$('.ui-tabs-panel a[href^="#"]').click(function(e) {
+var href = $(this).attr('href');
+hsExpandAnchor(href);
+selectTabAndScroll(href);
+e.preventDefault();
+});
+
+// add sticky headers to tables
+$('table').stickyTableHeaders();
+});
+
+function copyToClipboard(text)
+{
+if (window.clipboardData && window.clipboardData.setData) { // Internet Explorer
+window.clipboardData.setData("Text", text);
+}
+else { // Fallback solution
+window.prompt("Copy to clipboard: Ctrl+C, Enter", text);
+}
+}
+
+$(document).ready(function() {
+// Assuming that the ZeroClipboard swf file is in the same folder than darksun,
+// get the path to it (it will be relative to the current page location).
+var bbScriptPath = $('script[src$="darksun.js"]').attr('src');  // the js file path
+var bbPathToZeroClipboardSwf = bbScriptPath.replace('darksun.js', 'ZeroClipboard.swf');
+
+// Add copy to clipboard snippets
+$('.org-src-container').prepend('<div class="snippet-copy-to-clipboard"><span class="copy-to-clipboard-button">[copy]</span></div>');
+
+// Display/hide snippets on source block mouseenter/mouseleave
+$(document).on('mouseenter', '.org-src-container', function () {
+$(this).find('.snippet-copy-to-clipboard').show();
+
+// Need to call zclip here, once the button is visible.
+// Beacause when the button is not visible, zclip does nothing.
+if ((window.location.protocol != 'file:') && ($(this).find('.zclip').length == 0)) {
+$(this).find('.copy-to-clipboard-button').zclip({
+//path: 'http://www.steamdev.com/zclip/js/ZeroClipboard.swf',
+//path: 'styles/darksun/js/ZeroClipboard.swf',
+path: bbPathToZeroClipboardSwf,
+copy: function() {
+return $(this).parent().parent().find('.src').text();
+}
+});
+}
+}).on('mouseleave', '.org-src-container', function () {
+$(this).find('.snippet-copy-to-clipboard').hide();
+});
+
+// Handle copy to clipboard (here, for a local file only 'file://...'
+if (window.location.protocol == 'file:') { // if local file use browser-specific code
+$('.copy-to-clipboard-button').click(function() {
+// Get the text to be copied
+var text = $(this).parent().parent().find('.src').text();
+text = text.replace(/\n/g, "\r\n");
+// alert(text);
+copyToClipboard(text);
+});
+}
+});
+
+$(function() {
+$('li > code :contains("[X]")')
+.parent()
+.addClass('checked')
+.end()
+.remove();
+$('li > code :contains("[-]")')
+.parent()
+.addClass('halfchecked')
+.end()
+.remove();
+$('li > code :contains("[ ]")')
+.parent()
+.addClass('unchecked')
+.end()
+.remove();
+});
+
+$(function() {
+$('i :contains("[#A]")')
+.replaceWith('<i><span style="color: #F67777;">[#A]</span></i>');
+$('i :contains("[#B]")')
+.replaceWith('<i><span style="color: #B6E864;">[#B]</span></i>');
+$('i :contains("[#C]")')
+.replaceWith('<i><span style="color: #C3DCFF;">[#C]</span></i>');
+});
+
+function togglePanel(e) {
+e.preventDefault();
+
+$("#left-panel-contents").toggleClass('active').toggle(200);
+$("#right-panel-contents").toggleClass('active').toggle(200);
+
+var slidePos =
+$("#left-panel-button").css("left") == "-23px"? '182px': '-23px';
+
+$("#left-panel-button").
+animate({"left": slidePos, "opacity": 0.9}, {duration: "200" });
+
+// if ($("#left-panel-contents").hasClass('active')) {
+//     hsHideTodoKeyword('done');
+// } else {
+//     hsShowTodoKeyword('done');
+// }
+
+// return false;
+}
+
+$(function() {
+$('<div id="left-panel-wrapper" class="dontprint"><div id="left-panel-contents" style="opacity: 0.9"></div><div id="left-panel-button" class="dontprint"><a href="#">Dashboard</a></div></div>')
+.appendTo('body');
+
+$('<div id="right-panel-wrapper" class="dontprint"><div id="right-panel-contents" style="opacity: 0.9"></div></div>')
+.appendTo('body');
+
+$('#left-panel-button').click(togglePanel);
+});
+
+$(function() {
+var ul = $('<ul id="listOfTodo"></ul>').appendTo('#left-panel-contents');
+var countOfTodo = {}, listOfTodo = [], totalOfTodo = 0;
+
+// assign the counts (avoid double-counting elements from the ToC)
+$('span.todo').not($('#table-of-contents span.todo')).each(function() {
+var $thisTodo = $(this).text().trim();
+
+if ($.inArray($thisTodo, listOfTodo) == -1) {
+countOfTodo[$thisTodo] = 1;
+listOfTodo.push($thisTodo);
+}
+else
+countOfTodo[$thisTodo] += 1;
+totalOfTodo += 1;
+});
+
+function scoreTodo(t) {
+switch (t) {
+case 'NEW': return 1;
+case 'TODO': return 2;
+case 'STRT': return 3;
+case 'WAIT': return 4;
+case 'DLGT': return 5;
+case 'SDAY': return 6;
+case 'DFRD': return 7;
+case 'DONE': return 8;
+case 'CANX': return 9;
+default: return 0;
+}
+}
+
+function compareTodo(a, b) {
+if (scoreTodo(a) < scoreTodo(b)) return -1;
+if (scoreTodo(a) > scoreTodo(b)) return 1;
+return 0;
+}
+
+listOfTodo.sort(compareTodo);
+
+// display
+for (i = 0; i < listOfTodo.length; i++) {
+var $thisTodo = listOfTodo[i];
+$(ul).append('<li><span class="todo ' + $thisTodo + '">'+ $thisTodo + '</span>'
++ ' <small>(' + countOfTodo[$thisTodo] + ')</small></li>');
+}
+
+$('#listOfTodo')
+.before('<b>Next Actions</b> <small>(' + totalOfTodo + ')</small>:<br>');
+});
+
+$(function() {
+var ul = $('<ul id="listOfDone"></ul>').appendTo('#left-panel-contents');
+var countOfDone = {}, listOfDone = [], totalOfDone = 0;
+
+// assign the counts (avoid double-counting elements from the ToC)
+$('span.done').not($('#table-of-contents span.done')).each(function() {
+var $thisDone = $(this).text().trim();
+
+if ($.inArray($thisDone, listOfDone) == -1) {
+countOfDone[$thisDone] = 1;
+listOfDone.push($thisDone);
+}
+else
+countOfDone[$thisDone] += 1;
+totalOfDone += 1;
+});
+
+// display
+for (i = 0; i < listOfDone.length; i++) {
+var $thisDone = listOfDone[i];
+$(ul).append('<li><span class="done ' + $thisDone + '">'+ $thisDone + '</span>'
++ ' <small>(' + countOfDone[$thisDone] + ')</small></li>');
+}
+
+$('#listOfDone')
+.before('<b>Done Actions</b> <small>(' + totalOfDone + '):</small><br>');
+});
+
+$(function() {
+var ul = $('<ul id="listOfTags"></ul>').appendTo('#right-panel-contents');
+var countOfTags = {}, listOfTags = [], totalOfTags = 0;
+
+// assign the counts (avoid double-counting elements from the ToC)
+$('span.tag').not($('#table-of-contents span.tag')).each(function() {
+var $thisTagGroup = $(this).text().trim().split(/\s/);
+// \s matches spaces, tabs, new lines, etc.
+
+for (tag in $thisTagGroup) {
+if ($.inArray($thisTagGroup[tag], listOfTags) == -1) {
+countOfTags[$thisTagGroup[tag]] = 1;
+listOfTags.push($thisTagGroup[tag]);
+}
+else
+countOfTags[$thisTagGroup[tag]] += 1;
+totalOfTags += 1;
+}
+});
+
+listOfTags.sort();
+
+// display
+for (i = 0; i < listOfTags.length; i++) {
+var $thisTag = listOfTags[i];
+// $(ul).append('<li><span class="tag ' + $thisTag + '">'+
+//                   $thisTag + '</span> <small>(' + countOfTags[$thisTag] + ')</small></li>');
+$(ul).append('<li><span class="tag"><span class="' + $thisTag + '">' + $thisTag
++ '</span></span>'
++ ' <small>(' + countOfTags[$thisTag] + ')</small></li>');
+}
+
+$('#listOfTags')
+.before('<b>Contexts</b> <small>(' + totalOfTags + '):</small><br>');
+});
+
+$(function() {
+$('.done').parent(':header').parent().find(':header').addClass('DONEheader');
+$('.done').parent(':header').parent().css({color: '#999999'});
+});
+
+$(function() {
+$('span.todo').click(function(e) {
+var orgKeyword = $(this).text().trim();
+$('.' + orgKeyword).toggleClass('selected');
+$('#content .' + orgKeyword).parent().parent()
+.toggleClass('match' + orgKeyword);
+$('#left-panel-wrapper .' + orgKeyword).parent()
+.toggleClass('match' + orgKeyword);
+e.preventDefault();
+})
+});
+
+$(function() {
+$('.tag span').click(function(e) {
+var orgTag = $(this).text().trim();
+$('.' + orgTag).toggleClass('selected');
+$('#content .' + orgTag).parent().parent().parent()
+.toggleClass('matchtag');
+$('#right-panel-wrapper .' + orgTag).parent().parent()
+.toggleClass('matchtag');
+e.preventDefault();
+})
+});
+
+function clickPreviousTab() {
+var active = $('#content').tabs('option', 'active');
+// Avoid going back to last tab
+if (active == 0) return;
+
+$('#content').tabs('option', 'active', active - 1);
+
+// Set the location href
+var href = $('#content div[aria-expanded=true]').attr('id');
+document.location.hash = href;
+$.scrollTo(0);
+}
+
+function clickNextTab() {
+var active = $('#content').tabs('option', 'active');
+$('#content').tabs('option', 'active', active + 1);
+
+// Set the location href
+var href = $('#content div[aria-expanded=true]').attr('id');
+document.location.hash = href;
+$.scrollTo(0);
+}
+
+function orgDefkey(e) {
+if (!e)
+var e = window.event;
+var keycode = (e.keyCode) ? e.keyCode : e.which;
+var actualkey = String.fromCharCode(keycode);
+switch (actualkey) {
+case "?": // help (dashboard)
+case "h":
+togglePanel(e);
+break;
+case "n": // next
+clickNextTab();
+break;
+case "p": // previous
+clickPreviousTab();
+break;
+// case "b": // scroll down - should be mapped to Shift-SPC
+//     $(window).scrollTop($(window).scrollTop()-$(window).height());
+//     break;
+case "<": // scroll to top
+$(window).scrollTop(0);
+break;
+case ">": // scroll to bottom
+$(window).scrollTop($(document).height());
+break;
+case "-": // collapse all
+hsCollapseAll();
+break;
+case "+": // expand all
+hsExpandAll();
+break;
+case "r": // go to next task
+hsReviewTaskNext();
+break;
+case "R": // go to previous task
+hsReviewTaskPrev();
+break;
+case "q": // quit reviewing
+hsReviewTaskQuit();
+break;
+case "g": // refresh the page (from the server, rather than the cache)
+location.reload(true);
+break;
+}
+}
+
+document.onkeypress = orgDefkey;
+</script>
+<script type="text/javascript">
+// hideshow.js --- HideShow JS file
+//
+// Copyright (C) 2014 All Right Reserved, Fabrice Niessen
+//
+// This file is free software: you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation, either version 3 of
+// the License, or (at your option) any later version.
+//
+// This file is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")>
+// URL: https://github.com/fniessen/hide-show/
+// Version: 20140912.1722
+
+// var HS_COLLAPSIBLE_HEADERS = $('h3, h4, h5'); // collapsible headers
+
+if (typeof HS_STARTUP_FOLDED === 'undefined') {
+var HS_STARTUP_FOLDED = false;      // Show just the overview, or show all.
+}
+
+if (typeof HS_SHOW_ALL_TEXT === 'undefined') {
+var HS_SHOW_ALL_TEXT = 'Expand';
+}
+if (typeof HS_HIDE_ALL_TEXT === 'undefined') {
+var HS_HIDE_ALL_TEXT = 'Collapse';
+}
+
+if (typeof HS_ALWAYS_DISPLAY_ICON === 'undefined') {
+var HS_ALWAYS_DISPLAY_ICON = false; // Display an icon for all states, or
+// just when closed.
+}
+
+if (typeof HS_ICON_CLOSED === 'undefined') {
+var HS_ICON_CLOSED = '&#x25BA;';    // black right-pointing pointer
+}
+if (typeof HS_ICON_OPEN === 'undefined') {
+var HS_ICON_OPEN = '&#x25BC;';      // black down-pointing triangle
+}
+if (typeof HS_ICON_EMPTY === 'undefined') {
+var HS_ICON_EMPTY = '&#x25A0;';     // black square
+}
+
+if (typeof HS_SHOW_ALL_OPEN_DONE_TREES === 'undefined') {
+var HS_SHOW_ALL_OPEN_DONE_TREES = false; // Expand all will open DONE trees.
+}
+
+if (typeof HS_CLASS === 'undefined') {
+var HS_CLASS = 'hsCollapsible';
+}
+
+// Expand a header
+function hsExpand(header) {
+hsExpand2(header, true);
+}
+
+// Expand a header
+function hsExpand2(header, expandDoneHeader) {
+// Ignore non collapsible entries
+if (!header.parent().hasClass(HS_CLASS)) return;
+
+// Do not expand DONE node if not required
+if (hsIsDoneHeader(header) && !expandDoneHeader) return;
+
+header.children('span[class="ellipsis"]').remove();
+if (HS_ALWAYS_DISPLAY_ICON == true) {
+header.append('<span class="ellipsis"> ' + HS_ICON_OPEN + '</span>');
+}
+header.parent().removeClass('hsCollapsed').addClass('hsExpanded');
+header.nextAll().show();
+}
+
+// Expand a header and all its parents
+function hsExpandParents(header) {
+hsExpand(header);
+header.parents('.hsCollapsed').each(function() {
+hsExpand($(this).children(':header'));
+});
+}
+
+// Collapse a header and all its parents
+function hsCollapseParents(header) {
+hsCollapse(header);
+header.parents('.hsExpanded').each(function() {
+hsCollapse($(this).children(':header'));
+});
+}
+
+// Collapse a header
+function hsCollapse(header) {
+// Ignore non collapsible entries
+if (!header.parent().hasClass(HS_CLASS)) return;
+
+header.children('span[class="ellipsis"]').remove();
+header.append('<span class="ellipsis"> ' + HS_ICON_CLOSED + '</span>');
+header.parent().removeClass('hsExpanded').addClass('hsCollapsed');
+// header.nextAll().hide('fast');
+header.nextAll().hide();
+}
+
+// Toggle a header
+function hsToggleCollapsing(header) {
+if (header.parent().hasClass('hsCollapsed'))
+hsExpand(header);
+else if (header.parent().hasClass('hsExpanded'))
+hsCollapse(header);
+}
+
+// Expand all headers
+function hsExpandAll() {
+$('#content .hsCollapsed').each(function() {
+hsExpand2($(this).children(':header'), HS_SHOW_ALL_OPEN_DONE_TREES);
+});
+}
+
+// Collapse all headers
+function hsCollapseAll() {
+$('#content .hsExpanded').each(function() {
+hsCollapse($(this).children(':header'));
+});
+}
+
+// Collapse all visible headers
+function hsCollapseAllVisible() {
+$('#content .hsExpanded:visible').each(function() {
+hsCollapse($(this).children(':header'));
+});
+}
+
+// Add click events to H3/H4/H5 headers which have contents.
+function hsInit() {
+for (var i = 3; i <= 5; i++) {
+$('#content .outline-' + i).each(function() {
+var header = $(this).children(':header');
+if (header.siblings().length > 0) {
+$(this).addClass(HS_CLASS);
+header.css({cursor: 'pointer'});
+header.click(function() {
+hsToggleCollapsing($(this)); });
+
+// Allow to override global Collapse/Expand default on an entry
+// basis (see property `:HTML_CONTAINER_CLASS:')
+if (header.parent().hasClass('hsCollapsed')) {
+hsCollapse(header);
+} else if (header.parent().hasClass('hsExpanded')) {
+hsExpand(header);
+} else {
+hsSetDefaultVisibility(header);
+}
+}
+else {
+if (HS_ALWAYS_DISPLAY_ICON == true) {
+header.append('<span class="ellipsis"> ' + HS_ICON_EMPTY
++ '</span>');
+}
+$(this).addClass('hsEmpty');
+}
+});
+}
+
+// Add div to hold minitoc content (so it can be cleared without deleting the buttons)
+$('#minitoc').append($('<div id="minitoc-content"></div>'));
+
+// Add buttons
+$('#minitoc').append($('<div class="buttons dontprint"></div>'));
+$('.buttons').append($('<span>' + HS_SHOW_ALL_TEXT + '</span>')
+.addClass('hsButton')
+.click(hsExpandAll));
+$('.buttons').append($('<span>' + HS_HIDE_ALL_TEXT + '</span>')
+.addClass('hsButton')
+.click(hsCollapseAll));
+}
+
+// Returns true if a header is a DONE header
+function hsIsDoneHeader(header) {
+return $('span.done', header).length;
+}
+
+// Sets the default visibility state to a header
+function hsSetDefaultVisibility(header) {
+if (HS_STARTUP_FOLDED) {
+hsCollapse(header);
+}
+else {
+if (!hsIsDoneHeader(header) | HS_SHOW_ALL_OPEN_DONE_TREES) {
+hsExpand(header);
+}
+else {
+hsCollapse(header);
+}
+}
+}
+
+// Expands an anchor, i.e. expand all parent headers
+function hsExpandAnchor(id) {
+// alert(id);
+if (id) {
+// alert($(id + '.hsNode').length);
+$(id).parents('.hsCollapsed').each(function() {
+hsExpand2($(this).children(':header'), true);
+});
+}
+}
+
+// Search for next task to review, starting from beginning of current tab.
+// If BACKWARD is true, search in the reverse direction.
+function hsReviewTaskNext(backward) {
+// If no tasks to review at all, do nothing.
+if ($('.outline-2 span.todo').length == 0) return;
+
+if ($('.hsReviewing').length == 0) { // reviewing is starting
+$('body').addClass('hsReviewing');
+$('.hsReviewPanel').addClass('hsReviewing');
+$('body').prepend('<div id="hsOverlay"></div>');
+hsAddReviewingPanels();
+
+hsCollapseAll();
+// Get first task to review on each tab and expand it
+$('.outline-2').each(function(){
+var firstTodo = $(this).find('span.todo:first').parent().parent();
+firstTodo.addClass('hsReview');
+hsExpandParents($(firstTodo).children(':header'));
+});
+}
+else {
+// Get all todos
+var todosElements = $('.outline-2:visible span.todo').parent().parent();
+// alert(todosElements.length);
+var todos = jQuery.makeArray(todosElements);
+if (backward) {
+todos = todos.reverse();
+}
+
+// Find current review item and review the next one
+var foundReview = false;
+var index;
+for (index = 0; index < todos.length; ++index) {
+var todo = todos[index];
+if (foundReview) {
+$(todo).addClass('hsReview');
+hsExpandParents($(todo).children(':header'));
+break;
+}
+if ($(todo).hasClass('hsReview')) {
+foundReview = true;
+if (index < todos.length - 1) {
+$(todo).removeClass('hsReview');
+hsCollapseParents($(todo).children(':header'));
+}
+}
+}
+
+// Update reviewing panel
+if (index < todos.length) {
+var reviewItem = index + 1;
+if (backward) {
+reviewItem = todos.length - index;
+}
+
+$('.outline-2:visible .hsReviewingPanel .hsReviewItem').text(reviewItem);
+}
+}
+
+// Scroll to the current review item
+$('html, body').animate({
+scrollTop: $(".hsReview:visible").offset().top
+}, 200);
+}
+
+// go to previous task to review
+function hsReviewTaskPrev() {
+hsReviewTaskNext(true);
+}
+
+// stop reviewing tasks
+function hsReviewTaskQuit() {
+$('body').removeClass('hsReviewing');
+$('.hsReviewPanel').removeClass('hsReviewing');
+$('.hsReview').removeClass('hsReview');
+$('#hsOverlay').remove();
+$('.hsReviewingPanel').remove();
+}
+
+function hsHideTodoKeyword(kw) {
+$('span.' + kw).addClass('hsHidden').parent().parent().hide();
+}
+
+function hsShowTodoKeyword(kw) {
+$('span.' + kw).removeClass('hsHidden').parent().parent().show();
+// XXX Show if parent is not collapsed!
+}
+
+function hsAddReviewPanels() {
+$('.outline-2').each(function(e) {
+var nbItems = $(this).find('span.todo').length;
+if (nbItems > 0) {
+$(this).prepend('<div class="hsReviewPanel hsUnselectable" onclick="hsReviewTaskNext()">'
++ 'Press r or click here<br>'
++ 'to review ' + nbItems + ' tasks<br>'
++ '(out of ' +  nbReviewTotalTasks + ' tasks)</div>');
+}
+});
+}
+
+function hsAddReviewingPanels() {
+$('.outline-2').each(function(e) {
+var nbItems = $(this).find('span.todo').length;
+if (nbItems > 0) {
+$(this).prepend('<div class="hsReviewingPanel hsUnselectable">Reviewing task <span class="hsReviewItem">1</span> / ' + nbItems + '<br>'
++ '(out of ' +  nbReviewTotalTasks + ' tasks)<br>'
++ 'Shortcuts: '
++ '<span class="hsReviewButton" onclick="hsReviewTaskNext()">r (next)</span> - '
++ '<span class="hsReviewButton" onclick="hsReviewTaskPrev()">R (previous)</span>'
++ '</div>');
+}
+else {
+$(this).prepend('<div class="hsReviewingPanel hsUnselectable">No task to review<br>'
++ '(out of ' +  nbReviewTotalTasks + ' tasks)<br>'
++ 'Shortcuts: '
++ '<span class="hsReviewButton" onclick="hsReviewTaskNext()">r (next)</span> - '
++ '<span class="hsReviewButton" onclick="hsReviewTaskPrev()">R (previous)</span>'
++ '</div>');
+}
+});
+}
+
+var nbReviewTotalTasks;
+
+$(document).ready(function() {
+nbReviewTotalTasks = $('.outline-2 span.todo').length;
+hsAddReviewPanels();
+});
+</script>
+<style type="text/css">
+               body {
+                 max-width: 35cm !important;
+               }
+               #content {
+                 max-width: 80em !important;
+                 width: 90%;
+               }
+               </style>
+<link rel="stylesheet" type="text/css" href="https://thomasf.github.io/solarized-css/solarized-dark.min.css" />
+</head>
+<body>
+<div id="content" class="content">
+<h1 class="title">Truth table calculator</h1>
+<div id="table-of-contents" role="doc-toc">
+<h2>Table of Contents</h2>
+<div id="text-table-of-contents" role="doc-toc">
+<ul>
+<li><a href="#org553b118">1. Implemented logical operations</a>
+<ul>
+<li><a href="#org9c9ba62">1.1. Equivalent ( ⇔ , 1 )</a></li>
+<li><a href="#org2c565cf">1.2. Implies ( ⇒ , 2 )</a></li>
+<li><a href="#org8fd4c7b">1.3. OR ( ∨ , 3 )</a></li>
+<li><a href="#org422252e">1.4. AND ( ∧ , 4 )</a></li>
+<li><a href="#orga0458d5">1.5. NOT ( ¬ , 5 )</a></li>
+</ul>
+</li>
+<li><a href="#org375fe5b">2. Examples</a>
+<ul>
+<li><a href="#org2167e31">2.1. Example: (A ∧ B) ∨ ¬C</a></li>
+<li><a href="#org0a783a3">2.2. Example: A ⇒ (B ∨ ¬C)</a></li>
+<li><a href="#org20994f3">2.3. Example: (A ⇔ B) ∧ C</a></li>
+</ul>
+</li>
+</ul>
+</div>
+</div>
+<ul class="org-ul">
+<li>See also: <a href="https://en.wikipedia.org/wiki/Truth_table">https://en.wikipedia.org/wiki/Truth_table</a></li>
+</ul>
+
+<p>
+A truth table is a mathematical table used to determine the output of a logic function
+based on all possible combinations of inputs. Each row represents a possible state of
+the input variables, with the corresponding output value. Truth tables are crucial in
+designing and understanding digital circuits, Boolean algebra, and logical expressions.
+</p>
+
+<div id="outline-container-org553b118" class="outline-2">
+<h2 id="org553b118"><span class="section-number-2">1.</span> Implemented logical operations</h2>
+<div class="outline-text-2" id="text-1">
+</div>
+<div id="outline-container-org9c9ba62" class="outline-3">
+<h3 id="org9c9ba62"><span class="section-number-3">1.1.</span> Equivalent ( ⇔ , 1 )</h3>
+<div class="outline-text-3" id="text-1-1">
+<p>
+The equivalent operation, also known as logical biconditional, is true if and only if
+both inputs are the same. In other words, it asserts that both propositions are
+either both true or both false. It is often represented by the symbol <b>⇔</b>.
+</p>
+
+<p>
+Truth Table:
+</p>
+
+<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
+
+
+<colgroup>
+<col  class="org-left" />
+
+<col  class="org-left" />
+
+<col  class="org-left" />
+</colgroup>
+<thead>
+<tr>
+<th scope="col" class="org-left">A</th>
+<th scope="col" class="org-left">B</th>
+<th scope="col" class="org-left">A ⇔ B</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+</tr>
+
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+
+<div id="outline-container-org2c565cf" class="outline-3">
+<h3 id="org2c565cf"><span class="section-number-3">1.2.</span> Implies ( ⇒ , 2 )</h3>
+<div class="outline-text-3" id="text-1-2">
+<p>
+An implication asserts that if the first proposition is true, the
+second must be true as well. If the first is false, the implication
+holds regardless of the second proposition's value.
+</p>
+
+<p>
+Truth table:
+</p>
+
+<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
+
+
+<colgroup>
+<col  class="org-left" />
+
+<col  class="org-left" />
+
+<col  class="org-left" />
+</colgroup>
+<thead>
+<tr>
+<th scope="col" class="org-left">A</th>
+<th scope="col" class="org-left">B</th>
+<th scope="col" class="org-left">A ⇒ B</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+</tr>
+
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+
+<div id="outline-container-org8fd4c7b" class="outline-3">
+<h3 id="org8fd4c7b"><span class="section-number-3">1.3.</span> OR ( ∨ , 3 )</h3>
+<div class="outline-text-3" id="text-1-3">
+<p>
+The OR operation, also known as logical disjunction, is true if at
+least one of the inputs is true. It asserts that if either proposition
+is true, the entire expression is true.
+</p>
+
+<p>
+Truth table:
+</p>
+
+<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
+
+
+<colgroup>
+<col  class="org-left" />
+
+<col  class="org-left" />
+
+<col  class="org-left" />
+</colgroup>
+<thead>
+<tr>
+<th scope="col" class="org-left">A</th>
+<th scope="col" class="org-left">B</th>
+<th scope="col" class="org-left">A ∨ B</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+</tr>
+
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+
+<div id="outline-container-org422252e" class="outline-3">
+<h3 id="org422252e"><span class="section-number-3">1.4.</span> AND ( ∧ , 4 )</h3>
+<div class="outline-text-3" id="text-1-4">
+<p>
+The AND operation, also known as logical conjunction, is true if and
+only if both inputs are true.
+</p>
+
+<p>
+Truth table:
+</p>
+
+<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
+
+
+<colgroup>
+<col  class="org-left" />
+
+<col  class="org-left" />
+
+<col  class="org-left" />
+</colgroup>
+<thead>
+<tr>
+<th scope="col" class="org-left">A</th>
+<th scope="col" class="org-left">B</th>
+<th scope="col" class="org-left">A ∧ B</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+</tr>
+
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+
+<div id="outline-container-orga0458d5" class="outline-3">
+<h3 id="orga0458d5"><span class="section-number-3">1.5.</span> NOT ( ¬ , 5 )</h3>
+<div class="outline-text-3" id="text-1-5">
+<p>
+The NOT operation, also known as logical negation, inverts the value
+of the input. If the input is true, the output is false, and vice
+versa.
+</p>
+
+<p>
+Truth Table:
+</p>
+
+<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
+
+
+<colgroup>
+<col  class="org-left" />
+
+<col  class="org-left" />
+</colgroup>
+<thead>
+<tr>
+<th scope="col" class="org-left">A</th>
+<th scope="col" class="org-left">¬A</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+</div>
+<div id="outline-container-org375fe5b" class="outline-2">
+<h2 id="org375fe5b"><span class="section-number-2">2.</span> Examples</h2>
+<div class="outline-text-2" id="text-2">
+</div>
+<div id="outline-container-org2167e31" class="outline-3">
+<h3 id="org2167e31"><span class="section-number-3">2.1.</span> Example: (A ∧ B) ∨ ¬C</h3>
+<div class="outline-text-3" id="text-2-1">
+<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
+
+
+<colgroup>
+<col  class="org-left" />
+
+<col  class="org-left" />
+
+<col  class="org-left" />
+
+<col  class="org-left" />
+</colgroup>
+<thead>
+<tr>
+<th scope="col" class="org-left">A</th>
+<th scope="col" class="org-left">B</th>
+<th scope="col" class="org-left">C</th>
+<th scope="col" class="org-left">(A ∧ B) ∨ ¬C</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+</tr>
+
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+</tr>
+
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+</tr>
+
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+
+<div id="outline-container-org0a783a3" class="outline-3">
+<h3 id="org0a783a3"><span class="section-number-3">2.2.</span> Example: A ⇒ (B ∨ ¬C)</h3>
+<div class="outline-text-3" id="text-2-2">
+<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
+
+
+<colgroup>
+<col  class="org-left" />
+
+<col  class="org-left" />
+
+<col  class="org-left" />
+
+<col  class="org-left" />
+</colgroup>
+<thead>
+<tr>
+<th scope="col" class="org-left">A</th>
+<th scope="col" class="org-left">B</th>
+<th scope="col" class="org-left">C</th>
+<th scope="col" class="org-left">A ⇒ (B ∨ ¬C)</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+</tr>
+
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+</tr>
+
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+</tr>
+
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+
+<div id="outline-container-org20994f3" class="outline-3">
+<h3 id="org20994f3"><span class="section-number-3">2.3.</span> Example: (A ⇔ B) ∧ C</h3>
+<div class="outline-text-3" id="text-2-3">
+<p>
+Truth Table:
+</p>
+
+<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
+
+
+<colgroup>
+<col  class="org-left" />
+
+<col  class="org-left" />
+
+<col  class="org-left" />
+
+<col  class="org-left" />
+</colgroup>
+<thead>
+<tr>
+<th scope="col" class="org-left">A</th>
+<th scope="col" class="org-left">B</th>
+<th scope="col" class="org-left">C</th>
+<th scope="col" class="org-left">(A ⇔ B) ∧ C</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+</tr>
+
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+</tr>
+
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+</tr>
+
+<tr>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+<td class="org-left">T</td>
+<td class="org-left">T</td>
+</tr>
+
+<tr>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+<td class="org-left">F</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+</div>
+</div>
+<div id="postamble" class="status">
+<p class="date">Created: 2025-05-31 la 07:09</p>
+<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
+</div>
+</body>
+</html>
diff --git a/Math/Truth table calculator/index.org b/Math/Truth table calculator/index.org
new file mode 100644 (file)
index 0000000..cd58c50
--- /dev/null
@@ -0,0 +1,131 @@
+#+SETUPFILE: ~/.emacs.d/org-styles/html/darksun.theme
+#+TITLE: Truth table calculator
+#+LANGUAGE: en
+#+LATEX_HEADER: \usepackage[margin=1.0in]{geometry}
+#+LATEX_HEADER: \usepackage{parskip}
+#+LATEX_HEADER: \usepackage[none]{hyphenat}
+
+#+OPTIONS: H:20 num:20
+#+OPTIONS: author:nil
+
+- See also: https://en.wikipedia.org/wiki/Truth_table
+
+A truth table is a mathematical table used to determine the output of a logic function
+based on all possible combinations of inputs. Each row represents a possible state of
+the input variables, with the corresponding output value. Truth tables are crucial in
+designing and understanding digital circuits, Boolean algebra, and logical expressions.
+
+* Implemented logical operations
+** Equivalent ( ⇔ , 1 )
+
+The equivalent operation, also known as logical biconditional, is true if and only if
+both inputs are the same. In other words, it asserts that both propositions are
+either both true or both false. It is often represented by the symbol *⇔*.
+
+Truth Table:
+
+| A | B | A ⇔ B |
+|---+---+-------|
+| T | T | T     |
+| T | F | F     |
+| F | T | F     |
+| F | F | T     |
+
+** Implies ( ⇒ , 2 )
+
+An implication asserts that if the first proposition is true, the
+second must be true as well. If the first is false, the implication
+holds regardless of the second proposition's value.
+
+Truth table:
+
+| A | B | A ⇒ B |
+|---+---+-------|
+| T | T | T     |
+| T | F | F     |
+| F | T | T     |
+| F | F | T     |
+
+** OR ( ∨ , 3 )
+
+The OR operation, also known as logical disjunction, is true if at
+least one of the inputs is true. It asserts that if either proposition
+is true, the entire expression is true.
+
+Truth table:
+
+| A | B | A ∨ B |
+|---+---+-------|
+| T | T | T     |
+| T | F | T     |
+| F | T | T     |
+| F | F | F     |
+
+** AND ( ∧ , 4 )
+
+The AND operation, also known as logical conjunction, is true if and
+only if both inputs are true.
+
+Truth table:
+
+| A | B | A ∧ B |
+|---+---+-------|
+| T | T | T     |
+| T | F | F     |
+| F | T | F     |
+| F | F | F     |
+
+** NOT ( ¬ , 5 )
+
+The NOT operation, also known as logical negation, inverts the value
+of the input. If the input is true, the output is false, and vice
+versa.
+
+Truth Table:
+
+| A | ¬A |
+|---+----|
+| T | F  |
+| F | T  |
+* Examples
+
+** Example: (A ∧ B) ∨ ¬C
+
+| A | B | C | (A ∧ B) ∨ ¬C |
+|---+---+---+--------------|
+| T | T | T | T            |
+| T | T | F | T            |
+| T | F | T | F            |
+| T | F | F | T            |
+| F | T | T | F            |
+| F | T | F | T            |
+| F | F | T | F            |
+| F | F | F | T            |
+
+** Example: A ⇒ (B ∨ ¬C)
+
+| A | B | C | A ⇒ (B ∨ ¬C) |
+|---+---+---+--------------|
+| T | T | T | T            |
+| T | T | F | T            |
+| T | F | T | F            |
+| T | F | F | T            |
+| F | T | T | T            |
+| F | T | F | T            |
+| F | F | T | T            |
+| F | F | F | T            |
+
+** Example: (A ⇔ B) ∧ C
+
+Truth Table:
+
+| A | B | C | (A ⇔ B) ∧ C |
+|---+---+---+-------------|
+| T | T | T | T           |
+| T | T | F | F           |
+| T | F | T | F           |
+| T | F | F | F           |
+| F | T | T | F           |
+| F | T | F | F           |
+| F | F | T | T           |
+| F | F | F | F           |
diff --git a/Math/Truth table calculator/truth.bas b/Math/Truth table calculator/truth.bas
new file mode 100755 (executable)
index 0000000..ee39e82
--- /dev/null
@@ -0,0 +1,597 @@
+'                         TRUTH TABLE CALCULATOR\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2002, Initial version\r
+' 2024 - 2025, Improved program readability\r
+'\r
+'\r
+' A truth table is a mathematical table used to determine the output of a\r
+' logic function based on all possible combinations of inputs. Each row\r
+' represents a possible state of the input variables, with the\r
+' corresponding output value. Truth tables are crucial in designing and\r
+' understanding digital circuits, Boolean algebra, and logical\r
+' expressions.\r
+'\r
+' Implemented operations:\r
+'   Equivalent ( Keyboard shortcut: 1 )\r
+'   Implies ( Keyboard shortcut: 2 )\r
+'   OR ( Keyboard shortcut: 3 )\r
+'   AND ( Keyboard shortcut: 4 )\r
+'   NOT ( Keyboard shortcut: 5 )\r
+\r
+DECLARE SUB removeRedundancies (startIndex!, endIndex!, removalCount!)\r
+DECLARE SUB getOperatorPriority (a!, b!)\r
+DECLARE SUB movM (x1!, n!)\r
+DECLARE SUB clearScreenBuffer ()\r
+DECLARE SUB lendm (x1!, m!)\r
+DECLARE SUB mov (x1!, n!)\r
+DECLARE SUB lendp (x1!, m!)\r
+DECLARE SUB teeslg (x1!, x2!, l!)\r
+DECLARE SUB prepare ()\r
+DECLARE SUB tee (x1!, x2!)\r
+DECLARE SUB lahend (x1, x2)\r
+DECLARE SUB printText (x!, y!, c!, c1!, a$)\r
+DECLARE SUB sist ()\r
+DECLARE SUB start ()\r
+DIM SHARED font(0 TO 7, 0 TO 7, 0 TO 122)\r
+\r
+' Logical expression storage and processing arrays\r
+DIM SHARED logicalExpression(0 TO 79) ' Stores ASCII values of logical expression\r
+DIM SHARED variableValues(1 TO 8, 1 TO 100) ' Stores variable values for each combination\r
+DIM SHARED variableNames(1 TO 8) ' Stores ASCII values of variable names\r
+DIM SHARED resultValues(1 TO 100) ' Stores computed result values\r
+DIM SHARED expressionPosition(0 TO 79) ' Stores screen positions of expression characters\r
+DIM SHARED xlahn\r
+DIM SHARED tehl\r
+DIM SHARED nm\r
+DIM SHARED prnp\r
+\r
+start\r
+\r
+13\r
+sist\r
+prepare\r
+GOTO 13\r
+\r
+SUB clearScreenBuffer\r
+' Waits for user input to clear the screen buffer\r
+FOR a = 1 TO 50\r
+    a$ = INKEY$\r
+NEXT a\r
+END SUB\r
+\r
+SUB getOperatorPriority (operator, priority)\r
+' Determines the priority of logical operators\r
+SELECT CASE operator\r
+    CASE 5   ' NOT\r
+        priority = 1\r
+    CASE 3, 4  ' OR, AND\r
+        priority = 2\r
+    CASE 2   ' Implies\r
+        priority = 3\r
+    CASE 1   ' Equivalent\r
+        priority = 4\r
+    CASE 40, 41  ' Parentheses\r
+        priority = 100\r
+END SELECT\r
+END SUB\r
+\r
+\r
+SUB lahend (x1, x2)\r
+' Analyzes and prepares the logical equation for solving\r
+DIM muu(65 TO 122)\r
+FOR a = 65 TO 122\r
+    muu(a) = 0\r
+NEXT a\r
+\r
+muu(116) = 1 ' t\r
+muu(118) = 1 ' v\r
+\r
+nm = 0\r
+FOR a = x1 TO x2\r
+    b = logicalExpression(a)\r
+    IF ((b >= 65) AND (b <= 90)) OR ((b >= 97) AND (b <= 122)) THEN\r
+        IF muu(b) = 0 THEN\r
+            nm = nm + 1\r
+            variableNames(nm) = b\r
+            muu(b) = 1\r
+        END IF\r
+    END IF\r
+NEXT a\r
+\r
+variableNames(nm + 1) = 116 ' t\r
+variableNames(nm + 2) = 118 ' v\r
+\r
+f = 2 ^ nm\r
+tehl = f\r
+FOR a = 1 TO nm\r
+    d = 1\r
+    e = 1\r
+    f = f / 2\r
+    FOR b = 1 TO 2 ^ nm\r
+        IF e > f THEN d = -d: e = 1\r
+        IF d = 1 THEN c = ASC("t") ELSE c = ASC("v")\r
+        variableValues(a, b) = c\r
+        e = e + 1\r
+    NEXT b\r
+NEXT a\r
+\r
+FOR a = 1 TO tehl\r
+    variableValues(nm + 1, a) = 116 ' t\r
+    variableValues(nm + 2, a) = 118 ' v\r
+NEXT a\r
+\r
+nm = nm + 2\r
+\r
+DIM bck(0 TO 79)\r
+FOR a = 0 TO 79\r
+    bck(a) = logicalExpression(a)\r
+    expressionPosition(a) = a\r
+NEXT a\r
+\r
+LOCATE 5, 1\r
+teeslg x1, x2, a\r
+\r
+tee x1, x2 + a\r
+\r
+FOR a = 0 TO 79\r
+    logicalExpression(a) = bck(a)\r
+NEXT a\r
+\r
+FOR a = 1 TO tehl\r
+    printText x2 + 1, a, 14, 0, CHR$(resultValues(a))\r
+NEXT a\r
+\r
+END SUB\r
+\r
+SUB lendm (x1, m)\r
+' Measures the length of a logical expression enclosed in parentheses\r
+IF logicalExpression(x1) <> 41 THEN m = 1: GOTO 19\r
+c = x1\r
+d = 1\r
+20\r
+c = c - 1\r
+IF logicalExpression(c) = 40 THEN d = d - 1\r
+IF logicalExpression(c) = 41 THEN d = d + 1\r
+IF d > 0 THEN GOTO 20\r
+m = x1 - c\r
+19\r
+END SUB\r
+\r
+SUB lendp (x1, m)\r
+' Measures the length of a logical expression enclosed in parentheses\r
+IF logicalExpression(x1) <> 40 THEN m = 1: GOTO 17\r
+c = x1\r
+d = 1\r
+18\r
+c = c + 1\r
+IF logicalExpression(c) = 40 THEN d = d + 1\r
+IF logicalExpression(c) = 41 THEN d = d - 1\r
+IF d > 0 THEN GOTO 18\r
+m = c - x1 + 1\r
+17\r
+END SUB\r
+\r
+SUB mov (x1, n)\r
+' Moves a portion of the logical expression to the right\r
+FOR a = 79 - n TO x1 STEP -1\r
+    logicalExpression(a + n) = logicalExpression(a)\r
+    expressionPosition(a + n) = expressionPosition(a)\r
+NEXT a\r
+END SUB\r
+\r
+SUB movM (x1, n)\r
+' Moves a portion of the logical expression to the left\r
+FOR a = x1 TO 79 - n\r
+    logicalExpression(a) = logicalExpression(a + n)\r
+    expressionPosition(a) = expressionPosition(a + n)\r
+NEXT a\r
+END SUB\r
+\r
+SUB prepare\r
+' Prepares the logical equation for processing\r
+CLS\r
+\r
+ln = 79\r
+FOR a = 0 TO 79\r
+5\r
+    IF logicalExpression(a) = 32 OR logicalExpression(a) = 0 THEN\r
+        FOR b = a TO 78\r
+            logicalExpression(b) = logicalExpression(b + 1)\r
+        NEXT b\r
+        ln = ln - 1\r
+        IF ln <= a - 1 THEN GOTO 6\r
+        GOTO 5\r
+    END IF\r
+NEXT a\r
+6\r
+\r
+CLS\r
+\r
+FOR a = 0 TO ln\r
+    printText a, 0, 13, 1, CHR$(logicalExpression(a))\r
+NEXT a\r
+\r
+printText 0, 1, 7, 0, SPACE$(79)\r
+\r
+lahend 0, ln\r
+\r
+a$ = INPUT$(1)\r
+\r
+END SUB\r
+\r
+SUB printText (x, y, c, c1, a$)\r
+    ' Prints characters to the screen at location (x,y) with color c, background c1\r
+    x1 = x * 8\r
+    y1 = (y + prnp) * 8\r
+\r
+    FOR b = 1 TO LEN(a$)\r
+        LINE (x1, y1)-(x1 + 7, y1 + 7), c1, BF\r
+        d = ASC(RIGHT$(LEFT$(a$, b), 1))\r
+        IF d > 122 THEN GOTO 22\r
+        FOR y2 = 0 TO 7\r
+            FOR x2 = 0 TO 7\r
+                c2 = font(x2, y2, d)\r
+                IF c2 > 0 THEN PSET (x1 + x2, y1 + y2), c\r
+            NEXT x2\r
+        NEXT y2\r
+22      x1 = x1 + 8\r
+    NEXT b\r
+\r
+END SUB\r
+\r
+SUB removeRedundancies (startIndex, endIndex, removalCount)\r
+    ' This procedure scans for parentheses that can be safely removed\r
+    ' without changing the logic of the expression, then removes them.\r
+\r
+    DIM currentEnd, parenthesesCount\r
+    currentEnd = endIndex\r
+    parenthesesCount = 0\r
+\r
+    a = startIndex\r
+26  IF logicalExpression(a) = 40 THEN\r
+        ' We found an opening parenthesis. Now let's see if it can be removed.\r
+        IF a = startIndex THEN p1 = 100 ELSE getOperatorPriority logicalExpression(a - 1), p1\r
+\r
+        c = a\r
+        d = 1\r
+        p2 = 0\r
+\r
+25      c = c + 1\r
+        IF logicalExpression(c) = 40 THEN d = d + 1\r
+        IF logicalExpression(c) = 41 THEN d = d - 1\r
+\r
+        ' Once d returns to 1, we are back to one level of parentheses,\r
+        ' meaning we can check operator priority inside.\r
+        IF d = 1 THEN\r
+            IF (logicalExpression(c) > 0) AND (logicalExpression(c) <= 5) THEN\r
+                getOperatorPriority logicalExpression(c), b\r
+                IF b > p2 THEN p2 = b\r
+            END IF\r
+        END IF\r
+\r
+        IF d > 0 THEN GOTO 25\r
+\r
+        IF c + 1 > currentEnd THEN p3 = 100 ELSE getOperatorPriority logicalExpression(c + 1), p3\r
+\r
+        ' If the operator outside is higher priority than what's inside,\r
+        ' we can safely remove the parentheses.\r
+        IF (p1 > p2) AND (p3 >= p2) THEN\r
+            movM c, 1\r
+            movM a, 1\r
+            parenthesesCount = parenthesesCount + 2\r
+            currentEnd = currentEnd - 2\r
+            a = a - 1\r
+        END IF\r
+    END IF\r
+\r
+    a = a + 1\r
+    IF a <= currentEnd THEN GOTO 26\r
+\r
+    removalCount = parenthesesCount\r
+END SUB\r
+\r
+SUB sist\r
+' Interacts with the user to input a logical equation\r
+CLS\r
+printText 0, 0, 3, 0, "Enter equation (ESC to quit) keys: 1 - " + CHR$(1) + "   2 - " + CHR$(2) + "   3 - " + CHR$(3) + "   4 - " + CHR$(4) + "   5 - " + CHR$(5)\r
+printText 0, 1, 3, 0, "Example: a" + CHR$(1) + "b" + CHR$(2) + "(g" + CHR$(3) + "b)"\r
+\r
+FOR a = 0 TO 79\r
+    logicalExpression(a) = 0\r
+NEXT a\r
+\r
+x = 0\r
+1\r
+FOR a = 0 TO 79\r
+    IF a = x THEN printText a, 2, 14, 1, CHR$(logicalExpression(a)) ELSE printText a, 2, 3, 0, CHR$(logicalExpression(a))\r
+NEXT a\r
+2\r
+a$ = INKEY$\r
+IF a$ = "" THEN GOTO 2\r
+\r
+IF a$ = CHR$(27) THEN SYSTEM\r
+IF a$ = CHR$(0) + "M" THEN x = x + 1\r
+IF a$ = CHR$(0) + "K" THEN x = x - 1\r
+IF x < 0 THEN x = 0\r
+IF x > 79 THEN x = 79\r
+\r
+IF LEN(a$) = 1 THEN\r
+    SELECT CASE ASC(a$)\r
+        CASE 32, 40, 41, 65 TO 90, 97 TO 122\r
+3\r
+            FOR a = 78 TO x STEP -1\r
+                logicalExpression(a + 1) = logicalExpression(a)\r
+            NEXT a\r
+            logicalExpression(x) = ASC(a$)\r
+            x = x + 1\r
+        CASE 8\r
+            IF x > 0 THEN\r
+                FOR a = x - 1 TO 78\r
+                    logicalExpression(a) = logicalExpression(a + 1)\r
+                NEXT a\r
+                x = x - 1\r
+            END IF\r
+        CASE 49 TO 53\r
+            a$ = CHR$(ASC(a$) - 48)\r
+            GOTO 3\r
+        CASE 13\r
+            GOTO 4\r
+    END SELECT\r
+END IF\r
+\r
+GOTO 1\r
+4\r
+\r
+END SUB\r
+\r
+SUB start\r
+' Initializes the screen and font\r
+prnp = 0\r
+\r
+SCREEN 7\r
+\r
+FOR a = 0 TO 122\r
+    LOCATE 1, 1\r
+    SELECT CASE a\r
+        CASE 7\r
+        CASE 1\r
+            LINE (0, 0)-(7, 7), 0, BF\r
+            LINE (2, 1)-(0, 3), 15\r
+            LINE (1, 4)-(2, 5), 15\r
+            LINE (5, 1)-(7, 3), 15\r
+            LINE (6, 4)-(5, 5), 15\r
+            LINE (1, 2)-(5, 2), 15\r
+            LINE (1, 4)-(5, 4), 15\r
+\r
+        CASE 2\r
+            LINE (0, 0)-(7, 7), 0, BF\r
+            LINE (5, 1)-(7, 3), 15\r
+            LINE (6, 4)-(5, 5), 15\r
+            LINE (1, 2)-(5, 2), 15\r
+            LINE (1, 4)-(5, 4), 15\r
+\r
+        CASE 3\r
+            LINE (0, 0)-(7, 7), 0, BF\r
+            LINE (0, 0)-(3, 7), 15\r
+            LINE (6, 0)-(3, 7), 15\r
+\r
+        CASE 4\r
+            LINE (0, 0)-(7, 7), 0, BF\r
+            LINE (0, 7)-(3, 0), 15\r
+            LINE (6, 7)-(3, 0), 15\r
+\r
+        CASE 5\r
+            LINE (0, 0)-(7, 7), 0, BF\r
+            LINE (0, 0)-(4, 0), 15\r
+            LINE (4, 1)-(4, 7), 15\r
+\r
+        CASE ELSE\r
+            PRINT CHR$(a)\r
+    END SELECT\r
+\r
+    FOR y = 0 TO 7\r
+        FOR x = 0 TO 7\r
+            font(x, y, a) = POINT(x, y)\r
+        NEXT x\r
+    NEXT y\r
+NEXT a\r
+\r
+SCREEN 12\r
+\r
+END SUB\r
+\r
+SUB tee (x1, x2)\r
+' Processes the logical equation and applies logical operations\r
+DIM opr(1 TO 2, 1 TO tehl)\r
+ng = 0\r
+ngx = 0\r
+oprm = 1\r
+oe = 0\r
+oex = 0\r
+\r
+FOR a = x1 TO x2\r
+    b = logicalExpression(a)\r
+    SELECT CASE b\r
+        CASE 40\r
+            c = a\r
+            d = 1\r
+10\r
+            c = c + 1\r
+            IF logicalExpression(c) = ASC("(") THEN d = d + 1\r
+            IF logicalExpression(c) = ASC(")") THEN d = d - 1\r
+            IF d = 0 THEN GOTO 11\r
+            GOTO 10\r
+11\r
+            tee a + 1, c - 1\r
+            a = c\r
+            FOR c = 1 TO tehl\r
+                opr(oprm, c) = resultValues(c)\r
+            NEXT c\r
+            GOTO 12\r
+        CASE 5\r
+            ng = 1\r
+            ngx = a\r
+        CASE 1 TO 4\r
+            oe = b\r
+            oex = a\r
+        CASE 65 TO 90, 97 TO 122\r
+            FOR c = 1 TO nm\r
+                IF variableNames(c) = b THEN d = c: GOTO 8\r
+            NEXT c\r
+8\r
+            FOR c = 1 TO tehl\r
+                opr(oprm, c) = variableValues(d, c)\r
+                printText expressionPosition(a), c, 3, 0, CHR$(variableValues(d, c))\r
+            NEXT c\r
+12\r
+            IF ng = 1 THEN GOSUB mkneg\r
+            IF oprm = 2 THEN\r
+                SELECT CASE oe\r
+                    CASE 1\r
+                        FOR c = 1 TO tehl\r
+                            d = opr(1, c)\r
+                            e = opr(2, c)\r
+                            IF d = e THEN f = ASC("t") ELSE f = ASC("v")\r
+                            opr(1, c) = f\r
+                            printText expressionPosition(oex), c, 12, 0, CHR$(f)\r
+                        NEXT c\r
+                    CASE 2\r
+                        FOR c = 1 TO tehl\r
+                            d = opr(1, c)\r
+                            e = opr(2, c)\r
+                            f = ASC("t")\r
+                            IF (d = ASC("t")) AND (e = ASC("v")) THEN f = ASC("v")\r
+                            opr(1, c) = f\r
+                            printText expressionPosition(oex), c, 12, 0, CHR$(f)\r
+                        NEXT c\r
+                    CASE 3\r
+                        FOR c = 1 TO tehl\r
+                            d = opr(1, c)\r
+                            e = opr(2, c)\r
+                            f = ASC("t")\r
+                            IF (d = ASC("v")) AND (e = ASC("v")) THEN f = ASC("v")\r
+                            opr(1, c) = f\r
+                            printText expressionPosition(oex), c, 12, 0, CHR$(f)\r
+                        NEXT c\r
+                    CASE 4\r
+                        FOR c = 1 TO tehl\r
+                            d = opr(1, c)\r
+                            e = opr(2, c)\r
+                            f = ASC("v")\r
+                            IF (d = ASC("t")) AND (e = ASC("t")) THEN f = ASC("t")\r
+                            opr(1, c) = f\r
+                            printText expressionPosition(oex), c, 12, 0, CHR$(f)\r
+                        NEXT c\r
+                END SELECT\r
+            ELSE\r
+                oprm = oprm + 1\r
+            END IF\r
+    END SELECT\r
+NEXT a\r
+\r
+GOTO 9\r
+\r
+mkneg:\r
+    ' NOT operation (negation) is applied to the current operand\r
+    FOR c = 1 TO tehl\r
+        d = opr(oprm, c)\r
+        IF d = ASC("t") THEN d = ASC("v") ELSE d = ASC("t")\r
+        printText expressionPosition(ngx), c, 4, 0, CHR$(d)\r
+        opr(oprm, c) = d\r
+    NEXT c\r
+    ng = 0\r
+RETURN\r
+9\r
+\r
+FOR c = 1 TO tehl\r
+    resultValues(c) = opr(1, c)\r
+NEXT c\r
+END SUB\r
+\r
+SUB teeslg (x1, x4, l)\r
+' Prepares the logical equation for solving by simplifying expressions within parentheses\r
+x2 = x4\r
+h = 0\r
+FOR e = 1 TO 4\r
+    g = 1\r
+    a = x1\r
+21\r
+    b = logicalExpression(a)\r
+    IF b = 40 THEN\r
+        c = a\r
+        d = 1\r
+14\r
+        c = c + 1\r
+        IF logicalExpression(c) = ASC("(") THEN d = d + 1\r
+        IF logicalExpression(c) = ASC(")") THEN d = d - 1\r
+        IF d = 0 THEN GOTO 15\r
+        GOTO 14\r
+15\r
+        IF e = 1 THEN teeslg a + 1, c - 1, l ELSE l = 0\r
+        a = c + l\r
+        x2 = x2 + l\r
+        h = h + l\r
+        GOTO 16\r
+    END IF\r
+\r
+    IF (b = 5) AND (e = 1) AND (g > 1) THEN\r
+        mov a, 1\r
+        logicalExpression(a) = 40\r
+        lendp a + 2, f\r
+        mov a + 2 + f, 1\r
+        logicalExpression(a + 2 + f) = 41\r
+        h = h + 2\r
+        x2 = x2 + 2\r
+        a = a + 2 + f\r
+        GOTO 16\r
+    END IF\r
+\r
+    IF (b = 3 OR b = 4) AND (e = 2) AND (g > 2) THEN\r
+        lendm a - 1, f\r
+        mov a - f, 1\r
+        logicalExpression(a - f) = 40\r
+        lendp a + 2, f\r
+        mov a + 2 + f, 1\r
+        logicalExpression(a + 2 + f) = 41\r
+        h = h + 2\r
+        x2 = x2 + 2\r
+        a = a + 2 + f\r
+        GOTO 16\r
+    END IF\r
+\r
+    IF (b = 2) AND (e = 3) AND (g > 3) THEN\r
+        lendm a - 1, f\r
+        mov a - f, 1\r
+        logicalExpression(a - f) = 40\r
+        lendp a + 2, f\r
+        mov a + 2 + f, 1\r
+        logicalExpression(a + 2 + f) = 41\r
+        h = h + 2\r
+        x2 = x2 + 2\r
+        a = a + 2 + f\r
+        GOTO 16\r
+    END IF\r
+\r
+    SELECT CASE b\r
+        CASE 5\r
+            g = 1\r
+        CASE 3, 4\r
+            g = 2\r
+        CASE 2\r
+            g = 3\r
+        CASE 1\r
+            g = 4\r
+    END SELECT\r
+16\r
+    a = a + 1\r
+    IF a <= x2 THEN GOTO 21\r
+NEXT e\r
+l = h\r
+END SUB\r
+\r
diff --git a/Miscellaneous/4D engine/index.html b/Miscellaneous/4D engine/index.html
new file mode 100644 (file)
index 0000000..67998b4
--- /dev/null
@@ -0,0 +1,22 @@
+<HTML>\r
+<HEAD><TITLE>4D engine</TITLE></HEAD>\r
+\r
+<BODY>\r
+\r
+<CENTER><H1>4D engine</H1></CENTER>\r
+<BR>\r
+<BR>\r
+Implementation of 4 dimensional (4D) engine.\r
+It's like 3D but with additional extra dimension.\r
+\r
+It's possible to define objects from 4D polygons.\r
+In 4D world minimum amount of points to define 4D\r
+shape is 5. Each point will be defined by 4 coordinates (X, Y, Z, Q).\r
+\r
+You can rotate object around any axis\r
+(4D world has 6 rotation axes!)\r
+Program allows you to move along any dimension.\r
+\r
+<BR><IMG SRC="sshot.png">\r
+</BODY>\r
+</HTML>
\ No newline at end of file
diff --git a/Miscellaneous/4D engine/qeng.bas b/Miscellaneous/4D engine/qeng.bas
new file mode 100755 (executable)
index 0000000..1f87299
--- /dev/null
@@ -0,0 +1,350 @@
+' 4D engine. It renders a 5-cell (aka. pentachoron) as a series\r
+' of 3D tetrahedrons with varying brightness. Brightness is used\r
+' to indicate shift in the fourth dimension.\r
+'\r
+' In essence, you can look at a 3D object as a series of 2D\r
+' cross-sections along the third dimension. Here we look at\r
+' a 4D object as a series of 3D cross-sections with varying\r
+' brightness (to distinguish between them).\r
+'\r
+' 4 dimensions also make it possible to rotate the object along\r
+' 6 different axes. Interestingly, the shape of the object changes\r
+' in 3D space when it is rotated along any of the axes that\r
+' involve the fourth dimension.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003.08, Initial version\r
+' 2024 - 2025, Improved program readability\r
+\r
+' Declare subroutines and functions that will be used in the program\r
+DECLARE SUB CalculateInterpolatedLine (originalX1!, originalY1!, originalZ1!, originalQ1!, originalX2!, originalY2!, originalZ2!, originalQ2!)\r
+DECLARE SUB RotatePoint (x1!, y1!, z1!, q1!, x4!, y4!, z4!, q4!)\r
+DECLARE SUB SetupPalette ()\r
+DECLARE SUB GetPointAtDistance (x1!, y1!, z1!, q1!, x2!, y2!, z2!, q2!, distanceFactor!, rx!, ry!, rz!, rq!)\r
+DECLARE SUB RenderPentachoron (ox1!, oy1!, oz1!, oq1!, ox2!, oy2!, oz2!, oq2!, ox3!, oy3!, oz3!, oq3!, ox4!, oy4!, oz4!, oq4!, ox5!, oy5!, oz5!, oq5!)\r
+DECLARE FUNCTION CalculateDistance (x1!, y1!, z1!, q1!, x2!, y2!, z2!, q2!)\r
+\r
+' Shared variables that can be accessed from any subroutine\r
+DIM SHARED screenSize\r
+DIM SHARED angleXZ, angleYZ, angleXY, angleQX, angleQY, angleQZ\r
+DIM SHARED cameraX, cameraY, cameraZ, cameraQ\r
+DIM SHARED pi\r
+DIM SHARED sineXZ, sineYZ, sineXY, sineQX, sineQY, sineQZ\r
+DIM SHARED cosineXZ, cosineYZ, cosineXY, cosineQX, cosineQY, cosineQZ\r
+\r
+' Arrays to store projected points and other drawing information\r
+DIM SHARED projectedX(1 TO 10)\r
+DIM SHARED projectedY(1 TO 10)\r
+DIM SHARED pointCount\r
+DIM SHARED frame\r
+\r
+' Display control instructions to the user\r
+PRINT ""\r
+PRINT " Use keys:"\r
+PRINT "       Rotate:"\r
+PRINT "               qw - XZ"\r
+PRINT "               as - YZ"\r
+PRINT "               zx - XY"\r
+PRINT "               er - QX"\r
+PRINT "               df - QY"\r
+PRINT "               cv - QZ"\r
+PRINT "       Move:"\r
+PRINT "               46 - x"\r
+PRINT "               82 - y"\r
+PRINT "               71 - z"\r
+PRINT "               -+ - q"\r
+PRINT\r
+PRINT "       ESC - to quit program"\r
+PRINT\r
+PRINT " Press any key to continue..."\r
+in$ = INPUT$(1)\r
+\r
+' Initialize pi value for rotation calculations\r
+pi = 3.1415\r
+\r
+' Initialize rotation angles for each axis\r
+angleXZ = pi * .5\r
+angleYZ = angleXZ\r
+angleXY = angleXZ\r
+angleQX = angleXZ\r
+angleQY = angleXZ\r
+angleQZ = angleXZ\r
+\r
+' Set initial camera position in 4D space\r
+cameraX = 0\r
+cameraY = 0\r
+cameraZ = 0\r
+cameraQ = .5\r
+\r
+' Set graphics mode to 640x480 with 16 colors\r
+SCREEN 12\r
+' Setup the color palette for rendering\r
+SetupPalette\r
+\r
+MainLoop:\r
+' Clear screen for new frame\r
+CLS\r
+\r
+' Calculate sine and cosine values for each rotation angle\r
+sineXZ = SIN(angleXZ): cosineXZ = COS(angleXZ)\r
+sineYZ = SIN(angleYZ): cosineYZ = COS(angleYZ)\r
+sineXY = SIN(angleXY): cosineXY = COS(angleXY)\r
+sineQX = SIN(angleQX): cosineQX = COS(angleQX)\r
+sineQY = SIN(angleQY): cosineQY = COS(angleQY)\r
+sineQZ = SIN(angleQZ): cosineQZ = COS(angleQZ)\r
+\r
+' Render multiple frames of the pentachoron with varying depth\r
+FOR frame = 1 TO 15 STEP 3\r
+  ' Render a pentachoron (5-cell) with the current camera position and rotation\r
+  RenderPentachoron -10, -10, -10, 0, 10, -10, -10, 0, 0, -10, 10, 0, 0, 10, 0, 0, 0, 0, 0, 10\r
+NEXT frame\r
+\r
+' Get user input for camera control\r
+in$ = INPUT$(1)\r
+\r
+' Handle user input for rotation and movement\r
+SELECT CASE in$\r
+CASE CHR$(27)\r
+  ' ESC key pressed - exit program\r
+  SYSTEM\r
+CASE "q"\r
+  ' Increase rotation angle along XZ axis\r
+  angleXZ = angleXZ + .1\r
+CASE "w"\r
+  ' Decrease rotation angle along XZ axis\r
+  angleXZ = angleXZ - .1\r
+CASE "a"\r
+  ' Increase rotation angle along YZ axis\r
+  angleYZ = angleYZ + .1\r
+CASE "s"\r
+  ' Decrease rotation angle along YZ axis\r
+  angleYZ = angleYZ - .1\r
+CASE "z"\r
+  ' Increase rotation angle along XY axis\r
+  angleXY = angleXY + .1\r
+CASE "x"\r
+  ' Decrease rotation angle along XY axis\r
+  angleXY = angleXY - .1\r
+CASE "e"\r
+  ' Increase rotation angle along QX axis\r
+  angleQX = angleQX + .1\r
+CASE "r"\r
+  ' Decrease rotation angle along QX axis\r
+  angleQX = angleQX - .1\r
+CASE "d"\r
+  ' Increase rotation angle along QY axis\r
+  angleQY = angleQY + .1\r
+CASE "f"\r
+  ' Decrease rotation angle along QY axis\r
+  angleQY = angleQY - .1\r
+CASE "c"\r
+  ' Increase rotation angle along QZ axis\r
+  angleQZ = angleQZ + .1\r
+CASE "v"\r
+  ' Decrease rotation angle along QZ axis\r
+  angleQZ = angleQZ - .1\r
+\r
+' Handle user input for movement in the 4D space\r
+CASE "4"\r
+  ' Move camera left along X axis\r
+  cameraX = cameraX - 3\r
+CASE "6"\r
+  ' Move camera right along X axis\r
+  cameraX = cameraX + 3\r
+CASE "8"\r
+  ' Move camera forward along Z axis\r
+  cameraZ = cameraZ + 3\r
+CASE "2"\r
+  ' Move camera backward along Z axis\r
+  cameraZ = cameraZ - 3\r
+CASE "7"\r
+  ' Move camera up along Y axis\r
+  cameraY = cameraY + 3\r
+CASE "1"\r
+  ' Move camera down along Y axis\r
+  cameraY = cameraY - 3\r
+CASE "+"\r
+  ' Move camera forward along Q axis (4th dimension)\r
+  cameraQ = cameraQ + .3\r
+CASE "-"\r
+  ' Move camera backward along Q axis (4th dimension)\r
+  cameraQ = cameraQ - .3\r
+\r
+END SELECT\r
+\r
+' Loop back to render next frame\r
+GOTO MainLoop\r
+\r
+' Function to calculate the distance between two points in 4D space\r
+FUNCTION CalculateDistance (x1, y1, z1, q1, x2, y2, z2, q2)\r
+  ' Calculate Euclidean distance in 4D space\r
+  CalculateDistance = SQR((x1 - x2) ^ 2 + (y1 - y2) ^ 2 + (z1 - z2) ^ 2 + (q1 - q2) ^ 2)\r
+END FUNCTION\r
+\r
+' Subroutine to calculate the linear interpolation between two points\r
+SUB CalculateInterpolatedLine (originalX1, originalY1, originalZ1, originalQ1, originalX2, originalY2, originalZ2, originalQ2)\r
+  ' Local variables to store coordinates of the two points\r
+  x1 = originalX1: y1 = originalY1: z1 = originalZ1: q1 = originalQ1\r
+  x2 = originalX2: y2 = originalY2: z2 = originalZ2: q2 = originalQ2\r
+\r
+  ' If the first point is in front of the camera and the second is behind,\r
+  ' swap them to ensure proper rendering order\r
+  IF (q1 > cameraQ) AND (q2 < cameraQ) THEN\r
+    SWAP x1, x2\r
+    SWAP y1, y2\r
+    SWAP z1, z2\r
+    SWAP q1, q2\r
+  END IF\r
+\r
+  ' If the first point is in front of the camera and the second is behind,\r
+  ' calculate the intersection point where the line segment crosses the camera plane\r
+  IF (q1 < cameraQ) AND (q2 > cameraQ) THEN\r
+    ' Calculate the difference in Q coordinates\r
+    qDifference = q2 - q1\r
+    ' Calculate how far along the line segment we need to go to reach the camera plane\r
+    qToCamera = cameraQ - q1\r
+    ' Calculate the interpolation factor\r
+    interpolationFactor = qToCamera / qDifference\r
+    ' Increment point counter\r
+    pointCount = pointCount + 1\r
+    ' Calculate interpolated coordinates\r
+    interpolatedX = (x2 - x1) * interpolationFactor + x1\r
+    interpolatedY = (y2 - y1) * interpolationFactor + y1\r
+    interpolatedZ = (z2 - z1) * interpolationFactor + z1 + 50\r
+    ' Project 3D coordinates to 2D screen coordinates and store them\r
+    projectedX(pointCount) = interpolatedX / interpolatedZ * 700 + 320\r
+    projectedY(pointCount) = interpolatedY / interpolatedZ * 700 + 240\r
+  END IF\r
+END SUB\r
+\r
+' Subroutine to get a point at a specific distance along the line segment\r
+SUB GetPointAtDistance (x1, y1, z1, q1, x2, y2, z2, q2, distanceFactor, rx, ry, rz, rq)\r
+  ' Calculate the vector between the two points\r
+  xVector = x2 - x1\r
+  yVector = y2 - y1\r
+  zVector = z2 - z1\r
+  qVector = q2 - q1\r
+\r
+  ' Calculate the coordinates of the point at the specified distance along the line segment\r
+  rx = x1 + (xVector * distanceFactor)\r
+  ry = y1 + (yVector * distanceFactor)\r
+  rz = z1 + (zVector * distanceFactor)\r
+  rq = q1 + (qVector * distanceFactor)\r
+END SUB\r
+\r
+' Subroutine to render a 3D tetrahedron with varying brightness\r
+SUB RenderPentachoron (originalX1, originalY1, originalZ1, originalQ1, originalX2, originalY2, originalZ2, originalQ2, originalX3, originalY3, originalZ3, originalQ3, originalX4, originalY4, originalZ4, originalQ4, originalX5, originalY5, originalZ5 _\r
+, originalQ5)\r
+\r
+  ' Adjust coordinates based on camera position and frame depth\r
+  originalX1 = originalX1 - cameraX\r
+  originalY1 = originalY1 - cameraY\r
+  originalZ1 = originalZ1 - cameraZ\r
+  originalQ1 = originalQ1 - cameraQ - frame\r
+\r
+  originalX2 = originalX2 - cameraX\r
+  originalY2 = originalY2 - cameraY\r
+  originalZ2 = originalZ2 - cameraZ\r
+  originalQ2 = originalQ2 - cameraQ - frame\r
+\r
+  originalX3 = originalX3 - cameraX\r
+  originalY3 = originalY3 - cameraY\r
+  originalZ3 = originalZ3 - cameraZ\r
+  originalQ3 = originalQ3 - cameraQ - frame\r
+\r
+  originalX4 = originalX4 - cameraX\r
+  originalY4 = originalY4 - cameraY\r
+  originalZ4 = originalZ4 - cameraZ\r
+  originalQ4 = originalQ4 - cameraQ - frame\r
+\r
+  originalX5 = originalX5 - cameraX\r
+  originalY5 = originalY5 - cameraY\r
+  originalZ5 = originalZ5 - cameraZ\r
+  originalQ5 = originalQ5 - cameraQ - frame\r
+\r
+  ' Rotate all points based on current rotation angles\r
+  RotatePoint originalX1, originalY1, originalZ1, originalQ1, x1, y1, z1, q1\r
+  RotatePoint originalX2, originalY2, originalZ2, originalQ2, x2, y2, z2, q2\r
+  RotatePoint originalX3, originalY3, originalZ3, originalQ3, x3, y3, z3, q3\r
+  RotatePoint originalX4, originalY4, originalZ4, originalQ4, x4, y4, z4, q4\r
+  RotatePoint originalX5, originalY5, originalZ5, originalQ5, x5, y5, z5, q5\r
+\r
+  ' Initialize point counter\r
+  pointCount = 0\r
+\r
+  ' Calculate interpolated points for all edges of the pentachoron\r
+  CalculateInterpolatedLine x1, y1, z1, q1, x2, y2, z2, q2\r
+  CalculateInterpolatedLine x1, y1, z1, q1, x3, y3, z3, q3\r
+  CalculateInterpolatedLine x1, y1, z1, q1, x4, y4, z4, q4\r
+  CalculateInterpolatedLine x1, y1, z1, q1, x5, y5, z5, q5\r
+\r
+  CalculateInterpolatedLine x2, y2, z2, q2, x3, y3, z3, q3\r
+  CalculateInterpolatedLine x2, y2, z2, q2, x4, y4, z4, q4\r
+  CalculateInterpolatedLine x2, y2, z2, q2, x5, y5, z5, q5\r
+\r
+  CalculateInterpolatedLine x3, y3, z3, q3, x4, y4, z4, q4\r
+  CalculateInterpolatedLine x3, y3, z3, q3, x5, y5, z5, q5\r
+\r
+  CalculateInterpolatedLine x4, y4, z4, q4, x5, y5, z5, q5\r
+\r
+  ' Draw lines between each pair of interpolated points\r
+  FOR pointA = 1 TO pointCount\r
+    FOR pointB = pointA + 1 TO pointCount\r
+      ' Draw line with color based on frame depth (for varying brightness)\r
+      LINE (projectedX(pointA), projectedY(pointA))-(projectedX(pointB), projectedY(pointB)), 15 - frame\r
+    NEXT pointB\r
+  NEXT pointA\r
+\r
+END SUB\r
+\r
+' Subroutine to rotate a point along the specified axes\r
+SUB RotatePoint (x1, y1, z1, q1, x4, y4, z4, q4)\r
+\r
+  ' Rotate the point along the QX axis\r
+  q2 = q1 * sineQX - x1 * cosineQX\r
+  x2 = q1 * cosineQX + x1 * sineQX\r
+\r
+  ' Rotate the point along the QY axis\r
+  q3 = q2 * sineQY - y1 * cosineQY\r
+  y2 = q2 * cosineQY + y1 * sineQY\r
+\r
+  ' Rotate the point along the QZ axis\r
+  q4 = q3 * sineQZ - z1 * cosineQZ\r
+  z2 = q3 * cosineQZ + z1 * sineQZ\r
+\r
+  ' Rotate the point along the XZ axis\r
+  x3 = x2 * sineXZ - z2 * cosineXZ\r
+  z3 = x2 * cosineXZ + z2 * sineXZ\r
+\r
+  ' Rotate the point along the YZ axis\r
+  y3 = y2 * sineYZ - z3 * cosineYZ\r
+  z4 = y2 * cosineYZ + z3 * sineYZ\r
+\r
+  ' Rotate the point along the XY axis\r
+  y4 = y3 * sineXY - x3 * cosineXY\r
+  x4 = y3 * cosineXY + x3 * sineXY\r
+\r
+END SUB\r
+\r
+' Subroutine to set up the color palette\r
+SUB SetupPalette\r
+\r
+  ' Set up a grayscale color palette\r
+  FOR colorIndex = 0 TO 15\r
+    ' Set palette register\r
+    OUT &H3C8, colorIndex\r
+    ' Set RGB values (all equal for grayscale)\r
+    OUT &H3C9, colorIndex * 4\r
+    OUT &H3C9, colorIndex * 4\r
+    OUT &H3C9, colorIndex * 4\r
+    ' Draw a vertical line with this color to visualize the palette\r
+    LINE (colorIndex, 0)-(colorIndex, 400), colorIndex\r
+  NEXT colorIndex\r
+\r
+END SUB\r
+\r
diff --git a/Miscellaneous/4D engine/sshot.png b/Miscellaneous/4D engine/sshot.png
new file mode 100644 (file)
index 0000000..03e6e3e
Binary files /dev/null and b/Miscellaneous/4D engine/sshot.png differ
diff --git a/Miscellaneous/Alien font.bas b/Miscellaneous/Alien font.bas
new file mode 100644 (file)
index 0000000..cdbc6fc
--- /dev/null
@@ -0,0 +1,112 @@
+' Program attempts to render imaginary alien text.\r
+' Text is composed by subdividing square into 4 triangles.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2001,    Initial version.\r
+' 2024.08, Improved code readability.\r
+\r
+DEFINT A-Z\r
+\r
+' Declare the subroutine which will draw a character at a given position with a given size and color\r
+DECLARE SUB DrawCharacter (characterX, characterY, characterColor, CharacterSize)\r
+\r
+' Define shared array for colors\r
+DIM SHARED characterColors(1 TO 4) AS INTEGER\r
+\r
+' Initialize the color palette\r
+characterColors(1) = 7 ' LightGray\r
+characterColors(2) = 7 ' LightGray\r
+characterColors(3) = 0 ' Black\r
+characterColors(4) = 0 ' Black\r
+\r
+' Set the screen mode and seed the random number generator\r
+SCREEN 12\r
+RANDOMIZE TIMER\r
+\r
+' Clear the screen with black color\r
+PAINT (1, 1), 0\r
+\r
+' Define the size of each character\r
+CONST CharacterSize = 4\r
+\r
+' Initialize counters for drawing characters\r
+DIM tmp AS INTEGER\r
+tmp = 0\r
+\r
+' Outer loop for vertical positioning of characters\r
+FOR characterY = 1 TO 480 - CharacterSize - 2 STEP CharacterSize + (CharacterSize \ 2)\r
+    DIM tmp1 AS INTEGER\r
+    tmp1 = 0\r
+\r
+    ' Inner loop for horizontal positioning of characters\r
+    FOR characterX = 1 TO 640 - CharacterSize - 2 STEP CharacterSize + (CharacterSize \ 2)\r
+        ' Draw a character with random color and specified size at the current position\r
+        CALL DrawCharacter(characterX, characterY, INT(RND * 16), CharacterSize)\r
+\r
+        ' Increment the inner loop counter\r
+        tmp1 = tmp1 + 1\r
+\r
+        ' Add spaces to emulate visual character clusters\r
+        IF tmp1 > 20 THEN\r
+            tmp1 = 0\r
+            characterX = characterX + (CharacterSize)\r
+        END IF\r
+    NEXT characterX\r
+\r
+    ' Increment the outer loop counter\r
+    tmp = tmp + 1\r
+\r
+    ' Add space to group caracters visually into clusters\r
+    IF tmp > 5 THEN\r
+        tmp = 0\r
+        characterY = characterY + (CharacterSize)\r
+    END IF\r
+NEXT characterY\r
+\r
+' Subroutine to draw a character at a given position with a given size and color\r
+SUB DrawCharacter (characterX AS INTEGER, characterY AS INTEGER, characterColor AS INTEGER, CharacterSize AS INTEGER)\r
+    ' Calculate half the size of the character for drawing diagonals\r
+    DIM halfSize AS INTEGER\r
+    halfSize = CharacterSize \ 2\r
+\r
+    ' Randomly select a color from the palette\r
+    DIM randomColor AS INTEGER\r
+    randomColor = characterColors(INT(RND * 3) + 1)\r
+\r
+    ' Draw the top horizontal line and diagonals of the character\r
+    LINE (characterX, characterY)-(characterX + CharacterSize, characterY), randomColor\r
+    LINE (characterX, characterY)-(characterX + halfSize, characterY + halfSize), randomColor\r
+    LINE (characterX + CharacterSize, characterY)-(characterX + halfSize, characterY + halfSize), randomColor\r
+    ' Fill the top right corner of the character\r
+    PAINT (characterX + 2, characterY + 1), randomColor\r
+\r
+    ' Draw the left vertical line and diagonals of the character\r
+    randomColor = characterColors(INT(RND * 3) + 1)\r
+    LINE (characterX, characterY)-(characterX, characterY + CharacterSize), randomColor\r
+    LINE (characterX, characterY)-(characterX + halfSize, characterY + halfSize), randomColor\r
+    LINE (characterX, characterY + CharacterSize)-(characterX + halfSize, characterY + halfSize), randomColor\r
+    ' Fill the middle left of the character\r
+    PAINT (characterX + 1, characterY + 2), randomColor\r
+\r
+    ' Draw the right vertical line and diagonals of the character\r
+    randomColor = characterColors(INT(RND * 3) + 1)\r
+    LINE (characterX + CharacterSize, characterY)-(characterX + CharacterSize, characterY + CharacterSize), randomColor\r
+    LINE (characterX + CharacterSize, characterY)-(characterX + halfSize, characterY + halfSize), randomColor\r
+    LINE (characterX + CharacterSize, characterY + CharacterSize)-(characterX + halfSize, characterY + halfSize), randomColor\r
+    ' Fill the middle right of the character\r
+    PAINT (characterX + CharacterSize - 1, characterY + 2), randomColor\r
+\r
+    ' Draw the bottom horizontal line and diagonals of the character\r
+    randomColor = characterColors(INT(RND * 3) + 1)\r
+    LINE (characterX, characterY + CharacterSize)-(characterX + CharacterSize, characterY + CharacterSize), randomColor\r
+    LINE (characterX, characterY + CharacterSize)-(characterX + halfSize, characterY + halfSize), randomColor\r
+    LINE (characterX + CharacterSize, characterY + CharacterSize)-(characterX + halfSize, characterY + halfSize), randomColor\r
+    ' Fill the bottom left corner of the character\r
+    PAINT (characterX + 2, characterY + CharacterSize - 1), randomColor\r
+END SUB\r
+\r
diff --git a/Miscellaneous/Alien font.png b/Miscellaneous/Alien font.png
new file mode 100644 (file)
index 0000000..ec7e817
Binary files /dev/null and b/Miscellaneous/Alien font.png differ
diff --git a/Miscellaneous/Automated school clock/v1/Electronics/1.png b/Miscellaneous/Automated school clock/v1/Electronics/1.png
new file mode 100644 (file)
index 0000000..798fdf3
Binary files /dev/null and b/Miscellaneous/Automated school clock/v1/Electronics/1.png differ
diff --git a/Miscellaneous/Automated school clock/v1/Electronics/2.png b/Miscellaneous/Automated school clock/v1/Electronics/2.png
new file mode 100644 (file)
index 0000000..f998b57
Binary files /dev/null and b/Miscellaneous/Automated school clock/v1/Electronics/2.png differ
diff --git a/Miscellaneous/Automated school clock/v1/Electronics/3 key keyboard.png b/Miscellaneous/Automated school clock/v1/Electronics/3 key keyboard.png
new file mode 100644 (file)
index 0000000..4c70f99
Binary files /dev/null and b/Miscellaneous/Automated school clock/v1/Electronics/3 key keyboard.png differ
diff --git a/Miscellaneous/Automated school clock/v1/Electronics/3.png b/Miscellaneous/Automated school clock/v1/Electronics/3.png
new file mode 100644 (file)
index 0000000..73df687
Binary files /dev/null and b/Miscellaneous/Automated school clock/v1/Electronics/3.png differ
diff --git a/Miscellaneous/Automated school clock/v1/Electronics/4.png b/Miscellaneous/Automated school clock/v1/Electronics/4.png
new file mode 100644 (file)
index 0000000..1109bba
Binary files /dev/null and b/Miscellaneous/Automated school clock/v1/Electronics/4.png differ
diff --git a/Miscellaneous/Automated school clock/v1/Electronics/skeem.png b/Miscellaneous/Automated school clock/v1/Electronics/skeem.png
new file mode 100644 (file)
index 0000000..3c93169
Binary files /dev/null and b/Miscellaneous/Automated school clock/v1/Electronics/skeem.png differ
diff --git a/Miscellaneous/Automated school clock/v1/README.html b/Miscellaneous/Automated school clock/v1/README.html
new file mode 100644 (file)
index 0000000..d7dc1d0
--- /dev/null
@@ -0,0 +1,473 @@
+<!doctype html>
+<html lang="en">
+<head>
+<title>juhend</title>
+<!-- 2018-04-20 Fri 11:08 -->
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<meta name="generator" content="Org-mode">
+<meta name="author" content="Svjatoslav Agejenko">
+
+<link  href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
+<style type="text/css">
+/* org mode styles on top of twbs */
+
+html {
+    position: relative;
+    min-height: 100%;
+}
+
+body {
+    font-size: 18px;
+    margin-bottom: 105px;
+}
+
+footer {
+    position: absolute;
+    bottom: 0;
+    width: 100%;
+    height: 101px;
+    background-color: #f5f5f5;
+}
+
+footer > div {
+    padding: 10px;
+}
+
+footer p {
+    margin: 0 0 5px;
+    text-align: center;
+    font-size: 16px;
+}
+
+#table-of-contents {
+    margin-top: 20px;
+    margin-bottom: 20px;
+}
+
+blockquote p {
+    font-size: 18px;
+}
+
+pre {
+    font-size: 16px;
+}
+
+.footpara {
+    display: inline-block;
+}
+
+figcaption {
+  font-size: 16px;
+  color: #666;
+  font-style: italic;
+  padding-bottom: 15px;
+}
+
+/* from twbs docs */
+
+.bs-docs-sidebar.affix {
+    position: static;
+}
+@media (min-width: 768px) {
+    .bs-docs-sidebar {
+        padding-left: 20px;
+    }
+}
+
+/* All levels of nav */
+.bs-docs-sidebar .nav > li > a {
+    display: block;
+    padding: 4px 20px;
+    font-size: 14px;
+    font-weight: 500;
+    color: #999;
+}
+.bs-docs-sidebar .nav > li > a:hover,
+.bs-docs-sidebar .nav > li > a:focus {
+    padding-left: 19px;
+    color: #A1283B;
+    text-decoration: none;
+    background-color: transparent;
+    border-left: 1px solid #A1283B;
+}
+.bs-docs-sidebar .nav > .active > a,
+.bs-docs-sidebar .nav > .active:hover > a,
+.bs-docs-sidebar .nav > .active:focus > a {
+    padding-left: 18px;
+    font-weight: bold;
+    color: #A1283B;
+    background-color: transparent;
+    border-left: 2px solid #A1283B;
+}
+
+/* Nav: second level (shown on .active) */
+.bs-docs-sidebar .nav .nav {
+    display: none; /* Hide by default, but at >768px, show it */
+    padding-bottom: 10px;
+}
+.bs-docs-sidebar .nav .nav > li > a {
+    padding-top: 1px;
+    padding-bottom: 1px;
+    padding-left: 30px;
+    font-size: 12px;
+    font-weight: normal;
+}
+.bs-docs-sidebar .nav .nav > li > a:hover,
+.bs-docs-sidebar .nav .nav > li > a:focus {
+    padding-left: 29px;
+}
+.bs-docs-sidebar .nav .nav > .active > a,
+.bs-docs-sidebar .nav .nav > .active:hover > a,
+.bs-docs-sidebar .nav .nav > .active:focus > a {
+    padding-left: 28px;
+    font-weight: 500;
+}
+
+/* Nav: third level (shown on .active) */
+.bs-docs-sidebar .nav .nav .nav {
+    padding-bottom: 10px;
+}
+.bs-docs-sidebar .nav .nav .nav > li > a {
+    padding-top: 1px;
+    padding-bottom: 1px;
+    padding-left: 40px;
+    font-size: 12px;
+    font-weight: normal;
+}
+.bs-docs-sidebar .nav .nav .nav > li > a:hover,
+.bs-docs-sidebar .nav .nav .nav > li > a:focus {
+    padding-left: 39px;
+}
+.bs-docs-sidebar .nav .nav .nav > .active > a,
+.bs-docs-sidebar .nav .nav .nav > .active:hover > a,
+.bs-docs-sidebar .nav .nav .nav > .active:focus > a {
+    padding-left: 38px;
+    font-weight: 500;
+}
+
+/* Show and affix the side nav when space allows it */
+@media (min-width: 992px) {
+    .bs-docs-sidebar .nav > .active > ul {
+        display: block;
+    }
+    /* Widen the fixed sidebar */
+    .bs-docs-sidebar.affix,
+    .bs-docs-sidebar.affix-bottom {
+        width: 213px;
+    }
+    .bs-docs-sidebar.affix {
+        position: fixed; /* Undo the static from mobile first approach */
+        top: 20px;
+    }
+    .bs-docs-sidebar.affix-bottom {
+        position: absolute; /* Undo the static from mobile first approach */
+    }
+    .bs-docs-sidebar.affix .bs-docs-sidenav,.bs-docs-sidebar.affix-bottom .bs-docs-sidenav {
+        margin-top: 0;
+        margin-bottom: 0
+    }
+}
+@media (min-width: 1200px) {
+    /* Widen the fixed sidebar again */
+    .bs-docs-sidebar.affix-bottom,
+    .bs-docs-sidebar.affix {
+        width: 263px;
+    }
+}
+</style>
+<script type="text/javascript">
+$(function() {
+    'use strict';
+
+    $('.bs-docs-sidebar li').first().addClass('active');
+
+    $(document.body).scrollspy({target: '.bs-docs-sidebar'});
+
+    $('.bs-docs-sidebar').affix();
+});
+</script>
+</head>
+<body>
+<div id="content" class="container">
+<div class="row"><div class="col-md-9"><h1 class="title">juhend</h1>
+<p>
+Kooli Kell programmi kasutusjuhend
+</p>
+
+<ul class="org-ul">
+<li>2002.10
+</li>
+<li>Svjatoslav Agejenko
+</li>
+</ul>
+
+
+<div id="outline-container-sec-1" class="outline-2">
+<h2 id="sec-1"><span class="section-number-2">1</span> Kasutajaliides</h2>
+<div class="outline-text-2" id="text-1">
+<p>
+Programm Kooli Kell on mõldud kella laskmiseks koolis, tundi sisse ja
+välja.  Samuti juhib programm arvuti küljes olevat liidest,
+kahekohaliste numbrite näitamiseks (minutid / tunnid), 3 klahvilist
+klaviatuuri ja releed.  Tundi sisse minev kell on 1 pikk ning 1 l”em
+helin. Väljaminev kell on 1 tavaline pikk helin. Programm loeb aega
+arvuti süsteemsest kellast.  Kella laskmis ajad on organiseeritud
+failidesse *.PP .  Aasta või päevaplaani muutmiseks tuleb redakteerida
+vastavaid faile. Programm valib sobiva päevaplaani lähtudes
+aastaplaanist, mis asub failis "aasta.ap" . Programmi saab kasutada
+arvutil millele on printeri pesasse (LPT1) ”endatud spetsiaalne
+liides, liidese skeem on failis "skeem.bmp". Liides omab kolme
+nummerdatud nuppu paigutusega:
+</p>
+
+<p class="verse">
+&lt;1&gt;   &lt;2&gt;<br >
+&#xa0;&#xa0;&#xa0;&lt;3&gt;<br >
+</p>
+
+<p>
+Programm on ettenähtud iseseisvalt töötama, kuid on ka võimalus
+erandkorras kгitsi kella lasta, aega muuta jne.. Programm eristab
+tavalisi nupuvajutusi ja topeltklõpse. Eesmärgiga suurendada
+funktsionaalsust väheste nuppudega.
+</p>
+</div>
+
+<div id="outline-container-sec-1-1" class="outline-3">
+<h3 id="sec-1-1"><span class="section-number-3">1.1</span> Nuppude funktsioonid peamenüüs:</h3>
+<div class="outline-text-3" id="text-1-1">
+<dl class="org-dl">
+<dt> &lt;1&gt; klõps </dt><dd>laseb kella tundi sisse
+</dd>
+<dt> &lt;1&gt; topeltklõps </dt><dd>laseb kella tunnist välja
+</dd>
+
+<dt> &lt;2&gt; klõps </dt><dd>läheb aja muutmis menüüsse
+</dd>
+<dt> &lt;3&gt; topeltklõps </dt><dd>hakkab tööle uuendatud graafikuga, vajalik pвast
+sisendfailide redigeerimist.
+</dd>
+
+<dt> &lt;3&gt; klõps </dt><dd>ümardab süsteemse aja täistunnini, vajalik aja
+sünkroniseerimiseks.
+</dd>
+<dt> &lt;3&gt; topeltklõps </dt><dd>laeb süsteemse: aasta, kuu, päeva, tunnid,
+minutid failist "sync.txt"
+</dd>
+</dl>
+</div>
+</div>
+
+<div id="outline-container-sec-1-2" class="outline-3">
+<h3 id="sec-1-2"><span class="section-number-3">1.2</span> Nuppude funktsioonid aja muutmis menüüs:</h3>
+<div class="outline-text-3" id="text-1-2">
+<dl class="org-dl">
+<dt> &lt;1&gt; klõps </dt><dd>vähendab süsteemsed tunnid/minutid 1. võrra
+</dd>
+
+<dt> &lt;2&gt; klõps </dt><dd>suurendab süsteemsed tunnid/minutid 1. võrra
+</dd>
+
+<dt> &lt;3&gt; klõps </dt><dd>valib näitamiseks ja redigeerimiseks tunnid või minutid.
+</dd>
+<dt> &lt;3&gt; topeltklõps </dt><dd>läheb tagasi peamenüüsse.
+</dd>
+</dl>
+
+<p>
+Aja muutmis menüüd tunneb ära selle järgi et indikaator tunnid või
+minutid vilgub, mitte ei põle nagu peamenüüs.
+</p>
+</div>
+</div>
+</div>
+
+
+<div id="outline-container-sec-2" class="outline-2">
+<h2 id="sec-2"><span class="section-number-2">2</span> Faili AASTA.AP formaat: (aastaplaan)</h2>
+<div class="outline-text-2" id="text-2">
+<pre class="example">
+v       &lt;kuu&gt;-&lt;päev&gt;     &lt;kuu&gt;-&lt;päev&gt;     &lt;päevaplaan&gt;
+</pre>
+
+<p>
+Sõnast aja vahemik. Paneb paika päevaplaani antud
+ajavahemikus. Esimene daatum peab kindlasti olema väiksem kui
+teine. St. kui on tõesti vaja:
+</p>
+
+<pre class="example">
+v       10-4    2-1     eri
+</pre>
+
+<p>
+tuleb kirjutada:
+</p>
+
+<pre class="example">
+v       10-4    12-31   eri
+v       1-1     2-1     eri
+</pre>
+
+<p>
+Päevaplaan kehtib vahemiku esimesest päevast kuni vahemiku viimase
+päevani.
+</p>
+
+
+<pre class="example">
+n       &lt;kuu&gt;-&lt;päev&gt;     &lt;kuu&gt;-&lt;päev&gt;     &lt;nädalapäev&gt;      &lt;päevaplaan&gt;
+</pre>
+
+<p>
+Sõnast nädalapäv. sama mis "v" kuid: paneb paika päevaplaani antud
+ajavahemikus, antud nädalapäeval. Nädalapäeva kirjeldatakse numbriga.
+nädala esimene päev on esmaspäev, talle vastab number 1.
+</p>
+
+
+<pre class="example">
+e       &lt;kuu&gt;-&lt;päev&gt; &lt;päevaplaan&gt;
+</pre>
+
+<p>
+Sõnast eriline. Paneb paika antud kuupävale antud pävaplaani. Sobib
+hästi erakorraliste lüendatud või muul moel muudetud päevaplaanide
+kehtestamiseks. Näiteks riigipühad, spordipäev jne.
+</p>
+
+<p>
+Kui teatud päeva kohta ei käinud ühtegi kirjet siis toimib vaikimisi
+"tuhi" päevaplaan. Kui teatud päeva kohta käis mitu kirjet siis jääb
+peale viimane.
+</p>
+</div>
+</div>
+
+
+
+<div id="outline-container-sec-3" class="outline-2">
+<h2 id="sec-3"><span class="section-number-2">3</span> Failide *.PP formaat: (päevaplaanid)</h2>
+<div class="outline-text-2" id="text-3">
+<pre class="example">
+# &lt;tund&gt;:&lt;minut&gt;  &lt;kell&gt;
+</pre>
+
+<p>
+Laseb antud ajal antud kella. Võimalikud kella helinad on:
+</p>
+
+<table class="table table-striped table-bordered table-hover table-condensed">
+
+
+<colgroup>
+<col  class="left">
+
+<col  class="left">
+</colgroup>
+<thead>
+<tr>
+<th scope="col" class="text-left">kella kood</th>
+<th scope="col" class="text-left">vastav helin</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="text-left">sis</td>
+<td class="text-left">kell tundi sisse</td>
+</tr>
+
+<tr>
+<td class="text-left">val</td>
+<td class="text-left">kell tunnist välja</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+
+<div id="outline-container-sec-4" class="outline-2">
+<h2 id="sec-4"><span class="section-number-2">4</span> Faili SYNC.TXT formaat:</h2>
+<div class="outline-text-2" id="text-4">
+<p>
+faili esimesel kahel real peab olema järgnev:
+</p>
+
+<pre class="example">
+KK-PP-AAAA
+TT:MM
+</pre>
+
+<p>
+kus:
+</p>
+<table class="table table-striped table-bordered table-hover table-condensed">
+
+
+<colgroup>
+<col  class="left">
+
+<col  class="left">
+</colgroup>
+<thead>
+<tr>
+<th scope="col" class="text-left">kood</th>
+<th scope="col" class="text-left">tähendus</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="text-left">KK</td>
+<td class="text-left">kuu</td>
+</tr>
+
+<tr>
+<td class="text-left">PP</td>
+<td class="text-left">päev</td>
+</tr>
+
+<tr>
+<td class="text-left">AAAA</td>
+<td class="text-left">aasta</td>
+</tr>
+
+<tr>
+<td class="text-left">TT</td>
+<td class="text-left">tunnid</td>
+</tr>
+
+<tr>
+<td class="text-left">MM</td>
+<td class="text-left">minutid</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+</div><div class="col-md-3"><nav id="table-of-contents">
+<div id="text-table-of-contents" class="bs-docs-sidebar">
+<ul class="nav">
+<li><a href="#sec-1">1. Kasutajaliides</a>
+<ul class="nav">
+<li><a href="#sec-1-1">1.1. Nuppude funktsioonid peamenüüs:</a></li>
+<li><a href="#sec-1-2">1.2. Nuppude funktsioonid aja muutmis menüüs:</a></li>
+</ul>
+</li>
+<li><a href="#sec-2">2. Faili AASTA.AP formaat: (aastaplaan)</a></li>
+<li><a href="#sec-3">3. Failide *.PP formaat: (päevaplaanid)</a></li>
+<li><a href="#sec-4">4. Faili SYNC.TXT formaat:</a></li>
+</ul>
+</div>
+</nav>
+</div></div></div>
+<footer id="postamble" class="">
+<div><p class="author">Author: Svjatoslav Agejenko</p>
+<p class="date">Created: 2018-04-20 Fri 11:08</p>
+<p class="creator"><a href="http://www.gnu.org/software/emacs/">Emacs</a> 25.1.1 (<a href="http://orgmode.org">Org-mode</a> 8.2.10)</p>
+</div>
+</footer>
+</body>
+</html>
diff --git a/Miscellaneous/Automated school clock/v1/README.org b/Miscellaneous/Automated school clock/v1/README.org
new file mode 100644 (file)
index 0000000..b153ade
--- /dev/null
@@ -0,0 +1,115 @@
+Kooli Kell programmi kasutusjuhend
+
+- 2002.10
+- Svjatoslav Agejenko
+
+
+* Kasutajaliides
+Programm Kooli Kell on mõldud kella laskmiseks koolis, tundi sisse ja
+välja.  Samuti juhib programm arvuti küljes olevat liidest,
+kahekohaliste numbrite näitamiseks (minutid / tunnid), 3 klahvilist
+klaviatuuri ja releed.  Tundi sisse minev kell on 1 pikk ning 1 l”em
+helin. Väljaminev kell on 1 tavaline pikk helin. Programm loeb aega
+arvuti süsteemsest kellast.  Kella laskmis ajad on organiseeritud
+failidesse *.PP .  Aasta või päevaplaani muutmiseks tuleb redakteerida
+vastavaid faile. Programm valib sobiva päevaplaani lähtudes
+aastaplaanist, mis asub failis "aasta.ap" . Programmi saab kasutada
+arvutil millele on printeri pesasse (LPT1) ”endatud spetsiaalne
+liides, liidese skeem on failis "skeem.bmp". Liides omab kolme
+nummerdatud nuppu paigutusega:
+
+#+BEGIN_VERSE
+        <1>   <2>
+           <3>
+#+END_VERSE
+
+Programm on ettenähtud iseseisvalt töötama, kuid on ka võimalus
+erandkorras kгitsi kella lasta, aega muuta jne.. Programm eristab
+tavalisi nupuvajutusi ja topeltklõpse. Eesmärgiga suurendada
+funktsionaalsust väheste nuppudega.
+
+** Nuppude funktsioonid peamenüüs:
+
++ <1> klõps :: laseb kella tundi sisse
++ <1> topeltklõps :: laseb kella tunnist välja
+
++ <2> klõps :: läheb aja muutmis menüüsse
++ <3> topeltklõps :: hakkab tööle uuendatud graafikuga, vajalik pвast
+     sisendfailide redigeerimist.
+
++ <3> klõps :: ümardab süsteemse aja täistunnini, vajalik aja
+               sünkroniseerimiseks.
++ <3> topeltklõps :: laeb süsteemse: aasta, kuu, päeva, tunnid,
+     minutid failist "sync.txt"
+
+** Nuppude funktsioonid aja muutmis menüüs:
+
++ <1> klõps :: vähendab süsteemsed tunnid/minutid 1. võrra
+
++ <2> klõps :: suurendab süsteemsed tunnid/minutid 1. võrra
+
++ <3> klõps :: valib näitamiseks ja redigeerimiseks tunnid või minutid.
++ <3> topeltklõps :: läheb tagasi peamenüüsse.
+
+Aja muutmis menüüd tunneb ära selle järgi et indikaator tunnid või
+minutid vilgub, mitte ei põle nagu peamenüüs.
+
+* Faili AASTA.AP formaat: (aastaplaan)
+: v       <kuu>-<päev>     <kuu>-<päev>     <päevaplaan>
+
+Sõnast aja vahemik. Paneb paika päevaplaani antud
+ajavahemikus. Esimene daatum peab kindlasti olema väiksem kui
+teine. St. kui on tõesti vaja:
+
+: v       10-4    2-1     eri
+
+tuleb kirjutada:
+
+: v       10-4    12-31   eri
+: v       1-1     2-1     eri
+
+Päevaplaan kehtib vahemiku esimesest päevast kuni vahemiku viimase
+päevani.
+
+
+: n       <kuu>-<päev>     <kuu>-<päev>     <nädalapäev>      <päevaplaan>
+
+Sõnast nädalapäv. sama mis "v" kuid: paneb paika päevaplaani antud
+ajavahemikus, antud nädalapäeval. Nädalapäeva kirjeldatakse numbriga.
+nädala esimene päev on esmaspäev, talle vastab number 1.
+
+
+: e       <kuu>-<päev> <päevaplaan>
+
+Sõnast eriline. Paneb paika antud kuupävale antud pävaplaani. Sobib
+hästi erakorraliste lüendatud või muul moel muudetud päevaplaanide
+kehtestamiseks. Näiteks riigipühad, spordipäev jne.
+
+Kui teatud päeva kohta ei käinud ühtegi kirjet siis toimib vaikimisi
+"tuhi" päevaplaan. Kui teatud päeva kohta käis mitu kirjet siis jääb
+peale viimane.
+
+* Failide *.PP formaat: (päevaplaanid)
+: # <tund>:<minut>  <kell>
+
+Laseb antud ajal antud kella. Võimalikud kella helinad on:
+
+| kella kood | vastav helin       |
+|------------+--------------------|
+| sis        | kell tundi sisse   |
+| val        | kell tunnist välja |
+
+* Faili SYNC.TXT formaat:
+faili esimesel kahel real peab olema järgnev:
+
+: KK-PP-AAAA
+: TT:MM
+
+kus:
+| kood | tähendus |
+|------+----------|
+| KK   | kuu      |
+| PP   | päev     |
+| AAAA | aasta    |
+| TT   | tunnid   |
+| MM   | minutid  |
diff --git a/Miscellaneous/Automated school clock/v1/aasta.ap b/Miscellaneous/Automated school clock/v1/aasta.ap
new file mode 100644 (file)
index 0000000..ef1b084
--- /dev/null
@@ -0,0 +1,7 @@
+v      01-01   12-31   tava\r
+n      01-01   12-31   5       reede\r
+e      10-04   opetajap\r
+e      10-31   rebased\r
+n      01-01   12-31   6       tuhi\r
+n      01-01   12-31   7       tuhi\r
+\r
diff --git a/Miscellaneous/Automated school clock/v1/autoexec.bat b/Miscellaneous/Automated school clock/v1/autoexec.bat
new file mode 100755 (executable)
index 0000000..cd7ae3c
--- /dev/null
@@ -0,0 +1,2 @@
+coff\r
+qb /run kk.bas
\ No newline at end of file
diff --git a/Miscellaneous/Automated school clock/v1/coff.asm b/Miscellaneous/Automated school clock/v1/coff.asm
new file mode 100644 (file)
index 0000000..0466c15
--- /dev/null
@@ -0,0 +1,4 @@
+mov    dx, 37Ah\r
+mov    al, 0\r
+out    dx, al\r
+ret
\ No newline at end of file
diff --git a/Miscellaneous/Automated school clock/v1/coff.com b/Miscellaneous/Automated school clock/v1/coff.com
new file mode 100755 (executable)
index 0000000..2537f6d
Binary files /dev/null and b/Miscellaneous/Automated school clock/v1/coff.com differ
diff --git a/Miscellaneous/Automated school clock/v1/ekr.bas b/Miscellaneous/Automated school clock/v1/ekr.bas
new file mode 100755 (executable)
index 0000000..67ac754
--- /dev/null
@@ -0,0 +1,70 @@
+DECLARE SUB jooks ()\r
+DECLARE SUB suva ()\r
+DECLARE SUB display ()\r
+DECLARE SUB clearBits ()\r
+DEFINT A-Z\r
+DIM SHARED bit(0 TO 16)\r
+\r
+suva\r
+jooks\r
+\r
+clearBits\r
+bit(10) = 0\r
+bit(14) = 0\r
+bit(6) = 0\r
+bit(2) = 0\r
+4\r
+GOTO 4\r
+\r
+SUB clearBits\r
+' This subroutine initializes all bits in the bit array to 1\r
+FOR a = 1 TO 16\r
+    bit(a) = 1\r
+NEXT a\r
+\r
+END SUB\r
+\r
+SUB display\r
+' This subroutine displays the current state of the bit array using LPT attached display\r
+prt = &H378\r
+d = 0\r
+FOR a = 0 TO 3\r
+    c = 2 ^ a\r
+    FOR b = 4 TO 7\r
+        d = d + 1\r
+        c = c + (bit(d) * 2 ^ b)\r
+    NEXT b\r
+\r
+    OUT prt, c\r
+NEXT a\r
+END SUB\r
+\r
+SUB jooks\r
+' This subroutine demonstrates a simple counting\r
+2\r
+clearBits\r
+FOR a = 1 TO 16\r
+    bit(16) = 1 ' Set the most significant bit to 1\r
+    bit(a - 1) = 1 ' Set the previous bit to 1\r
+    bit(a) = 0 ' Clear the current bit\r
+    PRINT a\r
+    FOR b = 1 TO 1000\r
+        display\r
+    NEXT b\r
+NEXT a\r
+GOTO 2\r
+END SUB\r
+\r
+SUB suva\r
+' This subroutine demonstrates a simple random bit setting algorithm\r
+3\r
+clearBits\r
+FOR b = 1 TO 16\r
+    IF RND * 100 > 50 THEN bit(b) = 0 ' Randomly set bits to 0\r
+NEXT b\r
+FOR b = 1 TO 100\r
+    display\r
+NEXT b\r
+GOTO 3\r
+END SUB\r
+\r
diff --git a/Miscellaneous/Automated school clock/v1/kk.bas b/Miscellaneous/Automated school clock/v1/kk.bas
new file mode 100755 (executable)
index 0000000..14883f8
--- /dev/null
@@ -0,0 +1,699 @@
+' Program allows scheduling school clock ringing.
+' Timetables are stored in separate files.
+' Also it drives numerical 2 digit led display through parallel LPT printer port.
+' Program is driven by special 3 button keyboard that is also attached to LPT port.
+
+DECLARE SUB num (a%)
+DECLARE SUB mntime ()
+DECLARE SUB showit ()
+DECLARE SUB ekrf (a%)
+DECLARE SUB ekr ()
+DECLARE SUB rese ()
+DECLARE SUB start ()
+DECLARE SUB boot ()
+DECLARE SUB getnad (g%, n%, d%, k%)
+DECLARE SUB initp (b$)
+DECLARE SUB getmd (a$, m, d)
+DECLARE SUB son (a$)
+DEFINT A-Z
+
+DECLARE SUB inita ()
+DECLARE SUB chm ()
+DECLARE SUB chd ()
+DECLARE SUB kell (a%)
+DECLARE SUB sync2 ()
+DECLARE SUB sync ()
+DECLARE SUB mnmain ()
+DECLARE SUB main ()
+DECLARE SUB getkey (kla%)
+DECLARE SUB klnait (k%)
+DECLARE SUB heli (a%)
+DECLARE SUB keys ()
+DECLARE SUB disp ()
+DIM SHARED bit(0 TO 7)
+DIM SHARED kl
+DIM SHARED hist(1 TO 3)
+DIM SHARED ap$(1 TO 500)
+DIM SHARED apl
+DIM SHARED pp$(1 TO 500)
+DIM SHARED ppl
+DIM SHARED prt, prt2
+DIM SHARED timo$
+DIM SHARED dato$
+DIM SHARED sona$(1 TO 50)
+DIM SHARED mitus
+DIM SHARED lp$
+DIM SHARED ndlp
+DIM SHARED pn$(1 TO 7)
+DIM SHARED bitt(1 TO 16)
+DIM SHARED modee, vilgu
+DIM SHARED tul(1 TO 2)
+
+start
+heli 4
+
+disp
+mnmain
+
+SUB chd
+b$ = "tuhi"
+IF apl = 0 THEN inita
+
+a$ = DATE$
+n1 = VAL(RIGHT$(a$, 4))
+n2 = VAL(LEFT$(a$, 2))
+a$ = LEFT$(a$, 5)
+n3 = VAL(RIGHT$(a$, 2))
+getnad n1, n2, n3, ndlp
+LOCATE 10, 1
+PRINT "Week plan:", pn$(ndlp)
+FOR a = 1 TO apl
+son ap$(a)
+SELECT CASE sona$(1)
+CASE "v"
+getmd sona$(2), m1, d1
+getmd sona$(3), m2, d2
+getmd DATE$, m3, d3
+IF m3 < m1 THEN GOTO 9
+IF m3 > m2 THEN GOTO 9
+IF m3 = m1 THEN IF d3 < d1 THEN GOTO 9
+IF m3 = m2 THEN IF d3 > d2 THEN GOTO 9
+b$ = sona$(4)
+CASE "n"
+getmd sona$(2), m1, d1
+getmd sona$(3), m2, d2
+getmd DATE$, m3, d3
+IF m3 < m1 THEN GOTO 9
+IF m3 > m2 THEN GOTO 9
+IF m3 = m1 THEN IF d3 < d1 THEN GOTO 9
+IF m3 = m2 THEN IF d3 > d2 THEN GOTO 9
+IF ndlp <> VAL(sona$(4)) THEN GOTO 9
+b$ = sona$(5)
+CASE "e"
+getmd sona$(2), m1, d1
+getmd DATE$, m2, d2
+IF (m1 = m2) AND (d1 = d2) THEN b$ = sona$(3)
+END SELECT
+9
+NEXT a
+
+IF b$ <> lp$ THEN initp b$
+lp$ = b$
+LOCATE 9, 1
+PRINT "Day plan:", lp$
+END SUB
+
+SUB chm
+showit
+a$ = DATE$
+IF a$ <> dato$ THEN chd
+dato$ = a$
+b = 0
+FOR a = 1 TO ppl
+son pp$(a)
+SELECT CASE sona$(1)
+CASE "#"
+getmd sona$(2), h1, m1
+getmd TIME$, h2, m2
+' PRINT h1, m1, h2, m2
+IF (h2 = h1) AND (m2 = m1) THEN
+IF sona$(3) = "sis" THEN b = 1
+IF sona$(3) = "val" THEN b = 2
+END IF
+END SELECT
+NEXT a
+
+IF b > 0 THEN kell b
+
+END SUB
+
+SUB disp
+CLS
+PRINT "Kooli Kell  v 1.2  2002.10.10"
+PRINT "Programmi autor Svjatoslav Agejenko"
+
+END SUB
+
+SUB ekr
+FOR e = 1 TO 10
+c = 1
+c = c + 16 * bitt(1)
+c = c + 32 * bitt(2)
+c = c + 64 * bitt(3)
+c = c + 128 * bitt(4)
+OUT prt2, c
+
+c = 2
+c = c + 16 * bitt(5)
+c = c + 32 * bitt(6)
+c = c + 64 * bitt(7)
+c = c + 128 * bitt(8)
+OUT prt2, c
+
+c = 4
+c = c + 16 * bitt(9)
+c = c + 32 * bitt(10)
+c = c + 64 * bitt(11)
+c = c + 128 * bitt(12)
+OUT prt2, c
+
+c = 8
+c = c + 16 * bitt(13)
+c = c + 32 * bitt(14)
+c = c + 64 * bitt(15)
+c = c + 128 * bitt(16)
+OUT prt2, c
+
+NEXT e
+END SUB
+
+SUB ekrf (a)
+SELECT CASE (a)
+CASE 0
+bitt(1) = 0
+bitt(2) = 0
+bitt(3) = 0
+bitt(7) = 0
+bitt(5) = 0
+bitt(6) = 0
+bitt(8) = 1
+CASE 1
+bitt(2) = 0
+bitt(7) = 0
+CASE 2
+bitt(1) = 0
+bitt(3) = 0
+bitt(5) = 0
+bitt(7) = 0
+bitt(8) = 0
+CASE 3
+bitt(1) = 0
+bitt(2) = 0
+bitt(5) = 0
+bitt(8) = 0
+bitt(7) = 0
+CASE 4
+bitt(2) = 0
+bitt(6) = 0
+bitt(7) = 0
+bitt(8) = 0
+CASE 5
+bitt(1) = 0
+bitt(2) = 0
+bitt(5) = 0
+bitt(6) = 0
+bitt(8) = 0
+CASE 6
+bitt(1) = 0
+bitt(2) = 0
+bitt(3) = 0
+bitt(5) = 0
+bitt(6) = 0
+bitt(8) = 0
+CASE 7
+bitt(2) = 0
+bitt(7) = 0
+bitt(5) = 0
+CASE 8
+bitt(1) = 0
+bitt(2) = 0
+bitt(3) = 0
+bitt(7) = 0
+bitt(5) = 0
+bitt(6) = 0
+bitt(8) = 0
+CASE 9
+bitt(1) = 0
+bitt(2) = 0
+bitt(7) = 0
+bitt(5) = 0
+bitt(6) = 0
+bitt(8) = 0
+CASE 10
+bitt(15) = 0
+bitt(16) = 0
+bitt(12) = 0
+bitt(10) = 0
+bitt(9) = 0
+bitt(4) = 0
+CASE 11
+bitt(15) = 0
+bitt(4) = 0
+CASE 12
+bitt(15) = 0
+bitt(16) = 0
+bitt(9) = 0
+bitt(10) = 0
+bitt(11) = 0
+CASE 13
+bitt(15) = 0
+bitt(4) = 0
+bitt(16) = 0
+bitt(11) = 0
+bitt(9) = 0
+CASE 14
+bitt(15) = 0
+bitt(4) = 0
+bitt(12) = 0
+bitt(11) = 0
+CASE 15
+bitt(9) = 0
+bitt(4) = 0
+bitt(11) = 0
+bitt(12) = 0
+bitt(16) = 0
+CASE 16
+bitt(9) = 0
+bitt(4) = 0
+bitt(11) = 0
+bitt(12) = 0
+bitt(16) = 0
+bitt(10) = 0
+CASE 17
+bitt(4) = 0
+bitt(15) = 0
+bitt(16) = 0
+CASE 18
+bitt(4) = 0
+bitt(15) = 0
+bitt(16) = 0
+bitt(12) = 0
+bitt(11) = 0
+bitt(10) = 0
+bitt(9) = 0
+CASE 19
+bitt(4) = 0
+bitt(15) = 0
+bitt(16) = 0
+bitt(12) = 0
+bitt(11) = 0
+bitt(9) = 0
+END SELECT
+
+END SUB
+
+SUB getkey (kla)
+
+' Read the state of the buttons on the keyboard
+1
+IF vilgu = 1 THEN
+tmr = tmr + 1
+IF tmr > 5 THEN bitt(13) = tul(1): bitt(14) = tul(2) ELSE bitt(13) = 1: bitt(14) = 1
+IF tmr > 10 THEN
+tmr = 0
+END IF
+ELSE
+bitt(13) = tul(1)
+bitt(14) = tul(2)
+END IF
+
+' Get the current time
+b$ = LEFT$(TIME$, 5)
+IF b$ <> timo$ THEN chm
+timo$ = b$
+hist(1) = hist(1) + 1
+IF hist(1) > 20000 THEN hist(1) = 15000
+hist(2) = hist(2) + 1
+IF hist(2) > 20000 THEN hist(2) = 15000
+hist(3) = hist(3) + 1
+IF hist(3) > 20000 THEN hist(3) = 15000
+
+' Read the state of the buttons on the keyboard
+keys
+IF kl > 0 THEN
+  IF hist(kl) > 1 AND hist(kl) < 9 THEN
+    klnait kl + 3
+    kla = kl + 3
+    GOTO 4
+  ELSE
+    hist(kl) = 0
+  END IF
+END IF
+IF hist(1) = 10 THEN klnait 1: kla = 1: GOTO 4
+IF hist(2) = 10 THEN klnait 2: kla = 2: GOTO 4
+IF hist(3) = 10 THEN klnait 3: kla = 3: GOTO 4
+
+IF hist(1) > 11 AND hist(2) > 11 AND hist(3) > 11 THEN klnait 0
+
+' Display current time and date
+LOCATE 7, 1
+PRINT TIME$
+LOCATE 8, 1
+PRINT DATE$
+GOTO 1
+4
+
+' Reset the button press count
+hist(1) = 10000
+hist(2) = 10000
+hist(3) = 10000
+
+' Play a sound to indicate button press
+FOR b = 1 TO 100
+SOUND 0, .1
+NEXT b
+IF kla > 3 THEN SOUND 4000, .1 ELSE SOUND 3000, .1
+
+END SUB
+
+SUB getmd (a$, m, d)
+b$ = LEFT$(a$, 5)
+m = VAL(LEFT$(b$, 2))
+d = VAL(RIGHT$(b$, 2))
+
+END SUB
+
+SUB getnad (g, n, d, k)
+LOCATE 11, 1
+PRINT g, n, d
+p = g
+m = n - 2
+IF n > 2 GOTO 120
+p = p - 1: m = m + 12
+120
+c = INT(p / 100)
+y = p - c * 100
+w = d + INT((13 * m - 1) / 5) + y + INT(y / 4) + INT(c / 4) - 2 * c
+k = w - 7 * INT(w / 7)
+IF k = 0 THEN k = 7
+END SUB
+
+SUB heli (a)
+'GOTO 10
+SELECT CASE a
+CASE 1
+FOR c = 1 TO 5
+SOUND 3000, 1
+SOUND 0, 1
+NEXT c
+
+CASE 2
+FOR c = 1 TO 5
+SOUND 2500, 1
+SOUND 0, 2
+NEXT c
+SOUND 2500, 10
+
+CASE 3
+FOR a = 1 TO 10
+SOUND 500, .5
+SOUND 1500, .5
+SOUND 2000, .5
+SOUND 1520, .5
+NEXT a
+
+CASE 4
+FOR a = 800 TO 1000 STEP 10
+SOUND a, .1
+SOUND a * 3, .1
+SOUND 0, 1
+NEXT a
+10
+
+END SELECT
+
+END SUB
+
+SUB inita
+apl = 0
+OPEN "aasta.ap" FOR INPUT AS #1
+5
+IF EOF(1) <> 0 THEN GOTO 3
+LINE INPUT #1, a$
+apl = apl + 1
+ap$(apl) = a$
+GOTO 5
+3
+CLOSE #1
+END SUB
+
+SUB initp (b$)
+ppl = 0
+OPEN b$ + ".pp" FOR INPUT AS #1
+6
+IF EOF(1) <> 0 THEN GOTO 7
+LINE INPUT #1, a$
+ppl = ppl + 1
+pp$(ppl) = a$
+GOTO 6
+7
+CLOSE #1
+END SUB
+
+SUB kell (a)
+heli 3
+
+SELECT CASE a
+CASE 1
+OUT prt, 255
+FOR b = 1 TO 80
+SOUND 0, 1
+NEXT b
+OUT prt, 0
+FOR b = 1 TO 15
+SOUND 0, 1
+NEXT b
+OUT prt, 255
+FOR b = 1 TO 15
+SOUND 0, 1
+NEXT b
+OUT prt, 0
+
+CASE 2
+OUT prt, 255
+FOR b = 1 TO 80
+SOUND 0, 1
+NEXT b
+OUT prt, 0
+
+END SELECT
+END SUB
+
+SUB keys
+kl = 0
+OUT prt, 0
+8
+a = INP(prt)
+b = INP(prt)
+IF a <> b THEN GOTO 8
+
+b = 128
+FOR c = 0 TO 7
+d = INT(a / b)
+bit(c) = d
+a = a - (b * d)
+b = b / 2
+NEXT c
+
+IF bit(4) = 1 AND bit(6) = 1 THEN bit(4) = 0: bit(6) = 0: kl = 3
+IF bit(6) = 1 THEN kl = 2
+IF bit(4) = 1 THEN kl = 1
+
+a$ = INKEY$
+IF a$ = CHR$(0) + "K" THEN kl = 1
+IF a$ = CHR$(0) + "M" THEN kl = 2
+IF a$ = CHR$(0) + "P" THEN kl = 3
+ekr
+END SUB
+
+SUB klnait (k)
+
+' Highlight the pressed button on the display
+IF k = 3 THEN c = 3 ELSE c = 1
+IF k = 6 THEN c = 14
+LOCATE 5, 6
+COLOR 7, c
+PRINT "<kesk>"
+COLOR 7, 0
+
+' Highlight the pressed button on the display
+IF k = 1 THEN c = 3 ELSE c = 1
+IF k = 4 THEN c = 14
+LOCATE 4, 1
+COLOR 7, c
+PRINT "<vasak>"
+COLOR 7, 0
+
+IF k = 2 THEN c = 3 ELSE c = 1
+IF k = 5 THEN c = 14
+LOCATE 4, 10
+COLOR 7, c
+PRINT "<parem>"
+COLOR 7, 0
+
+END SUB
+
+SUB mnmain
+2
+getkey a
+IF a = 6 THEN sync
+IF a = 3 THEN sync2
+
+IF a = 1 THEN kell 1
+IF a = 4 THEN kell 2
+
+IF a = 2 THEN mntime
+IF a = 5 THEN rese
+GOTO 2
+
+END SUB
+
+SUB mntime
+vilgu = 1
+11
+showit
+getkey a
+
+IF modee = 1 THEN
+  b = VAL(LEFT$(TIME$, 2))
+  c = 0
+  IF a = 1 THEN c = 1: b = b - 1
+  IF a = 2 THEN c = 1: b = b + 1
+  IF b < 0 THEN b = 0
+  IF b > 23 THEN b = 23
+  d$ = STR$(b)
+  IF LEFT$(d$, 1) = " " THEN d$ = RIGHT$(d$, LEN(d$) - 1)
+  IF LEN(d$) < 2 THEN d$ = "0" + d$
+  e$ = d$ + RIGHT$(TIME$, 6)
+  IF c = 1 THEN TIME$ = e$
+ELSE
+  b = VAL(RIGHT$(LEFT$(TIME$, 5), 2))
+  c = 0
+  IF a = 1 THEN c = 1: b = b - 1
+  IF a = 2 THEN c = 1: b = b + 1
+  IF b < 0 THEN b = 0
+  IF b > 59 THEN b = 59
+  d$ = STR$(b)
+  IF LEFT$(d$, 1) = " " THEN d$ = RIGHT$(d$, LEN(d$) - 1)
+  IF LEN(d$) < 2 THEN d$ = "0" + d$
+  e$ = LEFT$(TIME$, 3) + d$ + RIGHT$(TIME$, 3)
+  IF c = 1 THEN TIME$ = e$
+END IF
+
+IF a = 3 THEN
+IF modee = 1 THEN modee = 2 ELSE modee = 1
+END IF
+
+IF a = 6 THEN GOTO 12
+GOTO 11
+12
+vilgu = 0
+modee = 2
+END SUB
+
+SUB num (a)
+
+FOR b = 1 TO 12
+bitt(b) = 1
+NEXT b
+bitt(15) = 1
+bitt(16) = 1
+
+b = INT(a / 10)
+c = a - (10 * b)
+ekrf b
+ekrf c + 10
+END SUB
+
+SUB rese
+heli 4
+timo$ = ""
+dato$ = ""
+apl = 0
+END SUB
+
+SUB showit
+a$ = LEFT$(TIME$, 5)
+IF modee = 1 THEN
+b = VAL(LEFT$(a$, 2))
+tul(1) = 1
+tul(2) = 0
+ELSE
+b = VAL(RIGHT$(a$, 2))
+tul(1) = 0
+tul(2) = 1
+END IF
+LOCATE 15, 1
+PRINT b
+num b
+
+
+END SUB
+
+SUB son (a$)
+
+FOR b = 1 TO 50
+sona$(b) = ""
+NEXT b
+mitus = 0
+
+b = 1
+FOR c = 1 TO LEN(a$)
+d$ = RIGHT$(LEFT$(a$, c), 1)
+IF d$ = " " OR d$ = CHR$(9) THEN
+b = 1
+ELSE
+IF b = 1 THEN b = 0: mitus = mitus + 1
+sona$(mitus) = sona$(mitus) + d$
+END IF
+NEXT c
+
+
+END SUB
+
+SUB start
+pn$(1) = "Monday"
+pn$(2) = "Tuesday"
+pn$(3) = "Wednesday"
+pn$(4) = "Thursday"
+pn$(5) = "Friday"
+pn$(6) = "Saturday"
+pn$(7) = "Sunday"
+
+prt = &H37A
+prt2 = &H378
+hist(1) = 10000
+hist(2) = 10000
+hist(3) = 10000
+
+FOR a = 1 TO 16
+bitt(a) = 1
+NEXT a
+modee = 2
+vilgu = 0
+tul(1) = 1
+tul(2) = 1
+END SUB
+
+SUB sync
+OPEN "sync.txt" FOR INPUT AS #1
+LINE INPUT #1, a$
+DATE$ = a$
+LINE INPUT #1, a$
+TIME$ = a$
+CLOSE #1
+
+heli 2
+END SUB
+
+SUB sync2
+a$ = TIME$
+a$ = LEFT$(a$, 5)
+b = VAL(RIGHT$(a$, 2))
+c = VAL(LEFT$(a$, 2))
+IF b >= 30 THEN c = c + 1
+b = 0
+IF c > 23 THEN c = c - 24
+a$ = RIGHT$(STR$(c), LEN(STR$(c)) - 1)
+b$ = RIGHT$(STR$(b), LEN(STR$(b)) - 1)
+IF LEN(a$) < 2 THEN a$ = "0" + a$
+IF LEN(b$) < 2 THEN b$ = "0" + b$
+a$ = a$ + ":" + b$
+
+'LOCATE 10, 1
+'PRINT a$
+
+TIME$ = a$
+
+heli 1
+END SUB
diff --git a/Miscellaneous/Automated school clock/v1/opetajap.pp b/Miscellaneous/Automated school clock/v1/opetajap.pp
new file mode 100644 (file)
index 0000000..0708469
--- /dev/null
@@ -0,0 +1,19 @@
+# 08:30 sis\r
+# 09:15 val\r
+\r
+# 09:25 sis\r
+# 10:10 val\r
+\r
+# 10:20 sis\r
+# 10:45 val\r
+\r
+# 10:55 sis\r
+# 11:20 val\r
+\r
+# 11:40 sis\r
+# 12:05 val\r
+\r
+# 12:15 sis\r
+# 12:40 val\r
+\r
+\r
diff --git a/Miscellaneous/Automated school clock/v1/rebased.pp b/Miscellaneous/Automated school clock/v1/rebased.pp
new file mode 100644 (file)
index 0000000..97dc6a5
--- /dev/null
@@ -0,0 +1,23 @@
+# 08:30 sis\r
+# 09:10 val\r
+\r
+# 09:20 sis\r
+# 10:00 val\r
+\r
+# 10:10 sis\r
+# 10:50 val\r
+\r
+# 11:30 sis\r
+# 12:10 val\r
+\r
+# 12:20 sis\r
+# 13:00 val\r
+\r
+# 13:10 sis\r
+# 13:50 val\r
+\r
+# 14:00 sis\r
+# 14:40 val\r
+\r
+# 14:45 sis\r
+# 15:30 val\r
diff --git a/Miscellaneous/Automated school clock/v1/reede.pp b/Miscellaneous/Automated school clock/v1/reede.pp
new file mode 100644 (file)
index 0000000..b4c0e82
--- /dev/null
@@ -0,0 +1,23 @@
+# 08:30 sis\r
+# 09:15 val\r
+\r
+# 09:25 sis\r
+# 10:10 val\r
+\r
+# 10:20 sis\r
+# 11:05 val\r
+\r
+# 11:35 sis\r
+# 12:20 val\r
+\r
+# 12:30 sis\r
+# 13:15 val\r
+\r
+# 13:20 sis\r
+# 14:05 val\r
+\r
+# 14:10 sis\r
+# 14:55 val\r
+\r
+# 15:00 sis\r
+# 15:45 val\r
diff --git a/Miscellaneous/Automated school clock/v1/sync.txt b/Miscellaneous/Automated school clock/v1/sync.txt
new file mode 100644 (file)
index 0000000..f6ff243
--- /dev/null
@@ -0,0 +1,5 @@
+09-06-2002\r
+15:38\r
+\r
+kuu-paev-aasta\r
+tunnid-minutid
\ No newline at end of file
diff --git a/Miscellaneous/Automated school clock/v1/tava.pp b/Miscellaneous/Automated school clock/v1/tava.pp
new file mode 100644 (file)
index 0000000..ce22071
--- /dev/null
@@ -0,0 +1,36 @@
+# 08:30 sis\r
+# 09:15 val\r
+\r
+# 09:25 sis\r
+# 10:10 val\r
+\r
+# 10:20 sis\r
+# 11:05 val\r
+\r
+# 11:35 sis\r
+# 12:20 val\r
+\r
+# 12:30 sis\r
+# 13:15 val\r
+\r
+# 13:25 sis\r
+# 14:10 val\r
+\r
+# 14:20 sis\r
+# 15:05 val\r
+\r
+# 15:10 sis\r
+# 15:55 val\r
+\r
+# 16:00 sis\r
+# 16:45 val\r
+\r
+# 16:50 sis\r
+# 17:45 val\r
+\r
+# 17:50 sis\r
+# 18:25 val\r
+\r
+# 18:30 sis\r
+# 19:15 val\r
+\r
diff --git a/Miscellaneous/Automated school clock/v1/tuhi.pp b/Miscellaneous/Automated school clock/v1/tuhi.pp
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/Miscellaneous/Automated school clock/v2/aasta.ap b/Miscellaneous/Automated school clock/v2/aasta.ap
new file mode 100644 (file)
index 0000000..82777d6
--- /dev/null
@@ -0,0 +1,14 @@
+v      01-01   12-31   tava\r
+n      01-01   12-31   5       reede\r
+e      10-04   opetajap\r
+e      10-31   rebased\r
+e      04-17   luhend\r
+e      04-18   tuhi\r
+e      04-30   luhend\r
+e      05-01   tuhi\r
+e      06-23   tuhi\r
+e      06-24   tuhi\r
+n      01-01   12-31   6       tuhi\r
+n      01-01   12-31   7       tuhi\r
+v      07-01   08-31   tuhi\r
+\r
diff --git a/Miscellaneous/Automated school clock/v2/kkmini.bas b/Miscellaneous/Automated school clock/v2/kkmini.bas
new file mode 100755 (executable)
index 0000000..4564dc8
--- /dev/null
@@ -0,0 +1,485 @@
+DECLARE SUB dispt ()\r
+' Svjatoslav Agejenko\r
+' E-mail: svjatoslav@svjatoslav.eu\r
+' Homepage: www.hot.ee/n0/\r
+\r
+DECLARE SUB dispp ()\r
+DECLARE SUB displukk ()\r
+DECLARE SUB kola (a%)\r
+DECLARE SUB rese ()\r
+DECLARE SUB start ()\r
+DECLARE SUB getnad (g%, n%, d%, k%)\r
+DECLARE SUB initp (b$)\r
+DECLARE SUB getmd (a$, m%, d%)\r
+DECLARE SUB son (a$)\r
+DECLARE SUB inita ()\r
+DECLARE SUB chm ()\r
+DECLARE SUB chd ()\r
+DECLARE SUB kell (a%)\r
+DECLARE SUB sync2 ()\r
+DECLARE SUB sync ()\r
+DECLARE SUB mnmain ()\r
+DECLARE SUB heli (a%)\r
+DECLARE SUB disp ()\r
+DEFINT A-Z\r
+\r
+DIM SHARED ap$(1 TO 500)\r
+DIM SHARED apl\r
+DIM SHARED pp$(1 TO 500)\r
+DIM SHARED ppl\r
+DIM SHARED prt, prt2\r
+DIM SHARED timo$\r
+DIM SHARED dato$\r
+DIM SHARED sona$(1 TO 50)\r
+DIM SHARED mitus\r
+DIM SHARED lp$\r
+DIM SHARED ndlp\r
+DIM SHARED pn$(1 TO 7)\r
+DIM SHARED lk$\r
+DIM SHARED ssave\r
+DIM SHARED ssavel\r
+DIM SHARED timero AS LONG\r
+DIM SHARED kblukk\r
+DIM SHARED tunnidara\r
+\r
+start\r
+\r
+\r
+disp\r
+mnmain\r
+\r
+SUB chd\r
+b$ = "tuhi"\r
+IF apl = 0 THEN inita\r
+\r
+a$ = DATE$\r
+n1 = VAL(RIGHT$(a$, 4))\r
+n2 = VAL(LEFT$(a$, 2))\r
+a$ = LEFT$(a$, 5)\r
+n3 = VAL(RIGHT$(a$, 2))\r
+getnad n1, n2, n3, ndlp\r
+FOR a = 1 TO apl\r
+son ap$(a)\r
+SELECT CASE sona$(1)\r
+CASE "v"\r
+getmd sona$(2), m1, d1\r
+getmd sona$(3), m2, d2\r
+getmd DATE$, m3, d3\r
+IF m3 < m1 THEN GOTO 9\r
+IF m3 > m2 THEN GOTO 9\r
+IF m3 = m1 THEN IF d3 < d1 THEN GOTO 9\r
+IF m3 = m2 THEN IF d3 > d2 THEN GOTO 9\r
+b$ = sona$(4)\r
+CASE "n"\r
+getmd sona$(2), m1, d1\r
+getmd sona$(3), m2, d2\r
+getmd DATE$, m3, d3\r
+IF m3 < m1 THEN GOTO 9\r
+IF m3 > m2 THEN GOTO 9\r
+IF m3 = m1 THEN IF d3 < d1 THEN GOTO 9\r
+IF m3 = m2 THEN IF d3 > d2 THEN GOTO 9\r
+IF ndlp <> VAL(sona$(4)) THEN GOTO 9\r
+b$ = sona$(5)\r
+CASE "e"\r
+getmd sona$(2), m1, d1\r
+getmd DATE$, m2, d2\r
+IF (m1 = m2) AND (d1 = d2) THEN b$ = sona$(3)\r
+END SELECT\r
+9\r
+NEXT a\r
+\r
+IF b$ <> lp$ THEN initp b$\r
+lp$ = b$\r
+tunnidara = 0\r
+dispp\r
+disp\r
+END SUB\r
+\r
+SUB chm\r
+a$ = DATE$\r
+IF a$ <> dato$ THEN chd\r
+dato$ = a$\r
+b = 0\r
+FOR a = 1 TO ppl\r
+son pp$(a)\r
+SELECT CASE sona$(1)\r
+CASE "#"\r
+getmd sona$(2), h1, m1\r
+getmd TIME$, h2, m2\r
+' PRINT h1, m1, h2, m2\r
+IF (h2 = h1) AND (m2 = m1) THEN\r
+IF sona$(3) = "sis" THEN b = 1\r
+IF sona$(3) = "val" THEN b = 2\r
+END IF\r
+END SELECT\r
+NEXT a\r
+\r
+IF (tunnidara = 0) AND (b > 0) THEN kell b\r
+ssave = ssave + 1\r
+END SUB\r
+\r
+SUB disp\r
+CLS\r
+PRINT "Kooli Kell (mini) v 1.1  2003.3"\r
+PRINT "Programmi autor Svjatoslav Agejenko   E-mail: n0@hot.ee"\r
+PRINT ""\r
+PRINT "s - kell tundi sisse             v - kell tunnist v�lja"\r
+PRINT "a - sisesta uus aeg              d - sisesta uus daatum"\r
+PRINT "u - �mardab aja t�istunnini      l - laeb aja failist SYNC.TXT"\r
+PRINT "7 - 1 minut tagasi               8 - 1 minut edasi"\r
+PRINT "4 - 1 tund tagasi                5 - 1 tund edasi"\r
+PRINT "r - programmi restart            q - programmist v�lja"\r
+PRINT "                                 j - j�tab k�ik tunnid t�na �ra"\r
+\r
+dispp\r
+\r
+LOCATE 12, 15\r
+PRINT "Kuu-P�ev-Aasta (USA standard)"\r
+\r
+\r
+LOCATE 17\r
+\r
+FOR a = 1 TO ppl\r
+IF pp$(a) <> SPACE$(LEN(pp$(a))) THEN\r
+  PRINT pp$(a);\r
+  PRINT SPACE$(15 - LEN(pp$(a)));\r
+END IF\r
+NEXT a\r
+\r
+displukk\r
+dispt\r
+END SUB\r
+\r
+SUB displukk\r
+LOCATE 1, 40\r
+IF kblukk = 1 THEN\r
+  COLOR 0, 7\r
+  PRINT "Klaviatuur lukus! Vajuta CTRL+L"\r
+  COLOR 7, 0\r
+ELSE\r
+  PRINT "                               "\r
+END IF\r
+END SUB\r
+\r
+SUB dispp\r
+IF ndlp = 0 THEN GOTO 14\r
+LOCATE 14, 1\r
+PRINT "n�dalap�ev:", pn$(ndlp)\r
+LOCATE 15, 1\r
+PRINT "p�evaplaan:", lp$\r
+14\r
+END SUB\r
+\r
+SUB dispt\r
+LOCATE 16, 20\r
+COLOR 12 + 15, 0\r
+IF tunnidara = 1 THEN\r
+  PRINT "T�na on k�ik tunnid �ra j�etud"\r
+ELSE\r
+  PRINT "                              "\r
+END IF\r
+COLOR 7, 0\r
+END SUB\r
+\r
+SUB getmd (a$, m, d)\r
+b$ = LEFT$(a$, 5)\r
+m = VAL(LEFT$(b$, 2))\r
+d = VAL(RIGHT$(b$, 2))\r
+\r
+END SUB\r
+\r
+SUB getnad (g, n, d, k)\r
+'LOCATE 11, 1\r
+'PRINT g, n, d\r
+p = g\r
+m = n - 2\r
+IF n > 2 GOTO 120\r
+p = p - 1: m = m + 12\r
+120\r
+c = INT(p / 100)\r
+y = p - c * 100\r
+w = d + INT((13 * m - 1) / 5) + y + INT(y / 4) + INT(c / 4) - 2 * c\r
+k = w - 7 * INT(w / 7)\r
+IF k = 0 THEN k = 7\r
+END SUB\r
+\r
+SUB heli (a)\r
+'GOTO 10\r
+SELECT CASE a\r
+CASE 1\r
+FOR c = 1 TO 5\r
+SOUND 3000, 1\r
+SOUND 0, 1\r
+NEXT c\r
+\r
+CASE 2\r
+FOR c = 1 TO 5\r
+SOUND 2500, 1\r
+SOUND 0, 2\r
+NEXT c\r
+SOUND 2500, 10\r
+\r
+CASE 3\r
+FOR a = 1 TO 10\r
+SOUND 500, .5\r
+SOUND 1500, .5\r
+SOUND 2000, .5\r
+SOUND 1520, .5\r
+NEXT a\r
+\r
+\r
+CASE 4\r
+FOR a = 800 TO 1000 STEP 10\r
+SOUND a, .1\r
+SOUND a * 3, .1\r
+SOUND 0, 1\r
+NEXT a\r
+10\r
+\r
+END SELECT\r
+\r
+\r
+END SUB\r
+\r
+SUB inita\r
+apl = 0\r
+OPEN "aasta.ap" FOR INPUT AS #1\r
+5\r
+IF EOF(1) <> 0 THEN GOTO 3\r
+LINE INPUT #1, a$\r
+apl = apl + 1\r
+ap$(apl) = a$\r
+GOTO 5\r
+3\r
+CLOSE #1\r
+END SUB\r
+\r
+SUB initp (b$)\r
+ppl = 0\r
+OPEN b$ + ".pp" FOR INPUT AS #1\r
+6\r
+IF EOF(1) <> 0 THEN GOTO 7\r
+LINE INPUT #1, a$\r
+ppl = ppl + 1\r
+pp$(ppl) = a$\r
+GOTO 6\r
+7\r
+CLOSE #1\r
+END SUB\r
+\r
+SUB kell (a)\r
+b$ = TIME$ + DATE$\r
+IF b$ <> lk$ THEN lk$ = b$ ELSE GOTO 2\r
+\r
+heli 3\r
+\r
+SELECT CASE a\r
+CASE 1\r
+kola 4\r
+FOR b = 1 TO 15\r
+SOUND 0, 1\r
+NEXT b\r
+kola 1\r
+CASE 2\r
+kola 5\r
+END SELECT\r
+2\r
+END SUB\r
+\r
+SUB kola (a)\r
+timero = TIMER\r
+11\r
+FOR b = 1 TO 100\r
+OUT prt, 0\r
+OUT prt, 255\r
+NEXT b\r
+IF ABS(timero - TIMER) < a THEN GOTO 11\r
+END SUB\r
+\r
+SUB mnmain\r
+1\r
+b$ = LEFT$(TIME$, 5)\r
+IF b$ <> timo$ THEN chm\r
+timo$ = b$\r
+\r
+a$ = INKEY$\r
+\r
+IF a$ <> "" THEN\r
+IF ssave > ssavel THEN disp\r
+ssave = 0\r
+END IF\r
+\r
+IF a$ = CHR$(12) THEN\r
+  IF kblukk = 1 THEN kblukk = 0 ELSE kblukk = 1\r
+  displukk\r
+END IF\r
+IF kblukk = 1 THEN a$ = ""\r
+\r
+IF a$ = "s" THEN kell 1\r
+IF a$ = "v" THEN kell 2\r
+\r
+IF a$ = "a" THEN\r
+CLS\r
+PRINT "                  vana aeg: " + TIME$\r
+INPUT "sisesta uus aeg (TT:MM:SS): ", b$\r
+IF LEN(b$) <> 8 THEN GOTO 12\r
+TIME$ = b$\r
+timo$ = ""\r
+12\r
+disp\r
+END IF\r
+\r
+IF a$ = "d" THEN\r
+CLS\r
+PRINT "                    vana daatum: " + DATE$\r
+INPUT "sisesta uus daatum (KK-PP-AAAA): ", b$\r
+IF LEN(b$) <> 10 THEN GOTO 13\r
+DATE$ = b$\r
+timo$ = ""\r
+13\r
+disp\r
+END IF\r
+\r
+IF a$ = "7" OR a$ = "8" THEN\r
+  b = VAL(RIGHT$(LEFT$(TIME$, 5), 2))\r
+  IF a$ = "7" THEN b = b - 1\r
+  IF a$ = "8" THEN b = b + 1\r
+  IF b < 0 THEN b = 0\r
+  IF b > 59 THEN b = 59\r
+  d$ = STR$(b)\r
+  IF LEFT$(d$, 1) = " " THEN d$ = RIGHT$(d$, LEN(d$) - 1)\r
+  IF LEN(d$) < 2 THEN d$ = "0" + d$\r
+  e$ = LEFT$(TIME$, 3) + d$ + RIGHT$(TIME$, 3)\r
+  TIME$ = e$\r
+END IF\r
+\r
+IF a$ = "4" OR a$ = "5" THEN\r
+  b = VAL(LEFT$(TIME$, 2))\r
+  IF a$ = "4" THEN b = b - 1\r
+  IF a$ = "5" THEN b = b + 1\r
+  IF b < 0 THEN b = 0\r
+  IF b > 23 THEN b = 23\r
+  d$ = STR$(b)\r
+  IF LEFT$(d$, 1) = " " THEN d$ = RIGHT$(d$, LEN(d$) - 1)\r
+  IF LEN(d$) < 2 THEN d$ = "0" + d$\r
+  e$ = d$ + RIGHT$(TIME$, 6)\r
+  TIME$ = e$\r
+END IF\r
+\r
+IF a$ = "u" THEN sync2\r
+IF a$ = "l" THEN sync\r
+\r
+IF a$ = "r" THEN rese\r
+IF a$ = "q" THEN SYSTEM\r
+\r
+IF a$ = "j" THEN\r
+IF tunnidara = 0 THEN tunnidara = 1 ELSE tunnidara = 0\r
+dispt\r
+END IF\r
+\r
+IF ssave <= ssavel THEN\r
+  LOCATE 11, 1\r
+  PRINT TIME$\r
+  LOCATE 12, 1\r
+  PRINT DATE$\r
+ELSE\r
+  IF ABS(TIMER - timero) > 10 THEN\r
+  CLS\r
+  kblukk = 1\r
+  FOR b = 1 TO 20\r
+    LOCATE RND * 22 + 1, RND * 79 + 1\r
+    IF RND * 100 < 50 THEN PRINT "*" ELSE PRINT "."\r
+  NEXT b\r
+  LOCATE RND * 22 + 1, RND * 50 + 1\r
+  COLOR 0, 7\r
+  PRINT "< " + LEFT$(TIME$, 2);\r
+  COLOR 16, 7\r
+  PRINT ":";\r
+  COLOR 0, 7\r
+  PRINT RIGHT$(LEFT$(TIME$, 5), 2) + " >"\r
+  COLOR 7, 0\r
+  timero = TIMER\r
+  END IF\r
+END IF\r
+GOTO 1\r
+\r
+\r
+END SUB\r
+\r
+SUB rese\r
+heli 4\r
+timo$ = ""\r
+dato$ = ""\r
+apl = 0\r
+END SUB\r
+\r
+SUB son (a$)\r
+\r
+FOR b = 1 TO 50\r
+sona$(b) = ""\r
+NEXT b\r
+mitus = 0\r
+\r
+b = 1\r
+FOR c = 1 TO LEN(a$)\r
+d$ = RIGHT$(LEFT$(a$, c), 1)\r
+IF d$ = " " OR d$ = CHR$(9) THEN\r
+b = 1\r
+ELSE\r
+IF b = 1 THEN b = 0: mitus = mitus + 1\r
+sona$(mitus) = sona$(mitus) + d$\r
+END IF\r
+NEXT c\r
+\r
+\r
+END SUB\r
+\r
+SUB start\r
+pn$(1) = "esmasp�ev"\r
+pn$(2) = "teisip�ev"\r
+pn$(3) = "kolmap�ev"\r
+pn$(4) = "neljap�ev"\r
+pn$(5) = "reede"\r
+pn$(6) = "laup�ev"\r
+pn$(7) = "p�hap�ev"\r
+\r
+prt = &H378\r
+\r
+ssavel = 2\r
+kblukk = 1\r
+tunnidara = 0\r
+END SUB\r
+\r
+SUB sync\r
+OPEN "sync.txt" FOR INPUT AS #1\r
+LINE INPUT #1, a$\r
+DATE$ = a$\r
+LINE INPUT #1, a$\r
+TIME$ = a$\r
+CLOSE #1\r
+\r
+heli 2\r
+END SUB\r
+\r
+SUB sync2\r
+a$ = TIME$\r
+a$ = LEFT$(a$, 5)\r
+b = VAL(RIGHT$(a$, 2))\r
+c = VAL(LEFT$(a$, 2))\r
+IF b >= 30 THEN c = c + 1\r
+b = 0\r
+IF c > 23 THEN c = c - 24\r
+a$ = RIGHT$(STR$(c), LEN(STR$(c)) - 1)\r
+b$ = RIGHT$(STR$(b), LEN(STR$(b)) - 1)\r
+IF LEN(a$) < 2 THEN a$ = "0" + a$\r
+IF LEN(b$) < 2 THEN b$ = "0" + b$\r
+a$ = a$ + ":" + b$\r
+\r
+'LOCATE 10, 1\r
+'PRINT a$\r
+\r
+TIME$ = a$\r
+\r
+heli 1\r
+END SUB\r
+\r
diff --git a/Miscellaneous/Automated school clock/v2/luhend.pp b/Miscellaneous/Automated school clock/v2/luhend.pp
new file mode 100644 (file)
index 0000000..8c36fd4
--- /dev/null
@@ -0,0 +1,27 @@
+# 08:30 sis\r
+# 09:00 val\r
+\r
+# 09:10 sis\r
+# 09:40 val\r
+\r
+# 09:50 sis\r
+# 10:20 val\r
+\r
+# 10:30 sis\r
+# 11:00 val\r
+\r
+# 11:30 sis\r
+# 12:00 val\r
+\r
+# 12:10 sis\r
+# 12:40 val\r
+\r
+# 12:50 sis\r
+# 13:20 val\r
+\r
+# 13:30 sis\r
+# 14:00 val\r
+\r
+# 14:05 sis\r
+# 14:35 val\r
+\r
diff --git a/Miscellaneous/Automated school clock/v2/opetajap.pp b/Miscellaneous/Automated school clock/v2/opetajap.pp
new file mode 100644 (file)
index 0000000..0708469
--- /dev/null
@@ -0,0 +1,19 @@
+# 08:30 sis\r
+# 09:15 val\r
+\r
+# 09:25 sis\r
+# 10:10 val\r
+\r
+# 10:20 sis\r
+# 10:45 val\r
+\r
+# 10:55 sis\r
+# 11:20 val\r
+\r
+# 11:40 sis\r
+# 12:05 val\r
+\r
+# 12:15 sis\r
+# 12:40 val\r
+\r
+\r
diff --git a/Miscellaneous/Automated school clock/v2/rebased.pp b/Miscellaneous/Automated school clock/v2/rebased.pp
new file mode 100644 (file)
index 0000000..97dc6a5
--- /dev/null
@@ -0,0 +1,23 @@
+# 08:30 sis\r
+# 09:10 val\r
+\r
+# 09:20 sis\r
+# 10:00 val\r
+\r
+# 10:10 sis\r
+# 10:50 val\r
+\r
+# 11:30 sis\r
+# 12:10 val\r
+\r
+# 12:20 sis\r
+# 13:00 val\r
+\r
+# 13:10 sis\r
+# 13:50 val\r
+\r
+# 14:00 sis\r
+# 14:40 val\r
+\r
+# 14:45 sis\r
+# 15:30 val\r
diff --git a/Miscellaneous/Automated school clock/v2/reede.pp b/Miscellaneous/Automated school clock/v2/reede.pp
new file mode 100644 (file)
index 0000000..b4c0e82
--- /dev/null
@@ -0,0 +1,23 @@
+# 08:30 sis\r
+# 09:15 val\r
+\r
+# 09:25 sis\r
+# 10:10 val\r
+\r
+# 10:20 sis\r
+# 11:05 val\r
+\r
+# 11:35 sis\r
+# 12:20 val\r
+\r
+# 12:30 sis\r
+# 13:15 val\r
+\r
+# 13:20 sis\r
+# 14:05 val\r
+\r
+# 14:10 sis\r
+# 14:55 val\r
+\r
+# 15:00 sis\r
+# 15:45 val\r
diff --git a/Miscellaneous/Automated school clock/v2/sync.txt b/Miscellaneous/Automated school clock/v2/sync.txt
new file mode 100644 (file)
index 0000000..dbbc645
--- /dev/null
@@ -0,0 +1,5 @@
+02-03-2003\r
+11:32\r
+\r
+kuu-paev-aasta\r
+tunnid-minutid
\ No newline at end of file
diff --git a/Miscellaneous/Automated school clock/v2/tava.pp b/Miscellaneous/Automated school clock/v2/tava.pp
new file mode 100644 (file)
index 0000000..e83ded7
--- /dev/null
@@ -0,0 +1,29 @@
+# 08:30 sis\r
+# 09:15 val\r
+\r
+# 09:25 sis\r
+# 10:10 val\r
+\r
+# 10:20 sis\r
+# 11:05 val\r
+\r
+# 11:35 sis\r
+# 12:20 val\r
+\r
+# 12:30 sis\r
+# 13:15 val\r
+\r
+# 13:25 sis\r
+# 14:10 val\r
+\r
+# 14:20 sis\r
+# 15:05 val\r
+\r
+# 15:10 sis\r
+# 15:55 val\r
+\r
+# 16:00 sis\r
+# 16:45 val\r
+\r
+# 16:50 sis\r
+# 17:35 val
\ No newline at end of file
diff --git a/Miscellaneous/Automated school clock/v2/tuhi.pp b/Miscellaneous/Automated school clock/v2/tuhi.pp
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/Miscellaneous/Automated school clock/v3/aasta.ap b/Miscellaneous/Automated school clock/v3/aasta.ap
new file mode 100644 (file)
index 0000000..8640065
--- /dev/null
@@ -0,0 +1,12 @@
+v      01-01   12-31   tava\r
+n      01-01   12-31   5       reede\r
+e      04-17   luhend\r
+e      04-18   tuhi\r
+e      04-30   luhend\r
+e      05-01   tuhi\r
+e      06-23   tuhi\r
+e      06-24   tuhi\r
+n      01-01   12-31   6       tuhi\r
+n      01-01   12-31   7       tuhi\r
+v      07-01   08-31   tuhi\r
+\r
diff --git a/Miscellaneous/Automated school clock/v3/kell3.bas b/Miscellaneous/Automated school clock/v3/kell3.bas
new file mode 100755 (executable)
index 0000000..459e85a
--- /dev/null
@@ -0,0 +1,623 @@
+' Program allows scheduling school clock ringing.\r
+' Timetables are stored in separate files.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' ?, Initial version\r
+' 2024, Improved program readability\r
+\r
+\r
+DECLARE FUNCTION getName$ (a%)\r
+DECLARE FUNCTION getSym$ (a$, b%)\r
+DECLARE SUB editor ()\r
+DECLARE SUB leiaconf ()\r
+DECLARE SUB clrerr ()\r
+DECLARE SUB dispt ()\r
+\r
+DECLARE SUB dispp ()\r
+DECLARE SUB displukk ()\r
+DECLARE SUB kola (a%)\r
+DECLARE SUB rese ()\r
+DECLARE SUB start ()\r
+DECLARE SUB getNad (g%, n%, d%, k%)\r
+DECLARE SUB initp (b$)\r
+DECLARE SUB getMd (a$, m%, d%)\r
+DECLARE SUB son (a$)\r
+DECLARE SUB inita ()\r
+DECLARE SUB chm ()\r
+DECLARE SUB chd ()\r
+DECLARE SUB kell (a%)\r
+DECLARE SUB sync2 ()\r
+DECLARE SUB sync ()\r
+DECLARE SUB mnmain ()\r
+DECLARE SUB heli (a%)\r
+DECLARE SUB disp ()\r
+DEFINT A-Z\r
+\r
+DIM SHARED ap$(1 TO 500)\r
+DIM SHARED apl\r
+DIM SHARED pp$(1 TO 500)\r
+DIM SHARED ppl\r
+DIM SHARED prt, prt2\r
+DIM SHARED timo$\r
+DIM SHARED dato$\r
+DIM SHARED sona$(1 TO 50)\r
+DIM SHARED mitus\r
+DIM SHARED lp$\r
+DIM SHARED ndlp\r
+DIM SHARED pn$(1 TO 7)\r
+DIM SHARED lk$\r
+DIM SHARED ssave\r
+DIM SHARED ssavel\r
+DIM SHARED timero AS LONG\r
+DIM SHARED kblukk\r
+DIM SHARED tunnidara\r
+DIM SHARED errmsg$\r
+DIM SHARED cnflist$(1 TO 200)\r
+\r
+'ON ERROR GOTO 20\r
+\r
+start\r
+disp\r
+mnmain\r
+\r
+20\r
+LOCATE 20, 1\r
+COLOR 0, 15\r
+PRINT "Programmi t88s ilmus j2rgnev t6rge:"\r
+PRINT errmsg$\r
+PRINT "Programmi t2itmine katkestatud!  Abi saamiseks lugege juhendit."\r
+SYSTEM\r
+\r
+SUB chd\r
+b$ = "tuhi"\r
+IF apl = 0 THEN inita\r
+\r
+a$ = DATE$\r
+n1 = VAL(RIGHT$(a$, 4))\r
+n2 = VAL(LEFT$(a$, 2))\r
+a$ = LEFT$(a$, 5)\r
+n3 = VAL(RIGHT$(a$, 2))\r
+getNad n1, n2, n3, ndlp\r
+FOR a = 1 TO apl\r
+    son ap$(a)\r
+    SELECT CASE sona$(1)\r
+        CASE "v"\r
+            getMd sona$(2), m1, d1\r
+            getMd sona$(3), m2, d2\r
+            getMd DATE$, m3, d3\r
+            IF m3 < m1 THEN GOTO 9\r
+            IF m3 > m2 THEN GOTO 9\r
+            IF m3 = m1 THEN IF d3 < d1 THEN GOTO 9\r
+            IF m3 = m2 THEN IF d3 > d2 THEN GOTO 9\r
+            b$ = sona$(4)\r
+        CASE "n"\r
+            getMd sona$(2), m1, d1\r
+            getMd sona$(3), m2, d2\r
+            getMd DATE$, m3, d3\r
+            IF m3 < m1 THEN GOTO 9\r
+            IF m3 > m2 THEN GOTO 9\r
+            IF m3 = m1 THEN IF d3 < d1 THEN GOTO 9\r
+            IF m3 = m2 THEN IF d3 > d2 THEN GOTO 9\r
+            IF ndlp <> VAL(sona$(4)) THEN GOTO 9\r
+            b$ = sona$(5)\r
+        CASE "e"\r
+            getMd sona$(2), m1, d1\r
+            getMd DATE$, m2, d2\r
+            IF (m1 = m2) AND (d1 = d2) THEN b$ = sona$(3)\r
+    END SELECT\r
+9\r
+NEXT a\r
+\r
+IF b$ <> lp$ THEN initp b$\r
+lp$ = b$\r
+tunnidara = 0\r
+dispp\r
+disp\r
+END SUB\r
+\r
+SUB chm\r
+a$ = DATE$\r
+IF a$ <> dato$ THEN chd\r
+dato$ = a$\r
+b = 0\r
+FOR a = 1 TO ppl\r
+    son pp$(a)\r
+    SELECT CASE sona$(1)\r
+        CASE "#"\r
+            getMd sona$(2), h1, m1\r
+            getMd TIME$, h2, m2\r
+            ' PRINT h1, m1, h2, m2\r
+            IF (h2 = h1) AND (m2 = m1) THEN\r
+                IF sona$(3) = "sis" THEN b = 1\r
+                IF sona$(3) = "val" THEN b = 2\r
+            END IF\r
+        END SELECT\r
+    NEXT a\r
+\r
+IF (tunnidara = 0) AND (b > 0) THEN kell b\r
+ssave = ssave + 1\r
+END SUB\r
+\r
+SUB clrerr\r
+errmsg$ = "tundmatu viga. V6ibolla on v2he RAM m2lu?"\r
+END SUB\r
+\r
+SUB disp\r
+CLS\r
+PRINT "Kooli Kell 3     2003.09"\r
+PRINT "autor: Svjatoslav Agejenko  "\r
+PRINT ""\r
+PRINT "s - kell tundi sisse             v - kell tunnist v�lja"\r
+PRINT "a - sisesta uus aeg              d - sisesta uus daatum"\r
+PRINT "p - n2itab dokumentatsiooni      j - j�tab k�ik tunnid t�na �ra"\r
+PRINT "7 - 1 minut tagasi               8 - 1 minut edasi"\r
+PRINT "4 - 1 tund tagasi                5 - 1 tund edasi"\r
+PRINT "r - programmi restart            q - programmist v�lja"\r
+PRINT "k - konfiguratsiooni redaktor    CTRL+L - klaviatuuri lukk (sees/v2ljas)"\r
+\r
+dispp\r
+\r
+LOCATE 12, 15\r
+PRINT "Kuu-P�ev-Aasta (USA standard)"\r
+\r
+LOCATE 17\r
+\r
+FOR a = 1 TO ppl\r
+    IF pp$(a) <> SPACE$(LEN(pp$(a))) THEN\r
+        PRINT pp$(a);\r
+        PRINT SPACE$(15 - LEN(pp$(a)));\r
+    END IF\r
+NEXT a\r
+\r
+displukk\r
+dispt\r
+END SUB\r
+\r
+SUB displukk\r
+LOCATE 1, 40\r
+IF kblukk = 1 THEN\r
+    COLOR 0, 7\r
+    PRINT "Klaviatuur lukus! Vajuta CTRL+L"\r
+    COLOR 15, 0\r
+ELSE\r
+    PRINT "                               "\r
+END IF\r
+END SUB\r
+\r
+SUB dispp\r
+IF ndlp = 0 THEN GOTO 14\r
+LOCATE 14, 1\r
+PRINT "n�dalap�ev:", pn$(ndlp)\r
+LOCATE 15, 1\r
+PRINT "p�evaplaan:", lp$\r
+14\r
+END SUB\r
+\r
+SUB dispt\r
+LOCATE 16, 20\r
+COLOR 12 + 15, 0\r
+IF tunnidara = 1 THEN\r
+    PRINT "T2na on k6ik tunnid 2ra j2etud"\r
+ELSE\r
+    PRINT "                              "\r
+END IF\r
+COLOR 15, 0\r
+END SUB\r
+\r
+SUB editor\r
+23\r
+leiaconf\r
+CLS\r
+COLOR 0, 15\r
+LOCATE 1, 1\r
+PRINT SPACE$(80);\r
+LOCATE 1, 1\r
+PRINT "Konfiguratsiooni redaktor. Valige v�lja p�eva v6i aasta plaani."\r
+LOCATE 2, 1\r
+PRINT SPACE$(80)\r
+LOCATE 2, 1\r
+PRINT "  nr   nimi     laiend     suurus loomisdaatum"\r
+\r
+LOCATE 22, 1\r
+PRINT SPACE$(80)\r
+LOCATE 22, 1\r
+PRINT "K - valitud faili kustutamine   U - uus fail   ESC - redaktorist v�lja"\r
+p = 0\r
+v = 1\r
+17\r
+FOR a = 3 TO 21\r
+    IF a - 2 + p = v THEN\r
+        COLOR 0, 7\r
+        LOCATE a, 1\r
+        PRINT cnflist$(a - 2 + p) + SPACE$(55 - LEN(cnflist$(a - 2 + p)))\r
+        LOCATE a, 56\r
+        COLOR 31, 0\r
+        PRINT "<=="\r
+        IF cnflist$(a - 2 + p) <> SPACE$(LEN(cnflist$(a - 2 + p))) THEN\r
+            COLOR 15, 0\r
+            PRINT " valitud: " + getName$(v)\r
+        END IF\r
+        COLOR 15, 0\r
+    ELSE\r
+        COLOR 15, 0\r
+        LOCATE a, 1\r
+        PRINT cnflist$(a - 2 + p) + SPACE$(80 - LEN(cnflist$(a - 2 + p)))\r
+    END IF\r
+NEXT a\r
+\r
+a$ = INKEY$\r
+LOCATE 1, 1\r
+'IF a$ <> "" THEN PRINT ASC(RIGHT$(a$, 1)); ASC(LEFT$(a$, 1))\r
+IF a$ = CHR$(27) THEN GOTO 18\r
+IF a$ = "u" OR a$ = "U" THEN SHELL "EDIT": GOTO 23\r
+IF a$ = CHR$(0) + "P" THEN v = v + 1\r
+IF a$ = CHR$(0) + "H" THEN v = v - 1\r
+IF a$ = CHR$(0) + CHR$(73) THEN v = v - 17\r
+IF a$ = CHR$(0) + CHR$(81) THEN v = v + 17\r
+IF a$ = "K" OR a$ = "k" THEN\r
+    IF LEN(getName$(v)) > 2 THEN\r
+        IF getName$(v) = "AASTA.AP" THEN\r
+            SOUND 3000, .1\r
+        ELSE\r
+            KILL getName$(v)\r
+            GOTO 23\r
+        END IF\r
+    ELSE\r
+        SOUND 3000, .1\r
+    END IF\r
+END IF\r
+IF a$ = CHR$(13) THEN\r
+    IF getName$(v) = "." THEN\r
+        SOUND 3000, .1\r
+    ELSE\r
+        SHELL "EDIT " + getName$(v)\r
+        GOTO 23\r
+    END IF\r
+END IF\r
+\r
+IF v < 1 THEN v = 1: SOUND 3000, .2\r
+IF v > 200 THEN v = 200: : SOUND 3000, .2\r
+\r
+21\r
+IF v - p > 19 THEN p = p + 1: GOTO 21\r
+22\r
+IF v - p < 1 THEN p = p - 1: GOTO 22\r
+\r
+GOTO 17\r
+18\r
+COLOR 15, 0\r
+disp\r
+END SUB\r
+\r
+SUB getMd (a$, m, d)\r
+b$ = LEFT$(a$, 5)\r
+m = VAL(LEFT$(b$, 2))\r
+d = VAL(RIGHT$(b$, 2))\r
+\r
+END SUB\r
+\r
+SUB getNad (g, n, d, k)\r
+'LOCATE 11, 1\r
+'PRINT g, n, d\r
+p = g\r
+m = n - 2\r
+IF n > 2 GOTO 120\r
+p = p - 1: m = m + 12\r
+120\r
+c = INT(p / 100)\r
+y = p - c * 100\r
+w = d + INT((13 * m - 1) / 5) + y + INT(y / 4) + INT(c / 4) - 2 * c\r
+k = w - 7 * INT(w / 7)\r
+IF k = 0 THEN k = 7\r
+END SUB\r
+\r
+FUNCTION getName$ (a)\r
+c$ = ""\r
+FOR b = 8 TO 40\r
+    d$ = getSym(cnflist$(a), b)\r
+    IF d$ = " " THEN GOTO 19\r
+    c$ = c$ + d$\r
+NEXT b\r
+19\r
+getName$ = c$ + "." + getSym(cnflist$(a), 17) + getSym(cnflist$(a), 18)\r
+END FUNCTION\r
+\r
+FUNCTION getSym$ (a$, b)\r
+getSym$ = RIGHT$(LEFT$(a$, b), 1)\r
+END FUNCTION\r
+\r
+SUB heli (a)\r
+'GOTO 10\r
+SELECT CASE a\r
+    CASE 1\r
+        FOR c = 1 TO 5\r
+            SOUND 3000, 1\r
+            SOUND 0, 1\r
+        NEXT c\r
+\r
+    CASE 2\r
+        FOR c = 1 TO 5\r
+            SOUND 2500, 1\r
+            SOUND 0, 2\r
+        NEXT c\r
+        SOUND 2500, 10\r
+\r
+    CASE 3\r
+        FOR a = 1 TO 10\r
+            SOUND 500, .5\r
+            SOUND 1500, .5\r
+            SOUND 2000, .5\r
+            SOUND 1520, .5\r
+        NEXT a\r
+\r
+    CASE 4\r
+        FOR a = 800 TO 1000 STEP 10\r
+            SOUND a, .1\r
+            SOUND a * 3, .1\r
+            SOUND 0, 1\r
+        NEXT a\r
+    10\r
+END SELECT\r
+\r
+END SUB\r
+\r
+SUB inita\r
+apl = 0\r
+errmsg$ = "Ei leia aastaplaani faili! 'aasta.ap'"\r
+OPEN "aasta.ap" FOR INPUT AS #1\r
+clrerr\r
+5\r
+IF EOF(1) <> 0 THEN GOTO 3\r
+LINE INPUT #1, a$\r
+apl = apl + 1\r
+ap$(apl) = a$\r
+GOTO 5\r
+3\r
+CLOSE #1\r
+END SUB\r
+\r
+SUB initp (b$)\r
+ppl = 0\r
+errmsg$ = "Ei leia aastaplaanis mainitud '" + b$ + ".pp' p�evaplaani!"\r
+OPEN b$ + ".pp" FOR INPUT AS #1\r
+clrerr\r
+6\r
+IF EOF(1) <> 0 THEN GOTO 7\r
+LINE INPUT #1, a$\r
+ppl = ppl + 1\r
+pp$(ppl) = a$\r
+GOTO 6\r
+7\r
+CLOSE #1\r
+END SUB\r
+\r
+SUB kell (a)\r
+b$ = TIME$ + DATE$\r
+IF b$ <> lk$ THEN lk$ = b$ ELSE GOTO 2\r
+\r
+heli 3\r
+\r
+SELECT CASE a\r
+    CASE 1\r
+        kola 4\r
+        FOR b = 1 TO 15\r
+            SOUND 0, 1\r
+        NEXT b\r
+        kola 1\r
+\r
+    CASE 2\r
+        kola 5\r
+END SELECT\r
+2\r
+\r
+END SUB\r
+\r
+SUB kola (a)\r
+COLOR 15, 7\r
+s$ = ""\r
+FOR b = 1 TO 80\r
+    s$ = s$ + CHR$(219)\r
+NEXT b\r
+FOR b = 1 TO 30\r
+    PRINT s$;\r
+NEXT b\r
+\r
+timero = TIMER\r
+11\r
+OUT prt, 255\r
+IF ABS(timero - TIMER) < a THEN GOTO 11\r
+OUT prt, 0\r
+COLOR 15, 0\r
+disp\r
+END SUB\r
+\r
+SUB leiaconf\r
+FOR a = 1 TO 200\r
+    cnflist$(a) = ""\r
+NEXT a\r
+c = 1\r
+\r
+SHELL "dir >dir.tmp"\r
+OPEN "dir.tmp" FOR INPUT AS #1\r
+15\r
+IF EOF(1) <> 0 THEN GOTO 16\r
+LINE INPUT #1, a$\r
+IF LEN(a$) < 30 THEN GOTO 15\r
+IF LEFT$(a$, 1) = " " THEN GOTO 15\r
+IF LEFT$(a$, 1) = "." THEN GOTO 15\r
+b$ = RIGHT$(LEFT$(a$, 12), 3)\r
+IF b$ = "PP " OR b$ = "AP " THEN ELSE GOTO 15\r
+d$ = "    " + STR$(c)\r
+a$ = RIGHT$(d$, 4) + "   " + a$\r
+IF LEN(a$) > 50 THEN a$ = LEFT$(a$, 50)\r
+cnflist$(c) = a$\r
+c = c + 1\r
+GOTO 15\r
+16\r
+CLOSE #1\r
+KILL "dir.tmp"\r
+END SUB\r
+\r
+SUB mnmain\r
+1\r
+b$ = LEFT$(TIME$, 5)\r
+IF b$ <> timo$ THEN chm\r
+timo$ = b$\r
+\r
+a$ = INKEY$\r
+\r
+IF a$ <> "" THEN\r
+    IF ssave > ssavel THEN disp\r
+    ssave = 0\r
+END IF\r
+\r
+IF a$ = CHR$(12) THEN\r
+    IF kblukk = 1 THEN kblukk = 0 ELSE kblukk = 1\r
+    displukk\r
+END IF\r
+IF kblukk = 1 THEN\r
+    IF a$ <> "" THEN SOUND 3000, 1\r
+    a$ = ""\r
+END IF\r
+IF a$ = "k" OR a$ = "K" THEN editor\r
+\r
+IF a$ = "s" OR a$ = "S" THEN kell 1\r
+IF a$ = "v" OR a$ = "V" THEN kell 2\r
+\r
+IF a$ = "a" THEN\r
+    CLS\r
+    PRINT "                  vana aeg: " + TIME$\r
+    INPUT "sisesta uus aeg (TT:MM:SS): ", b$\r
+    IF LEN(b$) <> 8 THEN GOTO 12\r
+    TIME$ = b$\r
+    timo$ = ""\r
+    12\r
+    disp\r
+END IF\r
+\r
+IF a$ = "d" OR a$ = "D" THEN\r
+    CLS\r
+    PRINT "                    vana daatum: " + DATE$\r
+    INPUT "sisesta uus daatum (KK-PP-AAAA): ", b$\r
+    IF LEN(b$) <> 10 THEN GOTO 13\r
+    DATE$ = b$\r
+    timo$ = ""\r
+    13\r
+    disp\r
+END IF\r
+\r
+IF a$ = "7" OR a$ = "8" THEN\r
+    b = VAL(RIGHT$(LEFT$(TIME$, 5), 2))\r
+    IF a$ = "7" THEN b = b - 1\r
+    IF a$ = "8" THEN b = b + 1\r
+    IF b < 0 THEN b = 0\r
+    IF b > 59 THEN b = 59\r
+    d$ = STR$(b)\r
+    IF LEFT$(d$, 1) = " " THEN d$ = RIGHT$(d$, LEN(d$) - 1)\r
+    IF LEN(d$) < 2 THEN d$ = "0" + d$\r
+    e$ = LEFT$(TIME$, 3) + d$ + RIGHT$(TIME$, 3)\r
+    TIME$ = e$\r
+END IF\r
+\r
+IF a$ = "4" OR a$ = "5" THEN\r
+    b = VAL(LEFT$(TIME$, 2))\r
+    IF a$ = "4" THEN b = b - 1\r
+    IF a$ = "5" THEN b = b + 1\r
+    IF b < 0 THEN b = 0\r
+    IF b > 23 THEN b = 23\r
+    d$ = STR$(b)\r
+    IF LEFT$(d$, 1) = " " THEN d$ = RIGHT$(d$, LEN(d$) - 1)\r
+    IF LEN(d$) < 2 THEN d$ = "0" + d$\r
+    e$ = d$ + RIGHT$(TIME$, 6)\r
+    TIME$ = e$\r
+END IF\r
+\r
+IF a$ = "p" OR a$ = "P" THEN SHELL "EDIT juhend.txt": disp\r
+\r
+IF a$ = "r" OR a$ = "R" THEN rese\r
+IF a$ = "q" OR a$ = "Q" THEN SYSTEM\r
+\r
+IF a$ = "j" OR a$ = "J" THEN\r
+    IF tunnidara = 0 THEN tunnidara = 1 ELSE tunnidara = 0\r
+    dispt\r
+END IF\r
+\r
+IF ssave <= ssavel THEN\r
+    LOCATE 11, 1\r
+    PRINT TIME$\r
+    LOCATE 12, 1\r
+    PRINT DATE$\r
+ELSE\r
+    IF ABS(TIMER - timero) > 10 THEN\r
+        CLS\r
+        kblukk = 1\r
+        FOR b = 1 TO 20\r
+            LOCATE RND * 22 + 1, RND * 79 + 1\r
+            IF RND * 100 < 50 THEN PRINT "*" ELSE PRINT "."\r
+        NEXT b\r
+        LOCATE RND * 22 + 1, RND * 50 + 1\r
+        COLOR 0, 7\r
+        PRINT "< " + LEFT$(TIME$, 2);\r
+        COLOR 16, 7\r
+        PRINT ":";\r
+        COLOR 0, 7\r
+        PRINT RIGHT$(LEFT$(TIME$, 5), 2) + " >"\r
+        COLOR 15, 0\r
+        timero = TIMER\r
+    END IF\r
+END IF\r
+GOTO 1\r
+\r
+END SUB\r
+\r
+SUB rese\r
+heli 4\r
+timo$ = ""\r
+dato$ = ""\r
+apl = 0\r
+END SUB\r
+\r
+SUB son (a$)\r
+\r
+FOR b = 1 TO 50\r
+    sona$(b) = ""\r
+NEXT b\r
+mitus = 0\r
+\r
+b = 1\r
+FOR c = 1 TO LEN(a$)\r
+    d$ = RIGHT$(LEFT$(a$, c), 1)\r
+    IF d$ = " " OR d$ = CHR$(9) THEN\r
+        b = 1\r
+    ELSE\r
+        IF b = 1 THEN b = 0: mitus = mitus + 1\r
+        sona$(mitus) = sona$(mitus) + d$\r
+    END IF\r
+NEXT c\r
+\r
+END SUB\r
+\r
+SUB start\r
+CLS\r
+COLOR 15\r
+pn$(1) = "esmasp�ev"\r
+pn$(2) = "teisip�ev"\r
+pn$(3) = "kolmap�ev"\r
+pn$(4) = "neljap�ev"\r
+pn$(5) = "reede"\r
+pn$(6) = "laup�ev"\r
+pn$(7) = "p�hap�ev"\r
+\r
+prt = &H378\r
+\r
+ssavel = 2\r
+kblukk = 1\r
+tunnidara = 0\r
+\r
+OUT prt, 0\r
+END SUB\r
diff --git a/Miscellaneous/Automated school clock/v3/luhend.pp b/Miscellaneous/Automated school clock/v3/luhend.pp
new file mode 100644 (file)
index 0000000..8c36fd4
--- /dev/null
@@ -0,0 +1,27 @@
+# 08:30 sis\r
+# 09:00 val\r
+\r
+# 09:10 sis\r
+# 09:40 val\r
+\r
+# 09:50 sis\r
+# 10:20 val\r
+\r
+# 10:30 sis\r
+# 11:00 val\r
+\r
+# 11:30 sis\r
+# 12:00 val\r
+\r
+# 12:10 sis\r
+# 12:40 val\r
+\r
+# 12:50 sis\r
+# 13:20 val\r
+\r
+# 13:30 sis\r
+# 14:00 val\r
+\r
+# 14:05 sis\r
+# 14:35 val\r
+\r
diff --git a/Miscellaneous/Automated school clock/v3/reede.pp b/Miscellaneous/Automated school clock/v3/reede.pp
new file mode 100644 (file)
index 0000000..b4c0e82
--- /dev/null
@@ -0,0 +1,23 @@
+# 08:30 sis\r
+# 09:15 val\r
+\r
+# 09:25 sis\r
+# 10:10 val\r
+\r
+# 10:20 sis\r
+# 11:05 val\r
+\r
+# 11:35 sis\r
+# 12:20 val\r
+\r
+# 12:30 sis\r
+# 13:15 val\r
+\r
+# 13:20 sis\r
+# 14:05 val\r
+\r
+# 14:10 sis\r
+# 14:55 val\r
+\r
+# 15:00 sis\r
+# 15:45 val\r
diff --git a/Miscellaneous/Automated school clock/v3/skeem.png b/Miscellaneous/Automated school clock/v3/skeem.png
new file mode 100644 (file)
index 0000000..9c3e95b
Binary files /dev/null and b/Miscellaneous/Automated school clock/v3/skeem.png differ
diff --git a/Miscellaneous/Automated school clock/v3/tava.pp b/Miscellaneous/Automated school clock/v3/tava.pp
new file mode 100644 (file)
index 0000000..e83ded7
--- /dev/null
@@ -0,0 +1,29 @@
+# 08:30 sis\r
+# 09:15 val\r
+\r
+# 09:25 sis\r
+# 10:10 val\r
+\r
+# 10:20 sis\r
+# 11:05 val\r
+\r
+# 11:35 sis\r
+# 12:20 val\r
+\r
+# 12:30 sis\r
+# 13:15 val\r
+\r
+# 13:25 sis\r
+# 14:10 val\r
+\r
+# 14:20 sis\r
+# 15:05 val\r
+\r
+# 15:10 sis\r
+# 15:55 val\r
+\r
+# 16:00 sis\r
+# 16:45 val\r
+\r
+# 16:50 sis\r
+# 17:35 val
\ No newline at end of file
diff --git a/Miscellaneous/Automated school clock/v3/tuhi.pp b/Miscellaneous/Automated school clock/v3/tuhi.pp
new file mode 100644 (file)
index 0000000..d3f5a12
--- /dev/null
@@ -0,0 +1 @@
+\r
diff --git a/Miscellaneous/Automated school clock/v3/tutorial.org b/Miscellaneous/Automated school clock/v3/tutorial.org
new file mode 100644 (file)
index 0000000..19dd2dc
--- /dev/null
@@ -0,0 +1,113 @@
+* Kooli Kell 3 programmi kasutusjuhend\r
+- 2003.09 :: Esimene versioon.\r
+- 2025 :: Parendatud juhendi sõnastus.\r
+\r
+- Programmi, juhendi ja skeemi autor :: Svjatoslav Agejenko\r
+- E-post :: svjatoslav@svjatoslav.eu\r
+- kodulehekülg :: https://www.svjatoslav.eu\r
+\r
+Ettevaatust: Siin tekstis olev info võib olla vananenud, vigane v6i\r
+ebatäielik. Autor ei võta endale vastutust antud süsteemi kasutamisest\r
+tekkinud otsese või kaudse kahju puhul!\r
+\r
+* Üldinfo\r
+\r
+Programm Kooli Kell on mõeldud kella laskmiseks koolis, tundi sisse ja\r
+välja.\r
+\r
+- Tundi sisse minev kell on 1 pikk ning 1 lühem helin.\r
+- Väljaminev kell on 1 tavaline pikk helin.\r
+\r
+Programm loeb aega arvuti süsteemsest kellast.  Fail 'AASTA.AP' hoiab\r
+aasta graafikut, kus saab määrata teatud päeva kohta käiva\r
+päevaplaani. Päevaplaanid asuvad failides '*.PP'.\r
+\r
+Aasta või päevaplaani muutmiseks tuleb redigeerida vastavaid faile.\r
+Failides on info esitatud programmile 'Kooli Kell' arusaadavate\r
+käskudena. Kus ühel real on üks käsk, või tühi rida. Rea esimene sõna\r
+peab olema käsk, ning järgnevad sõnad on selle käsu parameetrid. Sõnad\r
+võivad olla eraldatud suvalise 0 suuremate tabulaatorite ja/või\r
+tühikute arvuga. Programmi saab kasutada arvutil millele on ühendatud\r
+spetsiaalne liides, või millel on see liides sisse\r
+monteeritud. Liideses olev relee toimib lülitina, mis kella laskmise\r
+ajaks sulgub. Liides vooluahelasse ise voolu ei anna. Seega on liides\r
+mõeldud kella ja toiteallikaga vooluahelasse jadamisi\r
+ühendamiseks. Või siis olemasoleva mehaanilise kella laskmis nupuga\r
+paralleelselt, siis saab kella lasta nii endisest nupust kui ka\r
+arvutiga.\r
+\r
+Programm on ettenähtud iseseisvalt töötama, kuid on ka võimalus\r
+erandkorras k2sitsi kella lasta, aega muuta jne.  Selleks tuleb\r
+vajutada erinevaid klahve klaviatuuril.  K2ivitudes kuvab programm\r
+klahvide kirjeldused ekraanile.\r
+\r
+* faili AASTA.AP formaat\r
+\r
+Lõpp 'AP' tuleneb sõnadest Aasta plaan.\r
+\r
+: v       <kuu>-<päev>    <kuu>-<päev>    <päevaplaan>\r
+\r
+Sõnast vahemik. Paneb paika p2evaplaani antud ajavahemikus. Esimene\r
+daatum peab kindlasti olema v2iksem kui teine. St. kui on tõesti vaja:\r
+\r
+: v   10-4    2-1 eri\r
+\r
+tuleb kirjutada:\r
+\r
+: v   10-4    12-31   eri\r
+: v   1-1 2-1 eri\r
+\r
+P2evaplaan kehtib vahemiku esimesest p2evast kuni vahemiku viimase p2evani.\r
+\r
+: n       <kuu>-<päev>    <kuu>-<päev>    <nädalapäev>    <päevaplaan>\r
+\r
+Sõnast n2dalap2ev. sama mis "v" kuid: paneb paika p2evaplaani antud\r
+ajavahemikus, antud n2dalap2eval. N2dalap2eva kirjeldatakse numbriga.\r
+n2dala esimene p2ev on esmasp2ev, talle vastab number 1.\r
+\r
+: e   <kuu>-<päev> <päevaplaan>\r
+\r
+Sõnast eripäevaplaan. Paneb paika antud kuupäevale antud päevaplaani.\r
+Sobib hästi erakorraliste, lühendatud või uhekordselt kehtivate\r
+päevaplaanide kehtestamiseks. Näiteks riigipühad, spordipäev jne.\r
+\r
+Kui teatud päeva kohta ei käinud ühtegi kirjet siis toimib vaikimisi "tuhi"\r
+päevaplaan. Kui teatud päeva kohta käis mitu kirjet siis jääb peale viimane.\r
+\r
+* failide *.PP formaat\r
+\r
+Lõpp 'PP' tuleneb sõnadest Päeva Plaan.\r
+\r
+: #   <tund>:<minut>  <kell>\r
+\r
+Laseb antud ajal antud kella. Võimalikud kella helinad on:\r
+\r
+- sis :: -kell tundi sisse\r
+- val :: -kell tunnist välja\r
+\r
+* Raudvara nõuded\r
+\r
+- 286 protsessoriga PC tüüpi arvuti. :: Peaks töötama ka 8086 protsessoril aga pole testinud.\r
+\r
+- 640 KB põhimälu :: Vähemaga pole testinud.\r
+\r
+- 500 KB vaba kettaruumi :: Kõvakettalt töö kiirendab oluliselt\r
+  programmi käivitumist, ja konfiguratsiooni redigeerimist.\r
+\r
+- LPT port.\r
+\r
+- Monitor :: Võib olla mustvalge\r
+\r
+- Klaviatuur.\r
+\r
+* Tarkvara nõuded\r
+\r
+- DOS 6.22 :: Võib ka varasem, kuid pole testinud.\r
+- QB 4.5 :: Piisab 'QB.EXE' failist. Peaks t88tama ka MS QBasic-us.\r
+- EDIT.EXE :: DOSi käsurealt käivituv teksti redaktor.\r
+\r
+* Nõuded inimesele\r
+\r
+Süsteemi kasutamiseks hädavajalik antud juhendist aru saamine.\r
+Süsteemi paigaldamine nõuab elektriku oskusi. Programmi kasutamiseks\r
+on vajalik vähemalt algaja tasemel arvutikasutaja oskus.\r
diff --git a/Miscellaneous/Custom palette, 2.png b/Miscellaneous/Custom palette, 2.png
new file mode 100644 (file)
index 0000000..9fe22b5
Binary files /dev/null and b/Miscellaneous/Custom palette, 2.png differ
diff --git a/Miscellaneous/Custom palette, 3.png b/Miscellaneous/Custom palette, 3.png
new file mode 100644 (file)
index 0000000..83065f1
Binary files /dev/null and b/Miscellaneous/Custom palette, 3.png differ
diff --git a/Miscellaneous/Custom palette.bas b/Miscellaneous/Custom palette.bas
new file mode 100644 (file)
index 0000000..332b85a
--- /dev/null
@@ -0,0 +1,167 @@
+' An attempt to generate a universally reusable color palette for 256 color limit.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2001, Initial version.\r
+' 2024.08, Enhance program readability\r
+\r
+DEFINT A-Y\r
+SCREEN 13\r
+CLS\r
+\r
+' Initialize color index\r
+colorIndex = 0\r
+\r
+' Generate colors by varying red, green, and blue components from 0 to 5\r
+FOR redComponent = 0 TO 5\r
+    FOR greenComponent = 0 TO 5\r
+        FOR blueComponent = 0 TO 5\r
+            ' Set the color for the next pixel\r
+            OUT &H3C8, colorIndex\r
+            colorIndex = colorIndex + 1\r
+\r
+            ' Output the RGB components to the palette registers\r
+            OUT &H3C9, redComponent * 12\r
+            OUT &H3C9, greenComponent * 12\r
+            OUT &H3C9, blueComponent * 12\r
+        NEXT blueComponent\r
+    NEXT greenComponent\r
+NEXT redComponent\r
+\r
+' Draw a grid of colored squares using the generated color palette\r
+FOR colorIndex = 0 TO 5\r
+    FOR blueComponent = 0 TO 5\r
+        FOR redComponent = 0 TO 5\r
+            ' Draw a square with the calculated color\r
+            LINE (redComponent * 5 + colorIndex * 30, blueComponent * 5)-_\r
+                   (redComponent * 5 + 4 + colorIndex * 30, blueComponent * 5 + 4), _\r
+                   colorIndex * 36 + blueComponent * 6 + redComponent, BF\r
+        NEXT redComponent\r
+    NEXT blueComponent\r
+NEXT colorIndex\r
+\r
+' Wait for user input before proceeding\r
+a$ = INPUT$(1)\r
+\r
+' Initialize coordinates for pattern drawing\r
+patternEx = -100\r
+patternEy = 0\r
+\r
+' Draw a series of patterns with varying colors\r
+FOR patternZ = 0 TO 75 STEP 15\r
+    ' Calculate the vertices of an equilateral triangle\r
+    x1 = 50 - (patternZ / 2)\r
+    y1 = 50 - (patternZ * .866025)\r
+    x2 = 50 + patternZ\r
+    y2 = 50\r
+    x3 = x1\r
+    y3 = 100 - y1\r
+\r
+    ' Move to the next starting position for the pattern\r
+    patternEx = patternEx + 100\r
+    IF patternZ = 45 THEN\r
+        patternEx = patternEx - 300\r
+        patternEy = patternEy + 101\r
+    END IF\r
+\r
+    ' Draw the pattern by calculating colors based on distance from triangle vertices\r
+    FOR x = 0 TO 100\r
+        FOR y = 0 TO 100\r
+            ' Calculate color components based on distance to each vertex\r
+            r = 7 - (SQR((x1 - x) ^ 2 + (y1 - y) ^ 2) / 15 + 1)\r
+            g = 7 - (SQR((x2 - x) ^ 2 + (y2 - y) ^ 2) / 15 + 1)\r
+            b = 7 - (SQR((x3 - x) ^ 2 + (y3 - y) ^ 2) / 15 + 1)\r
+\r
+            ' Clamp color values within the range of 0 to 5\r
+            IF r < 0 THEN r = 0\r
+            IF g < 0 THEN g = 0\r
+            IF b < 0 THEN b = 0\r
+            IF r > 5 THEN r = 5\r
+            IF g > 5 THEN g = 5\r
+            IF b > 5 THEN b = 5\r
+\r
+            ' Calculate the final color index\r
+            colorIndex = r * 36 + g * 6 + b\r
+\r
+            ' Plot the pixel with the calculated color\r
+            PSET (x + patternEx, y + patternEy), colorIndex\r
+        NEXT y\r
+    NEXT x\r
+NEXT patternZ\r
+\r
+' Wait for user input before proceeding\r
+a$ = INPUT$(1)\r
+\r
+' Reset starting position for the second pattern\r
+patternEx = -100\r
+patternEy = 0\r
+\r
+' Draw a second series of patterns using color dithering, to create\r
+' seemingly smooth color transitions while still having only 8bit colors to work with\r
+FOR patternZ = 0 TO 75 STEP 15\r
+    ' Calculate the vertices of an equilateral triangle with different scaling\r
+    x1 = 50 - (patternZ / 2.5)\r
+    y1 = 50 - (patternZ * .566025)\r
+    x2 = 50 + patternZ / 1.5\r
+    y2 = 50\r
+    x3 = x1\r
+    y3 = 100 - y1\r
+\r
+    ' Move to the next starting position for the pattern\r
+    patternEx = patternEx + 100\r
+    IF patternZ = 45 THEN\r
+        patternEx = patternEx - 300\r
+        patternEy = patternEy + 101\r
+    END IF\r
+\r
+    ' Initialize accumulators for dithering color components\r
+    rSum = 0\r
+    gSum = 0\r
+    bSum = 0\r
+\r
+    ' Draw the pattern by calculating average colors based on distance from triangle vertices\r
+    FOR x = 0 TO 100\r
+        FOR y = 0 TO 100\r
+            ' Calculate color components based on distance to each vertex\r
+            r = 30 - (SQR((x1 - x) ^ 2 + (y1 - y) ^ 2) / 2 + 1)\r
+            g = 30 - (SQR((x2 - x) ^ 2 + (y2 - y) ^ 2) / 2 + 1)\r
+            b = 30 - (SQR((x3 - x) ^ 2 + (y3 - y) ^ 2) / 2 + 1)\r
+\r
+            ' Accumulate the color components\r
+            rSum = rSum + r\r
+            gSum = gSum + g\r
+            bSum = bSum + b\r
+\r
+            ' Calculate the average color components over a span of 5 pixels\r
+            rAvg = rSum / 5\r
+            gAvg = gSum / 5\r
+            bAvg = bSum / 5\r
+\r
+            ' Reset the sums after calculating the averages\r
+            rSum = rSum - (rAvg * 5)\r
+            gSum = gSum - (gAvg * 5)\r
+            bSum = bSum - (bAvg * 5)\r
+\r
+            ' Clamp average color values within the range of 0 to 5\r
+            IF rAvg < 0 THEN rAvg = 0\r
+            IF gAvg < 0 THEN gAvg = 0\r
+            IF bAvg < 0 THEN bAvg = 0\r
+            IF rAvg > 5 THEN rAvg = 5\r
+            IF gAvg > 5 THEN gAvg = 5\r
+            IF bAvg > 5 THEN bAvg = 5\r
+\r
+            ' Calculate the final color index\r
+            colorIndex = rAvg * 36 + gAvg * 6 + bAvg\r
+\r
+            ' Plot the pixel with the calculated color\r
+            PSET (x + patternEx, y + patternEy), colorIndex\r
+        NEXT y\r
+    NEXT x\r
+NEXT patternZ\r
+\r
+' Wait for user input before exiting\r
+a$ = INPUT$(1)
\ No newline at end of file
diff --git a/Miscellaneous/Custom palette.png b/Miscellaneous/Custom palette.png
new file mode 100644 (file)
index 0000000..8b62b42
Binary files /dev/null and b/Miscellaneous/Custom palette.png differ
diff --git a/Miscellaneous/Database/auto.scr b/Miscellaneous/Database/auto.scr
new file mode 100644 (file)
index 0000000..6716870
--- /dev/null
@@ -0,0 +1,3 @@
+fload data.ddb\r
+chklin 1 |> s 1\r
+|> c
\ No newline at end of file
diff --git a/Miscellaneous/Database/data.ddb b/Miscellaneous/Database/data.ddb
new file mode 100644 (file)
index 0000000..6094893
--- /dev/null
@@ -0,0 +1,11 @@
+// 1 First name\r
+// 2 Last name\r
+// 3 Postal address\r
+// 4 Phone\r
+// 5 Sex M / F\r
+// 6 Registration number in the database\r
+// 7 Birth year\r
+\r
+John           |Doe            |Marshmelow road 1-23   | +385 123123123 |M|0|1985\r
+Jane           |Doe            |Candy road 1-23        | +385 123123124 |F|1|1987\r
+\r
diff --git a/Miscellaneous/Database/ddbase6.bas b/Miscellaneous/Database/ddbase6.bas
new file mode 100755 (executable)
index 0000000..3062e41
--- /dev/null
@@ -0,0 +1,975 @@
+' Simple scriptable relational database engine.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2002, Initial version\r
+' 2024, Improved program readability\r
+\r
+DECLARE SUB box (x1%, y1%, x2%, y2%)\r
+DECLARE SUB ssort (s%, m%)\r
+DECLARE SUB sort (s%, w%)\r
+REM $DYNAMIC\r
+DECLARE SUB cmp (a$, b$, r%)\r
+DECLARE SUB boss ()\r
+DECLARE SUB std (a$)\r
+DECLARE FUNCTION cnum$ (a%)\r
+DECLARE SUB fload (a$, b%, c%, d%)\r
+DECLARE SUB putfs (f%, l%, s%, c$)\r
+DECLARE SUB gets (l%, s%, a$)\r
+DECLARE SUB puts (l%, s%, a$)\r
+DECLARE SUB runf (a$)\r
+DECLARE SUB getfil (a%)\r
+DEFINT A-Y\r
+DECLARE SUB mkson (a$)\r
+DECLARE SUB title (a$)\r
+DECLARE SUB strip (a$, b$)\r
+DECLARE SUB cmd (a$)\r
+DECLARE SUB conkey (a$)\r
+DECLARE SUB conn (a$)\r
+DECLARE SUB ch ()\r
+DECLARE SUB chkey (a$)\r
+DECLARE SUB getkey (a$)\r
+DECLARE SUB conm (d$, c)\r
+DECLARE SUB start ()\r
+\r
+DIM SHARED con$(1 TO 50)\r
+DIM SHARED conc(1 TO 50)\r
+DIM SHARED concmd$\r
+DIM SHARED conx\r
+DIM SHARED sona$(1 TO 20)\r
+DIM SHARED mitus\r
+\r
+DIM SHARED buf$(1 TO 5000)\r
+DIM SHARED bufu(1 TO 5000)\r
+DIM SHARED bufl(1 TO 1000, 1 TO 30)\r
+DIM SHARED buflu(1 TO 1000)\r
+DIM SHARED lng\r
+DIM SHARED opf(1 TO 30)\r
+DIM SHARED hist$(1 TO 20)\r
+DIM SHARED histp, histk\r
+DIM SHARED buff(1 TO 30, 1 TO 1000)\r
+DIM SHARED stack(1 TO 2000, 1 TO 10)\r
+DIM SHARED stackl(1 TO 10)\r
+DIM SHARED stdl\r
+\r
+start\r
+\r
+1\r
+ch\r
+GOTO 1\r
+\r
+REM $STATIC\r
+SUB boss\r
+y1 = 0\r
+yp1 = 100\r
+y2 = 0\r
+yp2 = 100\r
+\r
+lx = 160\r
+ly = 100\r
+lxp = 1\r
+lyp = -1\r
+\r
+SCREEN 13\r
+\r
+GOSUB 18\r
+16\r
+a$ = INKEY$\r
+IF a$ = CHR$(0) + "H" THEN yp1 = yp1 - 25\r
+IF a$ = CHR$(0) + "P" THEN yp1 = yp1 + 25\r
+IF a$ = CHR$(27) THEN GOTO 17\r
+\r
+LINE (10, y1 - 35)-(20, y1 + 35), 0, B\r
+LINE (11, y1 - 34)-(19, y1 + 34), 15, B\r
+\r
+LINE (310, y2 - 35)-(300, y2 + 35), 0, B\r
+LINE (309, y2 - 34)-(301, y2 + 34), 15, B\r
+\r
+LINE (lx - 10, ly - 10)-(lx + 10, ly + 10), 0, B\r
+LINE (lx - 9, ly - 9)-(lx + 9, ly + 9), 15, B\r
+\r
+lx = lx + lxp\r
+ly = ly + lyp\r
+IF ly < 20 THEN lyp = 1\r
+IF ly > 180 THEN lyp = -1\r
+IF lx < 30 THEN\r
+    lxp = 1\r
+    IF ly < y1 - 35 OR ly > y1 + 35 THEN SOUND 1000, 1\r
+END IF\r
+IF lx > 290 THEN\r
+    lxp = -1\r
+    GOSUB 18\r
+END IF\r
+\r
+IF yp1 > 0 THEN y1 = y1 + 1: yp1 = yp1 - 1\r
+IF yp1 < 0 THEN y1 = y1 - 1: yp1 = yp1 + 1\r
+IF yp2 > 0 THEN y2 = y2 + 1: yp2 = yp2 - 1\r
+IF yp2 < 0 THEN y2 = y2 - 1: yp2 = yp2 + 1\r
+\r
+SOUND 0, .1\r
+GOTO 16\r
+\r
+18\r
+tlx = lx\r
+tly = ly\r
+tlyp = lyp\r
+tlxp = lxp\r
+\r
+19\r
+lx = lx + lxp\r
+ly = ly + lyp\r
+IF ly < 20 THEN lyp = 1\r
+IF ly > 180 THEN lyp = -1\r
+IF lx < 30 THEN lxp = 1\r
+IF lx > 290 THEN\r
+    yp2 = ly - y2\r
+ELSE\r
+    GOTO 19\r
+END IF\r
+\r
+SWAP lx, tlx\r
+SWAP ly, tly\r
+SWAP lyp, tlyp\r
+SWAP lxp, tlxp\r
+RETURN\r
+\r
+17\r
+SCREEN 0\r
+WIDTH 80, 50\r
+VIEW PRINT 1 TO 50\r
+END SUB\r
+\r
+SUB box (x1, y1, x2, y2)\r
+b$ = ""\r
+c$ = ""\r
+FOR a = x1 TO x2\r
+    b$ = b$ + " "\r
+    c$ = c$ + "-"\r
+NEXT a\r
+\r
+b$ = "|" + b$ + "|"\r
+c$ = "|" + c$ + "|"\r
+\r
+COLOR 14, 0\r
+LOCATE y1, x1\r
+PRINT c$\r
+LOCATE y2, x1\r
+PRINT c$\r
+FOR a = y1 + 1 TO y2 - 1\r
+    LOCATE a, y1\r
+    PRINT b$\r
+NEXT a\r
+\r
+END SUB\r
+\r
+SUB ch\r
+chkey a$\r
+IF a$ <> "" THEN conkey a$\r
+\r
+END SUB\r
+\r
+SUB chkey (a$)\r
+a$ = INKEY$\r
+IF a$ <> "" THEN\r
+    IF a$ = CHR$(0) + "M" THEN a$ = "pa"\r
+    IF a$ = CHR$(0) + "K" THEN a$ = "va"\r
+    IF a$ = CHR$(0) + "H" THEN a$ = "ul"\r
+    IF a$ = CHR$(0) + "P" THEN a$ = "al"\r
+END IF\r
+\r
+END SUB\r
+\r
+SUB cmd (a$)\r
+IF a$ = SPACE$(LEN(a$)) THEN GOTO 5\r
+conm a$, 14\r
+\r
+mkson a$\r
+IF mitus = 0 THEN GOTO 5\r
+\r
+SELECT CASE sona$(1)\r
+CASE "help"\r
+    title "help"\r
+    conm "help   - for help", 7\r
+    conm "quit   - quit program", 7\r
+    conm "b      - boss screen", 7\r
+    conm "memstat- show info about memory blocks", 7\r
+    conm "memput <addr> <data> - put data to specified memory block", 7\r
+    conm "memlist <addr> <amount> - show memory blocks, starting from <addr>", 7\r
+    conm "runf <file.ext> - run script file", 7\r
+    conm "lnstat - show info about memory lines", 7\r
+    conm "lnput <line> <word> <data> <data> ... put data in <line> starting from <word>", 7\r
+    conm "lnlist <addr> <amount> - show contenc of memory lines", 7\r
+    conm "fstat - show info about memory files", 7\r
+    conm "fput <file> <line> <word> <data> <data> ... put data in memory file", 7\r
+    conm "fload <filename.ext> <file> <line> <word>- load data file into memory file", 7\r
+    conm "cls    - clear screen", 7\r
+    conm "stclear <stack> - clear stack", 7\r
+    conm "chklin <page> <from line> <to line> - determine used line numbers to STDOUT", 7\r
+    conm "stacksize <stack> - determine stack size to STDOUT", 7\r
+    conm "filtand <stack> <word> <mask> <word> <mask> ... filters out lines to STDOUT", 7\r
+    conm "filtor <stack> <word> <mask> <word> <mask> ... filters out lines to STDOUT", 7\r
+    conm "disp <stack> <word> <word> ... display formatted selected cells to STDOUT", 7\r
+    conm "sort <stack> <word> - sort elements by <word> value, lower first", 7\r
+    conm "swap <stack> - swap stack elements (backwards)", 7\r
+    conm "ssort <stack> <word> - sort stack in alphabetical order", 7\r
+    conm "memget <pointer> - allocates memory block, and puts there -", 7\r
+    conm "liststack <stack> <from line> <to line> - show stack values to STDOUT", 7\r
+    conm "ask <question> <file> <line> <word> - asks question, and stores result", 7\r
+    conm "flnget <file> <pointer> - get unused line in file", 7\r
+GOTO 5\r
+\r
+CASE "quit"\r
+SYSTEM\r
+\r
+CASE "memstat"\r
+title "memory blocks summary"\r
+c = 0\r
+lng = 0\r
+FOR b = 1 TO 5000\r
+    IF bufu(b) > 0 THEN c = c + 1\r
+    lng = lng + LEN(buf$(b))\r
+NEXT b\r
+d$ = "memory blocks used:" + STR$(c) + "  total 5000"\r
+conm d$, 7\r
+d$ = "data size:" + STR$(lng)\r
+conm d$, 7\r
+GOTO 5\r
+\r
+CASE "memput"\r
+b = VAL(sona$(2))\r
+strip sona$(3), c$\r
+IF c$ = "" THEN\r
+    bufu(b) = 0\r
+    buf$(b) = ""\r
+ELSE\r
+    bufu(b) = 1\r
+    buf$(b) = sona$(3)\r
+END IF\r
+GOTO 5\r
+\r
+CASE "memlist"\r
+b = VAL(sona$(2))\r
+c = VAL(sona$(3))\r
+IF b = 0 THEN b = 1\r
+IF c = 0 THEN c = 1\r
+\r
+FOR d = b TO 5000\r
+    IF c = 0 THEN GOTO 5\r
+    IF bufu(d) > 0 THEN\r
+        e$ = cnum(d) + ":" + SPACE$(5 - LEN(cnum(d)))\r
+        e$ = e$ + buf$(d)\r
+        conm e$, 7\r
+        c = c - 1\r
+    END IF\r
+NEXT d\r
+GOTO 5\r
+\r
+CASE "runf"\r
+runf sona$(2)\r
+GOTO 5\r
+\r
+CASE "lnstat"\r
+title "memory lines summary"\r
+c = 0\r
+d = 0\r
+FOR b = 1 TO 1000\r
+    IF buflu(b) > 0 THEN c = c + 1: d = d + buflu(b)\r
+NEXT b\r
+d$ = "memory lines used:" + STR$(c) + "  total 1000"\r
+conm d$, 7\r
+d$ = "total number of words in lines:" + STR$(d)\r
+conm d$, 7\r
+GOTO 5\r
+\r
+CASE "lnput"\r
+b = VAL(sona$(2))\r
+c = VAL(sona$(3))\r
+e = mitus\r
+IF e < 4 THEN e = 4\r
+FOR d = 4 TO e\r
+    puts b, c + d - 4, sona$(d)\r
+NEXT d\r
+GOTO 5\r
+\r
+CASE "lnlist"\r
+b = VAL(sona$(2))\r
+c = VAL(sona$(3))\r
+\r
+FOR d = b TO 1000\r
+    IF c = 0 THEN GOTO 5\r
+    IF buflu(d) > 0 THEN\r
+        e$ = cnum(d) + ":"\r
+        e$ = e$ + SPACE$(5 - LEN(e$))\r
+        e$ = e$ + cnum(buflu(d))\r
+        e$ = e$ + SPACE$(8 - LEN(e$))\r
+\r
+        FOR g = 1 TO 10\r
+            gets d, g, f$\r
+            e$ = e$ + " >" + f$\r
+        NEXT g\r
+        conm e$, 7\r
+        c = c - 1\r
+    END IF\r
+NEXT d\r
+GOTO 5\r
+\r
+CASE "fstat"\r
+title "Memory files summary"\r
+FOR b = 1 TO 30\r
+    e = 0\r
+    FOR c = 1 TO 1000\r
+        IF buff(b, c) > -1 THEN\r
+            IF e = 0 THEN\r
+                d$ = "File number:" + STR$(b)\r
+                conm d$, 7\r
+                e = e + 1\r
+            END IF\r
+            d$ = "on line:" + STR$(c) + "  allocated memory line: " + STR$(buff(b, c))\r
+            conm d$, 7\r
+        END IF\r
+    NEXT c\r
+NEXT b\r
+GOTO 5\r
+\r
+CASE "fput"\r
+b = VAL(sona$(2))\r
+c = VAL(sona$(3))\r
+d = VAL(sona$(4))\r
+f = mitus\r
+IF f < 5 THEN f = 5\r
+FOR e = 5 TO f\r
+    putfs b, c, d + e - 5, sona$(e)\r
+NEXT e\r
+GOTO 5\r
+\r
+CASE "cls"\r
+FOR b = 1 TO 50\r
+    conm " ", 7\r
+NEXT b\r
+GOTO 5\r
+\r
+CASE "fload"\r
+b = VAL(sona$(3))\r
+c = VAL(sona$(4))\r
+d = VAL(sona$(5))\r
+IF b = 0 THEN b = 1\r
+IF c = 0 THEN c = 1\r
+IF d = 0 THEN d = 1\r
+fload sona$(2), b, c, d\r
+GOTO 5\r
+\r
+CASE "stclear"\r
+b = VAL(sona$(2))\r
+IF b = 0 THEN b = 1\r
+stackl(b) = 0\r
+GOTO 5\r
+\r
+CASE "chklin"\r
+b = VAL(sona$(2))\r
+c = VAL(sona$(3))\r
+d = VAL(sona$(4))\r
+IF b = 0 THEN b = 1\r
+IF c = 0 THEN c = 1\r
+IF d = 0 THEN d = 1000\r
+\r
+FOR e = c TO d\r
+    IF buff(b, e) > 0 THEN std cnum(buff(b, e))\r
+NEXT e\r
+GOTO 5\r
+\r
+CASE "stacksize"\r
+b = VAL(sona$(2))\r
+IF b = 0 THEN b = 1\r
+std cnum(stackl(b))\r
+GOTO 5\r
+\r
+CASE "b"\r
+boss\r
+conm "returning", 7\r
+GOTO 5\r
+\r
+CASE "filtor"\r
+b = VAL(sona$(2))\r
+FOR e = 1 TO stackl(b)\r
+    FOR c = 3 TO mitus STEP 2\r
+        gets stack(e, b), VAL(sona$(c)), f$\r
+        cmp f$, sona$(c + 1), d\r
+        IF d = 1 THEN\r
+            std cnum(stack(e, b))\r
+        GOTO 20\r
+        END IF\r
+    NEXT c\r
+20\r
+NEXT e\r
+GOTO 5\r
+\r
+CASE "disp"\r
+b = VAL(sona$(2))\r
+DIM tmp1(1 TO 100)\r
+DIM tmp2(1 TO 100)\r
+\r
+FOR d = 1 TO 100\r
+    tmp2(d) = 0\r
+NEXT d\r
+d = 0\r
+\r
+FOR e = 3 TO mitus\r
+    d = d + 1\r
+    tmp1(d) = VAL(sona$(e))\r
+NEXT e\r
+\r
+FOR c = 1 TO stackl(b)\r
+    FOR e = 1 TO d\r
+        gets stack(c, b), tmp1(e), f$\r
+        IF tmp2(e) < LEN(f$) THEN tmp2(e) = LEN(f$)\r
+    NEXT e\r
+NEXT c\r
+\r
+FOR c = 1 TO stackl(b)\r
+    g$ = ""\r
+    FOR e = 1 TO d\r
+        gets stack(c, b), tmp1(e), f$\r
+        f$ = f$ + SPACE$(tmp2(e) - LEN(f$))\r
+        g$ = g$ + f$ + " # "\r
+    NEXT e\r
+    conm g$, 10\r
+NEXT c\r
+\r
+ERASE tmp2\r
+ERASE tmp1\r
+GOTO 5\r
+\r
+CASE "filtand"\r
+b = VAL(sona$(2))\r
+FOR e = 1 TO stackl(b)\r
+    FOR c = 3 TO mitus STEP 2\r
+        gets stack(e, b), VAL(sona$(c)), f$\r
+        cmp f$, sona$(c + 1), d\r
+        IF d = 0 THEN GOTO 21\r
+    NEXT c\r
+    std cnum(stack(e, b))\r
+21\r
+NEXT e\r
+GOTO 5\r
+\r
+CASE "sort"\r
+b = VAL(sona$(2))\r
+c = VAL(sona$(3))\r
+sort b, c\r
+GOTO 5\r
+\r
+CASE "swap"\r
+b = VAL(sona$(2))\r
+c = stackl(b)\r
+FOR d = 1 TO c / 2\r
+    SWAP stack(d, b), stack(c - d + 1, b)\r
+NEXT d\r
+GOTO 5\r
+\r
+CASE "ssort"\r
+b = VAL(sona$(2))\r
+c = VAL(sona$(3))\r
+IF b = 0 THEN b = 1\r
+IF c = 0 THEN c = 1\r
+ssort b, c\r
+GOTO 5\r
+\r
+CASE "memget"\r
+b = VAL(sona$(2))\r
+IF b = 0 THEN b = 1\r
+FOR c = 1 TO 5000\r
+IF bufu(c) = 0 THEN bufu(c) = 1: buf$(c) = "-": stack(b, 10) = c: GOTO 23\r
+NEXT c\r
+23\r
+IF stackl(10) < b THEN stackl(10) = b\r
+GOTO 5\r
+\r
+CASE "liststack"\r
+b = VAL(sona$(2))\r
+c = VAL(sona$(3))\r
+d = VAL(sona$(4))\r
+IF b = 0 THEN b = 1\r
+IF c = 0 THEN c = 1\r
+IF d = 0 THEN d = stackl(b)\r
+FOR e = c TO d\r
+    std cnum(stack(e, b))\r
+NEXT e\r
+GOTO 5\r
+\r
+CASE "ask"\r
+b$ = sona$(2)\r
+IF b$ = "" THEN b$ = "input"\r
+c = VAL(sona$(3))\r
+d = VAL(sona$(4))\r
+e = VAL(sona$(5))\r
+box 5, 5, 75, 11\r
+LOCATE 7, 7\r
+PRINT b$\r
+LOCATE 9, 7\r
+INPUT "", f$\r
+putfs c, d, e, f$\r
+conm "'" + f$ + "' accepted", 7\r
+GOTO 5\r
+\r
+CASE "flnget"\r
+b = VAL(sona$(2))\r
+c = VAL(sona$(3))\r
+FOR d = 1 TO 1000\r
+    IF buff(b, d) = -1 THEN\r
+        stack(c, 10) = d\r
+        IF stackl(10) < c THEN stackl(10) = c\r
+        GOTO 24\r
+    END IF\r
+NEXT d\r
+24\r
+GOTO 5\r
+\r
+END SELECT\r
+\r
+conm "Invalid command", 12\r
+5\r
+END SUB\r
+\r
+SUB cmp (a$, b$, r%)\r
+IF a$ = b$ THEN r% = 1 ELSE r% = 0\r
+END SUB\r
+\r
+FUNCTION cnum$ (a)\r
+b$ = STR$(a)\r
+cnum$ = RIGHT$(b$, LEN(b$) - 1)\r
+END FUNCTION\r
+\r
+SUB conkey (a$)\r
+b$ = concmd$ + SPACE$(85)\r
+b$ = LEFT$(b$, 80)\r
+\r
+IF a$ = "va" THEN conx = conx - 1\r
+IF a$ = "pa" THEN conx = conx + 1\r
+IF a$ = "ul" THEN\r
+    b$ = hist$(histk)\r
+    histk = histk - 1\r
+    IF histk < 1 THEN histk = 20\r
+END IF\r
+IF a$ = "al" THEN\r
+    b$ = hist$(histk)\r
+    histk = histk + 1\r
+    IF histk > 20 THEN histk = 1\r
+END IF\r
+\r
+IF LEN(a$) = 1 THEN\r
+    IF a$ = CHR$(13) THEN\r
+        strip b$, c$\r
+        histp = histp + 1\r
+        IF histp > 20 THEN histp = 1\r
+        histk = histp\r
+        hist$(histp) = c$\r
+        cmd c$\r
+        b$ = ""\r
+        conx = 1\r
+        GOTO 4\r
+    END IF\r
+\r
+    IF a$ = CHR$(8) THEN\r
+        IF conx > 1 THEN\r
+            b$ = LEFT$(b$, conx - 2) + RIGHT$(b$, 81 - conx)\r
+            conx = conx - 1\r
+        END IF\r
+        GOTO 4\r
+    END IF\r
+\r
+    b$ = LEFT$(b$, conx - 1) + a$ + RIGHT$(b$, 81 - conx)\r
+    conx = conx + 1\r
+END IF\r
+4\r
+\r
+IF conx < 1 THEN conx = 1\r
+IF conx > 80 THEN conx = 80\r
+\r
+b$ = b$ + SPACE$(85)\r
+concmd$ = LEFT$(b$, 80)\r
+LOCATE 50, 1\r
+COLOR 15, 1\r
+PRINT concmd$;\r
+LOCATE 50, conx\r
+COLOR 0, 14\r
+PRINT RIGHT$(LEFT$(concmd$, conx), 1);\r
+\r
+\r
+END SUB\r
+\r
+SUB conm (d$, c)\r
+a$ = d$\r
+\r
+14\r
+IF LEN(a$) > 78 THEN\r
+    b$ = LEFT$(a$, 78)\r
+    conm b$, c\r
+    a$ = "      >> " + RIGHT$(a$, LEN(a$) - 78)\r
+    GOTO 14\r
+END IF\r
+\r
+b$ = a$ + SPACE$(80 - LEN(a$))\r
+con$(50) = b$\r
+conc(50) = c\r
+\r
+FOR a = 1 TO 49\r
+    con$(a) = con$(a + 1)\r
+    conc(a) = conc(a + 1)\r
+NEXT a\r
+\r
+FOR a = 1 TO 49\r
+    LOCATE a, 1\r
+    COLOR conc(a), 0\r
+    PRINT con$(a)\r
+NEXT a\r
+\r
+END SUB\r
+\r
+SUB fload (a$, b, c, d)\r
+getfil h\r
+\r
+j = c\r
+l = 0\r
+\r
+OPEN a$ FOR INPUT AS #h\r
+12\r
+IF EOF(h) <> 0 THEN GOTO 13\r
+LINE INPUT #h, e$\r
+\r
+IF LEFT$(e$, 3) = "// " THEN\r
+    conm e$, 10\r
+    GOTO 12\r
+END IF\r
+IF e$ = SPACE$(LEN(e$)) THEN GOTO 12\r
+\r
+e$ = e$ + "|"\r
+l = l + 1\r
+h$ = ""\r
+i = d\r
+FOR f = 1 TO LEN(e$)\r
+    g$ = RIGHT$(LEFT$(e$, f), 1)\r
+    IF g$ = "|" THEN\r
+        putfs b, j, i, h$\r
+        h$ = ""\r
+        g$ = ""\r
+        i = i + 1\r
+    END IF\r
+    IF g$ = CHR$(9) THEN g$ = ""\r
+    h$ = h$ + g$\r
+NEXT f\r
+\r
+j = j + 1\r
+GOTO 12\r
+13\r
+CLOSE #h\r
+\r
+opf(h) = 0\r
+\r
+k$ = "file: " + a$ + "  loaded." + STR$(l) + " lines in file"\r
+conm k$, 7\r
+END SUB\r
+\r
+SUB getfil (a)\r
+FOR b = 1 TO 30\r
+    IF opf(b) = 0 THEN\r
+        opf(b) = 1\r
+        a = b\r
+        GOTO 7\r
+    END IF\r
+NEXT b\r
+7\r
+END SUB\r
+\r
+SUB gets (l, s, a$)\r
+\r
+b = bufl(l, s)\r
+\r
+IF b = -1 THEN\r
+    a$ = ""\r
+ELSE\r
+    a$ = buf$(b)\r
+END IF\r
+\r
+END SUB\r
+\r
+SUB mkson (a$)\r
+\r
+mitus = 0\r
+\r
+d = 1\r
+FOR b = 1 TO LEN(a$)\r
+    c$ = RIGHT$(LEFT$(a$, b), 1)\r
+    IF c$ = " " THEN\r
+        d = 1\r
+    ELSE\r
+        IF d = 1 THEN\r
+            mitus = mitus + 1\r
+            sona$(mitus) = ""\r
+            d = 0\r
+        END IF\r
+        sona$(mitus) = sona$(mitus) + c$\r
+    END IF\r
+NEXT b\r
+\r
+'conm "sonad_______", 10\r
+'FOR b = 1 TO mitus\r
+'conm sona$(b), 14\r
+'NEXT b\r
+\r
+FOR a = 1 TO mitus\r
+    IF LEFT$(sona$(a), 2) = "|>" THEN\r
+        IF sona$(a + 1) = "c" THEN stdl = 1\r
+        IF sona$(a + 1) = "s" THEN stdl = 10 + VAL(sona$(a + 2))\r
+        mitus = a - 1\r
+        GOTO 15\r
+    END IF\r
+    IF LEFT$(sona$(a), 2) = "|@" THEN\r
+        sona$(a) = cnum(stack(VAL(RIGHT$(sona$(a), LEN(sona$(a)) - 2)), 10))\r
+    END IF\r
+NEXT a\r
+\r
+15\r
+FOR a = mitus + 1 TO 20\r
+    sona$(a) = ""\r
+NEXT a\r
+\r
+END SUB\r
+\r
+SUB putfs (f, l, s, c$)\r
+\r
+'DIM SHARED buff(1 TO 30, 1 TO 1000)\r
+\r
+la = buff(f, l)\r
+\r
+IF la = -1 THEN\r
+    FOR a = 1 TO 1000\r
+        IF buflu(a) = 0 THEN\r
+            la = a\r
+            GOTO 10\r
+        END IF\r
+    NEXT a\r
+10\r
+END IF\r
+\r
+puts la, s, c$\r
+IF buflu(la) = 0 THEN\r
+    buff(f, l) = -1\r
+ELSE\r
+    buff(f, l) = la\r
+END IF\r
+END SUB\r
+\r
+SUB puts (l, s, a$)\r
+'PRINT l, s\r
+IF a$ = "|" THEN a$ = ""\r
+IF a$ = "||" THEN GOTO 11\r
+'conm a$, 13\r
+b = bufl(l, s)\r
+\r
+IF b = -1 THEN\r
+    FOR c = 1 TO 10000\r
+        IF bufu(c) = 0 THEN\r
+            GOTO 6\r
+        END IF\r
+    NEXT c\r
+6\r
+    b = c\r
+    bufu(b) = 1\r
+    buflu(l) = buflu(l) + 1\r
+END IF\r
+\r
+strip a$, c$\r
+\r
+IF c$ = "" THEN\r
+    bufu(b) = 0\r
+    buf$(b) = ""\r
+    bufl(l, s) = -1\r
+    buflu(l) = buflu(l) - 1\r
+ELSE\r
+    buf$(b) = c$\r
+    bufl(l, s) = b\r
+END IF\r
+11\r
+\r
+END SUB\r
+\r
+SUB runf (a$)\r
+getfil h\r
+\r
+OPEN a$ FOR INPUT AS #h\r
+9\r
+IF EOF(h) <> 0 THEN GOTO 8\r
+LINE INPUT #h, b$\r
+cmd b$\r
+GOTO 9\r
+8\r
+CLOSE #h\r
+\r
+opf(h) = 0\r
+\r
+END SUB\r
+\r
+SUB sort (s, w)\r
+DIM tmp1(1 TO 10000)\r
+DIM tmp2(1 TO 10000)\r
+\r
+b = stackl(s)\r
+\r
+FOR a = 1 TO b\r
+    gets stack(a, s), w, c$\r
+    tmp1(a) = VAL(c$)\r
+    tmp2(a) = a\r
+NEXT a\r
+\r
+d = 1\r
+FOR a = 1 TO b\r
+    e = 32000\r
+\r
+    FOR c = d TO b\r
+        IF tmp1(c) < e THEN\r
+            e = tmp1(c)\r
+            f = c\r
+        END IF\r
+    NEXT c\r
+    SWAP tmp1(a), tmp1(f)\r
+    SWAP tmp2(a), tmp2(f)\r
+    d = d + 1\r
+NEXT a\r
+\r
+FOR a = 1 TO b\r
+    stack(a, s) = tmp2(a)\r
+NEXT a\r
+\r
+END SUB\r
+\r
+SUB ssort (s, m)\r
+DIM tbti(1 TO 2000)\r
+DIM tbtp(1 TO 2000)\r
+DIM tbt$(1 TO 2000)\r
+\r
+FOR a = 1 TO stackl(s)\r
+    gets stack(a, s), m, b$\r
+    tbt$(a) = b$\r
+    tbtp(a) = a\r
+NEXT a\r
+\r
+b = stackl(s)\r
+FOR a = 1 TO stackl(s)\r
+d$ = tbt$(1)\r
+e = 1\r
+f = ASC(LEFT$(d$, 1))\r
+FOR c = 2 TO b\r
+IF ASC(LEFT$(tbt$(c), 1)) = f THEN\r
+IF d$ <> tbt$(c) THEN\r
+g$ = d$ + CHR$(0)\r
+h$ = tbt$(c) + CHR$(0)\r
+i = LEN(g$)\r
+IF LEN(h$) > i THEN i = LEN(h$)\r
+FOR j = 1 TO i\r
+k = ASC(RIGHT$(LEFT$(g$, j), 1))\r
+l = ASC(RIGHT$(LEFT$(h$, j), 1))\r
+IF k < l THEN GOTO 22\r
+IF l < k THEN e = c: d$ = tbt$(c): f = ASC(LEFT$(d$, 1)): GOTO 22\r
+NEXT j\r
+END IF\r
+END IF\r
+IF ASC(LEFT$(tbt$(c), 1)) < f THEN f = ASC(LEFT$(tbt$(c), 1)): e = c: d$ = tbt$(c)\r
+22\r
+NEXT c\r
+\r
+    tbti(a) = tbtp(e)\r
+    tbt$(e) = tbt$(b)\r
+    tbtp(e) = tbtp(b)\r
+    b = b - 1\r
+NEXT a\r
+\r
+FOR a = 1 TO stackl(s)\r
+    stack(a, s) = tbti(a)\r
+NEXT a\r
+\r
+conm "done", 7\r
+\r
+END SUB\r
+\r
+SUB start\r
+WIDTH 80, 50\r
+VIEW PRINT 1 TO 50\r
+CLS\r
+conx = 1\r
+histp = 1\r
+histk = 1\r
+stdl = 1\r
+\r
+conm "DDBASE, (Dos Data BASE) 0.0", 7\r
+conm "Copyright Svjatoslav Agejenko. All Rights Reserved.", 7\r
+conm "starting...", 7\r
+FOR a = 1 TO 5000\r
+    bufu(a) = 0\r
+    buf$(a) = ""\r
+NEXT a\r
+\r
+FOR a = 1 TO 30\r
+    FOR b = 1 TO 1000\r
+        bufl(b, a) = -1\r
+        buff(a, b) = -1\r
+    NEXT b\r
+    opf(a) = 0\r
+NEXT a\r
+\r
+FOR a = 1 TO 1000\r
+    buflu(a) = 0\r
+NEXT a\r
+\r
+FOR a = 1 TO 10\r
+    stackl(a) = 0\r
+NEXT a\r
+\r
+a$ = "runf auto.scr"\r
+FOR b = 1 TO LEN(a$)\r
+    c$ = RIGHT$(LEFT$(a$, b), 1)\r
+    conkey c$\r
+NEXT b\r
+conkey CHR$(13)\r
+\r
+END SUB\r
+\r
+SUB std (a$)\r
+'conm a$, 2\r
+\r
+SELECT CASE stdl\r
+CASE 1\r
+    conm a$, 10\r
+CASE 11 TO 20\r
+    b = stdl - 10\r
+    stackl(b) = stackl(b) + 1\r
+    stack(stackl(b), b) = VAL(a$)\r
+\r
+    c$ = a$ + " > " + cnum(stackl(b)) + " ! " + cnum(b)\r
+END SELECT\r
+\r
+END SUB\r
+\r
+SUB strip (a$, b$)\r
+b$ = a$\r
+2\r
+IF LEFT$(b$, 1) = " " THEN\r
+    b$ = RIGHT$(b$, LEN(b$) - 1)\r
+    GOTO 2\r
+END IF\r
+3\r
+IF RIGHT$(b$, 1) = " " THEN\r
+    b$ = LEFT$(b$, LEN(b$) - 1)\r
+    GOTO 3\r
+END IF\r
+\r
+END SUB\r
+\r
+SUB title (a$)\r
+conm " ", 10\r
+conm "================> " + a$ + " <===============", 7\r
+\r
+END SUB\r
diff --git a/Miscellaneous/Database/lisa.scr b/Miscellaneous/Database/lisa.scr
new file mode 100644 (file)
index 0000000..30e4900
--- /dev/null
@@ -0,0 +1,11 @@
+flnget 1 1\r
+ask Eesnimi 1 |@1 1\r
+ask Perekonnanimi 1 |@1 2\r
+ask Aadress 1 |@1 3\r
+ask Telefon 1 |@1 4\r
+ask Sugu_M_voi_N 1 |@1 5\r
+ask S\81nniaasta 1 |@1 7\r
+stclear 1\r
+chklin 1 |> s 1\r
+stacksize 1 |> c\r
+\r
diff --git a/Miscellaneous/Mouse driver/index.html b/Miscellaneous/Mouse driver/index.html
new file mode 100644 (file)
index 0000000..25a8c73
--- /dev/null
@@ -0,0 +1,16 @@
+<HTML>\r
+<HEAD><TITLE>QBasic mouse extension</TITLE></HEAD>\r
+\r
+<BODY>\r
+<CENTER><H1>QBasic mouse extension</H1></CENTER>\r
+<BR>\r
+<BR>\r
+\r
+This TSR written in x86 assembler, allows QBasic programs to use mouse,\r
+by writing mouse movement and button press info to memory,\r
+referenced by INT 79h.\r
+Afterwards QBasic programs can read mouse cursor position\r
+directly from RAM by using PEEK command.\r
+\r
+</BODY>\r
+</HTML>
\ No newline at end of file
diff --git a/Miscellaneous/Mouse driver/mousedrv.bas b/Miscellaneous/Mouse driver/mousedrv.bas
new file mode 100755 (executable)
index 0000000..92d177c
--- /dev/null
@@ -0,0 +1,146 @@
+' QBasic does not have mouse support. Here is demonstration of custom mouse driver.\r
+' In order to use mouse, special custom TSR (Terminate and Stay Resident) mouse driver\r
+' has to be loaded before running this demo.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2004.01, Initial version\r
+\r
+DECLARE SUB mousedemo ()\r
+DECLARE SUB putword (addr!, dat!)\r
+DECLARE FUNCTION getword! (addr!)\r
+DECLARE FUNCTION getbyte! (addr!)\r
+DECLARE SUB start ()\r
+\r
+DIM SHARED extSEG, extADDR\r
+\r
+start\r
+\r
+mousedemo\r
+\r
+FUNCTION getbyte (addr)\r
+    ' This function retrieves a byte from the specified address.\r
+    getbyte = PEEK(extADDR + addr)\r
+END FUNCTION\r
+\r
+FUNCTION getword (addr)\r
+    ' This function retrieves a word (2 bytes) from the specified address.\r
+    a = PEEK(extADDR + addr)\r
+    b = PEEK(extADDR + addr + 1)\r
+\r
+    c$ = HEX$(a)\r
+    IF LEN(c$) = 1 THEN c$ = "0" + c$\r
+    IF LEN(c$) = 0 THEN c$ = "00"\r
+\r
+    ' Combine the two bytes into a single word.\r
+    c = VAL("&H" + HEX$(b) + c$)\r
+\r
+    getword = c\r
+END FUNCTION\r
+\r
+SUB mousedemo\r
+    ' This subroutine demonstrates mouse movement and button clicks.\r
+\r
+    cx = 150\r
+    cy = 100\r
+    maxmove = 50\r
+\r
+    1\r
+    frm = frm + 1\r
+\r
+    ' Check for user input on keyboard and exit if any key is pressed\r
+    IF INKEY$ <> "" THEN SYSTEM\r
+\r
+    ' Print the current coordinates and frame number.\r
+    LOCATE 1, 1\r
+    PRINT cx, cy\r
+    PRINT frm\r
+\r
+    ' Draw a circle at the current mouse position.\r
+    CIRCLE (cx, cy), 10, 0\r
+\r
+    ' Retrieve the x and y movement values from the mouse.\r
+    xp = getword(2)\r
+    putword 2, 0\r
+    yp = getword(4)\r
+    putword 4, 0\r
+\r
+    ' Retrieve the button status from the mouse.\r
+    butt = getword(6)\r
+    putword 6, 0\r
+\r
+    ' Print the button status if a button is pressed.\r
+    IF butt <> 0 THEN\r
+        LOCATE 5\r
+        PRINT butt\r
+    END IF\r
+\r
+    ' Limit the mouse movement to within maxmove.\r
+    IF xp < -maxmove THEN xp = -maxmove\r
+    IF xp > maxmove THEN xp = maxmove\r
+    cx = cx + xp\r
+\r
+    IF yp < -maxmove THEN yp = -maxmove\r
+    IF yp > maxmove THEN yp = maxmove\r
+    cy = cy + yp\r
+\r
+    ' Draw a circle at the new mouse position.\r
+    CIRCLE (cx, cy), 10, 10\r
+\r
+    ' Use sound command for adding short delay\r
+    SOUND 0, .05\r
+\r
+    ' Repeat the loop to continuously update the mouse position.\r
+    GOTO 1\r
+\r
+END SUB\r
+\r
+SUB putword (addr, dat)\r
+    ' This subroutine stores a word (2 bytes) at the specified address.\r
+\r
+    b$ = HEX$(dat)\r
+\r
+    2\r
+    IF LEN(b$) < 4 THEN b$ = "0" + b$: GOTO 2\r
+\r
+    ' Split the word into two bytes.\r
+    n1 = VAL("&H" + LEFT$(b$, 2))\r
+    n2 = VAL("&H" + RIGHT$(b$, 2))\r
+\r
+    ' Store the bytes at the specified address.\r
+    POKE (extADDR + addr), n2\r
+    POKE (extADDR + addr + 1), n1\r
+\r
+END SUB\r
+\r
+SUB start\r
+    ' This subroutine initializes the screen and retrieves the segment and address of the mouse driver.\r
+\r
+    SCREEN 13\r
+\r
+    DEF SEG = 0     ' read first from interrupt table\r
+\r
+    extSEG = PEEK(&H79 * 4 + 3) * 256\r
+    extSEG = extSEG + PEEK(&H79 * 4 + 2)\r
+\r
+    PRINT "Segment is: " + HEX$(extSEG)\r
+\r
+    extADDR = PEEK(&H79 * 4 + 1) * 256\r
+    extADDR = extADDR + PEEK(&H79 * 4 + 0)\r
+\r
+    PRINT "relative address is:"; extADDR\r
+\r
+    DEF SEG = extSEG\r
+\r
+    ' Check if the mouse driver is loaded.\r
+    IF getword(0) <> 1983 THEN\r
+        PRINT "FATAL ERROR: you must load"\r
+        PRINT "QBasic extension TSR first!"\r
+        SYSTEM\r
+    END IF\r
+\r
+END SUB
\ No newline at end of file
diff --git a/Miscellaneous/Mouse driver/qbext.asm b/Miscellaneous/Mouse driver/qbext.asm
new file mode 100644 (file)
index 0000000..57dd874
--- /dev/null
@@ -0,0 +1,84 @@
+; TSR hack that allows QBasic programs to use mouse.\r
+; Made by Svjatoslav Agejenko\r
+; in 2004.01\r
+; Homepage: http://svjatoslav.eu\r
\r
+\r
+org 100h\r
+\r
+myint = 79h     ; interrupt to hook, becomes pointer to data table\r
+\r
+\r
+       mov     dx, msg\r
+       mov     ah, 9\r
+       int     21h\r
+\r
+        mov     ax, 0           ; Saves old interrupt vector\r
+        mov     es, ax\r
+        mov     eax, [es:32]\r
+        mov     [oldVector], eax \r
+\r
+        cli\r
+        mov     ax, cs          ; Set new interrupt vector for IRQ 0\r
+        shl     eax, 16\r
+        mov     ax, custom\r
+        mov     [es:32], eax\r
+        mov     ax, dataTable   ; Set interrupt vector for INT 79 (default)\r
+        mov     [es:4 * myint], eax\r
+        sti\r
+\r
+        mov     ax, endPointer  ; Calculate needed memory size, become TSR\r
+        add     ax, 32\r
+        mov     dx, 0\r
+        mov     bx, 16\r
+        div     bx\r
+        mov     dx, ax\r
+        mov     ax, 3100h\r
+        int     21h\r
+\r
+custom:\r
+        pushf                   ; Execute default code in old int vector\r
+        call    dword [cs:oldVector]\r
+\r
+        cmp     [cs:isRunning], 0 ; Check if custom routine is already active\r
+        jne     EndOfRoutine\r
+\r
+        mov     [cs:isRunning], 1 ; Set active flag\r
+        pusha\r
+        push    ds\r
+        push    es\r
+\r
+               cli \r
+        mov     ax, 0bh         ; Read Mouse Motion Counters\r
+        int     33h\r
+        add     [CS:mouseHorisontal], cx\r
+        add     [CS:mouseVertical], dx\r
+        mov     ax, 3           ; read mouse buttons\r
+       int     33h\r
+        or      [CS:mouseButtons], bx\r
+       inc     byte [CS:updated]\r
+       sti\r
+\r
+        pop     es\r
+        pop     ds\r
+        popa\r
+        mov     [cs:isRunning], 0 ; Terminate active flag\r
+        EndOfRoutine:\r
+        iret\r
+\r
+oldVector       dd 0\r
+isRunning      db 0\r
+\r
+dataTable:\r
+       dw 1983                 ; check number, indicates that module is loaded\r
+        mouseHorisontal dw 0\r
+        mouseVertical   dw 0\r
+        mouseButtons    dw 0\r
+       updated         db 0\r
+       \r
+\r
+endPointer:\r
+       \r
+msg:\r
+file 'readme.txt'\r
+       db '$'\r
diff --git a/Miscellaneous/Mouse driver/qbext.com b/Miscellaneous/Mouse driver/qbext.com
new file mode 100755 (executable)
index 0000000..ae54fc4
Binary files /dev/null and b/Miscellaneous/Mouse driver/qbext.com differ
diff --git a/Miscellaneous/Password lock/passw.bas b/Miscellaneous/Password lock/passw.bas
new file mode 100644 (file)
index 0000000..b47b4b7
--- /dev/null
@@ -0,0 +1,252 @@
+' Program tries to render fancy rocket control system with password protection.\r
+' When entered password is wrong, program will halt in 3 attempts.\r
+' When password is correct, program will exit and return control to the user.\r
+' Password is stored in "passw.dat" file.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2002, Initial version.\r
+' 2024, Improved program readability.\r
+\r
+\r
+DECLARE SUB checkPassword (a$)\r
+DECLARE SUB startProgram ()\r
+DECLARE SUB makeVerticalLines (s%, C%)\r
+DECLARE SUB drawBox (x1%, y1%, x2%, y2%)\r
+\r
+DIM SHARED cha\r
+DIM SHARED password$\r
+\r
+startProgram\r
+\r
+' Initialize variables\r
+x = 25\r
+x2 = 10\r
+x3 = 0\r
+B$ = ""\r
+\r
+1\r
+' Update position of the bouncing ball\r
+x = x + xs\r
+IF x > 0 THEN\r
+    ' Decrease speed if ball is moving right\r
+    xs = xs - .5\r
+ELSE\r
+    ' Increase speed if ball is moving left\r
+    xs = xs + .5\r
+END IF\r
+' Gradually decrease the speed\r
+xs = xs - (xs / 8)\r
+\r
+' Draw a vertical line and a dot\r
+IF x2 > 100 THEN\r
+    ' Reset the position of the line\r
+    x2 = 10\r
+ELSE\r
+    LINE (x2, 10)-(x2, 60), 0\r
+    PSET (x2, x + 35), 10\r
+END IF\r
+' Draw another vertical line next to the first one\r
+IF x2 < 99 THEN\r
+    LINE (x2 + 1, 10)-(x2 + 1, 60), 3\r
+END IF\r
+\r
+' Update position of the lines\r
+x2 = x2 + 1\r
+x3 = x3 + 1\r
+\r
+' Play a sound when the ball hits the right edge\r
+IF x3 > 40 THEN\r
+    x3 = 0\r
+    xs = xs - 5\r
+    SOUND 1000, 1\r
+END IF\r
+\r
+SOUND 0, .5\r
+\r
+a$ = INKEY$\r
+' Check if the Enter key is pressed\r
+IF a$ = CHR$(13) THEN\r
+    ' Validate the entered password\r
+    checkPassword B$\r
+    ' Clear the input buffer\r
+    B$ = ""\r
+    GOTO 2\r
+END IF\r
+\r
+' Check if any other key is pressed\r
+IF a$ <> "" THEN\r
+    ' Handle backspace\r
+    IF a$ = CHR$(8) THEN\r
+        ' Remove the last character from the input buffer\r
+        IF LEN(B$) > 0 THEN\r
+            B$ = LEFT$(B$, LEN(B$) - 1)\r
+        END IF\r
+        GOTO 2\r
+    END IF\r
+    ' Add the pressed key to the input buffer\r
+    B$ = B$ + a$\r
+    ' Limit the length of the input buffer\r
+    IF LEN(B$) > 10 THEN\r
+        B$ = LEFT$(B$, 10)\r
+    END IF\r
+2\r
+    ' Draw the characters in the input buffer\r
+    FOR a = 1 TO 10\r
+        ' Determine the color of the character\r
+        IF a <= LEN(B$) THEN\r
+            C = 5\r
+        ELSE\r
+            C = 1\r
+        END IF\r
+        ' Draw the character\r
+        CIRCLE (a * 15 + 20, 150), 6, C\r
+        PAINT (a * 15 + 20, 150), C\r
+    NEXT a\r
+END IF\r
+\r
+GOTO 1\r
+\r
+SUB checkPassword (a$)\r
+    cha = cha - 1\r
+\r
+    ' Check if the entered password is correct\r
+    IF a$ = password$ THEN\r
+        CLS\r
+        SCREEN 2\r
+        SYSTEM\r
+    END IF\r
+\r
+    ' Draw the background of the error message box\r
+    DIM buf(1 TO 3000)\r
+    GET (79, 80)-(241, 141), buf(1)\r
+\r
+    ' Draw the borders of the error message box\r
+    drawBox 80, 90, 240, 140\r
+\r
+    ' Display the error message\r
+    LOCATE 14, 14\r
+    COLOR 12\r
+    PRINT "Wrong password"\r
+\r
+    ' Display the number of remaining attempts\r
+    COLOR 5\r
+    LOCATE 16, 13\r
+    PRINT STR$(cha) + " chances left"\r
+\r
+    ' Play a sound to indicate an error\r
+    FOR a = 1 TO 30\r
+        SOUND 0, 1\r
+    NEXT a\r
+\r
+    ' Display the final message when all attempts are exhausted\r
+    IF cha = 0 THEN\r
+        DIM buf2(1000)\r
+        GET (79, 138)-(241, 140), buf2\r
+        FOR a = 1 TO 40\r
+            PUT (79, 138 + a), buf2, PSET\r
+            SOUND 0, .5\r
+        NEXT a\r
+\r
+        LOCATE 19, 14\r
+        COLOR 12\r
+        PRINT "SYSTEM HALTED"\r
+        LOCATE 21, 14\r
+        PRINT "SUCCESSFULLY!!"\r
+3\r
+        GOTO 3\r
+    END IF\r
+\r
+    ' Restore the background of the error message box\r
+    PUT (79, 80), buf(1), PSET\r
+END SUB\r
+\r
+DEFINT A-Z\r
+SUB drawBox (x1%, y1%, x2%, y2%)\r
+    ' Draw the top border of the box\r
+    LINE (x1 + 1, y1 + 1)-(x2 - 1, y2 - 1), 0, BF\r
+    ' Draw the bottom border of the box\r
+    LINE (x1, y1)-(x2, y2), 10, B\r
+    ' Draw the left and right borders of the box\r
+    LINE (x1, y1)-(x2, y1 - 9), 14, BF\r
+    LINE (x1, y1)-(x2, y1 - 9), 10, B\r
+\r
+    ' Draw the top left corner of the box\r
+    LINE (x2 - 2, y1 - 2)-(x2 - 7, y1 - 7), 7, BF\r
+    ' Draw the top right corner of the box\r
+    LINE (x2 - 9, y1 - 2)-(x2 - 14, y1 - 7), 7, BF\r
+\r
+    ' Draw the diagonal lines in the top left corner\r
+    LINE (x2 - 2, y1 - 2)-(x2 - 7, y1 - 7), 0\r
+    LINE (x2 - 2, y1 - 7)-(x2 - 7, y1 - 2), 0\r
+\r
+    ' Draw the horizontal line in the top left corner\r
+    LINE (x2 - 10, y1 - 3)-(x2 - 13, y1 - 3), 0\r
+END SUB\r
+\r
+SUB makeVerticalLines (s%, C%)\r
+    ' Draw vertical lines\r
+    FOR x = 160 TO 319 STEP s\r
+        LINE (x, 0)-(x, 199), C\r
+        LINE (320 - x, 0)-(320 - x, 199), C\r
+    NEXT x\r
+\r
+    ' Draw horizontal lines\r
+    FOR y = 100 TO 199 STEP s\r
+        LINE (0, y)-(319, y), C\r
+        LINE (0, 200 - y)-(319, 200 - y), C\r
+    NEXT y\r
+END SUB\r
+\r
+DEFSNG A-Z\r
+SUB startProgram\r
+    ' Read the password from the file\r
+    OPEN "passw.dat" FOR INPUT AS #1\r
+    LINE INPUT #1, password$\r
+    CLOSE #1\r
+\r
+    ' Set the screen mode\r
+    SCREEN 13\r
+\r
+    ' Initialize the number of remaining attempts\r
+    cha = 3\r
+\r
+    ' Draw vertical lines with increasing spacing\r
+    s = 2\r
+    FOR C = 16 TO 31\r
+        s = s * 1.4\r
+        makeVerticalLines INT(s), INT(C)\r
+    NEXT C\r
+    makeVerticalLines INT(s), 0\r
+\r
+    ' Draw the main box\r
+    drawBox 70, 20, 270, 90\r
+\r
+    ' Display the initial message\r
+    COLOR 5\r
+    LOCATE 8, 10\r
+    PRINT "           stack dump:"\r
+    LOCATE 9, 10\r
+    PRINT "010010010010010010010100"\r
+\r
+    ' Display the running message\r
+    LOCATE 10, 10\r
+    PRINT "Running rocket ground"\r
+    LOCATE 11, 10\r
+    PRINT "control system..."\r
+\r
+    ' Draw the input box\r
+    drawBox 9, 9, 101, 61\r
+\r
+    ' Draw the password input box\r
+    drawBox 20, 130, 300, 190\r
+\r
+    ' Display the password prompt\r
+    LOCATE 18, 5\r
+    PRINT "ENTER PASSWORD:"\r
+END SUB\r
+\r
diff --git a/Miscellaneous/Password lock/passw.dat b/Miscellaneous/Password lock/passw.dat
new file mode 100644 (file)
index 0000000..6ea1900
--- /dev/null
@@ -0,0 +1 @@
+jerry
\ No newline at end of file
diff --git a/Miscellaneous/Password lock/screenshot, 1.png b/Miscellaneous/Password lock/screenshot, 1.png
new file mode 100644 (file)
index 0000000..bada664
Binary files /dev/null and b/Miscellaneous/Password lock/screenshot, 1.png differ
diff --git a/Miscellaneous/Password lock/screenshot, 2.png b/Miscellaneous/Password lock/screenshot, 2.png
new file mode 100644 (file)
index 0000000..c5183c9
Binary files /dev/null and b/Miscellaneous/Password lock/screenshot, 2.png differ
diff --git a/Miscellaneous/Pressed key test.bas b/Miscellaneous/Pressed key test.bas
new file mode 100644 (file)
index 0000000..d4d8af3
--- /dev/null
@@ -0,0 +1,26 @@
+' Utility to print information about pressed keyboard buttons.\r
+'\r
+\r
+MainLoop:\r
+    ' Wait for a key press and store it in userInput$\r
+    userInput$ = INKEY$\r
+\r
+    ' If no key has been pressed, jump back to the main loop\r
+    IF userInput$ = "" THEN GOTO MainLoop\r
+\r
+    ' Print the character that was typed by the user\r
+    PRINT "You typed: "; userInput$\r
+\r
+    ' Calculate the ASCII value of the first character (if input is more than one character)\r
+    ' and print it\r
+    IF LEN(userInput$) > 0 THEN\r
+        PRINT "ASCII value of the first character ('"; LEFT$(userInput$, 1); "'): "; ASC(LEFT$(userInput$, 1))\r
+    END IF\r
+\r
+    ' Calculate the ASCII value of the last character and print it\r
+    IF LEN(userInput$) > 0 THEN\r
+        PRINT "ASCII value of the last character ('"; RIGHT$(userInput$, 1); "'): "; ASC(RIGHT$(userInput$, 1))\r
+    END IF\r
+\r
+    ' Jump back to the main loop to wait for another key press\r
+    GOTO MainLoop
\ No newline at end of file
diff --git a/Miscellaneous/Video modes detector.bas b/Miscellaneous/Video modes detector.bas
new file mode 100644 (file)
index 0000000..9602423
--- /dev/null
@@ -0,0 +1,54 @@
+' Utility to determine available video modes.\r
+'\r
+' Written by Svjatoslav Agejenko\r
+' Homepage: svjatoslav.eu\r
+' Email:    svjatoslav@svjatoslav.eu\r
+\r
+' 2001, initial version\r
+' 2024.08, used AI to enhance program readability\r
+\r
+DIM SHARED AvailableModes(1 TO 100) AS INTEGER\r
+ON ERROR GOTO ErrorHandler\r
+\r
+' Initialize the video mode counter and the current mode number.\r
+currentModeIndex = 1\r
+currentModeNumber = 0\r
+\r
+' Start the loop to test each video mode.\r
+DO\r
+    ' Attempt to set the screen to the current video mode.\r
+    SCREEN currentModeNumber\r
+\r
+    ' Increment the mode number for the next iteration.\r
+    currentModeNumber = currentModeNumber + 1\r
+\r
+    ' Store the successful video mode in the array.\r
+    AvailableModes(currentModeIndex) = currentModeNumber - 1\r
+\r
+    ' Move to the next index in the array.\r
+    currentModeIndex = currentModeIndex + 1\r
+\r
+LOOP\r
+\r
+' Error handling routine when an error occurs (e.g., invalid video mode).\r
+ErrorHandler:\r
+' Increment the mode number to continue testing after an error.\r
+currentModeNumber = currentModeNumber + 1\r
+\r
+' Check if we have reached the maximum number of modes to test.\r
+IF currentModeNumber > 1000 THEN\r
+    ' Reset the screen to text mode (usually mode 1).\r
+    SCREEN 1\r
+\r
+    ' Display the list of available video modes.\r
+    PRINT "Available video modes on this computer:"\r
+    FOR modeIndex = 1 TO currentModeIndex - 1\r
+        PRINT AvailableModes(modeIndex)\r
+    NEXT modeIndex\r
+\r
+    ' End the program after displaying the results.\r
+    END\r
+END IF\r
+\r
+' Resume execution after an error to continue testing modes.\r
+RESUME
\ No newline at end of file
diff --git a/Miscellaneous/alarm 1.bas b/Miscellaneous/alarm 1.bas
new file mode 100755 (executable)
index 0000000..5e973a0
--- /dev/null
@@ -0,0 +1,57 @@
+' Program to play sound that resembles security alarm.\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' ?, Initial version\r
+' 2024 - 2025, Enhanced program readability\r
+\r
+SCREEN 1\r
+CLS\r
+\r
+' Initialize main frequency control variable\r
+' This will create the oscillating siren effect by increasing/decreasing value\r
+currentFrequency = 40\r
+\r
+StartLoop:\r
+    ' Play primary oscillating tone (main siren component)\r
+    ' Frequency sweeps up and down between thresholds\r
+    SOUND currentFrequency, .3\r
+\r
+    ' Add secondary fixed-frequency component (200Hz for 1 duration unit)\r
+    ' Creates layered audio effect that makes alarm more realistic\r
+    ' Duration parameter uses QBasic's time units (1 ≈ 0.05 seconds)\r
+    SOUND 200, 1\r
+\r
+    ' Rapidly increase frequency for ascending siren sweep\r
+    ' Jump amount (100) creates dramatic pitch jumps\r
+    currentFrequency = currentFrequency + 100\r
+\r
+    ' Check if we've exceeded upper frequency threshold (1000Hz)\r
+    ' If yes, switch to descending phase\r
+    IF currentFrequency > 1000 THEN GoTo DecreaseFrequency\r
+\r
+    ' Repeat ascending sweep until reaching maximum threshold\r
+    GOTO StartLoop\r
+\r
+DecreaseFrequency:\r
+    ' Continue playing oscillating tone during descending phase\r
+    SOUND currentFrequency, .3\r
+\r
+    ' Add high-pitched pulse (500Hz for short duration)\r
+    ' Creates distinctive alarm "warble" pattern\r
+    ' Shorter duration (.2) adds rhythmic pulsing\r
+    SOUND 500, .2\r
+\r
+    ' Gradually decrease frequency for descending sweep\r
+    ' Smaller decrement (10) creates slower descent than ascent\r
+    currentFrequency = currentFrequency - 10\r
+\r
+    ' Check if we've dropped below lower threshold (200Hz)\r
+    ' If yes, restart ascending phase to complete siren cycle\r
+    IF currentFrequency < 200 THEN GoTo StartLoop\r
+\r
+    ' Continue descending sweep until reaching minimum threshold\r
+    GOTO DecreaseFrequency\r
diff --git a/Miscellaneous/alarm 1.mp3 b/Miscellaneous/alarm 1.mp3
new file mode 100644 (file)
index 0000000..eec2000
Binary files /dev/null and b/Miscellaneous/alarm 1.mp3 differ
diff --git a/Miscellaneous/alarm 2.bas b/Miscellaneous/alarm 2.bas
new file mode 100755 (executable)
index 0000000..87f03c1
--- /dev/null
@@ -0,0 +1,34 @@
+' This program generates a security alarm sound effect with two alternating patterns\r
+\r
+DEFINT A-Z\r
+\r
+' Start of infinite alarm cycle\r
+1\r
+\r
+    ' Pattern 1: Ascending frequency sweep with counterpoint tone\r
+    ' Increase primary frequency from 100Hz to 1000Hz in steps of 3Hz\r
+    FOR ascendingFrequency = 100 TO 1000 STEP 3\r
+        ' Play main ascending tone\r
+        SOUND ascendingFrequency, .05\r
+\r
+        ' Generate counterpoint tone that decreases as primary increases\r
+        ' Formula creates complementary frequency by subtracting double current frequency\r
+        ' At 100Hz -> 5000-2*100=4800Hz; At 1000Hz -> 5000-2*1000=3000Hz\r
+        counterToneFrequency = 5000 - (ascendingFrequency * 2)\r
+        SOUND counterToneFrequency, .1\r
+    NEXT ascendingFrequency\r
+\r
+    ' Pattern 2: Descending frequency sweep with harmonic enhancement\r
+    ' Decrease frequency from 1000Hz back to 100Hz in larger steps (-5)\r
+    FOR descendingFrequency = 1000 TO 100 STEP -5\r
+        ' Play main descending tone \r
+        SOUND descendingFrequency, .05\r
+\r
+        ' Add harmonic overtone at triple frequency plus small offset\r
+        ' Creates richer, more complex sound texture\r
+        harmonicFrequency = (descendingFrequency * 3) + 10\r
+        SOUND harmonicFrequency, .05\r
+    NEXT descendingFrequency\r
+\r
+' Continuously repeat between both sound patterns\r
+GOTO 1\r
diff --git a/Miscellaneous/alarm 2.mp3 b/Miscellaneous/alarm 2.mp3
new file mode 100644 (file)
index 0000000..c00ecf5
Binary files /dev/null and b/Miscellaneous/alarm 2.mp3 differ
diff --git a/Miscellaneous/windowing system.bas b/Miscellaneous/windowing system.bas
new file mode 100755 (executable)
index 0000000..ff0d067
--- /dev/null
@@ -0,0 +1,274 @@
+' Text mode windowing system. Each window can display text file.\r
+' Window content can be scrolled horizontally and vertically.\r
+' Window can have arbitrary size and location on the screen.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+\r
+' Changelog:\r
+' 2003, Initial version\r
+' 2024-2025, Improved program readability\r
+\r
+DECLARE SUB demo ()\r
+DECLARE FUNCTION GetLineFromWindow$ (windowNum%, lineNum%)\r
+DECLARE SUB LoadFileIntoWindow (fileName$, windowNum%)\r
+DECLARE SUB SendLineToWindow (windowNum%, lineNum%, newString$)\r
+DECLARE FUNCTION GetFreeLineIndex% ()\r
+DECLARE SUB RefreshAllWindows ()\r
+DECLARE FUNCTION AddWindow% (x%, y%, widt%, haigh%, title$)\r
+DECLARE SUB DrawBox (x%, y%, widt%, haigh%, edgeStyle$)\r
+DEFINT A-Z\r
+DECLARE SUB ShowWindow (windowNum)\r
+DECLARE SUB InitializeSystem ()\r
+\r
+' Global variables for text storage\r
+DIM SHARED maxStorage%\r
+maxStorage% = 5000\r
+DIM SHARED textStorage$(1 TO maxStorage%)\r
+DIM SHARED storagePointer%\r
+\r
+' Window-related global arrays\r
+DIM SHARED windowData(1 TO 10, 1 TO 1000)      ' Stores line indices for each window\r
+DIM SHARED windowX(1 TO 10), windowY(1 TO 10)  ' Position of each window\r
+DIM SHARED windowWidth(1 TO 10), windowHeight(1 TO 10)  ' Size of each window\r
+DIM SHARED windowActiveStatus(1 TO 10)         ' Whether window is active\r
+DIM SHARED windowTitle$(1 TO 10)               ' Title of each window\r
+\r
+' Window scrolling/shifting\r
+DIM SHARED windowShiftX(1 TO 10)      ' Horizontal shift\r
+DIM SHARED windowShiftY(1 TO 10)      ' Vertical shift\r
+\r
+DIM SHARED currentActiveWindow%       ' Currently active window for display\r
+\r
+InitializeSystem\r
+\r
+demo\r
+\r
+FUNCTION AddWindow% (x%, y%, widt%, heigh%, title$)\r
+    ' Adds a new window to the system\r
+\r
+    ' Find an empty window slot\r
+    FOR windowNum% = 1 TO 10\r
+        IF windowActiveStatus(windowNum%) = 0 THEN\r
+            foundWindow% = windowNum%\r
+            GOTO FoundEmptySlot\r
+        END IF\r
+    NEXT windowNum%\r
+\r
+FoundEmptySlot:\r
+    ' Initialize the window properties\r
+    windowActiveStatus(foundWindow%) = 1\r
+    windowX(foundWindow%) = x%\r
+    windowY(foundWindow%) = y%\r
+    windowWidth(foundWindow%) = widt%\r
+    windowHeight(foundWindow%) = heigh%\r
+    windowTitle$(foundWindow%) = title$\r
+\r
+    ' Return the window number\r
+    AddWindow% = foundWindow%\r
+END FUNCTION\r
+\r
+SUB ClearWindowContent (windowNum%)\r
+    ' Clears all content from a window\r
+\r
+    FOR lineNum% = 1 TO 1000\r
+        IF windowData(windowNum%, lineNum%) > 0 THEN\r
+            textStorage$(windowData(windowNum%, lineNum%)) = ""\r
+            windowData(windowNum%, lineNum%) = 0\r
+        END IF\r
+    NEXT lineNum%\r
+END SUB\r
+\r
+SUB demo\r
+    ' Create three windows with different sizes and titles\r
+    window1% = AddWindow%(1, 1, 30, 10, "window 1.")\r
+    window2% = AddWindow%(1, 12, 80, 30, "second window")\r
+    window3% = AddWindow%(31, 2, 30, 10, "last window")\r
+\r
+    ' Load the same file into all windows\r
+    LoadFileIntoWindow "wsystem.bas", window2%\r
+    LoadFileIntoWindow "wsystem.bas", window1%\r
+    LoadFileIntoWindow "wsystem.bas", window3%\r
+\r
+AnimateWindows:\r
+    ' Randomly select an active window to animate\r
+    currentActiveWindow% = INT(RND * 3) + 1\r
+    RefreshAllWindows\r
+\r
+    ' Animate the windows by shifting their content\r
+    FOR animationFrame% = 1 TO 100\r
+        windowShiftX(currentActiveWindow%) = SIN(animationFrame% / 10) * 10 + 10\r
+        windowShiftY(currentActiveWindow%) = animationFrame%\r
+        ShowWindow currentActiveWindow%\r
+        ' split-second delay\r
+        SOUND 0, 1\r
+        IF INKEY$ <> "" THEN SYSTEM\r
+    NEXT animationFrame%\r
+\r
+    GOTO AnimateWindows\r
+END SUB\r
+\r
+FUNCTION GetFreeLineIndex%\r
+    ' Finds a free line in text storage\r
+\r
+FindNextLine:\r
+    IF storagePointer% > 1000 THEN\r
+        storagePointer% = 1\r
+    END IF\r
+\r
+    IF textStorage$(storagePointer%) = "" THEN\r
+        GetFreeLineIndex% = storagePointer%\r
+        storagePointer% = storagePointer% + 1\r
+    ELSE\r
+        storagePointer% = storagePointer% + 1\r
+        GOTO FindNextLine\r
+    END IF\r
+END FUNCTION\r
+\r
+FUNCTION GetLineFromWindow$ (windowNum%, lineNum%)\r
+    ' Retrieve a line from a window's memory\r
+\r
+    IF windowData(windowNum%, lineNum%) = 0 THEN\r
+        GetLineFromWindow$ = ""\r
+    ELSE\r
+        GetLineFromWindow$ = textStorage$(windowData(windowNum%, lineNum%))\r
+    END IF\r
+END FUNCTION\r
+\r
+SUB LoadFileIntoWindow (fileName$, windowNum%)\r
+    ' Load a file into a window's memory\r
+\r
+    OPEN fileName$ FOR INPUT AS #1\r
+    FOR lineNum% = 1 TO 1000\r
+        IF EOF(1) <> 0 THEN\r
+            GOTO FileLoaded\r
+        END IF\r
+        LINE INPUT #1, lineContent$\r
+        SendLineToWindow windowNum%, lineNum%, lineContent$\r
+    NEXT lineNum%\r
+\r
+FileLoaded:\r
+    CLOSE #1\r
+\r
+    ' Fill the remaining lines with empty strings\r
+    FOR blankLineNum% = lineNum% TO 1000\r
+        SendLineToWindow windowNum%, blankLineNum%, ""\r
+    NEXT blankLineNum%\r
+END SUB\r
+\r
+SUB RefreshAllWindows\r
+    ' Redraw all active windows\r
+\r
+    CLS\r
+    FOR windowNum% = 1 TO 10\r
+        IF windowActiveStatus(windowNum%) > 0 THEN\r
+            ShowWindow windowNum%\r
+        END IF\r
+    NEXT windowNum%\r
+END SUB\r
+\r
+SUB SendLineToWindow (windowNum%, lineNum%, newString$)\r
+    ' Stores a string in a window's memory\r
+\r
+    lineContent$ = newString$\r
+\r
+    ' Remove trailing spaces from the string\r
+    IF lineContent$ = SPACE$(LEN(lineContent$)) THEN\r
+        lineContent$ = ""\r
+    END IF\r
+\r
+    IF LEN(lineContent$) > 0 THEN\r
+TrimRight:\r
+        IF RIGHT$(lineContent$, 1) = " " THEN\r
+            lineContent$ = LEFT$(lineContent$, LEN(lineContent$) - 1)\r
+            GOTO TrimRight\r
+        END IF\r
+    END IF\r
+\r
+    ' Update the window memory with the new string\r
+    IF lineContent$ = "" THEN\r
+        IF windowData(windowNum%, lineNum%) > 0 THEN\r
+            textStorage$(windowData(windowNum%, lineNum%)) = "": windowData(windowNum%, lineNum%) = 0\r
+        END IF\r
+    ELSE\r
+        IF windowData(windowNum%, lineNum%) = 0 THEN\r
+            windowData(windowNum%, lineNum%) = GetFreeLineIndex%\r
+        END IF\r
+        textStorage$(windowData(windowNum%, lineNum%)) = lineContent$\r
+    END IF\r
+END SUB\r
+\r
+SUB ShowWindow (windowNum%)\r
+    ' Draws a window on the screen\r
+\r
+    ' Determine background color based on active window\r
+    IF windowNum% = currentActiveWindow% THEN\r
+        bgColor% = 1\r
+    ELSE\r
+        bgColor% = 0\r
+    END IF\r
+\r
+    x% = windowX(windowNum%)\r
+    y% = windowY(windowNum%)\r
+    widt% = windowWidth(windowNum%)\r
+    heigh% = windowHeight(windowNum%)\r
+    title$ = windowTitle$(windowNum%)\r
+\r
+    COLOR 11, bgColor%\r
+\r
+    ' Create border components\r
+    FOR borderSegment% = 1 TO widt% - 2\r
+        topBottom$ = topBottom$ + CHR$(205)\r
+    NEXT borderSegment%\r
+    borderTop$ = CHR$(201) + topBottom$ + CHR$(187)\r
+    borderBottom$ = CHR$(200) + topBottom$ + CHR$(188)\r
+\r
+    ' Draw top border\r
+    LOCATE y%, x%\r
+    PRINT borderTop$\r
+\r
+    ' Draw bottom border\r
+    LOCATE y% + heigh% - 1, x%\r
+    PRINT borderBottom$\r
+\r
+    ' Draw window content\r
+    FOR lineNum% = 1 TO heigh% - 2\r
+        LOCATE y% + lineNum%, x%\r
+        lineContent$ = GetLineFromWindow$(windowNum%, lineNum% + windowShiftY(windowNum%))\r
+        lineContent$ = lineContent$ + SPACE$(300)\r
+        lineContent$ = RIGHT$(lineContent$, LEN(lineContent$) - windowShiftX(windowNum%))\r
+        lineContent$ = LEFT$(lineContent$, widt% - 2)\r
+        PRINT CHR$(186) + lineContent$ + CHR$(186)\r
+    NEXT lineNum%\r
+\r
+    ' Draw window title\r
+    titleX% = INT(x% + (widt% / 2) - (LEN(title$) / 2) - 2)\r
+    LOCATE y%, titleX%\r
+    PRINT "[ "\r
+    titleX% = titleX% + 2\r
+\r
+    COLOR 10\r
+    LOCATE y%, titleX%\r
+    PRINT title$\r
+\r
+    titleX% = titleX% + LEN(title$)\r
+    COLOR 11\r
+    LOCATE y%, titleX%\r
+    PRINT " ]"\r
+    COLOR 7, 0\r
+END SUB\r
+\r
+SUB InitializeSystem\r
+    ' Initialize the screen and shared memory\r
+\r
+    WIDTH 80, 50\r
+    VIEW PRINT 1 TO 50\r
+\r
+    FOR storageIndex% = 1 TO maxStorage%\r
+        textStorage$(storageIndex%) = ""\r
+    NEXT storageIndex%\r
+\r
+    storagePointer% = 1\r
+END SUB
\ No newline at end of file
diff --git a/Miscellaneous/windowing system.webm b/Miscellaneous/windowing system.webm
new file mode 100644 (file)
index 0000000..1a456bb
Binary files /dev/null and b/Miscellaneous/windowing system.webm differ
diff --git a/Networking/COM port terminal.bas b/Networking/COM port terminal.bas
new file mode 100755 (executable)
index 0000000..f60bb6e
--- /dev/null
@@ -0,0 +1,35 @@
+' Simple COM port terminal\r
+' made by Svjatoslav Agejenko\r
+' in 2003.12\r
+' H-Page: svjatoslav.eu\r
+' E-Mail: svjatoslav@svjatoslav.eu\r
+\r
+CLS\r
+\r
+1\r
+    ' Read the status of the COM port\r
+    portStatus = INP(&H3FD)\r
+\r
+    ' Check if data is available\r
+    IF portStatus = 97 THEN\r
+        ' Read the data from the COM port\r
+        comData = INP(&H3F8)\r
+\r
+        ' Print the character and its ASCII value\r
+        PRINT CHR$(comData);\r
+        PRINT comData;\r
+    END IF\r
+\r
+    ' Get user input\r
+    userInput$ = INKEY$\r
+\r
+    ' If there is any input, print it and send to COM port\r
+    IF userInput$ <> "" THEN\r
+        PRINT userInput$;\r
+\r
+        ' Send the ASCII value of the input character to the COM port\r
+        OUT &H3F8, ASC(userInput$)\r
+    END IF\r
+\r
+' Repeat the process\r
+GOTO 1\r
diff --git a/Networking/Digital data over analog audio channel/INPUT.TXT b/Networking/Digital data over analog audio channel/INPUT.TXT
new file mode 100644 (file)
index 0000000..9d26a9b
--- /dev/null
@@ -0,0 +1 @@
+This is sample encoded message!\r
diff --git a/Networking/Digital data over analog audio channel/OUTPUT.TXT b/Networking/Digital data over analog audio channel/OUTPUT.TXT
new file mode 100644 (file)
index 0000000..9d26a9b
--- /dev/null
@@ -0,0 +1 @@
+This is sample encoded message!\r
diff --git a/Networking/Digital data over analog audio channel/SOUND.XI b/Networking/Digital data over analog audio channel/SOUND.XI
new file mode 100644 (file)
index 0000000..60a4fcc
Binary files /dev/null and b/Networking/Digital data over analog audio channel/SOUND.XI differ
diff --git a/Networking/Digital data over analog audio channel/aver.bas b/Networking/Digital data over analog audio channel/aver.bas
new file mode 100644 (file)
index 0000000..e984ed5
--- /dev/null
@@ -0,0 +1,73 @@
+' Noise reduction\r
+' made by Svjatoslav Agejenko\r
+' in 2003.12\r
+' H-Page: svjatoslav.eu\r
+' E-Mail: svjatoslav@svjatoslav.eu\r
\r
+\r
+\r
+DECLARE SUB start ()\r
+DEFINT A-Y\r
+DIM SHARED avb(1 TO 100)\r
+DIM SHARED byte AS STRING * 1\r
+DIM SHARED po, pod\r
+DIM SHARED file1$, file2$\r
+\r
+start\r
+\r
+INPUT "average factor:", po\r
+INPUT "divide factor:", pod\r
+\r
+OPEN file2$ FOR BINARY AS #1\r
+OPEN file1$ FOR BINARY AS #2\r
+\r
+SCREEN 12\r
+px = 0\r
+1\r
+GET #1, , byte\r
+c = ASC(byte)\r
+IF c > 127 THEN c = c - 255\r
+\r
+FOR a = 1 TO po - 1\r
+avb(a) = avb(a + 1)\r
+NEXT a\r
+avb(po) = c\r
+\r
+b = 0\r
+FOR a = 1 TO po\r
+b = b + avb(a)\r
+NEXT a\r
+\r
+b = b / pod\r
+'LINE (px + 1, 0)-(px + 1, 260), 14\r
+LINE (px, 0)-(px, 260), 0\r
+PSET (px, c + 130), 12\r
+PSET (px, b + 130), 14\r
+px = px + 1\r
+IF px > 639 THEN px = 1\r
+IF b < 0 THEN b = b + 255\r
+IF b > 255 THEN b = 255\r
+byte = CHR$(b)\r
+PUT #2, , byte\r
+'c$ = INPUT$(1)\r
+IF EOF(1) = 0 THEN GOTO 1\r
+\r
+CLOSE #2\r
+CLOSE #1\r
+\r
+SUB start\r
+\r
+IF COMMAND$ = "" THEN END\r
+b$ = COMMAND$\r
+file2$ = b$\r
+file1$ = ""\r
+FOR a = 1 TO LEN(b$)\r
+c$ = RIGHT$(LEFT$(b$, a), 1)\r
+IF c$ = "." OR c$ = " " THEN GOTO 2\r
+file1$ = file1$ + c$\r
+NEXT a\r
+2\r
+file1$ = file1$ + ".awe"\r
+\r
+END SUB\r
+\r
diff --git a/Networking/Digital data over analog audio channel/index.org b/Networking/Digital data over analog audio channel/index.org
new file mode 100755 (executable)
index 0000000..83bf69b
--- /dev/null
@@ -0,0 +1,9 @@
+* data in sound\r
+\r
+Utility to encode/decode digital information into wave sound file.\r
+You can later record it on the tape or send it acustically or\r
+for example over telephone line. Decoding utility\r
+is petty noise tolerant.\r
+\r
+\r
+[[file:screenshot.png]]\r
diff --git a/Networking/Digital data over analog audio channel/msg2xi.bas b/Networking/Digital data over analog audio channel/msg2xi.bas
new file mode 100644 (file)
index 0000000..45c1c9b
--- /dev/null
@@ -0,0 +1,163 @@
+' Utility that encodes arbitrary text message into 8 bit sound file.
+' This audio can be now transferred over telephone line or recorded to magnetic tape.
+' This program is free software: released under Creative Commons Zero (CC0) license
+' by Svjatoslav Agejenko.
+' Email: svjatoslav@svjatoslav.eu
+' Homepage: http://www.svjatoslav.eu
+'
+' Changelog:
+' 2001, Initial version
+' 2024.09, Improved program readability
+
+DECLARE SUB StartProgram ()
+DECLARE SUB AddIWave ()
+DECLARE SUB AddOWave ()
+DECLARE SUB ByteToSound (soundByte AS SINGLE)
+
+DIM SHARED iwaveArray(1 TO 20)
+DIM SHARED owaveArray(1 TO 41)
+DIM SHARED iwaveData$
+DIM SHARED owaveData$
+DIM SHARED inputFile$
+DIM SHARED outputFile$
+DIM SHARED byte AS STRING * 1
+
+StartProgram
+
+inputFile$ = "input.txt"
+outputFile$ = "sound.xi"
+
+' Open the input and output files for binary access
+OPEN inputFile$ FOR BINARY AS #2
+OPEN outputFile$ FOR BINARY AS #1
+
+' Add data start header/marker to the audio file
+FOR a = 1 TO 50
+    AddIWave
+NEXT a
+AddOWave
+
+' Read each byte from the input file and convert it to sound
+2
+GET #2, , byte
+ByteToSound ASC(byte)
+IF EOF(2) = 0 THEN GOTO 2
+
+' Close the files after processing
+CLOSE #2
+CLOSE #1
+
+PRINT "Encoding of message into sound completed"
+
+SUB ByteToSound (soundByte AS SINGLE)
+' Convert a byte to 8-bit wave sound data
+    soundByte = soundByte + 1
+
+    ' Check if the byte value is greater than 128.
+    ' If yes, set most significant bit to 1, otherwise 0
+    IF soundByte > 128 THEN
+        soundByte = soundByte - 128
+        AddIWave
+    ELSE
+        AddOWave
+    END IF
+
+    ' Check if the byte value is greater than 64 to set next bit
+    IF soundByte > 64 THEN
+        soundByte = soundByte - 64
+        AddIWave
+    ELSE
+        AddOWave
+    END IF
+
+    IF soundByte > 32 THEN
+        soundByte = soundByte - 32
+        AddIWave
+    ELSE
+        AddOWave
+    END IF
+
+    IF soundByte > 16 THEN
+        soundByte = soundByte - 16
+        AddIWave
+    ELSE
+        AddOWave
+    END IF
+
+    IF soundByte > 8 THEN
+        soundByte = soundByte - 8
+        AddIWave
+    ELSE
+        AddOWave
+    END IF
+
+    IF soundByte > 4 THEN
+        soundByte = soundByte - 4
+        AddIWave
+    ELSE
+        AddOWave
+    END IF
+
+    IF soundByte > 2 THEN
+        soundByte = soundByte - 2
+        AddIWave
+    ELSE
+        AddOWave
+    END IF
+
+    ' Check if the byte value is greater than 1
+    IF soundByte > 1 THEN
+        AddIWave
+    ELSE
+        AddOWave
+    END IF
+END SUB
+
+SUB AddIWave
+' Write iwaveData to the output file
+    PUT #1, , iwaveData$
+END SUB
+
+SUB AddOWave
+' Write owaveData to the output file
+    PUT #1, , owaveData$
+END SUB
+
+SUB StartProgram
+' Initialize wave data arrays
+
+    pi = 3.141592653999996#
+
+    ' Generate sine wave values to represent 1
+    b = 0
+    FOR a = pi / 2 TO 2.5 * pi STEP (2 * pi / 20)
+        b = b + 1
+        iwaveArray(b) = SIN(a) * 100
+        IF iwaveArray(b) < 0 THEN
+            iwaveArray(b) = iwaveArray(b) + 255
+        END IF
+    NEXT a
+
+    ' Generate sine wave values to represent 0
+    b = 0
+    FOR a = pi / 2 TO 2.5 * pi STEP (2 * pi / 40)
+        b = b + 1
+        owaveArray(b) = SIN(a) * 100
+        IF owaveArray(b) < 0 THEN
+            owaveArray(b) = owaveArray(b) + 255
+        END IF
+    NEXT a
+
+' Convert wave arrays to string data
+
+    ' Convert iwaveArray to string because strings are more computationally efficient to write into output file.
+    FOR a = 1 TO 20
+        iwaveData$ = iwaveData$ + CHR$(iwaveArray(a))
+    NEXT a
+
+    ' Convert owaveArray to string
+    FOR a = 1 TO 40
+        owaveData$ = owaveData$ + CHR$(owaveArray(a))
+    NEXT a
+
+END SUB
diff --git a/Networking/Digital data over analog audio channel/screenshot.png b/Networking/Digital data over analog audio channel/screenshot.png
new file mode 100755 (executable)
index 0000000..87a3a0a
Binary files /dev/null and b/Networking/Digital data over analog audio channel/screenshot.png differ
diff --git a/Networking/Digital data over analog audio channel/xi2msg.bas b/Networking/Digital data over analog audio channel/xi2msg.bas
new file mode 100644 (file)
index 0000000..caa0b24
--- /dev/null
@@ -0,0 +1,332 @@
+' Utility that decodes text message from 8 bit audio recording.
+' This program is free software: released under Creative Commons Zero (CC0) license
+' by Svjatoslav Agejenko.
+' Email: svjatoslav@svjatoslav.eu
+' Homepage: http://www.svjatoslav.eu
+'
+' Changelog:
+' 2001, Initial version
+' 2024 - 2025, Improved program readability
+'
+' Data is encoded in the audio by using frequency modulation.
+' When decoding data, program locates peaks between waveforms.
+' Then it calculates distance between peaks.
+' Long between peak distance is interpreted as 0 bit, short distance is 1 bit.
+' Bits 0 and 1 are then sequentially added into bytes and complete
+' message is decoded and shown on the screen. In addition, message is written out to
+' the file.
+'
+' Frequency modulation was chosen over amplitude modulation because
+' my tests with cassette tape recorder showed that distortions affect mostly
+' signal amplitude, but do not affect signal frequency that much.
+'
+' Data carrying audio is preceded with special header tone. Program detects header tone
+' and uses it to calculate baseline signal frequency that it will use later to decode bits.
+' Also header allows to mark precise data starting point.
+
+DEFINT A-Y
+DECLARE SUB bysf (a$, d)
+DECLARE SUB messa (a$)
+DECLARE SUB pfo (f, t, it)
+DECLARE SUB anal ()
+DECLARE SUB start ()
+DECLARE SUB iadd ()
+DECLARE SUB oadd ()
+DECLARE SUB byt (a)
+
+DIM SHARED file1$
+DIM SHARED file2$
+
+' Contains the actual audio waveform samples
+DIM SHARED audioBuffer(-100 TO 10000)
+DIM SHARED bus AS STRING * 1000
+DIM SHARED bufi
+DIM SHARED bg
+DIM SHARED sm
+DIM SHARED beg
+DIM SHARED wai
+DIM SHARED old2
+
+' Statistical Analysis Array (contains measured peak distances)
+DIM SHARED statisticalArray(1 TO 10)
+DIM SHARED statl
+DIM SHARED aver
+DIM SHARED byte AS STRING * 1
+DIM SHARED avv
+
+DIM SHARED li
+DIM SHARED oc
+DIM SHARED px
+
+start
+messa "Searching for beginning..."
+
+OPEN "output.txt" FOR BINARY AS #1
+OPEN "sound.xi" FOR BINARY AS #2
+SEEK #2, 360
+
+2
+GET #2, , bus
+FOR a = 1 TO 1000
+    b$ = RIGHT$(LEFT$(bus, a), 1)
+    bufi = bufi + 1
+    c = ASC(b$)
+    IF c > 127 THEN c = c - 255
+    audioBuffer(bufi) = c
+NEXT a
+IF (EOF(2) = 0) AND (bufi < 8000) THEN GOTO 2
+anal
+IF EOF(2) = 0 THEN GOTO 2
+
+CLOSE #2
+CLOSE #1
+
+SYSTEM
+
+SUB anal
+    ' Draw a vertical line to represent the buffer data
+    LINE (1, 170)-(200, 430), 0, BF
+
+    FOR a = 1 TO bufi - (avv - 1)
+        ' Draw horizontal lines at key points
+        LINE (100, 170)-(100, 430), 13
+        LINE (old2 - a + 100, 170)-(old2 - a + 100, 430), 11
+        LINE (0, 300)-(200, 300), 13
+
+        ' Plot the buffer data points
+        FOR b = 0 TO 200
+            PSET (b, audioBuffer(b + a - 101) + 300), 0
+            PSET (b, audioBuffer(b + a - 100) + 300), 14
+        NEXT b
+
+        LINE (old2 - a + 100, 170)-(old2 - a + 100, 430), 0
+
+        ' Calculate the average value of the buffer segment
+        c = 0
+        FOR b = a TO a + (avv - 1)
+            c = c + audioBuffer(b)
+        NEXT b
+        c = c / (avv / 2)
+
+        ' Determine if we are in a high or low state
+        IF c > oc THEN
+            IF li = -1 THEN
+                li = 1
+                pfo a + ((avv - 1) / 2 - 1), 1, oc
+                GOTO 3
+            END IF
+        END IF
+
+        IF c < oc THEN
+            IF li = 1 THEN
+                li = -1
+                pfo a + ((avv - 1) / 2 - 1), 2, oc
+                GOTO 3
+            END IF
+        END IF
+
+    3
+        ' Update the current average value
+        oc = c
+    NEXT a
+
+    ' Shift the buffer data to the left
+    FOR a = bufi - (avv - 2) TO bufi
+        audioBuffer(a - (bufi - (avv - 2)) + 1) = audioBuffer(a)
+    NEXT a
+
+    ' Update the starting index of the buffer
+    old2 = old2 - (bufi - (avv - 2)) + 1
+    bufi = avv - 1
+
+END SUB
+
+SUB bysf (a$, d)
+    ' Draw a horizontal line to represent the byte data
+    LINE (201, 170)-(639, 430), 1, B
+
+    IF d = 10 THEN px = 0: a$ = "": GOTO 5
+
+    px = px + 1
+    IF px > 53 THEN
+        px = 1
+    5
+    DIM tempr(1 TO 32000)
+    GET (201, 186)-(639, 430), tempr(1)
+    PUT (201, 170), tempr(1), PSET
+    LINE (201, 414)-(639, 430), 0, BF
+    END IF
+
+    ' Print the byte data to the screen
+    LOCATE 26, 26 + px
+    PRINT a$
+
+    ' Convert the byte value to a character and write it to the output file
+    byte = CHR$(d)
+    PUT #1, , byte
+
+END SUB
+
+SUB byt (a)
+
+    ' Draw a horizontal line to represent the bit data
+    LINE (410, 0)-(639, 169), 1, B
+
+    statl = statl + 1
+    IF statl > 8 THEN
+        statl = 1
+        b = 0
+        IF statisticalArray(1) = 1 THEN b = b + 128
+        IF statisticalArray(2) = 1 THEN b = b + 64
+        IF statisticalArray(3) = 1 THEN b = b + 32
+        IF statisticalArray(4) = 1 THEN b = b + 16
+        IF statisticalArray(5) = 1 THEN b = b + 8
+        IF statisticalArray(6) = 1 THEN b = b + 4
+        IF statisticalArray(7) = 1 THEN b = b + 2
+        IF statisticalArray(8) = 1 THEN b = b + 1
+
+        ' Print the byte value to the screen
+        LOCATE 10, 69
+        PRINT b
+
+        ' Print the hexadecimal representation of the byte value
+        LOCATE 10, 75
+        PRINT HEX$(b)
+
+        ' Print the character representation of the byte value
+        LOCATE 10, 79
+        c$ = CHR$(b)
+
+        ' Replace control characters with a space
+        IF b = 7 OR b = 8 OR b = 10 OR b = 12 OR b = 13 THEN c$ = " "
+
+        PRINT c$
+
+        bysf c$, b
+
+    DIM tempr(1 TO 10000)
+    GET (410, 16)-(639, 169), tempr(1)
+    PUT (410, 0), tempr(1), PSET
+    LINE (410, 153)-(639, 169), 0, BF
+    END IF
+
+    ' Print the bit value to the screen
+    LOCATE 10, 50 + (statl * 2)
+
+    statisticalArray(statl) = a
+
+    PRINT a
+
+END SUB
+
+SUB messa (a$)
+    ' Draw a horizontal line to represent the message data
+    LINE (0, 0)-(409, 169), 1, B
+
+    DIM tempr(1 TO 20000)
+
+    GET (0, 16)-(409, 169), tempr(1)
+
+    PUT (0, 0), tempr(1), PSET
+
+    LINE (0, 153)-(409, 169), 0, BF
+
+    ' Print the message to the screen
+    LOCATE 10, 1
+
+    PRINT a$
+
+END SUB
+
+SUB pfo (f, t, it)
+    IF t = 2 THEN
+        bg = it
+
+        IF wai > 0 THEN wai = wai - 1
+
+        ' Check if we have found data start header
+        IF (bg - sm > 6) AND (beg = 0) THEN
+            beg = 1
+            wai = 10
+            messa "Beginning point found!"
+        END IF
+
+        ' Perform statistical analysis if needed
+        IF (wai = 0) AND (beg = 1) THEN
+            IF statl = 0 THEN messa "Beginning statistical analyze"
+
+            statl = statl + 1
+
+            IF statl > 10 THEN
+                FOR a = 1 TO 10
+                    aver = aver + statisticalArray(a)
+                NEXT a
+
+                aver = aver * 1.5 / 10
+
+                beg = 2
+
+                statl = 1
+
+                messa "Statistical analyze completed!"
+            END IF
+
+            ' Store the current frame index
+            statisticalArray(statl) = f - old2
+        END IF
+
+        ' Decode the bits if we are in the decoding state
+        IF beg = 2 THEN
+            IF f - old2 >= aver THEN
+                beg = 3
+
+                statl = 0
+
+                FOR a = 1 TO 8
+                    statisticalArray(a) = 0
+                NEXT a
+
+                GOTO 4
+            END IF
+        END IF
+
+        ' Decode the bits based on the current state
+        IF beg = 3 THEN
+            IF f - old2 >= aver THEN
+                byt 0
+            ELSE
+                byt 1
+            END IF
+        END IF
+
+    4
+
+        old2 = f
+    ELSE
+        sm = it
+    END IF
+END SUB
+
+SUB start
+
+    ' Set the screen mode to graphics
+    SCREEN 12
+
+    ' Initialize buffer index and other variables
+    bufi = 0
+
+    beg = 0
+
+    statl = 0
+
+    aver = 0
+
+    px = 0
+
+    avv = 7
+
+    li = 1
+
+    oc = -9999
+
+END SUB
\ No newline at end of file
diff --git a/Networking/LPT communication driver/lptdrv.asm b/Networking/LPT communication driver/lptdrv.asm
new file mode 100644 (file)
index 0000000..599a545
--- /dev/null
@@ -0,0 +1,281 @@
+; Svjatoslav Agejenko\r
+; 2002.08\r
+; compile with FASM - Flat Assembler\r
+\r
+;      TSR driver for LPT1 communication.\r
+;      Functions by INT 63h:\r
+\r
+;        Deactivate\r
+;      AH = 0\r
+\r
+;        Activate\r
+;      AH = 1\r
+\r
+;        Get downloaded data\r
+;      AH = 2\r
+;      ES:DI   - pointer where to place downloaded data\r
+;      on return:\r
+;      AX = Number of bytes downloaded\r
+\r
+;      copies downloaded data from driver input buffers to\r
+;      specified place.        \r
+\r
+;        Upload data\r
+;      AH = 3\r
+;      DS:SI   - pointer for data to be uploaded\r
+;      CX      - amount of bytes to upload \r
+\r
+;      After interrupt, data will be immediately\r
+;      moved to communication driver own output buffer,\r
+;      and sent when line becomes avaiable.\r
\r
+myint = 63h    ; interrupt to hook\r
+upbuf = 5000   ; upload buffer size\r
+downbuf = 5000 ; download buffer size\r
+InPort = 37ah  ; input port, for Parallel Printer Port Control Register\r
+defspd = 3     ; Default communication speed\r
+upbufp = last + downbuf\r
+\r
+\r
+org    100h\r
+\r
+;============================ TSR initialization ====================\r
+\r
+mov    dx, InPort      ; reset line\r
+mov    al, 0\r
+out    dx, al\r
+\r
+mov    ax, 0           ; Saves old interrupt vector\r
+mov    es, ax\r
+mov    eax, [es:32]\r
+mov    [d2], eax       \r
+\r
+cli\r
+mov    ax, cs          ; Set new interrupt vector for IRQ 0\r
+shl    eax, 16\r
+mov    ax, custom\r
+mov    [es:32], eax\r
+mov    ax, int63       ; Set new interrupt vector for INT 63\r
+mov    [es:4 * myint], eax\r
+sti\r
+\r
+\r
+mov     ax, last        ; Calculate needed memory size, begin TSR\r
+add     ax, upbuf + downbuf + 1000\r
+mov     dx, 0\r
+mov     bx, 16\r
+div     bx\r
+mov     dx, ax\r
+mov     ax, 3100h\r
+int     21h\r
+d2     dd 0\r
+\r
+;============================ IRQ 0 handler =========================\r
+\r
+custom:\r
+pushf                  ; Execute default code in old int vector\r
+call   dword [cs:d2]\r
+\r
+;pusha                   ; Write 1 character, for debugging\r
+;mov     ax, 0e01h\r
+;mov     bx, 0\r
+;int     10h\r
+;popa\r
+\r
+inc    byte [cs:tmr]   ; Update timer\r
+\r
+cmp    [cs:progress], 0 ; Check if custom routine is already active\r
+jne    EndOfRoutine\r
+cmp    [cs:enabled], 0 ; Check if driver is enabled\r
+je     EndOfRoutine\r
+\r
+mov    [cs:progress], 1 ; Set active flag\r
+pusha\r
+push   ds\r
+push   es\r
+\r
+mov    dx, InPort\r
+in     al, dx\r
+shl     al, 4\r
+cmp     al, 128\r
+jb      checkdone\r
+\r
+;============================ download data from LPT ================\r
+\r
+mov    ax, cs\r
+mov    es, ax\r
+mov    ds, ax\r
+mov    di, last\r
+add    di, [dbufsiz]\r
+mov    bh, 0\r
+\r
+SkipHeader:\r
+in     al, dx\r
+shl    al, 6\r
+cmp    al, 128\r
+jae    SkipHeader\r
+mov    ah, 255\r
+mov    cx, 0\r
+\r
+SkipBit:\r
+inc    cx\r
+cmp    cx, 30\r
+je     MkHeader\r
+in     al, dx\r
+cmp    al, ah\r
+je     SkipBit\r
+in     al, dx\r
+\r
+mov    cx, 0\r
+mov    ah, al\r
+shr    al, 3\r
+or     al, 254\r
+sub    al, 254\r
+\r
+shl    bl, 1\r
+add    bl, al\r
+inc    bh\r
+cmp    bh, 8\r
+jb     SkipBit\r
+\r
+mov    al, bl\r
+stosb\r
+mov    bh, 0\r
+mov    bl, bh\r
+jmp    SkipBit\r
+\r
+MkHeader:\r
+mov    ax, di\r
+sub    ax, last\r
+sub    ax, [dbufsiz]\r
+stosw\r
+mov    ax, di\r
+sub    ax, last\r
+mov    [dbufsiz], ax\r
+\r
+checkdone:\r
+cmp    word [cs:ubufsiz], 0\r
+je     alldone\r
+\r
+; =========================== send data to LPT ======================\r
+\r
+mov    ax, cs\r
+mov    ds, ax\r
+mov    byte [tmr], 0\r
+\r
+mov    dx, InPort\r
+mov    al, 255\r
+out    dx, al\r
+mov    si, upbufp\r
+mov    cx, [ubufsiz]\r
+\r
+sti\r
+SendHeader:\r
+cmp     byte [tmr], 2\r
+jb     SendHeader\r
+cli\r
+\r
+SendByte:\r
+cmp    cx, 0\r
+je     sent\r
+\r
+mov    bl, 0\r
+lodsb\r
+\r
+SendBit:\r
+push   ax\r
+push   cx\r
+shr    al, 4\r
+or     al, 247\r
+sub    al, 247\r
+mov    bh, bl\r
+or     bh, 254\r
+sub    bh, 254\r
+shl    bh, 1\r
+add    al, bh\r
+\r
+mov    ch, 0\r
+mov    cl, [spd]\r
+WaitForBit:\r
+out    dx, al\r
+loop   WaitForBit\r
+pop    cx\r
+pop    ax\r
+inc    bl\r
+shl    al, 1\r
+cmp    bl, 8\r
+jb     SendBit\r
+\r
+dec    cx\r
+jmp    SendByte\r
+sent:\r
+\r
+mov    al, 0\r
+out    dx, al\r
+mov word [ubufsiz], 0\r
+\r
+\r
+alldone:\r
+pop    es\r
+pop    ds\r
+popa\r
+mov    [cs:progress], 0 ; Terminate active flag\r
+EndOfRoutine:\r
+iret\r
+\r
+progress db 0\r
+enabled db 0\r
+dbufsiz dw 0\r
+ubufsiz dw 0\r
+tmr    db 0\r
+spd    db defspd\r
+\r
+;============================ INT 63h handler =======================\r
+\r
+int63:\r
+cmp    ah, 0\r
+je     set_unactive\r
+cmp    ah, 1\r
+je     set_active\r
+cmp    ah, 2\r
+je     get_data\r
+cmp    ah, 3\r
+je     send_data\r
+jmp    EndOfRoutine\r
+\r
+set_active:\r
+mov    dx, InPort      ; reset line\r
+mov    al, 0\r
+out    dx, al\r
+mov    [cs:enabled], 1\r
+jmp    EndOfRoutine\r
+\r
+set_unactive:\r
+mov    [cs:enabled], 0\r
+jmp    EndOfRoutine\r
+\r
+get_data:\r
+push   ds\r
+mov    ax, cs\r
+mov    ds, ax\r
+mov    si, last\r
+mov    cx, [dbufsiz]\r
+rep    movsb\r
+pop    ds\r
+mov    ax, [cs:dbufsiz]\r
+mov    [cs:dbufsiz], 0\r
+jmp    EndOfRoutine\r
+\r
+send_data:\r
+push   es\r
+mov    dx, cx\r
+mov    bx, cs\r
+mov    es, bx\r
+mov    di, upbufp\r
+add    di, [cs:ubufsiz]\r
+rep    movsb\r
+add    [cs:ubufsiz], dx\r
+pop    es\r
+jmp    EndOfRoutine\r
+\r
+last:\r
diff --git a/Networking/LPT communication driver/lptdrv.com b/Networking/LPT communication driver/lptdrv.com
new file mode 100644 (file)
index 0000000..8abfb4e
Binary files /dev/null and b/Networking/LPT communication driver/lptdrv.com differ
diff --git a/Networking/LPT communication driver/lptdrv.txt b/Networking/LPT communication driver/lptdrv.txt
new file mode 100644 (file)
index 0000000..d276f46
--- /dev/null
@@ -0,0 +1,23 @@
+LPT communications driver\r
+made by Svjatoslav Agejenko\r
+in 2002.08\r
+H-Page: svjatoslav.eu\r
+E-Mail: svjatoslav@svjatoslav.eu\r
\r
+LPTDRV is a memory resident driver for LPT network.\r
+It hooks IRQ 0 and checks ca. 18 times per second LPT status.\r
+If any activity found it reads and decodes recieved data,\r
+and stores it into its 5000 bytes input buffer. It has also\r
+5000 bytes output buffer for sending data.\r
+Applications can communicate with this driver by INT 63h.\r
+see LPTDRV.ASM for more details.\r
+\r
+\r
+Parallel printer port pins 14, 17, 18\r
+must be connected on both computers directly, eg. one to one.\r
+\r
+pin 14 carries syncronisation signal. 0 1 0 1 0 1 ...\r
+pin 17 is used for data input/output.\r
+pin 18 is ground.\r
+\r
+Maximum transfer speed on my computer was ~ 12 Kb/s.\r
diff --git a/Networking/LPT communication driver/test.ASM b/Networking/LPT communication driver/test.ASM
new file mode 100644 (file)
index 0000000..e98e680
--- /dev/null
@@ -0,0 +1,100 @@
+; simple driver test\r
+\r
+org 100h\r
+\r
+mov     ah, 1   ; activate driver\r
+int    63h\r
+\r
+l1:\r
+mov    di, last\r
+mov    ah, 2\r
+int    63h\r
+cmp    ax, 0\r
+je     l2\r
+\r
+cmp    byte [last], 0\r
+jne    l3\r
+call   send4kb\r
+jmp    l2\r
+l3:\r
+\r
+add    ax, last\r
+mov    di, ax\r
+mov    byte [ds:di], 36\r
+\r
+mov    ah, 9\r
+mov    dx, d1\r
+int    21h\r
+\r
+\r
+l2:\r
+\r
+mov     ah, 0bh\r
+int     21h\r
+cmp     al, 0\r
+je      l1\r
+\r
+\r
+mov     ah, 0\r
+int     16h\r
+cmp     al, 27\r
+je      quit\r
+cmp    al, 13\r
+je     send\r
+cmp    al, 32\r
+je     TestSpeed\r
+\r
+jmp     l1\r
+\r
+quit:\r
+mov     ah, 0   ; deactivate driver\r
+int    63h\r
+ret\r
+\r
+send:\r
+mov     cx, d1 - d2\r
+mov    si, d2\r
+mov    ah, 3\r
+int    63h\r
+jmp    l1\r
+\r
+send4kb:\r
+mov    cx, 4096\r
+mov    si, last\r
+mov    ah, 3\r
+int    63h\r
+ret\r
+\r
+TestSpeed:\r
+mov    byte [last], 0\r
+mov     cx, 0\r
+\r
+l5:\r
+push   cx\r
+call   send4kb\r
+l4:\r
+mov     di, last + 1\r
+mov    ah, 2\r
+int    63h\r
+cmp    ax, 0\r
+je      l4\r
+pop    cx\r
+\r
+mov     dx, d3\r
+mov     ah, 9\r
+int     21h\r
+\r
+inc     cx\r
+cmp     cx, 100\r
+jb      l5\r
+\r
+mov     dx, d4\r
+mov     ah, 9\r
+int     21h\r
+jmp    l1\r
+\r
+d3      db '. $'\r
+d4      db 13, 10, 'done', 13, 10, '$'\r
+d2     db 'Quick brown fox jumped over the lazy dogs. 0123456789ABCDEF'\r
+d1     db 13,10,'Data recieved:'\r
+last:\r
diff --git a/Networking/LPT communication driver/test.COM b/Networking/LPT communication driver/test.COM
new file mode 100644 (file)
index 0000000..1a4847f
Binary files /dev/null and b/Networking/LPT communication driver/test.COM differ
diff --git a/Networking/LPT morse.bas b/Networking/LPT morse.bas
new file mode 100755 (executable)
index 0000000..7527ae6
--- /dev/null
@@ -0,0 +1,132 @@
+' Svjatoslav Agejenko\r
+' 2003.02, initial version\r
+' 2024, fixing code readability\r
+\r
+' Program to control radio transmitter over LPT port,\r
+' and send data in morse like code.\r
+\r
+DECLARE SUB sbit (a!)\r
+DECLARE SUB msg (a$)\r
+DECLARE SUB sb (a!)\r
+DECLARE SUB quit ()\r
+DECLARE SUB tone (c!)\r
+DECLARE SUB wai (a!)\r
+DECLARE SUB echo ()\r
+DECLARE SUB lptsend ()\r
+DIM SHARED bit(0 TO 7)\r
+DIM SHARED port\r
+\r
+CLS\r
+port = &H378\r
+echo\r
+\r
+l = 0\r
+1\r
+IF timeStr$ <> TIME$ THEN\r
+    IF l > 60 THEN\r
+        echo\r
+        l = 0\r
+    END IF\r
+    l = l + 1\r
+    timeStr$ = TIME$\r
+END IF\r
+\r
+key$ = INKEY$\r
+IF key$ <> "" THEN quit\r
+GOTO 1\r
+\r
+SUB echo\r
+\r
+bit(5) = 1\r
+lptsend\r
+wai 5\r
+\r
+msg "Hello!"\r
+' msg "Hello, world!"\r
+\r
+wai 1\r
+bit(5) = 0\r
+lptsend\r
+\r
+END SUB\r
+\r
+SUB lptsend\r
+\r
+b = 0\r
+FOR a = 0 TO 7\r
+    b = b * 2\r
+    IF bit(a) > 0 THEN\r
+        b = b + 1\r
+    END IF\r
+NEXT a\r
+\r
+OUT port, b\r
+\r
+END SUB\r
+\r
+SUB msg (message$)\r
+\r
+FOR a = 1 TO LEN(message$)\r
+    char$ = RIGHT$(LEFT$(message$, a), 1)\r
+    sb ASC(char$)\r
+    key$ = INKEY$\r
+    IF key$ <> "" THEN quit\r
+NEXT a\r
+\r
+END SUB\r
+\r
+SUB quit\r
+bit(5) = 0\r
+lptsend\r
+END\r
+END SUB\r
+\r
+SUB sb (asciiVal)\r
+d = asciiVal\r
+c = 128\r
+\r
+FOR b = 0 TO 7\r
+    IF d >= c THEN\r
+        sbit 1\r
+        d = d - c\r
+    ELSE\r
+        sbit 0\r
+    END IF\r
+    c = c / 2\r
+NEXT b\r
+\r
+END SUB\r
+\r
+SUB sbit (value)\r
+IF value = 1 THEN\r
+    tone 0\r
+    tone 0\r
+    tone 1\r
+ELSE\r
+    tone 0\r
+    tone 1\r
+    tone 1\r
+END IF\r
+END SUB\r
+\r
+SUB tone (cValue)\r
+' cValue = 1\r
+PRINT cValue;\r
+FOR a = 1 TO 40\r
+    bit(4) = cValue\r
+    lptsend\r
+    FOR b = 1 TO 500\r
+        NEXT b\r
+    bit(4) = 0\r
+    lptsend\r
+    FOR b = 1 TO 500\r
+        NEXT b\r
+NEXT a\r
+END SUB\r
+\r
+SUB wai (aValue)\r
+FOR b = 1 TO aValue * 10\r
+    SOUND 0, .1\r
+NEXT b\r
+\r
+END SUB
\ No newline at end of file
diff --git a/Networking/LPT pin control.bas b/Networking/LPT pin control.bas
new file mode 100755 (executable)
index 0000000..c7f2cac
--- /dev/null
@@ -0,0 +1,61 @@
+' Program to control voltage on individual LPT port pins.\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2002, Initial version\r
+' 2024.08, Improved program readability\r
+'\r
+' Use keyboard keys 1 - 8 to toggle on/off individual pins.\r
+\r
+DECLARE SUB display ()\r
+DECLARE SUB transmit ()\r
+DIM SHARED bit(1 TO 8)\r
+DIM SHARED printerPort\r
+\r
+printerPort = &H378\r
+FOR a = 1 TO 8\r
+    bit(a) = 0\r
+NEXT a\r
+SCREEN 13\r
+\r
+MainLoop:\r
+display\r
+transmit\r
+keyInput$ = INPUT$(1)\r
+IF VAL(keyInput$) > 0 THEN\r
+    keyValue = VAL(keyInput$)\r
+    IF bit(keyValue) = 0 THEN\r
+        bit(keyValue) = 1\r
+    ELSE\r
+        bit(keyValue) = 0\r
+    END IF\r
+END IF\r
+\r
+GOTO MainLoop\r
+\r
+SUB display\r
+\r
+    ' Display the current status of each pin\r
+    LOCATE 3, 1\r
+    PRINT "  1 2 3 4 5 6 7 8"\r
+\r
+    FOR a = 1 TO 8\r
+        LINE (a * 16, 1)-(a * 16 + 8, 9), bit(a), BF\r
+    NEXT a\r
+\r
+END SUB\r
+\r
+SUB transmit\r
+\r
+    ' Calculate the byte to be sent based on the status of each pin\r
+    outputByte = 0\r
+    FOR a = 1 TO 8\r
+        outputByte = outputByte * 2\r
+        outputByte = outputByte + bit(a)\r
+    NEXT a\r
+\r
+    OUT printerPort, outputByte\r
+END SUB\r
diff --git a/Networking/LPT to COM port data transfer.bas b/Networking/LPT to COM port data transfer.bas
new file mode 100755 (executable)
index 0000000..2896a79
--- /dev/null
@@ -0,0 +1,77 @@
+' This is quite unusual program. It sends data from LPT port (parallel\r
+' printer port) to COM (serial mouse) port. It does it by bit-banging\r
+' the data out of the LPT port. If you connect appropriate wire from\r
+' LPT port output bit (pin #3) to COM port input bit, you can send\r
+' data from LPT to COM.\r
+'\r
+' Note:\r
+' - Ground wire must be connected between LPT and COM ports too.\r
+' - Use this program at your own risk. It may not work on your system or may even damage it.\r
+'\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2002, Initial version\r
+' 2024, Improved program readability\r
+\r
+DEFINT A-Z\r
+DECLARE SUB sendChar (char$)\r
+DIM SHARED port\r
+port = &H378 ' LPT port\r
+\r
+PRINT "Type something. All keyboard strokes will be transmitted."\r
+PRINT "ESC to exit"\r
+\r
+1\r
+inputChar$ = INPUT$(1)\r
+IF inputChar$ = CHR$(27) THEN SYSTEM\r
+PRINT inputChar$;\r
+sendChar inputChar$\r
+GOTO 1\r
+\r
+SUB sendChar (char$)\r
+    ' Convert the character into its ASCII value\r
+    asciiValue = ASC(char$)\r
+\r
+    DIM bitArray(0 TO 8)\r
+    bitArray(0) = 0\r
+    bitArray(8) = 0\r
+\r
+    bValue = 64\r
+    cIndex = 7\r
+2\r
+    ' Convert the ASCII value into a binary representation\r
+    IF asciiValue >= bValue THEN\r
+        bitArray(cIndex) = 1\r
+        asciiValue = asciiValue - bValue\r
+    ELSE\r
+        bitArray(cIndex) = 0\r
+    END IF\r
+\r
+    ' Divide the value by 2 and move to the next bit\r
+    bValue = bValue / 2\r
+    cIndex = cIndex - 1\r
+\r
+    IF cIndex <> 0 GOTO 2\r
+\r
+    ' Send each bit of the character through the LPT port\r
+    FOR a = 0 TO 8\r
+        IF bitArray(a) = 0 THEN\r
+            bValue = 255\r
+        ELSE\r
+            bValue = 0\r
+        END IF\r
+\r
+        ' Adjust this loop based on your system and QBasic interpreter speed\r
+        FOR c = 0 TO 9\r
+            OUT port, bValue\r
+        NEXT c\r
+    NEXT a\r
+\r
+    ' Reset the LPT port to 0 after sending the character\r
+    OUT port, 0\r
+\r
+END SUB\r
diff --git a/Networking/morse.bas b/Networking/morse.bas
new file mode 100755 (executable)
index 0000000..7d8f3b9
--- /dev/null
@@ -0,0 +1,89 @@
+' Plays entered text in morse code audio beeps using PC-speaker.\r
+' This program is free software: released under Creative Commons Zero (CC0) license\r
+' by Svjatoslav Agejenko.\r
+' Email: svjatoslav@svjatoslav.eu\r
+' Homepage: http://www.svjatoslav.eu\r
+'\r
+' Changelog:\r
+' 2003, Initial version\r
+' 2024.08, Improved program readability\r
+\r
+DECLARE SUB say()\r
+DECLARE SUB laus(a$)\r
+DECLARE SUB char(a!)\r
+DIM SHARED mors(0 TO 255, 0 TO 9)\r
+DIM SHARED spd\r
+spd = 1\r
+CLS\r
+\r
+' Open the Morse code file for reading\r
+OPEN "morse.txt" FOR INPUT AS #1\r
+\r
+' Label to read each line from the file\r
+2\r
+IF EOF(1) THEN GOTO 1\r
+LINE INPUT #1, a$\r
+\r
+' Process each character in the current line\r
+FOR b = 1 TO LEN(a$)\r
+    c = ASC(RIGHT$(LEFT$(a$, b), 1))\r
+    IF b = 1 THEN m = c\r
+    IF b > 2 THEN\r
+        d = 0\r
+        IF c = ASC(".") THEN d = 1\r
+        IF c = ASC("-") THEN d = 2\r
+        mors(m, b - 2) = d\r
+    END IF\r
+NEXT b\r
+GOTO 2\r
+\r
+' Label to close the file\r
+1\r
+CLOSE\r
+\r
+' Prompt user for input\r
+PRINT "Type '.bye' to quit"\r
+\r
+' Main loop to read and process user input\r
+3\r
+PRINT ""\r
+INPUT "", a$\r
+IF a$ = ".bye" THEN SYSTEM\r
+laus a$\r
+GOTO 3\r
+\r
+' Subroutine to play Morse code for a single character\r
+SUB char(a)\r
+    PRINT CHR$(a);\r
+\r
+    ' Loop through each part of the Morse code sequence\r
+    FOR b = 0 TO 9\r
+        IF mors(a, b) = 1 THEN\r
+            ' Play short beep for a dot\r
+            SOUND 1000, 1 * spd\r
+            SOUND 0, 1 * spd\r
+        END IF\r
+\r
+        IF mors(a, b) = 2 THEN\r
+            ' Play long beep for a dash\r
+            SOUND 1000, 3 * spd\r
+            SOUND 0, 1 * spd\r
+        END IF\r
+    NEXT b\r
+\r
+    ' Short pause between Morse code characters\r
+    FOR a = 0 TO 160\r
+        SOUND 0, .1\r
+    NEXT a\r
+END SUB\r
+\r
+' Subroutine to process and play Morse code for an entire string\r
+SUB laus(a$)\r
+    ' Loop through each character in the input string\r
+    FOR b = 1 TO LEN(a$)\r
+        c = ASC(RIGHT$(LEFT$(a$, b), 1))\r
+\r
+        ' Call char subroutine to play Morse code for the current character\r
+        char c\r
+    NEXT b\r
+END SUB
\ No newline at end of file
diff --git a/Networking/morse.txt b/Networking/morse.txt
new file mode 100644 (file)
index 0000000..d695202
--- /dev/null
@@ -0,0 +1,36 @@
+a .-\r
+b -...\r
+c -.-.\r
+d -..\r
+e .\r
+f ..-.\r
+g --.\r
+h ....\r
+i ..\r
+j .---\r
+k -.-\r
+l .-..\r
+m --\r
+n -.\r
+o ---\r
+p .--.\r
+q --.-\r
+r .-.\r
+s ...\r
+t -\r
+u ..-\r
+v ...-\r
+w .--\r
+x -..-\r
+y -.--\r
+z --..\r
+0 -----\r
+1 .----\r
+2 ..---\r
+3 ...--\r
+4 ....-\r
+5 .....\r
+6 -....\r
+7 --...\r
+8 ---..\r
+9 ----.
\ No newline at end of file
diff --git a/Tools/Commit and push b/Tools/Commit and push
new file mode 100755 (executable)
index 0000000..057b511
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+cd "${0%/*}"; if [ "$1" != "T" ]; then gnome-terminal -e "'$0' T"; exit; fi;
+
+cd ..
+
+cola
+git push
+
+echo ""
+echo "Press ENTER to close this window."
+read
diff --git a/Tools/Open with IntelliJ IDEA b/Tools/Open with IntelliJ IDEA
new file mode 100755 (executable)
index 0000000..304bf94
--- /dev/null
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+# This script launches IntelliJ IDEA with the current project
+# directory. The script is designed to be run by double-clicking it in
+# the GNOME Nautilus file manager.
+
+# First, we change the current working directory to the directory of
+# the script.
+
+# "${0%/*}" gives us the path of the script itself, without the
+# script's filename.
+
+# This command basically tells the system "change the current
+# directory to the directory containing this script".
+
+cd "${0%/*}"
+
+# Then, we move up one directory level.
+# The ".." tells the system to go to the parent directory of the current directory.
+# This is done because we assume that the project directory is one level up from the script.
+cd ..
+
+# Now, we use the 'setsid' command to start a new session and run
+# IntelliJ IDEA in the background. 'setsid' is a UNIX command that
+# runs a program in a new session.
+
+# The command 'idea .' opens IntelliJ IDEA with the current directory
+# as the project directory.  The '&' at the end is a UNIX command that
+# runs the process in the background.  The '> /dev/null' part tells
+# the system to redirect all output (both stdout and stderr, denoted
+# by '&') that would normally go to the terminal to go to /dev/null
+# instead, which is a special file that discards all data written to
+# it.
+
+setsid idea . &>/dev/null &
+
+# The 'disown' command is a shell built-in that removes a shell job
+# from the shell's active list. Therefore, the shell will not send a
+# SIGHUP to this particular job when the shell session is terminated.
+
+# '-h' option specifies that if the shell receives a SIGHUP, it also
+# doesn't send a SIGHUP to the job.
+
+# '$!' is a shell special parameter that expands to the process ID of
+# the most recent background job.
+disown -h $!
+
+
+sleep 2
+
+# Finally, we use the 'exit' command to terminate the shell script.
+# This command tells the system to close the terminal window after
+# IntelliJ IDEA has been opened.
+exit
diff --git a/Tools/Update web site b/Tools/Update web site
new file mode 100755 (executable)
index 0000000..13994de
--- /dev/null
@@ -0,0 +1,55 @@
+#!/bin/bash
+cd "${0%/*}"; if [ "$1" != "T" ]; then gnome-terminal -e "'$0' T"; exit; fi;
+cd ..
+
+# Function to export org to html using emacs in batch mode
+export_org_to_html() {
+    local dir=$1
+    if [ -d "$dir" ]; then
+        (
+            cd "$dir" || return 1
+            if [ -f "index.html" ]; then
+                rm -f index.html
+            fi
+            if [ -f "index.org" ]; then
+                emacs --batch -l ~/.emacs --visit=index.org --funcall=org-html-export-to-html --kill
+            else
+                echo "Warning: index.org not found in $dir"
+            fi
+        )
+    else
+        echo "Warning: Directory $dir not found, skipping..."
+    fi
+}
+
+
+# Export org to html for the main index
+export_org_to_html "."
+
+# 2D graphics
+export_org_to_html "2D GFX/Animations"
+export_org_to_html "2D GFX/Fractals"
+export_org_to_html "2D GFX/Spirals"
+export_org_to_html "2D GFX/Textures"
+
+export_org_to_html "3D GFX/3D Synthezier/doc"
+export_org_to_html "3D GFX/Miscellaneous"
+export_org_to_html "3D GFX/Space"
+
+# Upload project homepage to the server.
+rsync -avz --delete  -e 'ssh -p 10006' ./ \
+      --include="*/" \
+      --include="*.html" \
+      --include="*.png" \
+      --include="*.bas" \
+      --include="*.dat" \
+      --include="*.webm" \
+      --include="*.jpeg" \
+      --include="*.blend" \
+      --exclude="*" \
+      n0@www3.svjatoslav.eu:/mnt/big/projects/qbasicapps/
+
+
+echo ""
+echo "Press ENTER to close this window."
+read
diff --git a/Tutorial/Group 1/00.bas b/Tutorial/Group 1/00.bas
new file mode 100755 (executable)
index 0000000..fc62f12
--- /dev/null
@@ -0,0 +1,10 @@
+' This program demonstrates a basic "Hello World" example in QuickBasic.
+' It is designed to be simple and easy to understand for novice programmers.
+
+' The following line prints a greeting message to the console.
+PRINT "Hello world!"
+
+' When you run this program, it will output the string "Hello world!" to the screen.
+' This is a traditional first step in learning any new programming language.
+
+' To execute this program, press F5 while in the QuickBasic editor environment.
diff --git a/Tutorial/Group 1/01.bas b/Tutorial/Group 1/01.bas
new file mode 100755 (executable)
index 0000000..0760259
--- /dev/null
@@ -0,0 +1,24 @@
+' This QuickBasic program demonstrates basic arithmetic operations
+' and the use of variables. It will perform a series of calculations
+' on a single variable and print the results after each operation.
+
+CLS ' Clears the screen to provide a clean output area
+
+' Initialize a variable with the value 3
+DIM initialValue AS INTEGER
+initialValue = 3
+
+' Print the current value of initialValue
+PRINT "The initial value is: "; initialValue
+
+' Perform multiplication and assign the result back to initialValue
+initialValue = initialValue * 2
+
+' Print the new value after multiplication
+PRINT "After doubling, the value is: "; initialValue
+
+' Perform subtraction and decrease initialValue by 1
+initialValue = initialValue - 1
+
+' Print the final value after subtraction
+PRINT "After decrementing by 1, the value is: "; initialValue
diff --git a/Tutorial/Group 1/02.bas b/Tutorial/Group 1/02.bas
new file mode 100755 (executable)
index 0000000..ccf5019
--- /dev/null
@@ -0,0 +1,21 @@
+' This program demonstrates basic arithmetic operations in QuickBasic
+
+CLS ' Clears the screen to provide a clean output area
+
+' Declare a variable 'a' and assign it the value of 7
+DIM a AS INTEGER
+a = 7
+
+' Print the current value of 'a' to the console
+PRINT "The value contained in variable 'a' is: "; a
+
+' Perform a series of arithmetic operations on the value of 'a'
+' and print the result
+PRINT "Performing some calculations with 'a':";
+PRINT (a + 2.1234) / 3 * 4 - 6
+
+' Explanation of the calculation:
+' 1. Add 2.1234 to 'a'
+' 2. Divide the result by 3
+' 3. Multiply the new result by 4
+' 4. Subtract 6 from the final result
diff --git a/Tutorial/Group 1/03.bas b/Tutorial/Group 1/03.bas
new file mode 100755 (executable)
index 0000000..6f6cebe
--- /dev/null
@@ -0,0 +1,34 @@
+' This program demonstrates how to use semicolon and comma as separators\r
+' in PRINT statements within Microsoft QuickBasic.\r
+\r
+CLS ' Clears the screen before starting the program\r
+\r
+' Semicolon Separator Example\r
+\r
+' The semicolon is used to print multiple items on the same line, without\r
+' advancing to a new line after each item. It is useful for formatting output\r
+' in a single line of text.\r
+\r
+PRINT "Semicolon separator:"\r
+PRINT 12; 314; 122; 1; 43      ' Prints numbers separated by semicolons on the same line\r
+PRINT 312; 4; 1; 3111; 3       ' Continues printing more numbers on the next line\r
+PRINT 3; 2344; 12231; 1; 12333 ' Final set of numbers printed on the last line\r
+\r
+' Print an empty line for better readability\r
+PRINT ' This statement prints an empty line to separate different sections\r
+\r
+' Comma Separator Example\r
+\r
+' The comma is used as a separator in PRINT statements to print multiple items,\r
+' each followed by a space and advancing to the next tab column (default is 14\r
+' characters apart). If there are more items than columns, it will start\r
+' a new line.\r
+\r
+PRINT "Comma separator:"\r
+PRINT 12, 314, 122, 1, 43      ' Prints numbers separated by commas, with spacing\r
+PRINT 312, 4, 1, 3111, 3       ' Numbers are printed in tabular form\r
+PRINT 3, 2344, 12231, 1, 12333 ' Continues the tabular output\r
+\r
+' End of program\r
+END ' This statement marks the end of the QuickBasic program\r
+\r
diff --git a/Tutorial/Group 1/04.bas b/Tutorial/Group 1/04.bas
new file mode 100755 (executable)
index 0000000..dd1a43d
--- /dev/null
@@ -0,0 +1,17 @@
+' This program prompts the user to enter a number and then prints that number back to the screen.
+' It demonstrates basic input/output operations in QuickBasic.
+
+DEFINT A-Z ' Declare all variables as integers for simplicity
+
+' Declare a variable to store the user's input
+DIM num AS INTEGER
+
+' Use the INPUT statement to prompt the user and read their input
+PRINT "Please enter a number:";
+INPUT num
+
+' Print a message to the screen along with the entered number
+PRINT "You entered: "; num
+
+' End of program
+END
diff --git a/Tutorial/Group 1/05.bas b/Tutorial/Group 1/05.bas
new file mode 100755 (executable)
index 0000000..5d56b0c
--- /dev/null
@@ -0,0 +1,26 @@
+REM **** Guess a Number Game ****
+
+DEFINT A-Z ' Define all variables as integers for performance and clarity
+
+' Main game loop
+DO
+    ' Prompt the user to enter a number
+    INPUT "Enter a number between 1 and 10: "; guess
+
+    ' Check if the user guessed the correct number
+    IF guess = 5 THEN
+        ' If the guess is correct, congratulate the user and exit the loop
+        PRINT "Correct!!! You've guessed the secret number."
+        EXIT DO
+    ELSEIF guess < 5 THEN
+        ' If the guess is too low, prompt the user to try a higher number
+        PRINT "Try a bigger number."
+    ELSEIF guess > 5 THEN
+        ' If the guess is too high, prompt the user to try a lower number
+        PRINT "Try a smaller number."
+    END IF
+LOOP
+
+' End of the program
+PRINT "Thank you for playing! Goodbye."
+END
diff --git a/Tutorial/Group 1/06.bas b/Tutorial/Group 1/06.bas
new file mode 100755 (executable)
index 0000000..4237cf8
--- /dev/null
@@ -0,0 +1,22 @@
+CLS ' Clear the screen
+
+' This program demonstrates a simple counting loop in QuickBasic.
+' It will print the current value of 'a' and increment it by 1 each time.
+' The loop continues until 'a' is no longer less than 10.
+
+DIM a AS INTEGER ' Declare variable 'a' as an integer
+
+' Initialize the counter variable 'a' to start at 1
+a = 1
+
+' Start of the counting loop
+DO WHILE a < 10
+    ' Print the current value of 'a' with a label
+    PRINT "current:"; a
+
+    ' Increment 'a' by 1
+    a = a + 1
+LOOP
+
+' The program will end after the loop finishes
+END
diff --git a/Tutorial/Group 1/07.bas b/Tutorial/Group 1/07.bas
new file mode 100755 (executable)
index 0000000..9bb214b
--- /dev/null
@@ -0,0 +1,12 @@
+' This program demonstrates a simple FOR loop in Microsoft QuickBasic
+
+CLS ' Clears the screen, preparing it for output
+
+' We are about to use a FOR loop to print numbers from 1 to 10
+FOR i = 1 TO 10 ' Initialize a counter variable 'i' starting at 1
+    ' For each iteration of the loop, print the current value of 'i'
+    PRINT "current: "; i ' Outputs the message with the current number
+NEXT i ' Increment 'i' by 1 and repeat the loop until 'i' is no longer less than or equal to 10
+
+' The program has now finished executing and will end
+END ' This marks the end of the QuickBasic program
diff --git a/Tutorial/Group 1/08.bas b/Tutorial/Group 1/08.bas
new file mode 100755 (executable)
index 0000000..8df64b6
--- /dev/null
@@ -0,0 +1,23 @@
+' This program demonstrates how to use a FOR loop and the SOUND statement
+' in QuickBasic. It plays a series of tones at increasing frequencies
+' from 100 Hz to 1000 Hz, in steps of 50 Hz, with each tone lasting for
+' one duration unit as defined by the SOUND statement.
+
+CLS ' Clears the screen before starting the program
+
+' Initialize the frequency variable to the starting value
+LET frequency = 100
+
+' Loop from the initial frequency (100 Hz) to the maximum frequency (1000 Hz),
+' increasing by 50 Hz on each iteration
+FOR frequency = 100 TO 1000 STEP 50
+    ' Print the current frequency value to the console
+    PRINT "Current Frequency:"; frequency; " Hz"
+
+    ' Play a sound at the specified frequency and duration
+    ' The SOUND statement takes two arguments: frequency and duration
+    SOUND frequency, 1 ' The duration is set to 1 (shortest possible sound)
+NEXT frequency
+
+' End of program execution
+END
diff --git a/Tutorial/Group 1/09.bas b/Tutorial/Group 1/09.bas
new file mode 100755 (executable)
index 0000000..1b96f04
--- /dev/null
@@ -0,0 +1,22 @@
+REM This program demonstrates how to generate random numbers\r
+REM and use them to create sound effects in QuickBasic.\r
+\r
+CLS ' Clear the screen before starting the program\r
+\r
+' Define constants for the range of random numbers\r
+FOR i = 1 TO 20 ' Loop 20 times to generate and play 20 random sounds\r
+    ' Generate a random floating-point number between LOWER_BOUND and UPPER_BOUND\r
+    n = RND * 1000\r
+    ' Print the generated random number to the screen\r
+    PRINT "Random number: "; n\r
+\r
+    ' Play a sound with a frequency based on the random number\r
+    ' The QuickBasic SOUND statement takes two arguments: frequency and duration\r
+    ' We add 40 to the random number to shift the frequency range\r
+    ' so that it is more audible\r
+    SOUND n + 40, 1 ' Play the sound for a short duration (1/89th of a second)\r
+\r
+NEXT i\r
+\r
+END ' End the program\r
+\r
diff --git a/Tutorial/Group 1/10.bas b/Tutorial/Group 1/10.bas
new file mode 100755 (executable)
index 0000000..ab4120b
--- /dev/null
@@ -0,0 +1,25 @@
+' This example program demonstrates how to use the WIDTH and COLOR\r
+' statements in QuickBasic to change the text font size and text colors.\r
+\r
+' Set the text window to a smaller font size suitable for displaying\r
+' 50 lines of text within an 80-column width.\r
+WIDTH 80, 50\r
+\r
+' Define constants for the number of colors available in standard\r
+' QuickBasic color palette.\r
+CONST NumColors = 32\r
+\r
+' Loop through all possible colors (0 to 31) and display a message\r
+' with each color to illustrate the different text color options.\r
+FOR colorIndex = 0 TO NumColors - 1\r
+    ' Set the current text color using the COLOR statement.\r
+    ' Colors range from 0 to 15 are solid, while colors 16 to 31\r
+    ' will blink slowly or quickly depending on the terminal.\r
+    COLOR colorIndex\r
+\r
+    ' Print a message indicating which color number is currently being used.\r
+    ' Note that color numbers 16 and above will produce blinking text.\r
+    PRINT "This is text color number "; colorIndex; "."\r
+\r
+NEXT colorIndex\r
+\r
diff --git a/Tutorial/Group 1/11.bas b/Tutorial/Group 1/11.bas
new file mode 100755 (executable)
index 0000000..e6f69e6
--- /dev/null
@@ -0,0 +1,27 @@
+' This program demonstrates how to use the COLOR statement and LOCATE function
+' in Microsoft QuickBasic to change the text color and cursor position
+' on the console screen.
+
+CLS ' Clears the screen before starting
+
+' Set the text color to yellow (color code 14) and position the cursor
+' at row 1, column 50. Then print a message at that location.
+COLOR 14
+LOCATE 1, 50 ' Sets the cursor location to <row=1, column=50>
+PRINT "Yellow text at 1, 50"
+
+' Change the text color to pink (color code 12) and move the cursor
+' to row 6, column 5. Print a message with the new color and position.
+COLOR 12
+LOCATE 6, 5 ' Sets the cursor location to <row=6, column=5>
+PRINT "Pink text at 6, 5"
+
+' Update the text color to green (color code 10) and set the cursor
+' to row 20, column 40. Display a message at this new location.
+COLOR 10
+LOCATE 20, 40 ' Sets the cursor location to <row=20, column=40>
+PRINT "Green text at 20, 40"
+
+' The program finishes execution here. Users can add more statements
+' below this line to experiment with different colors and positions.
+END ' End of the program
diff --git a/Tutorial/Group 1/12.bas b/Tutorial/Group 1/12.bas
new file mode 100755 (executable)
index 0000000..3aa9c36
--- /dev/null
@@ -0,0 +1,24 @@
+' This program demonstrates the use of FOR loops, color manipulation,
+' and string output in QuickBasic. It also shows how to prevent the
+' cursor from moving to a new line after printing a string.
+
+CLS ' Clears the screen before starting the program
+
+' The first loop demonstrates changing text colors using the COLOR statement
+' inside a FOR loop, which iterates from 1 to 15 (the number of available
+' color attributes in QuickBasic).
+FOR ColorIndex = 1 TO 15
+    COLOR ColorIndex ' Set the current text color to the loop index
+    PRINT "This is a test" ' Print the string with the new color
+NEXT ColorIndex
+
+PRINT ' Print a blank line for better readability
+
+' The second loop does the same as the first one, but it uses a semicolon
+' at the end of the PRINT statement to prevent the cursor from moving
+' to the start of a new line after each string output. This results in
+' all strings being printed on the same line.
+FOR ColorIndex = 1 TO 15
+    COLOR ColorIndex ' Change the text color for each iteration
+    PRINT "This is a test"; ' Print the string and keep the cursor on the same line
+NEXT ColorIndex
diff --git a/Tutorial/Group 1/13.bas b/Tutorial/Group 1/13.bas
new file mode 100755 (executable)
index 0000000..c778556
--- /dev/null
@@ -0,0 +1,19 @@
+' This example QuickBasic program demonstrates the difference between
+' normal division and integer division with rounding.
+
+CLS                       ' Clears the screen to provide a clean output area
+
+' Perform normal division which results in a floating-point number
+' and print the result
+PRINT "Normal division (70 / 4):"; 70 / 4
+
+' Explain the use of backslash (\) for integer division with rounding
+' Perform integer division with rounding and print the result
+PRINT "Integer division with rounding (70 \ 4):"; 70 \ 4
+
+' Provide a brief conclusion to summarize what was demonstrated
+PRINT
+PRINT "In QuickBasic, '/' performs normal division, while '\' does integer division"
+PRINT "and rounds the result to the nearest whole number."
+
+END                       ' End of program
diff --git a/Tutorial/Group 1/15.bas b/Tutorial/Group 1/15.bas
new file mode 100755 (executable)
index 0000000..242c221
--- /dev/null
@@ -0,0 +1,18 @@
+' This program demonstrates the use of nested FOR loops in QuickBasic\r
+' to draw a simple pattern on the screen.\r
+\r
+CLS ' Clears the screen and prepares for output\r
+\r
+' Outer loop will run 15 times, representing rows\r
+FOR row = 1 TO 15\r
+\r
+    ' Inner loop will run 60 times, representing columns within each row\r
+    FOR column = 1 TO 60\r
+        PRINT "#"; ' Print a '#' character followed by no space to create a continuous line\r
+    NEXT column\r
+\r
+    ' After completing one row, print a newline character to move to the next line\r
+    PRINT\r
+\r
+NEXT row\r
+\r
diff --git a/Tutorial/Group 1/16.bas b/Tutorial/Group 1/16.bas
new file mode 100755 (executable)
index 0000000..71f1eaf
--- /dev/null
@@ -0,0 +1,34 @@
+' QuickBasic example program to demonstrate the use of nested loops
+' and how to control the flow of a loop using the STEP keyword.
+
+CLS ' Clears the screen before starting the program
+
+' This outer loop will iterate from 1 to 10
+FOR b = 1 TO 10
+    ' The inner loop will print "A" b times, where b is the current
+    ' value of the outer loop iterator
+    FOR a = 1 TO b
+        PRINT "A"; ' Print "A" followed by a semicolon to prevent newline
+    NEXT a
+
+    ' After each inner loop iteration, print a newline to start the next line
+    PRINT
+NEXT b
+
+' Print a blank line to separate the two parts of the demonstration
+PRINT
+
+' This outer loop will iterate from 60 to 0, decrementing by 8 each time
+FOR b = 60 TO 0 STEP -8
+    ' The inner loop will print "B" b times, where b is the current
+    ' value of the outer loop iterator
+    FOR a = 1 TO b
+        PRINT "B"; ' Print "B" followed by a semicolon to prevent newline
+    NEXT a
+
+    ' After each inner loop iteration, print a newline to start the next line
+    PRINT
+NEXT b
+
+' End of the program
+END
diff --git a/Tutorial/Group 1/17.bas b/Tutorial/Group 1/17.bas
new file mode 100755 (executable)
index 0000000..b5e5f35
--- /dev/null
@@ -0,0 +1,31 @@
+' This example QuickBasic program demonstrates how to use the built-in
+' timer, as well as how to display the current system time and date.
+' It also shows a simple loop structure and the use of the CLS statement
+' to clear the screen.
+
+' To stop the program, press CTRL + PAUSE/BREAK.
+
+DO
+    ' Clear the screen to provide a clean display for each iteration.
+    CLS
+
+    ' Retrieve and print the current value of the system timer.
+    ' The TIMER function returns the number of seconds that have
+    ' elapsed since midnight, not counting leap seconds.
+    PRINT "System Timer: "; TIMER; " seconds since midnight."
+
+    ' Retrieve and print the current system time using TIME$.
+    ' TIME$ returns a string in the format "HH:MM:SS".
+    PRINT "Current System Time: "; TIME$; "."
+
+    ' Retrieve and print the current system date using DATE$.
+    ' DATE$ returns a string in the format "M/D/YYYY" or "DD/MM/YYYY"
+    ' depending on regional settings.
+    PRINT "Current System Date: "; DATE$; "."
+
+    ' Pause for a moment to allow the user to see the output before
+    ' it is cleared again in the next iteration of the loop.
+    ' The Sleep statement requires including the QB.BI library.
+    SLEEP 1
+
+LOOP
diff --git a/Tutorial/Group 1/18.bas b/Tutorial/Group 1/18.bas
new file mode 100755 (executable)
index 0000000..0aec40a
--- /dev/null
@@ -0,0 +1,31 @@
+' This example program demonstrates the use of the RND function
+' to generate random numbers in Microsoft QuickBasic.
+
+' Clear the screen before starting the program
+CLS
+
+' The first loop will print ten random numbers. However, these
+' numbers may not seem truly random because the random number
+' generator needs to be seeded with a varying value.
+
+PRINT "First group of 'random' numbers without seeding:"
+FOR b = 1 TO 10
+    PRINT RND
+NEXT b
+
+' Print an empty line for better readability between the two groups
+PRINT
+
+' Seed the random number generator using the TIMER function, which
+' returns the number of seconds since midnight. This ensures that
+' subsequent calls to RND will yield different sequences of numbers
+' each time the program is run after being restarted.
+RANDOMIZE TIMER
+PRINT "Second group of truly random numbers with seeding:"
+
+' Now, print another ten random numbers after seeding the generator
+FOR b = 1 TO 10
+    PRINT RND
+NEXT b
+
+' End of program
diff --git a/Tutorial/Group 1/19.bas b/Tutorial/Group 1/19.bas
new file mode 100755 (executable)
index 0000000..536364b
--- /dev/null
@@ -0,0 +1,31 @@
+' This program demonstrates how to use the QuickBasic functions RND (random number generator),\r
+' COLOR (sets text and background color), LOCATE (positions the cursor on the screen), PRINT (displays text),\r
+' SOUND (generates a tone through the PC speaker)\r
+\r
+CLS ' Clears the screen before starting the program\r
+\r
+' Generate random coordinates (x, y) for text placement on the screen\r
+' and a random color (c) for the text.\r
+' The screen has 80 columns (0-79) and 25 lines (0-24), but we start counting from 1.\r
+\r
+\r
+' INKEY$ returns a string containing any keystroke; if no key is pressed, it returns an empty string\r
+DO WHILE INKEY$ = ""\r
+    x = INT(RND * 80) + 1  ' Random column, ensuring it is within the screen width\r
+    y = INT(RND * 25) + 1  ' Random line, ensuring it is within the screen height\r
+    c = INT(RND * 16)      ' Random color index (0-15), where 0 is black and 15 is white\r
+\r
+    ' Set the text color to the randomly chosen color\r
+    COLOR c\r
+\r
+    ' Position the cursor at the random coordinates\r
+    LOCATE y, x\r
+\r
+    ' Print an "x" character at the current cursor position\r
+    PRINT "x"; ' The semicolon prevents advancing to the next line\r
+\r
+    ' Generate a sound with a frequency based on the x coordinate and a duration of 0.1 seconds\r
+    SOUND x * 100 + 100, 1\r
+\r
+LOOP\r
+\r
diff --git a/Tutorial/Group 2/01.bas b/Tutorial/Group 2/01.bas
new file mode 100755 (executable)
index 0000000..d3f31ae
--- /dev/null
@@ -0,0 +1,38 @@
+CLS
+
+' This program demonstrates how to use the SOUND statement in QuickBasic
+' to play tones with varying frequency and duration.
+
+' Play a sequence of tones with increasing frequency
+' Each tone has a fixed duration of 2 time units
+PRINT "Playing tones with increasing frequency:"
+SOUND 1000, 2          ' Play a tone at 1000 Hz for 2 time units
+SOUND 2000, 2          ' Play a tone at 2000 Hz for 2 time units
+SOUND 3000, 2          ' Play a tone at 3000 Hz for 2 time units
+
+' Wait for 10 time units to create a pause
+PRINT "Pausing for 10 time units..."
+SOUND 0, 10            ' Pause for 10 time units (silence)
+
+' Play a sequence of tones with a fixed frequency
+' Each tone has an increasing duration
+PRINT "Playing tones with fixed frequency and increasing length:"
+SOUND 1000, 1          ' Play a tone at 1000 Hz for 1 time unit
+SOUND 0, 10            ' Pause for 10 time units (silence)
+
+SOUND 1000, 2          ' Play a tone at 1000 Hz for 2 time units
+SOUND 0, 10            ' Pause for 10 time units (silence)
+
+SOUND 1000, 4          ' Play a tone at 1000 Hz for 4 time units
+SOUND 0, 10            ' Pause for 10 time units (silence)
+
+SOUND 1000, 8          ' Play a tone at 1000 Hz for 8 time units
+SOUND 0, 10            ' Pause for 10 time units (silence)
+
+' Notes:
+' - The SOUND statement takes two arguments: frequency and duration.
+' - Frequency is specified in Hertz (Hz), and duration is specified in time units.
+' - A frequency of 0 results in silence, which can be used to create pauses.
+' - Time units are not precisely defined by QuickBasic and may vary depending
+'   on the hardware and system configuration. They provide a relative measure
+'   for timing musical tones.
diff --git a/Tutorial/Group 2/02.bas b/Tutorial/Group 2/02.bas
new file mode 100755 (executable)
index 0000000..4495c79
--- /dev/null
@@ -0,0 +1,26 @@
+' Simple Sound Sweep Program\r
+\r
+' Start label for infinite loop\r
+beginLoop:\r
+\r
+' Increase speed on each pass - this controls how quickly frequencies change\r
+speed = speed + 1\r
+\r
+' Show current speed multiplier to user\r
+PRINT speed; "x"\r
+\r
+' Forward frequency sweep from 100Hz to 1000Hz\r
+FOR currentFrequency = 100 TO 1000 STEP speed\r
+  ' Create sound with current frequency for 0.1 seconds\r
+  ' SOUND format: SOUND frequency, duration\r
+  SOUND currentFrequency, .1\r
+NEXT currentFrequency\r
+\r
+' Reverse frequency sweep from 1000Hz to 100Hz\r
+FOR currentFrequency = 1000 TO 100 STEP -speed\r
+  ' Create sound with current frequency for 0.1 seconds\r
+  SOUND currentFrequency, .1\r
+NEXT currentFrequency\r
+\r
+' Jump back to beginning for continuous effect\r
+GOTO beginLoop\r
diff --git a/Tutorial/Group 2/03.bas b/Tutorial/Group 2/03.bas
new file mode 100755 (executable)
index 0000000..c2bba1e
--- /dev/null
@@ -0,0 +1,16 @@
+' This program demonstrates basic user input and string manipulation in QuickBasic.
+' It greets the user by name and asks how they are doing, using colors to enhance the output.
+
+CLS ' Clears the screen to provide a clean start for the program.
+
+' Prompt the user for their name and store it in a variable called userName$.
+INPUT "Hi, what is your name: ", userName$
+
+' Set the text color to a bright green (color code 10) for a pleasant visual effect.
+COLOR 10
+
+' Greet the user by printing "Hello" followed by their name and an exclamation mark.
+PRINT "Hello " + userName$ + "!"
+
+' Ask the user how they are doing by appending their name to the question.
+PRINT userName$ + ", how are you?"
diff --git a/Tutorial/Group 2/04.bas b/Tutorial/Group 2/04.bas
new file mode 100755 (executable)
index 0000000..2ef6a57
--- /dev/null
@@ -0,0 +1,13 @@
+CLS\r
+\r
+' Initialize the string variable with "-two-"\r
+stringValue$ = "-two-"\r
+PRINT stringValue$\r
+\r
+' Append "three" to the existing string\r
+stringValue$ = stringValue$ + "three"\r
+PRINT stringValue$\r
+\r
+' Prepend "one" to the string to form a complete sequence\r
+stringValue$ = "one" + stringValue$\r
+PRINT stringValue$\r
diff --git a/Tutorial/Group 2/05.bas b/Tutorial/Group 2/05.bas
new file mode 100755 (executable)
index 0000000..031f8d4
--- /dev/null
@@ -0,0 +1,52 @@
+CLS
+
+' This program creates a simple text-based box in the console window.
+' The user specifies the horizontal and vertical size of the box within
+' certain constraints to ensure it fits on the screen.
+
+' Prompt the user for the horizontal size of the box (between 2 and 79)
+INPUT "Enter the Horizontal Size of the Box (2 to 79): ", hs
+
+' Validate the horizontal size input
+WHILE hs < 2 OR hs > 79
+    PRINT "Invalid input. Please enter a number between 2 and 79."
+    INPUT "Enter the Horizontal Size of the Box (2 to 79): ", hs
+WEND
+
+' Prompt the user for the vertical size of the box (between 2 and 23)
+INPUT "Enter the Vertical Size of the Box (2 to 23): ", vs
+
+' Validate the vertical size input
+WHILE vs < 2 OR vs > 23
+    PRINT "Invalid input. Please enter a number between 2 and 23."
+    INPUT "Enter the Vertical Size of the Box (2 to 23): ", vs
+WEND
+
+' Draw the top line of the box
+FOR i = 1 TO hs
+    PRINT "#";
+NEXT i
+PRINT
+
+' Draw the middle section of the box
+FOR y = 1 TO vs - 2
+    ' Print the left side of the box
+    PRINT "#";
+
+    ' Print the interior of the box
+    FOR i = 1 TO hs - 2
+        PRINT ".";
+    NEXT i
+
+    ' Print the right side of the box
+    PRINT "#"
+NEXT y
+
+' Draw the bottom line of the box
+FOR i = 1 TO hs
+    PRINT "#";
+NEXT i
+PRINT
+
+' The program has finished drawing the box and now ends
+END
diff --git a/Tutorial/Group 2/06.bas b/Tutorial/Group 2/06.bas
new file mode 100755 (executable)
index 0000000..d7f192d
--- /dev/null
@@ -0,0 +1,5 @@
+' several commans may be at the single line, when separated by colon.\r
+\r
+1 a = a + 1: PRINT a; "x 7 ="; a * 7: IF a < 10 THEN GOTO 1\r
+\r
+\r
diff --git a/Tutorial/Group 2/07.bas b/Tutorial/Group 2/07.bas
new file mode 100755 (executable)
index 0000000..afe3d37
--- /dev/null
@@ -0,0 +1,36 @@
+REM This program demonstrates basic input/output and conditional logic in QuickBasic.
+REM It prompts the user to enter a number and then evaluates that number
+REM with respect to the value 5 using various comparison operators.
+
+PRINT "Please enter a number:"
+INPUT n
+
+REM Check if the number is less than 5
+IF n < 5 THEN
+    PRINT "The number you entered is smaller than 5."
+END IF
+
+REM Check if the number is greater than 5
+IF n > 5 THEN
+    PRINT "The number you entered is greater than 5."
+END IF
+
+REM Check if the number is exactly equal to 5
+IF n = 5 THEN
+    PRINT "The number you entered is equal to 5."
+END IF
+
+REM Check if the number is less than or equal to 5
+IF n <= 5 THEN
+    PRINT "The number you entered is 5, or less."
+END IF
+
+REM Check if the number is greater than or equal to 5
+IF n >= 5 THEN
+    PRINT "The number you entered is 5, or greater."
+END IF
+
+REM Check if the number is not equal to 5
+IF n <> 5 THEN
+    PRINT "The number you entered is not 5."
+END IF
diff --git a/Tutorial/Group 2/08.bas b/Tutorial/Group 2/08.bas
new file mode 100755 (executable)
index 0000000..930bea8
--- /dev/null
@@ -0,0 +1,80 @@
+CLS
+
+' This program simulates a login prompt for a nuclear rocket control system.
+' It asks the user to enter a password and checks if the entered password is correct.
+' If the password is incorrect, it prompts the user again.
+
+' Define a constant for the correct password for better security practices
+CONST CorrectPassword = "jerry"
+
+' Function to display the welcome message
+SUB DisplayWelcomeMessage
+    LOCATE 1, 1
+    COLOR 14
+    PRINT "          ========================================"
+    PRINT "          Welcome to nuclear rocket control system"
+    PRINT "          ========================================"
+END SUB
+
+' Function to display the rocket artwork
+SUB DisplayRocketArt
+    COLOR 10, 1
+    PRINT "..............................................................."
+    PRINT ".....MMMMMM................MM...MMMMMMM.MMMMMM.MMM..MMMMMMM..MM"
+    PRINT "MMMMMMMMMMMMMMM...MM.M....MMMMM.MM.MMMMMMMMMMMMMMMMMMMMMMM.MM.."
+    PRINT ".MMMMMMMMMMM.M.....MMM...MM.....MMMMMMMMMMMMMMMMMMMMMM.M......."
+    PRINT "..MMMMMMMMMMMM..............MMMMMMMMMMMMMMMMMMMMMMMMMM..M ....."
+    PRINT "....MMMMMMMM...............MMMM..MMMMM.MMMMMMMMMMMMM.MM........"
+    PRINT ".....MMMMMMM.............MMMMMMMM..MMM..MMMMMM.MMMMM.M........."
+    PRINT "........MM...............MMMMMMMMMM.M.....MM...........M......."
+    PRINT "......MMMMMM................MMMMMMM....................M......."
+    PRINT ".....MMMMMMMM.................MMMMMM....................MMM...."
+    PRINT "......MMMMMMM.................MMMMM...................MMMMMM..."
+    PRINT "........MMMMMM..................MM....................MMMMMMM.."
+    PRINT "..........MMMMM ...........................................MM.."
+END SUB
+
+' Function to play a simple tune
+SUB PlayTune
+    FOR a = 9 TO 23
+        SOUND 1.5 ^ a, 3
+    NEXT a
+END SUB
+
+' Main program execution starts here
+DO
+    ' Clear the screen and prompt the user for the password
+    CLS
+    COLOR 7
+    PRINT "Enter password: ";
+
+    ' Temporarily set text color to black to hide the password input
+    COLOR 0
+    INPUT "", UserPassword$
+
+    ' Restore original text color
+    COLOR 7
+LOOP UNTIL UserPassword$ = CorrectPassword
+
+' Clear the screen for the welcome message
+CLS
+
+' Call the function to display the welcome message
+DisplayWelcomeMessage
+
+' Call the function to display the rocket artwork
+DisplayRocketArt
+
+' Locate and display our location with a special color
+LOCATE 7, 34
+COLOR 12 + 16
+PRINT "*"
+
+' Play the simple tune using the sound command
+PlayTune
+
+' Restore default text color
+COLOR 7, 0
+
+' End of the program
+END
diff --git a/Tutorial/Group 2/09.bas b/Tutorial/Group 2/09.bas
new file mode 100755 (executable)
index 0000000..2e99357
--- /dev/null
@@ -0,0 +1,21 @@
+' This program demonstrates the use of string manipulation functions
+' in Microsoft QuickBasic. It shows how to extract substrings from a
+' given string using the LEFT$ and RIGHT$ functions.
+
+DEFSTR A-Z    ' Define all variables as strings to avoid type mismatches
+
+' Initialize a string variable with the value "software"
+SoftwareName$ = "software"
+
+' Print the full name of the software
+PRINT "Full software name: "; SoftwareName$
+
+' Extract and print the first four characters from the left of the string
+LEFTPart$ = LEFT$(SoftwareName$, 4)      ' Get the leftmost substring
+PRINT "Left part (first 4 characters): "; LEFTPart$
+
+' Extract and print the last four characters from the right of the string
+RIGHTPart$ = RIGHT$(SoftwareName$, 4)     ' Get the rightmost substring
+PRINT "Right part (last 4 characters): "; RIGHTPart$
+
+END    ' End of program
diff --git a/Tutorial/Group 2/10.bas b/Tutorial/Group 2/10.bas
new file mode 100755 (executable)
index 0000000..5df3e41
--- /dev/null
@@ -0,0 +1,37 @@
+CLS\r
+\r
+' This program demonstrates basic user input and string manipulation in QuickBasic.\r
+\r
+' Prompt the user to enter some text and store it in a variable called 'userInput$'.\r
+INPUT "Enter some text: ", userInput$\r
+\r
+' Print the text that the user entered in three different ways:\r
+' 1. Concatenating the prompt with the entered text using the '+' operator.\r
+' 2. Using a comma to separate the prompt from the entered text, which is more efficient.\r
+' 3. Using a colon to print on the same line without a space between the prompt and the input.\r
+PRINT "You entered: " + userInput$\r
+\r
+' Calculate the length of the entered text using the LEN function.\r
+' Then, print out the length, formatting it as a sentence.\r
+PRINT "Its length is" + STR$(LEN(userInput$)) + " characters."\r
+\r
+' Use a FOR loop to iterate from 1 to the length of the user input.\r
+' In each iteration, extract a substring from the left using the LEFT$ function\r
+' and print it to demonstrate string extraction from the beginning.\r
+FOR index = 1 TO LEN(userInput$)\r
+    PRINT "Leftmost " + STR$(index) + " character(s): " + LEFT$(userInput$, index)\r
+NEXT index\r
+\r
+' Print a blank line for better readability of the output.\r
+PRINT\r
+\r
+' Similar to the previous loop, but now we use the RIGHT$ function to extract\r
+' substrings from the right end of the user input, demonstrating string extraction\r
+' from the end of the string.\r
+FOR index = 1 TO LEN(userInput$)\r
+    PRINT "Rightmost " + STR$(index) + " character(s): " + RIGHT$(userInput$, index)\r
+NEXT index\r
+\r
+' End of the program.\r
+END\r
+\r
diff --git a/Tutorial/Group 2/11.bas b/Tutorial/Group 2/11.bas
new file mode 100755 (executable)
index 0000000..ef910ae
--- /dev/null
@@ -0,0 +1,19 @@
+' Simple Character Extractor Program\r
+' This program takes user input and prints each character individually\r
+\r
+CLS\r
+\r
+' Get user input\r
+INPUT "Enter some text:", userInput$\r
+\r
+' Process each character in the input string\r
+FOR charPosition = 1 TO LEN(userInput$)\r
+  ' Get the left portion of the string up to current position\r
+  leftPortion$ = LEFT$(userInput$, charPosition)\r
+\r
+  ' Extract the current character (rightmost character of left portion)\r
+  currentChar$ = RIGHT$(leftPortion$, 1)\r
+\r
+  ' Print the current character with label\r
+  PRINT "letter:"; currentChar$\r
+NEXT charPosition\r
diff --git a/Tutorial/Group 2/12.bas b/Tutorial/Group 2/12.bas
new file mode 100755 (executable)
index 0000000..28b738d
--- /dev/null
@@ -0,0 +1,45 @@
+' This program demonstrates the basics of animation and control flow in QuickBasic.
+' It shows a simple text bouncing up and down on the screen, simulating a "jumping" effect.
+
+' Declare variables with descriptive names to hold the position and movement direction
+DIM yPosition AS INTEGER ' Current vertical position of the text
+DIM ySpeed AS INTEGER   ' Vertical speed (or direction) of the text
+
+' Initialize the starting position and speed
+yPosition = 10
+ySpeed = 1
+
+' Main animation loop
+DO
+    ' Clear the screen before drawing the next frame
+    CLS
+
+    ' Update the vertical position based on the current speed
+    yPosition = yPosition + ySpeed
+
+    ' Check if the text has hit the top boundary and change direction if it has
+    IF yPosition > 20 THEN
+        ySpeed = -1
+    ENDIF
+
+    ' Check if the text has hit the bottom boundary and change direction if it has
+    IF yPosition < 2 THEN
+        ySpeed = 1
+    ENDIF
+
+    ' Set the cursor position to the current vertical position
+    LOCATE yPosition
+
+    ' Print the "jumping" text at the new position
+    PRINT "This is jumping text";
+
+    ' Play a sound with a frequency that varies based on the vertical position
+    ' The frequency is calculated to give an audible effect as the text jumps
+    SOUND yPosition * 200 + 100, 1
+
+    ' Pause briefly before drawing the next frame (adjust this value for faster or slower animation)
+    DELAY 0.1
+LOOP
+
+' Note: The program will run indefinitely due to the DO LOOP structure.
+' To stop the program, you can press Ctrl+Break on most systems.
diff --git a/Tutorial/Group 2/13.bas b/Tutorial/Group 2/13.bas
new file mode 100755 (executable)
index 0000000..c7c507a
--- /dev/null
@@ -0,0 +1,54 @@
+' This program demonstrates basic animation and boundary checking in QuickBasic.\r
+' It simulates a simple ball bouncing around the screen.\r
+\r
+CLS ' Clear the screen before starting the animation\r
+\r
+' Initialize variables representing the ball's position and velocity\r
+DIM x AS INTEGER ' Ball's X coordinate\r
+DIM y AS INTEGER ' Ball's Y coordinate\r
+DIM xs AS INTEGER ' Ball's speed in the X direction\r
+DIM ys AS INTEGER ' Ball's speed in the Y direction\r
+\r
+x = 12 ' Initial X position of the ball\r
+y = 7  ' Initial Y position of the ball\r
+xs = 1  ' Initial velocity in the X direction (rightward)\r
+ys = 1  ' Initial velocity in the Y direction (downward)\r
+\r
+' Main animation loop\r
+DO\r
+    ' Erase the ball at its current position by printing a space\r
+    LOCATE y, x: PRINT " ";\r
+\r
+    ' Update the ball's position based on its velocities\r
+    x = x + xs\r
+    y = y + ys\r
+\r
+    ' Draw the ball at its new position\r
+    LOCATE y, x: PRINT "O";\r
+\r
+    ' Check if the ball hits the right or left boundaries and reverse X velocity\r
+    IF x >= 79 THEN\r
+        xs = -1\r
+        SOUND 1000, 1 ' Play a sound when hitting the boundary\r
+    END IF\r
+    IF x <= 1 THEN\r
+        xs = 1\r
+        SOUND 1000, 1 ' Play a sound when hitting the boundary\r
+    END IF\r
+\r
+    ' Check if the ball hits the bottom or top boundaries and reverse Y velocity\r
+    IF y >= 22 THEN\r
+        ys = -1\r
+        SOUND 1000, 1 ' Play a sound when hitting the boundary\r
+    END IF\r
+    IF y <= 1 THEN\r
+        ys = 1\r
+        SOUND 1000, 1 ' Play a sound when hitting the boundary\r
+    END IF\r
+\r
+    ' Pause briefly to control the speed of the animation\r
+    SOUND 0, 1\r
+LOOP\r
+\r
+' The program will continue running indefinitely, creating an animated bouncing ball effect\r
+\r
diff --git a/Tutorial/Group 2/14.bas b/Tutorial/Group 2/14.bas
new file mode 100755 (executable)
index 0000000..4a0f1f9
--- /dev/null
@@ -0,0 +1,54 @@
+' This program demonstrates how to use the SOUND statement in QuickBasic
+' to produce different tones when pressing keys "0" through "9".
+' It also shows how to exit the program by pressing the Escape key.
+
+CLS
+PRINT "Press keys '0'-'9' for different sounds."
+PRINT "Press Esc to exit the program."
+
+' Start an infinite loop to continuously check for user input
+DO
+    ' Read a single character from the keyboard
+    a$ = INPUT$(1)
+
+    ' Play a sound corresponding to the key pressed
+    SELECT CASE a$
+        CASE "0"
+            ' Generate a low-pitched tone
+            SOUND 1900, 2
+        CASE "1"
+            ' Generate a slightly higher pitched tone
+            SOUND 1000, 2
+        CASE "2"
+            ' Generate a tone with a frequency of 1100 Hz
+            SOUND 1100, 2
+        CASE "3"
+            ' Generate a tone with a frequency of 1200 Hz
+            SOUND 1200, 2
+        CASE "4"
+            ' Generate a tone with a frequency of 1300 Hz
+            SOUND 1300, 2
+        CASE "5"
+            ' Generate a tone with a frequency of 1400 Hz
+            SOUND 1400, 2
+        CASE "6"
+            ' Generate a tone with a frequency of 1500 Hz
+            SOUND 1500, 2
+        CASE "7"
+            ' Generate a high-pitched tone
+            SOUND 1600, 2
+        CASE "8"
+            ' Generate a very high-pitched tone
+            SOUND 1700, 2
+        CASE "9"
+            ' Generate the highest pitched tone available
+            SOUND 1800, 2
+        CASE CHR$(27)
+            ' Check if the Escape key is pressed to exit the program
+            SYSTEM
+        CASE ELSE
+            ' If any other key is pressed, do nothing
+    END SELECT
+
+    ' Loop indefinitely until the user decides to exit
+LOOP
diff --git a/Tutorial/Group 2/15.bas b/Tutorial/Group 2/15.bas
new file mode 100755 (executable)
index 0000000..0f8b2b8
--- /dev/null
@@ -0,0 +1,26 @@
+' This program demonstrates how to use a FOR loop and the CHR$ function
+' in QuickBasic to print out characters from the ASCII table.
+
+CLS ' Clears the screen before printing
+
+' The FOR loop iterates over ASCII values starting from 32 (space character)
+' up to 255, which is beyond the standard ASCII range but includes extended
+' ASCII characters in QuickBasic.
+FOR a = 32 TO 255
+    ' CHR$ function converts an ASCII value to its corresponding character
+    PRINT " " + CHR$(a); ' Prints each character with a leading space for readability
+NEXT a
+
+' Print two new lines to separate the ASCII table from the greeting message
+PRINT
+PRINT
+
+' Greet the user in a friendly manner
+' The CHR$(1) represents the Start of Header (SOH) control character, which is
+' typically not visible and may be interpreted differently depending on the
+' environment. It is used here for demonstration purposes to show how
+' non-printable characters can be included in strings.
+PRINT "Hi there! " + CHR$(1)
+
+' End of the program
+END
diff --git a/Tutorial/Group 2/16.bas b/Tutorial/Group 2/16.bas
new file mode 100755 (executable)
index 0000000..3ff22a5
--- /dev/null
@@ -0,0 +1,40 @@
+' This program demonstrates how to capture and process keyboard input in QuickBASIC.
+' It listens for a key press, then prints out the character and its ASCII code.
+' Special keys like Escape, Enter, Backspace, Tabulator, and Space are given custom names.
+
+CLS ' Clears the screen before starting the program
+PRINT "Press any key..." ' Prompts the user to press a key
+
+' Main loop starts here
+DO
+    ' Capture a single character of input from the user
+    a$ = INPUT$(1)
+
+    ' Print the pressed key, if it is a printable character (ASCII code > 32)
+    PRINT "Pressed key was: ";
+    IF ASC(a$) > 32 THEN
+        PRINT a$
+    END IF
+
+    ' Check for special keys and print their names
+    SELECT CASE ASC(a$)
+        CASE 27 ' ASCII code for Escape key
+            PRINT "Escape"
+        CASE 13 ' ASCII code for Enter key
+            PRINT "Enter"
+        CASE 8 ' ASCII code for Backspace key
+            PRINT "Backspace"
+        CASE 9 ' ASCII code for Tabulator key
+            PRINT "Tabulator"
+        CASE 32 ' ASCII code for Space key
+            PRINT "Space"
+        CASE ELSE
+            ' If the key is not special, print its ASCII character
+            IF ASC(a$) > 32 THEN
+                PRINT a$
+            END IF
+    END SELECT
+
+    ' Print the ASCII code of the pressed key
+    PRINT "ASCII code is: "; ASC(a$)
+LOOP ' Continue listening for more key presses
diff --git a/Tutorial/Group 2/17.bas b/Tutorial/Group 2/17.bas
new file mode 100755 (executable)
index 0000000..899390e
--- /dev/null
@@ -0,0 +1,58 @@
+' This program demonstrates how to handle keyboard input in QuickBasic
+' and move a character around the screen using the numeric keypad.
+
+CLS
+
+' Inform the user about the controls and how to exit the program
+PRINT "Use keys 4, 8, 6, 2 for movement, make sure the NumLock is on"
+PRINT "ESC to exit"
+
+' Clear a line for better visibility
+PRINT " "
+
+' Wait for the user to press any key to start
+PRINT "Press any key to continue..."
+a$ = INPUT$(1)
+
+' Set the text color to bright yellow
+COLOR 14
+
+' Initialize the starting position of the character
+x = 40
+y = 10
+
+' Main loop for handling input and drawing the character
+DO
+    CLS ' Clear the screen before redrawing
+
+    ' Set the cursor position to the current character coordinates
+    LOCATE y, x
+
+    ' Print the character at the current position
+    PRINT CHR$(2); ' The semicolon prevents moving to the next line
+
+    ' Read a single character of input without waiting
+    a$ = INPUT$(1)
+
+    ' Check for movement inputs and update the character's position
+    SELECT CASE a$
+        CASE "4" ' Left arrow
+            x = x - 1
+        CASE "6" ' Right arrow
+            x = x + 1
+        CASE "8" ' Up arrow
+            y = y - 1
+        CASE "2" ' Down arrow
+            y = y + 1
+        CASE CHR$(27) ' Escape key
+            ' Exit the program
+            SYSTEM
+    END SELECT
+
+    ' Prevent the character from going off-screen
+    IF x < 1 THEN x = 1
+    IF x > 80 THEN x = 80
+    IF y < 1 THEN y = 1
+    IF y > 25 THEN y = 25
+
+LOOP ' Continue the main loop indefinitely
diff --git a/Tutorial/Group 2/18.bas b/Tutorial/Group 2/18.bas
new file mode 100755 (executable)
index 0000000..9700d82
--- /dev/null
@@ -0,0 +1,56 @@
+CLS
+
+' Main program loop starts here
+DO
+    ' Clear the screen and print the menu options
+    CLS
+    PRINT "******** Select action: ********"
+    PRINT " "
+    PRINT "1 - Exit program"
+    PRINT "2 - Make a sound"
+    PRINT "3 - Draw a box"
+
+    ' Prompt the user to enter their choice and store it in variable 'userChoice'
+    INPUT "Enter your choice (1-3): ", userChoice
+
+    ' Exit the program if the user chooses option 1
+    IF userChoice = 1 THEN
+        PRINT "Exiting program..."
+        EXIT DO
+    END IF
+
+    ' Play a sound if the user chooses option 2
+    IF userChoice = 2 THEN
+        ' Generate a sound with a frequency of 2000 Hz for 2 seconds
+        SOUND 2000, 2
+
+    ' Draw a box if the user chooses option 3
+    ELSEIF userChoice = 3 THEN
+        ' Outer loop to draw the top and bottom edges of the box
+        FOR row = 1 TO 15
+            ' Inner loop to draw the left and right edges of the box
+            FOR col = 1 TO 50
+                PRINT "#";
+            NEXT col
+            ' Move to the next line after drawing each row
+            PRINT
+        NEXT row
+
+    ' Inform the user if they have entered a number greater than 3
+    ELSEIF userChoice > 3 THEN
+        PRINT "Number too large. Please enter a value between 1 and 3."
+
+    ' Inform the user if they have entered a number less than 1
+    ELSEIF userChoice < 1 THEN
+        PRINT "Number too small. Please enter a value between 1 and 3."
+    END IF
+
+    ' Wait for the user to press a key before continuing
+    PRINT "Press any key to continue..."
+    WHILE INKEY$ = ""
+        ' Do nothing, just wait for a key press
+    WEND
+
+LOOP WHILE TRUE
+
+' End of program
diff --git a/Tutorial/Group 3/00.bas b/Tutorial/Group 3/00.bas
new file mode 100755 (executable)
index 0000000..c01682c
--- /dev/null
@@ -0,0 +1,21 @@
+' This program demonstrates how to set the video mode to 320x200 with 256 colors
+' and how to draw a single point on the screen using QuickBasic.
+
+SCREEN 13 ' Set video mode to 320 x 200 with 256 colors
+
+' Greet the user with a simple message
+PRINT "Hello..."
+
+' Define constants for the center of the screen for readability
+CONST CenterX = 160
+CONST CenterY = 100
+
+' Draw a point on the screen at the defined center coordinates
+' with a specified color.
+PSET (CenterX, CenterY), 10 ' Draws a point at (x=160, y=100) with color 10
+
+' Wait for a key press before exiting the program
+PRINT "Press any key to exit..."
+WHILE INKEY$ = ""
+    ' Do nothing until a key is pressed
+WEND
diff --git a/Tutorial/Group 3/01.bas b/Tutorial/Group 3/01.bas
new file mode 100755 (executable)
index 0000000..2575df0
--- /dev/null
@@ -0,0 +1,18 @@
+' QuickBasic example program to demonstrate drawing pixels on the screen
+' and generating simple sound with varying frequency.
+
+SCREEN 13 ' Set the graphics mode to 320x200 resolution with 256 colors
+
+' Loop to draw a vertical line of pixels from y-coordinate 50 to 150
+FOR y = 50 TO 150
+    ' Loop to draw a horizontal line of pixels from x-coordinate 100 to 200
+    FOR x = 100 TO 200
+        PSET (x, y), 10 ' Set the pixel at (x, y) to color 10
+    NEXT x
+
+    ' Generate a sound with a frequency corresponding to the y-coordinate
+    ' The SOUND statement takes two arguments: frequency and duration
+    ' Here, the frequency is set to the current value of y, and the duration
+    ' is set to 1 tick (approximately 1/18th of a second)
+    SOUND y, 1
+NEXT y
diff --git a/Tutorial/Group 3/02.bas b/Tutorial/Group 3/02.bas
new file mode 100755 (executable)
index 0000000..adf3b10
--- /dev/null
@@ -0,0 +1,27 @@
+' This program demonstrates how to create a simple drawing application
+' using Microsoft QuickBasic. It defines a subroutine called 'box' that
+' draws a rectangle on the screen with specified coordinates and color.
+
+' Declare the 'box' subroutine so it can be used in the main program
+DECLARE SUB box (x1 AS SINGLE, y1 AS SINGLE, x2 AS SINGLE, y2 AS SINGLE, c AS INTEGER)
+
+' Set the screen mode to 13h which is a 320x200 pixel graphics mode with 256 colors
+SCREEN 13
+
+' Draw three boxes on the screen using the 'box' subroutine
+' Each box has different starting and ending coordinates as well as color
+box 10, 10, 100, 100, 15
+box 30, 80, 300, 120, 11
+box 140, 20, 180, 180, 10
+
+' Define the 'box' subroutine
+SUB box (x1 AS SINGLE, y1 AS SINGLE, x2 AS SINGLE, y2 AS SINGLE, c AS INTEGER)
+    ' Use nested FOR loops to iterate over every pixel within the rectangle
+    DIM x AS SINGLE, y AS SINGLE
+    FOR y = y1 TO y2
+        FOR x = x1 TO x2
+            ' Set the color of the current pixel to the specified color 'c'
+            PSET (x, y), c
+        NEXT x
+    NEXT y
+END SUB
diff --git a/Tutorial/Group 3/03.bas b/Tutorial/Group 3/03.bas
new file mode 100755 (executable)
index 0000000..ee7b9c2
--- /dev/null
@@ -0,0 +1,15 @@
+' This program demonstrates how to use QuickBasic to draw a simple\r
+' graphic on the screen. It initializes the graphics mode, draws a\r
+' rectangle, and then draws a circle within that rectangle.\r
+\r
+' Set the graphics mode to 320x200 with 256 colors (mode 13)\r
+SCREEN 13\r
+\r
+' Draw a line\r
+LINE (10, 10)-(200, 100), 14\r
+\r
+' Draw a circle centered at (100, 100) with a radius of 80 pixels\r
+' using color 10 (bright green). The circle is drawn within the\r
+' previously defined rectangle.\r
+CIRCLE (100, 100), 80, 10\r
+\r
diff --git a/Tutorial/Group 3/04.bas b/Tutorial/Group 3/04.bas
new file mode 100755 (executable)
index 0000000..8408375
--- /dev/null
@@ -0,0 +1,25 @@
+' This example program demonstrates how to draw different types of\r
+' lines and boxes on the screen using Microsoft QuickBasic.\r
+\r
+' First, we set the screen mode to 13 which provides a graphics\r
+' resolution of 320x200 with 256 colors available.\r
+SCREEN 13\r
+\r
+' Now we will draw three different objects using the LINE statement:\r
+\r
+' Draw an filled box from coordinates (10, 10) to (50, 50).\r
+LINE (10, 10)-(50, 50), 14, BF\r
+\r
+' Draw an unfilled box with coordinates (100, 10) to (150, 50).\r
+LINE (100, 10)-(150, 50), 14, B\r
+\r
+' Draw a line with coordinates (200, 10) to (250, 50).\r
+LINE (200, 10)-(250, 50), 14\r
+\r
+' To finish the program and allow users to see the drawn objects\r
+' before the screen closes, we wait for a key press from the user.\r
+PRINT "Press any key to exit..."\r
+WHILE NOT INKEY$ <> ""\r
+    ' Loop until a key is pressed\r
+WEND\r
+\r
diff --git a/Tutorial/Group 3/05.bas b/Tutorial/Group 3/05.bas
new file mode 100755 (executable)
index 0000000..296eb8d
--- /dev/null
@@ -0,0 +1,15 @@
+' QuickBasic example program to demonstrate drawing lines with varying colors\r
+\r
+SCREEN 13 ' Set the screen mode to 13h which provides 256 color graphics\r
+\r
+' Draw vertical lines across the screen with colors from 0 to 255\r
+FOR xPosition = 0 TO 255\r
+    ' Draw a line from coordinates (xPosition, 50) to (xPosition, 100) using color xPosition\r
+    LINE (xPosition, 50)-(xPosition, 100), xPosition\r
+NEXT xPosition\r
+\r
+' Keep the window open until the user presses a key\r
+PRINT "Press any key to exit..."\r
+WHILE INKEY$ = ""\r
+WEND\r
+\r
diff --git a/Tutorial/Group 3/06.bas b/Tutorial/Group 3/06.bas
new file mode 100755 (executable)
index 0000000..e60ab45
--- /dev/null
@@ -0,0 +1,27 @@
+' This program demonstrates basic graphics drawing in QuickBasic.\r
+' It uses the SCREEN function to set the graphics mode, draws a circle\r
+' and a line using CIRCLE and LINE commands respectively, waits for user\r
+' input, and then uses the PAINT command to fill an area with a solid color.\r
+\r
+' Set the screen to mode 13 which is 320x200 pixels with 256 colors.\r
+SCREEN 13\r
+\r
+' Draw a circle centered at (160, 100) with a radius of 80 pixels\r
+' and use color 15 for the outline of the circle.\r
+CIRCLE (160, 100), 80, 15\r
+\r
+' Draw a line from (100, 10) to (200, 180) using color 15.\r
+LINE (100, 10)-(200, 180), 15\r
+\r
+' Print a message to the screen prompting the user to press any key.\r
+PRINT "Press any key to fill part of the circle..."\r
+\r
+' Wait for the user to press a key and store the input in variable 'a$'.\r
+a$ = INPUT$(1)\r
+\r
+' Fill the area inside the circle with color 15 starting from point (180, 100).\r
+' Note that PAINT fills an area bounded by the specified color at the start point.\r
+PAINT (180, 100), 15\r
+\r
+END ' End the program (although END is not strictly necessary in QuickBasic)\r
+\r
diff --git a/Tutorial/Group 3/07.bas b/Tutorial/Group 3/07.bas
new file mode 100755 (executable)
index 0000000..216341e
--- /dev/null
@@ -0,0 +1,25 @@
+' This program demonstrates how to use subroutines and drawing
+' commands in QuickBasic. It draws a simple figure consisting of
+' concentric circles and intersecting lines.
+
+DECLARE SUB DrawFigure (xCenter AS DOUBLE, yCenter AS DOUBLE)
+SCREEN 13 ' Set the screen mode for high-resolution graphics
+
+' To see a list of subroutines, press F2
+' This is useful when navigating through larger programs
+
+' Draw figures at different locations on the screen
+DrawFigure 100, 100
+DrawFigure 200, 50
+DrawFigure 180, 150
+
+SUB DrawFigure (xCenter AS DOUBLE, yCenter AS DOUBLE)
+    ' Draw three concentric circles with a specified center point
+    CIRCLE (xCenter, yCenter), 10, 15
+    CIRCLE (xCenter, yCenter), 20, 15
+    CIRCLE (xCenter, yCenter), 30, 15
+
+    ' Draw two lines intersecting at the center point
+    LINE (xCenter, yCenter - 50)-(xCenter, yCenter + 50), 15
+    LINE (xCenter - 50, yCenter)-(xCenter + 50, yCenter), 15
+END SUB
diff --git a/Tutorial/Group 3/08.bas b/Tutorial/Group 3/08.bas
new file mode 100755 (executable)
index 0000000..56ba16e
--- /dev/null
@@ -0,0 +1,33 @@
+' This program demonstrates how to draw sine and cosine waves on the screen
+' using Microsoft QuickBasic. It is intended for beginners learning
+' programming in QuickBasic.
+
+' First, we set the graphics mode to 13 which provides a 320x200 pixel
+' resolution with 256 colors.
+SCREEN 13
+
+' We will draw two waves: one for sine and another for cosine. The amplitude
+' of both waves is scaled by a factor of 50, and they are vertically
+' centered on the screen by adding 100 to the y-coordinate.
+
+' The FOR loop iterates over the x-axis from 0 to 319 pixels, which covers
+' the entire width of the screen in this graphics mode.
+FOR x = 0 TO 319
+    ' Calculate the y-coordinate for the sine wave. We divide x by 10 to
+    ' reduce the frequency of the wave so it fits nicely on the screen.
+    ' The SIN function returns a value between -1 and 1, which we scale
+    ' and shift to get the desired waveform.
+    ysine = SIN(x / 10) * 50 + 100
+
+    ' Use PSET (Pixel SET) to plot a point on the screen for the sine wave
+    PSET (x, ysine), 14
+
+    ' Similarly, calculate and plot the cosine wave with color 12
+    ycosine = COS(x / 10) * 50 + 100
+    PSET (x, ycosine), 12
+
+    ' The loop continues to the next x-coordinate until it reaches 319.
+NEXT x
+
+' After the loop completes, both sine and cosine waves will be drawn on
+' the screen, with each point of the wave plotted in its respective color.
diff --git a/Tutorial/Group 3/09.bas b/Tutorial/Group 3/09.bas
new file mode 100755 (executable)
index 0000000..31d9cb1
--- /dev/null
@@ -0,0 +1,40 @@
+' This program demonstrates how to draw a simple circle using QuickBasic.\r
+' It utilizes trigonometric functions SIN and COS to calculate the position of points on a circle.\r
+\r
+SCREEN 13 ' Set the screen mode to 13, which is 320x200 with 256 colors\r
+\r
+' Define pi (π) as a constant for calculations\r
+CONST pi = 3.141592653589789#\r
+\r
+' Define the number of points to be drawn on the circular shape\r
+DIM mi AS INTEGER\r
+mi = 12\r
+\r
+' Calculate the angle increment for each iteration of the loop\r
+' This will determine how many points we draw on the circle\r
+DIM angleStep AS SINGLE\r
+angleStep = pi * 2 / mi\r
+\r
+' Loop through angles from 0 to 2π (360 degrees) with the calculated step\r
+FOR a = 0 TO pi * 2 STEP angleStep\r
+\r
+    ' Calculate the x-coordinate of the current point on the circle\r
+    ' We multiply by 50 to scale the radius and add 100 for centering\r
+    DIM x AS SINGLE\r
+    x = SIN(a) * 50 + 100\r
+\r
+    ' Calculate the y-coordinate of the current point on the circle\r
+    ' Similarly, we scale and center the point\r
+    DIM y AS SINGLE\r
+    y = COS(a) * 50 + 100\r
+\r
+    ' Set the pixel at coordinates (x, y) with color 10\r
+    PSET (x, y), 10\r
+\r
+NEXT a\r
+\r
+' Wait for a key press before ending the program\r
+PRINT "Press any key to exit..."\r
+WHILE INKEY$ = ""\r
+WEND\r
+\r
diff --git a/Tutorial/Group 3/10.bas b/Tutorial/Group 3/10.bas
new file mode 100755 (executable)
index 0000000..ad15b02
--- /dev/null
@@ -0,0 +1,53 @@
+' This program demonstrates basic QuickBasic graphics and sound capabilities.\r
+' It is designed for novice programmers to learn about drawing lines, plotting points,\r
+' handling user input, and generating simple sounds.\r
+\r
+' Set the graphics mode to 320x200 with 16 colors (mode 13).\r
+SCREEN 13\r
+\r
+' Draw a grid on the screen with horizontal and vertical lines every 10 pixels.\r
+' This loop demonstrates the use of the LINE function to draw lines.\r
+FOR i = 0 TO 320 STEP 10\r
+  ' Draw a horizontal line from the left edge to the right edge at y-coordinate i.\r
+  LINE (0, i)-(319, i), 5\r
+  ' Draw a vertical line from the top edge to the bottom edge at x-coordinate i.\r
+  LINE (i, 0)-(i, 199), 5\r
+NEXT i\r
+\r
+' Draw a horizontal line across the middle of the screen (y=100)\r
+LINE (0, 100)-(319, 100), 10\r
+\r
+' Prompt the user to press any key before continuing.\r
+PRINT "Press any key to continue..."\r
+' Wait for the user to press a key and store the input in variable a$.\r
+a$ = INPUT$(1)\r
+\r
+' Initialize variables for the bouncing ball animation and sound.\r
+DIM y AS SINGLE ' The vertical position of the ball, using single precision for smooth motion.\r
+DIM ys AS SINGLE ' The vertical speed of the ball.\r
+DIM t AS INTEGER ' A counter for the main animation loop.\r
+\r
+' Set the initial vertical position of the ball to the middle of the screen (y=100).\r
+y = 100\r
+' Set the initial vertical speed of the ball to a negative value for upward motion.\r
+ys = -1\r
+\r
+' The main animation loop runs from t=0 to t=300, simulating the passage of time.\r
+FOR t = 0 TO 300\r
+  ' Plot the current position of the ball with a specific color (14).\r
+  PSET (t, y), 14\r
+\r
+  ' Update the vertical speed of the ball by adding gravity-like acceleration (ys = ys + .01).\r
+  ys = ys + .01\r
+  ' Update the vertical position of the ball based on the current speed (y = y + ys).\r
+  y = y + ys\r
+\r
+  ' Generate a sound with a frequency that varies inversely with the ball's vertical position.\r
+  ' As the ball falls, the pitch of the sound increases.\r
+  SOUND 300 - y, .1\r
+NEXT t\r
+\r
+' The program ends here; to exit, press any key.\r
+PRINT "Press any key to exit..."\r
+a$ = INPUT$(1)\r
+\r
diff --git a/Tutorial/Group 3/11.bas b/Tutorial/Group 3/11.bas
new file mode 100755 (executable)
index 0000000..6d1cfe9
--- /dev/null
@@ -0,0 +1,26 @@
+' This program demonstrates basic mathematical operations in QuickBasic.
+' It includes examples of rounding, taking the absolute value,
+' and finding the remainder of a division operation.
+
+DIM a AS SINGLE      ' Declare variable 'a' as type SINGLE for floating-point arithmetic
+
+' Assign a negative floating-point number to variable 'a'
+a = -12.7
+
+' Print the original value of 'a'
+PRINT "Normal: "; a
+
+' Use the INT function to round down 'a' to the nearest whole number
+' and print the result
+PRINT "Rounded down (INT): "; INT(a)
+
+' Use the ABS function to get the absolute value of 'a',
+' which is always non-negative, and print the result
+PRINT "Absolute value: "; ABS(a)
+
+' Calculate the remainder of 10 divided by 4 using the MOD operator
+' and store the result in an implicitly declared variable
+' Then print the result
+DIM reminder AS INTEGER
+reminder = 10 MOD 4
+PRINT "Remainder of 10 / 4 is: "; reminder
diff --git a/Tutorial/index.html b/Tutorial/index.html
new file mode 100644 (file)
index 0000000..459b8ee
--- /dev/null
@@ -0,0 +1,16 @@
+<HTML>\r
+<HEAD><TITLE>QBasic tutorial</TITLE></HEAD>\r
+\r
+<BODY>\r
+\r
+<CENTER><H1>QBasic tutorial</H1></CENTER>\r
+<BR>\r
+<BR>\r
+<BR>QBasic tutorial.\r
+Is a good for those who like to learn by example.\r
+Package contains a lot of tiny self explainatory\r
+examples quiding you from simplest operations like printing\r
+to console, functions and array access to 2D and 3D graphics.\r
+<br>Used those successfully as examples when teaching programming for beginners.\r
+</BODY>\r
+</HTML>
\ No newline at end of file
diff --git a/Tutorial/qsort3.bas b/Tutorial/qsort3.bas
new file mode 100644 (file)
index 0000000..edc6407
--- /dev/null
@@ -0,0 +1,136 @@
+DECLARE SUB sort (x1!, x2!)\r
+DECLARE SUB check ()\r
+DECLARE SUB di (r1!, r2!, c!)\r
+DECLARE SUB disp ()\r
+DIM SHARED siz\r
+siz = 15000\r
+DIM SHARED arr(1 TO siz)\r
+DIM SHARED mark(1 TO siz)\r
+DIM SHARED bck(1 TO siz)\r
+DIM SHARED dbg\r
+WIDTH 80, 50\r
+\r
+dbg = 1\r
+CLS\r
+FOR i = 1 TO 1000\r
+LOCATE 5, 40\r
+PRINT i\r
+RANDOMIZE i\r
+siz = 45\r
+\r
+FOR a = 1 TO siz\r
+  arr(a) = INT(RND * 100)\r
+  bck(a) = arr(a)\r
+NEXT a\r
+11\r
+\r
+sort 1, siz\r
+disp\r
+\r
+\r
+fail = 0\r
+FOR i2 = 1 TO siz - 1\r
+  IF arr(i2) > arr(i2 + 1) THEN\r
+    PRINT "wrong!"\r
+    a$ = INPUT$(1)\r
+    fail = 1\r
+    GOTO 10\r
+  END IF\r
+NEXT i2\r
+10\r
+\r
+IF fail = 1 THEN\r
+  FOR i2 = 1 TO siz\r
+    arr(i2) = bck(i2)\r
+  NEXT i2\r
+  dbg = 1\r
+  GOTO 11\r
+END IF\r
+\r
+NEXT i\r
+\r
+SUB di (r1, r2, c)\r
+\r
+mark(r1) = c\r
+mark(r2) = c\r
+disp\r
+mark(r1) = 0\r
+mark(r2) = 0\r
+\r
+\r
+END SUB\r
+\r
+SUB disp\r
+FOR i = 1 TO siz\r
+  LOCATE i, 1\r
+  COLOR 15, mark(i)\r
+  PRINT arr(i), "    ", i\r
+NEXT i\r
+\r
+IF dbg = 1 THEN a$ = INPUT$(1)\r
+'SOUND 0, .05\r
+END SUB\r
+\r
+SUB sort (x1, x2)\r
+min = 99999\r
+max = -99999\r
+FOR i = x1 TO x2\r
+  IF arr(i) > max THEN max = arr(i)\r
+  IF arr(i) < min THEN min = arr(i)\r
+NEXT i\r
+sv = (max + min) / 2\r
+LOCATE 1, 50\r
+PRINT sv\r
+'disp\r
+di x1, x2, 4\r
+IF x1 >= x2 THEN GOTO 3\r
+\r
+IF x1 + 1 = x2 THEN\r
+  IF arr(x1) > arr(x2) THEN SWAP arr(x1), arr(x2)\r
+  GOTO 3\r
+END IF\r
+\r
+xl1 = x1\r
+xl2 = x2\r
+\r
+\r
+1\r
+di xl1, xl2, 1\r
+IF arr(xl1) > sv THEN\r
+2\r
+  IF arr(xl2) < sv THEN\r
+    SWAP arr(xl1), arr(xl2)\r
+    xl1 = xl1 + 1\r
+    xl2 = xl2 - 1\r
+  ELSE\r
+    xl2 = xl2 - 1\r
+    di xl1, xl2, 1\r
+    IF xl1 = xl2 THEN GOTO 4\r
+    GOTO 2\r
+  END IF\r
+ELSE\r
+  xl1 = xl1 + 1\r
+END IF\r
+\r
+IF xl1 < xl2 THEN GOTO 1\r
+'IF arr(xl1) < sv THEN xl1 = xl1 + 1\r
+'IF arr(xl1) < sv THEN xl1 = xl1 + 1\r
+4\r
+mark(xl1) = 14\r
+disp\r
+mark(xl1) = 0\r
+\r
+IF xl1 = x2 THEN\r
+  sort x1, xl1 - 1\r
+ELSE\r
+  IF arr(xl1) > sv THEN\r
+    sort x1, xl1 - 1\r
+    sort xl1, x2\r
+  ELSE\r
+    sort x1, xl1\r
+    sort xl1 + 1, x2\r
+  END IF\r
+END IF\r
+3\r
+END SUB\r
+\r
diff --git a/VC.EXT b/VC.EXT
new file mode 100644 (file)
index 0000000..31271e4
--- /dev/null
+++ b/VC.EXT
@@ -0,0 +1 @@
+bas: c:\qb45\qb.exe !.!
\ No newline at end of file
diff --git a/index.org b/index.org
new file mode 100644 (file)
index 0000000..239fef8
--- /dev/null
+++ b/index.org
@@ -0,0 +1,451 @@
+#+SETUPFILE: ~/.emacs.d/org-styles/html/darksun.theme
+#+TITLE:  BASIC applications collection
+#+LANGUAGE: en
+#+LATEX_HEADER: \usepackage[margin=1.0in]{geometry}
+#+LATEX_HEADER: \usepackage{parskip}
+#+LATEX_HEADER: \usepackage[none]{hyphenat}
+
+#+OPTIONS: H:20 num:20
+#+OPTIONS: author:nil
+
+#+begin_export html
+<style>
+  .flex-center {
+    display: flex;            /* activate flexbox */
+    justify-content: center;  /* horizontally center anything inside   */
+  }
+
+  .flex-center video {
+    width: min(90%, 1000px); /* whichever is smaller wins */
+    height: auto;            /* preserve aspect ratio */
+  }
+
+  .responsive-img {
+    width: min(100%, 1000px);
+    height: auto;
+  }
+</style>
+#+end_export
+
+
+* Overview
+This collection contains lots of applications:
+
+- [[id:3587240c-1d50-478d-b850-04ebc8dc63c7][Miscellaneous]]
+
+- [[id:ebafd8a3-54d4-4834-a03d-a942b535a82f][2D Graphics]]
+  - [[file:2D%20GFX/Animations/index.html][Animations]]
+
+- [[id:63fd5d58-9bce-4c0a-99d4-ed2d025258f0][3D Graphics]]
+- [[id:aa195f33-6d69-48ff-9af5-3f761a51dcb2][Games]]
+
+I wrote them at around year 2000, mostly in QBasic.
+
+* 2D GFX
+:PROPERTIES:
+:ID:       ebafd8a3-54d4-4834-a03d-a942b535a82f
+:END:
+** Animations
+
+Collection of various 2D animations. Good for demonstrating various
+algorithms and getting fun looking results quite easily.
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:2D%20GFX/Animations/index.html][file:2D%20GFX/Animations/logo.png]]
+
+[[file:2D%20GFX/Animations/index.html][See entire animations collection]]
+
+** Fractals
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:2D%20GFX/Fractals/index.html][file:2D%20GFX/Fractals/fractal%20squares,%202.png]]
+
+[[file:2D GFX/Fractals/index.html][See entire fractals collection]]
+
+** Spiral series
+
+Small collection of programs that are result of exploratory
+programming, for fun. It started out from drawing spiral on the
+screen. Every iteration built upon previous result.
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:2D%20GFX/Spirals/index.html][file:2D%20GFX/Spirals/logo.png]]
+
+[[file:2D%20GFX/Spirals/index.html][See entire spiral collection]]
+
+** Textures
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:2D%20GFX/Textures/index.html][file:2D%20GFX/Textures/logo.png]]
+
+[[file:2D%20GFX/Textures/index.html][See entire texture collection]]
+
+** Miscellaneous
+*** Hello friend
+
+TODO: description goes here ...
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:2D%20GFX/Hello%20friend.bas][file:2D%20GFX/Hello%20friend.png]]
+
+[[file:2D%20GFX/Hello%20friend.bas][Hello friend.bas]]
+
+#+INCLUDE: "2D GFX/Hello friend.bas" src basic-qb45
+
+*** People
+
+TODO: description goes here ...
+
+#+begin_export html
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="2D GFX/People.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:2D%20GFX/People.bas][People.bas]]
+
+*** Stroboscope
+
+TODO: description goes here ...
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:2D%20GFX/Stroboscope.bas][file:2D%20GFX/Stroboscope.png]]
+
+[[file:2D%20GFX/Stroboscope.bas][Stroboscope.bas]]
+
+*** Truncated cone
+
+TODO: description goes here ...
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:2D%20GFX/Truncated%20cone.bas][file:2D%20GFX/Truncated%20cone.png]]
+
+[[file:2D%20GFX/Truncated%20cone.bas][Truncated cone.bas]]
+
+#+INCLUDE: "2D GFX/Truncated cone.bas" src basic-qb45
+
+* 3D GFX
+:PROPERTIES:
+:ID:       63fd5d58-9bce-4c0a-99d4-ed2d025258f0
+:END:
+** Miscellaneous 3D demos
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:3D%20GFX/Miscellaneous/index.html][file:3D%20GFX/Miscellaneous/logo.png]]
+
+[[file:3D GFX/Space/index.html][See entire miscellaneous 3D demo applications collection]]
+
+** Space
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:3D%20GFX/Space/index.html][file:3D%20GFX/Space/logo.png]]
+
+[[file:3D GFX/Space/index.html][See entire space themed applications collection]]
+
+** 3D Synthezier
+
+Parses scene definition language and creates 3D world based on
+it. Result will be in a [[https://en.wikipedia.org/wiki/Wavefront_.obj_file][wavefront obj file]], witch can be then
+visualized using external renderer.
+
+See directory:
+: 3D GFX/3D Synthetizer/
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:3D%20GFX/3D%20Synthezier/doc/index.html][file:3D%20GFX/3D%20Synthezier/doc/hexagonal%20city,%202.jpeg]]
+
+[[file:3D%20GFX/3D%20Synthezier/doc/index.html][Read more]]
+
+** Helicopter demo
+
+TODO: description goes here ...
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:3D%20GFX/Helicopter/demo,%201.png][file:3D%20GFX/Helicopter/demo,%201.png]]
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:3D%20GFX/Helicopter/demo,%202.png][file:3D%20GFX/Helicopter/demo,%202.png]]
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:3D%20GFX/Helicopter/demo,%203.png][file:3D%20GFX/Helicopter/demo,%203.png]]
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:3D%20GFX/Helicopter/demo,%204.png][file:3D%20GFX/Helicopter/demo,%204.png]]
+
+[[https://www2.svjatoslav.eu/gitweb/?p=qbasicapps.git;a=tree;f=3D+GFX/Helicopter;hb=HEAD][Project files]]
+
+** Swapping 3D engine
+
+TODO: description goes here ...
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:3D%20GFX/Swapping%203D%20engine/screenshot.png]]
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:3D%20GFX/Swapping%203D%20engine/screenshot,%202.png]]
+
+[[file:3D%20GFX/Swapping%203D%20engine/engine.bas][engine.bas]]
+
+** 3D land
+
+#+begin_export html
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="3D%20GFX/3D%20land.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+
+[[file:3D%20GFX/3D%20land.bas][3D land.bas]]
+
+#+INCLUDE: "3D GFX/3D land.bas" src basic-qb45
+
+** Anaglyph
+
+TODO: description goes here ...
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:3D%20GFX/Anaglyph.bas][file:3D%20GFX/Anaglyph.png]]
+
+[[file:3D%20GFX/Anaglyph.bas][Anaglyph.bas]]
+
+** Ray casting engine
+
+TODO: description goes here ...
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:3D%20GFX/Ray%20casting%20engine.bas][file:3D%20GFX/Ray%20casting%20engine.png]]
+
+[[file:3D%20GFX/Ray%20casting%20engine.bas][Ray casting engine.bas]]
+
+* Misc
+:PROPERTIES:
+:ID:       3587240c-1d50-478d-b850-04ebc8dc63c7
+:END:
+* Games
+:PROPERTIES:
+:ID:       aa195f33-6d69-48ff-9af5-3f761a51dcb2
+:END:
+** Multiplayer game of worms
+
+Game supports up to 5 players. Any amount of those players can be AI
+controlled. Game has multiple levels. After worms have eaten certain
+amount of fruits, game advances to the next level. Each worm has
+limited amount of lives. When worm runs into the wall or another worm,
+it loses one life.
+
+#+begin_export html
+<div class="flex-center">
+  <video controls loop autoplay>
+    <source src="Games/Worm/screencast.webm" type="video/webm">
+    Your browser does not support the video tag.
+  </video>
+</div>
+#+end_export
+
+[[file:Games/Worm/worm.bas][Source code]]
+
+Levels are stored in [[https://www2.svjatoslav.eu/gitweb/?p=qbasicapps.git;a=tree;f=Games/Worm;h=644d30adafb2621f34f6d2f3e43e026084092f60;hb=HEAD]['lvl' files]] that are directly editable using text
+editor.
+
+** Checkers
+
+Play checkers against the computer with any board size and any amount
+of caps. Does thinking by recursively testing many possible scenarios
+with any depth.
+
+Since it is slow QBasic implementation, it isn't practical to play
+with many caps or big thinking depth, for reasonable responce time.
+
+[[file:Games/Checkers 2/checkers2.bas][Source code]]
+
+#+attr_html: :class responsive-img
+#+attr_latex: :width 1000px
+[[file:Games/Checkers 2/checkers2.bas][file:Games/Checkers%202/screenshot.png]]
+
+* Download
+** Getting the source code
+
+Programs author is Svjatoslav Agejenko
+- Homepage: https://svjatoslav.eu (See also [[https://www.svjatoslav.eu/projects/][other software projects]].)
+- Email: mailto://svjatoslav@svjatoslav.eu
+
+*These programs are free software: released under Creative Commons
+Zero (CC0) license.*
+
+- [[https://www2.svjatoslav.eu/gitweb/?p=qbasicapps.git;a=summary][Browse Git repository online]].
+- [[https://www2.svjatoslav.eu/gitweb/?p=qbasicapps.git;a=snapshot;h=HEAD;sf=tgz][Download latest snapshot in TAR GZ format]].
+- You can clone Git repository using git:
+  : git clone https://www3.svjatoslav.eu/git/qbasicapps.git
+
+** Installation and Usage
+
+There are various ways to run legacy QBasic applications under Debian
+GNU/Linux:
+
++ Full system virtualization :: One way would be to use full system
+virtualization with [[https://www.qemu.org/][QEMU]], [[https://www.virtualbox.org/][VirtualBox]] or [[https://www.vmware.com/products/desktop-hypervisor.html][VMware Workstation or
+Player]]. After creating virtual machine, you need to obtain and
+install some distribution of DOS like [[https://en.wikipedia.org/wiki/MS-DOS][MS-DOS]] or [[https://www.freedos.org/][FreeDOS]]. Within DOS
+you can then use either Microsoft *QBasic* or Microsoft
+*QuickBasic*. QBasic is already included in Microsoft DOS by
+default. QuickBasic is more capable but must be obtained separately.
+
+- QB64 :: [[https://qb64.com][QB64]] is mostly compatible with Microsoft BASIC variants and
+ can be used too.
+
+- [[id:97ea6094-ade6-4c7d-aea9-9874acf9dc86][DOSBox + MS BASIC]] :: Easy to install and good compatibility.
+
+*** DOSBox + MS BASIC
+:PROPERTIES:
+:ID:       97ea6094-ade6-4c7d-aea9-9874acf9dc86
+:END:
+
+Following tutorial focuses on using DOSBox with original Microsoft
+QBasic or QuickBasic.
+
+DOSBox is trivial to install and BASIC programs do not need to be
+copied to virtual drive or operating system to run them. Using
+original BASIC binaries ensures good compatibility.
+
+
+Here is suggested installation and usage procedure:
+
+1. Install DOSBox by running the following command in your terminal:
+   : sudo apt-get install dosbox
+
+2. Obtain and place a copy of QuickBasic *QB.EXE* executable binary
+   into directory */QB45/* within project root directory.
+
+   Optionally obtain [[https://en.wikipedia.org/wiki/Volkov_Commander][Volkov Commander]] executable VC.COM and place it
+   under project root directory. Volkov Commander simplifies
+   filesystem navigation and running arbitrary BASIC program by
+   selecting it and pressing ENTER key. For this to work, BAS file
+   extension is mapped to BASIC executable within VC.EXT file (already
+   available in the project root directory). In case you are using
+   QBasic instead, feel free to fix VC.EXT to point to appropriate
+   BASIC executable.
+
+3. Optionally check and apply [[id:13c7d873-f1aa-4061-88ac-dc9e43c6303d][DOSBox usage tips]].
+
+4. Execute script that is located in the root directory of the
+   repository:
+   : ./run_dosbox.sh
+
+5. Now project root directory appears as root directory of virtual
+   *C:* drive. You can navigate around and start programs.
+
+
+Here is suggested project directory layout with QuickBasic and Volkov
+Commander installed:
+#+begin_example
+  ├── COPYING
+  ├── index.org
+  ├── QB45
+  │   ├── QB.EXE
+  │   └── QB.INI
+  ├── run_dosbox.sh
+  ├── (... other repository files and directories)
+  ├── VC.COM
+  ├── VC.EXT
+  └── VC.INI
+#+end_example
+
+*** DOSBox usage tips
+:PROPERTIES:
+:ID:       13c7d873-f1aa-4061-88ac-dc9e43c6303d
+:END:
+**** How to change keyboard layout to Dvorak
+
+In case you want to use Dvorak keyboard layout and DOSBox fails to
+auto-apply it, here is how you can set it manually:
+
+1. Edit file:
+  : ~/.dosbox/dosbox-<version>.conf
+
+2. Disable scancodes usage:
+   : usescancodes=false
+
+3. Save the changes and restart DOSBox for the configuration to take
+   effect.
+
+**** Increase window size
+
+If you have big high-resolution screen, by default DOSBox window could
+appear small. To make it bigger:
+
+1. Edit file:
+  : ~/.dosbox/dosbox-<version>.conf
+
+2. Set windowresolution to either of those values:
+   : windowresolution=1366x768
+   : windowresolution=1600x900
+
+3. Save the changes and restart DOSBox for the configuration to take
+   effect.
+
+4. If scaling did not work, set output to opengl:
+   : output=opengl
+
+**** Exit mouse capture
+
+DOSBox detects when a game uses mouse control. When you click on the
+screen, it should get locked (confined to the DOSBox window) and work.
+
+To release mouse lock, press:
+: CTRL-F10
+**** Increase CPU speed for better animation smoothness
+
+Many applications benefit from as fast CPU as possible. Games and
+animations that require limited frames per second always have their
+own CPU independent mechanisms for limiting animation speed. So
+setting CPU as fast as possible within emulator is beneficial.
+
+This is how I accomplished it in DOSBox:
+
+
+1. Edit file:
+  : ~/.dosbox/dosbox-<version>.conf
+
+2. Edit [cpu] section accordingly:
+  #+begin_src conf
+    [cpu]
+    core=normal
+    cputype=auto
+    cycles=fixed 100000
+  #+end_src
+
+3. Save the changes and restart DOSBox for the configuration to take
+   effect.
+** See also
+
+- Programs found in the March 1975 3rd printing of David Ahl's 101
+  BASIC Computer Games, published by Digital Equipment Corp:
+  https://github.com/maurymarkowitz/101-BASIC-Computer-Games
+
+- QB64 is a modern extended BASIC programming language that retains
+  QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for
+  Windows, Linux, and macOS: https://qb64.com/
diff --git a/run_dosbox.sh b/run_dosbox.sh
new file mode 100755 (executable)
index 0000000..12c0b34
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+# Run DOSBox with the current directory mounted as C: drive and switch to C: drive on startup.
+dosbox -c "MOUNT C: $(pwd)" -c "C:"