├── code ├── sounds │ ├── mp3s │ │ ├── mp3.txt │ │ ├── 1.mp3 │ │ ├── 2.mp3 │ │ ├── 3.mp3 │ │ ├── 4.mp3 │ │ ├── 5.mp3 │ │ ├── 6.mp3 │ │ ├── 7.mp3 │ │ ├── 8.mp3 │ │ ├── delta.mp3 │ │ ├── right.mp3 │ │ └── wrong.mp3 │ └── midi │ │ ├── midi.txt │ │ ├── 1.midi │ │ ├── 2.midi │ │ ├── 3.midi │ │ ├── 4.midi │ │ ├── 5.midi │ │ ├── 6.midi │ │ ├── 7.midi │ │ ├── 8.midi │ │ ├── delta.midi │ │ ├── right.midi │ │ └── wrong.midi ├── 3D │ └── readme.txt ├── 2D │ ├── 111.png │ ├── 112.png │ ├── 113.png │ ├── 121.png │ ├── 122.png │ ├── 123.png │ ├── 131.png │ ├── 132.png │ ├── 133.png │ ├── 211.png │ ├── 212.png │ ├── 213.png │ ├── 221.png │ ├── 222.png │ ├── 223.png │ ├── 231.png │ ├── 232.png │ ├── 233.png │ ├── 311.png │ ├── 312.png │ ├── 313.png │ ├── 321.png │ ├── 322.png │ ├── 323.png │ ├── 331.png │ ├── 332.png │ ├── 333.png │ └── readme.txt ├── povray │ ├── sample.png │ ├── cubegen.ini │ └── cubegen.pov ├── dev │ ├── readme.txt │ ├── cubegen.ini.template │ └── cubegen.pov.template ├── music │ ├── readme.txt │ ├── MidiGen.hs │ └── midi2mp3.sh └── nzt.py ├── screenshot.png ├── tutorial111.png ├── tutorial221.png ├── tutorial222.png ├── welcomeToThe231.png ├── README.md └── LICENSE /code/sounds/mp3s/mp3.txt: -------------------------------------------------------------------------------- 1 | mp3 files 2 | -------------------------------------------------------------------------------- /code/sounds/midi/midi.txt: -------------------------------------------------------------------------------- 1 | midi files 2 | -------------------------------------------------------------------------------- /code/3D/readme.txt: -------------------------------------------------------------------------------- 1 | Directory for 3D files! 2 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/screenshot.png -------------------------------------------------------------------------------- /code/2D/111.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/111.png -------------------------------------------------------------------------------- /code/2D/112.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/112.png -------------------------------------------------------------------------------- /code/2D/113.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/113.png -------------------------------------------------------------------------------- /code/2D/121.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/121.png -------------------------------------------------------------------------------- /code/2D/122.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/122.png -------------------------------------------------------------------------------- /code/2D/123.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/123.png -------------------------------------------------------------------------------- /code/2D/131.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/131.png -------------------------------------------------------------------------------- /code/2D/132.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/132.png -------------------------------------------------------------------------------- /code/2D/133.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/133.png -------------------------------------------------------------------------------- /code/2D/211.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/211.png -------------------------------------------------------------------------------- /code/2D/212.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/212.png -------------------------------------------------------------------------------- /code/2D/213.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/213.png -------------------------------------------------------------------------------- /code/2D/221.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/221.png -------------------------------------------------------------------------------- /code/2D/222.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/222.png -------------------------------------------------------------------------------- /code/2D/223.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/223.png -------------------------------------------------------------------------------- /code/2D/231.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/231.png -------------------------------------------------------------------------------- /code/2D/232.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/232.png -------------------------------------------------------------------------------- /code/2D/233.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/233.png -------------------------------------------------------------------------------- /code/2D/311.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/311.png -------------------------------------------------------------------------------- /code/2D/312.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/312.png -------------------------------------------------------------------------------- /code/2D/313.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/313.png -------------------------------------------------------------------------------- /code/2D/321.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/321.png -------------------------------------------------------------------------------- /code/2D/322.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/322.png -------------------------------------------------------------------------------- /code/2D/323.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/323.png -------------------------------------------------------------------------------- /code/2D/331.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/331.png -------------------------------------------------------------------------------- /code/2D/332.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/332.png -------------------------------------------------------------------------------- /code/2D/333.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/2D/333.png -------------------------------------------------------------------------------- /tutorial111.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/tutorial111.png -------------------------------------------------------------------------------- /tutorial221.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/tutorial221.png -------------------------------------------------------------------------------- /tutorial222.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/tutorial222.png -------------------------------------------------------------------------------- /welcomeToThe231.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/welcomeToThe231.png -------------------------------------------------------------------------------- /code/povray/sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/povray/sample.png -------------------------------------------------------------------------------- /code/sounds/mp3s/1.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/mp3s/1.mp3 -------------------------------------------------------------------------------- /code/sounds/mp3s/2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/mp3s/2.mp3 -------------------------------------------------------------------------------- /code/sounds/mp3s/3.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/mp3s/3.mp3 -------------------------------------------------------------------------------- /code/sounds/mp3s/4.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/mp3s/4.mp3 -------------------------------------------------------------------------------- /code/sounds/mp3s/5.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/mp3s/5.mp3 -------------------------------------------------------------------------------- /code/sounds/mp3s/6.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/mp3s/6.mp3 -------------------------------------------------------------------------------- /code/sounds/mp3s/7.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/mp3s/7.mp3 -------------------------------------------------------------------------------- /code/sounds/mp3s/8.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/mp3s/8.mp3 -------------------------------------------------------------------------------- /code/sounds/midi/1.midi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/midi/1.midi -------------------------------------------------------------------------------- /code/sounds/midi/2.midi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/midi/2.midi -------------------------------------------------------------------------------- /code/sounds/midi/3.midi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/midi/3.midi -------------------------------------------------------------------------------- /code/sounds/midi/4.midi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/midi/4.midi -------------------------------------------------------------------------------- /code/sounds/midi/5.midi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/midi/5.midi -------------------------------------------------------------------------------- /code/sounds/midi/6.midi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/midi/6.midi -------------------------------------------------------------------------------- /code/sounds/midi/7.midi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/midi/7.midi -------------------------------------------------------------------------------- /code/sounds/midi/8.midi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/midi/8.midi -------------------------------------------------------------------------------- /code/dev/readme.txt: -------------------------------------------------------------------------------- 1 | This folder contains experimental code, such as templates used in intended features. 2 | -------------------------------------------------------------------------------- /code/sounds/midi/delta.midi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/midi/delta.midi -------------------------------------------------------------------------------- /code/sounds/midi/right.midi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/midi/right.midi -------------------------------------------------------------------------------- /code/sounds/midi/wrong.midi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/midi/wrong.midi -------------------------------------------------------------------------------- /code/sounds/mp3s/delta.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/mp3s/delta.mp3 -------------------------------------------------------------------------------- /code/sounds/mp3s/right.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/mp3s/right.mp3 -------------------------------------------------------------------------------- /code/sounds/mp3s/wrong.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zack-bitcoin/NZT/master/code/sounds/mp3s/wrong.mp3 -------------------------------------------------------------------------------- /code/2D/readme.txt: -------------------------------------------------------------------------------- 1 | This folder contains 2D images to illustrate NZT proof of concept! 2 | Included images are green. 3 | However, when autogen is functional to bypass upload size requirements, color will change by level. 4 | -------------------------------------------------------------------------------- /code/music/readme.txt: -------------------------------------------------------------------------------- 1 | This folder contains source code used to generate the tunes. 2 | 3 | !!! NOTE !!! 4 | 5 | This code uses a different naming scheme than the one used in the sounds folder. The new layout works better. This code needs changes to produce files compatible with the rest of the program. 6 | -------------------------------------------------------------------------------- /code/povray/cubegen.ini: -------------------------------------------------------------------------------- 1 | ;; povray RES.INI file 2 | ;; I usually run povray cubegen[high] 3 | ;; [med] setting is for 2d 4 | 5 | Input_File_Name=cubegen.pov 6 | Output_File_Name=sample.png 7 | 8 | ;default 9 | +W300 +H300 10 | 11 | [Low] 12 | +W80 +H60 13 | 14 | [Med] 15 | +W1920 +H1080 +A +J 16 | 17 | [High] 18 | +W3840 +H2160 +A +J 19 | 20 | [Insane] 21 | +W7680 +H4320 +A0.5 +J0.2 22 | -------------------------------------------------------------------------------- /code/dev/cubegen.ini.template: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | file="$1" 4 | 5 | cat < LEVEL: 73 | if answer == parse[trialnumber-LEVEL-1]: 74 | play('right.mp3') 75 | else: 76 | play('wrong.mp3') 77 | return [trialnumber, answer] 78 | def stop_game(x, y, z): 79 | pygame.quit() 80 | sys.exit() 81 | def event2(x, trialnumber, answer): 82 | play('delta.mp3') 83 | pygame.time.set_timer(EVENT2, 0) 84 | return [trialnumber, answer] 85 | events = {K_a: ['1.mp3', 1], 86 | K_s: ['2.mp3', 7], 87 | K_d: ['3.mp3', 6], 88 | K_f: ['4.mp3', 4], 89 | K_j: ['5.mp3', 5], 90 | K_k: ['6.mp3', 3], 91 | K_l: ['7.mp3', 2], 92 | K_SEMICOLON: ['8.mp3', 8]} 93 | def key_up(event, trialnumber, answer): 94 | [f, a] = events.get(event.key, ['',-1]) 95 | if (a != -1): 96 | play(f) 97 | answer = a 98 | return [trialnumber, answer] 99 | main_switch = { 100 | QUIT: stop_game, 101 | NEXTTRIAL: next_trial, 102 | EVENT2: event2, 103 | KEYUP: key_up} 104 | def nothing(a,b,c): return [b,c] 105 | while True: # main game loop 106 | for event in pygame.event.get(): 107 | if trialnumber == TRIALS + LEVEL -1: 108 | stop_game(0, 0, 0) 109 | f = main_switch.get(event.type, nothing) 110 | [trialnumber, answer] = f(event,trialnumber,answer) 111 | pygame.display.update() 112 | fpsClock.tick(FPS) 113 | 114 | -------------------------------------------------------------------------------- /code/povray/cubegen.pov: -------------------------------------------------------------------------------- 1 | #include "colors.inc" // Required for rendering 2 | #include "textures.inc" 3 | #include "shapes.inc" 4 | #include "glass.inc" 5 | #include "metals.inc" 6 | 7 | background { color Black } // Black background 8 | 9 | camera { location <23,23,100> 10 | look_at <23,23,23> } // Camera Position and Angle 11 | 12 | #declare Lightbulb = union { 13 | merge { 14 | sphere { <0,0,0>, 1} // sphere radius 1 15 | texture { 16 | pigment {color rgb<1,1,1>} // white light 17 | finish {ambient .8 diffuse .6} 18 | }}} // Lightsource Properties 19 | 20 | light_source { 21 | <23,23,23> // Source is located at center of cube 22 | color White // Note - I changed this to Red for renderings of 'center' 23 | looks_like { Lightbulb }} // NOT a point source! 24 | 25 | #declare shinySphere = // declare shinySphere properties 26 | sphere { 27 | <0,0,0>, 2 // center and radius 28 | pigment { White filter 1} // no idea what all this stuff does 29 | finish { ambient .1 diffuse .1 reflection .2 specular 1 roughness .001 30 | irid { 0.35 thickness .5 turbulence .5 31 | }} // but it makes it look REALLY COOL!!! 32 | interior { ior 1.5 fade_distance 5 fade_power 1 caustics 1 33 | }} // reduces boilerplate in declarations for faces, corners, and edges 34 | 35 | #declare corner = union{ // union of sphere and 3 cylinders 36 | 37 | object {shinySphere translate <0,0,0>} 38 | 39 | cylinder { <0, 3, 0> <0, 9, 0> .5 } 40 | cylinder { <3, 0, 0> <9, 0, 0> .5 } 41 | cylinder { <0, 0, 3> <0, 0, 9> .5 }} // corner for myCube 42 | 43 | #declare face = union{ // union of 4 spheres and 4 cylinders 44 | 45 | object {shinySphere translate <8,8,0>} 46 | object {shinySphere translate <8, -8, 0>} 47 | object {shinySphere translate <-8, 8, 0>} 48 | object {shinySphere translate <-8, -8, 0>} 49 | 50 | cylinder { <8,5,0> <8,-5,0> .5 } 51 | cylinder { <-8,5,0> <-8,-5,0> .5 } 52 | cylinder { <-5,-8,0> <5,-8,0> .5 } 53 | cylinder { <-5,8,0> <5,8,0> .5 }} // face for myCube 54 | 55 | #declare edge = union{ // union of 2 spheres and 5 cylinders 56 | 57 | object {shinySphere translate <0,0,8>} 58 | object {shinySphere translate <0,0,-8>} 59 | 60 | cylinder { <3, 0, -8> <9, 0, -8> .5 } 61 | cylinder { <0, 3, -8> <0, 9, -8> .5 } 62 | cylinder { <0, 0, -5> <0, 0, 5> .5 } 63 | cylinder { <3, 0, 8> <9, 0, 8> .5 } 64 | cylinder { <0, 3, 8> <0, 9, 8> .5 }} // edge for myCube 65 | 66 | #declare myCube = union { // this was rather tedeious, however pragmatism prevailed 67 | 68 | object {face translate <23, 23, 0> pigment { color rgb <0,255,0>}} // Back 217.png 69 | object {face translate <23, 23, 46> } // Front 223.png 70 | object {face translate <23, 23, 0> rotate <90,0,0> } // Down 212.png 71 | object {face translate <23, 23, 0> rotate <90,0,90> } // Right 122.png 72 | object {face translate <23, 23, 0> rotate <90,0,90> translate <46, 0, 0> } // Left 322.png 73 | object {face translate <23, 23, 0> rotate <90,0,0> translate <0,46,0> } // Top 232.png 74 | 75 | object {corner translate <0,0,0> } // BackRightDown 111.png 76 | object {corner rotate <0,0,-90> translate <0,46,0> } // BackRightTop 131.png 77 | object {corner rotate <0,0,90> translate <46,0,0> } // BackLeftDown 311.png 78 | object {corner rotate <-90,0,0> translate <0,0,46> } // FrontRightDown 113.png 79 | object {corner rotate <0,0,180> translate <46,46,0> } // BackLeftTop 331.png 80 | object {corner rotate <0, -180, 0> translate <46,0,46> } // FrontLeftDown 313.png 81 | object {corner rotate <-180,0,0> translate <0,46,46> } // FrontRightTop 133.png 82 | object {corner rotate <0,90,180> translate <46,46,46> } // FrontLeftTop 333.png 83 | 84 | object {edge translate <0, 0, 23> } // RightDown 112.png 85 | object {edge rotate <0, 0, 90> translate <46, 0, 23> } // LeftDown 312.png 86 | object {edge rotate <0, 0, 180> translate <46, 46, 23> } // LeftTop 332.png 87 | object {edge rotate <0, 0, -90> translate <0, 46, 23> } // RightTop 132.png 88 | object {edge rotate <-90, 180, -90> translate <23, 0, 0> } // BackDown 211.png 89 | object {edge rotate <-90, 180, 180> translate <0, 23, 0> } // BackRight 121.png 90 | object {edge rotate <-90, -90, 180> translate <46, 23, 0> } // BackLeft 321.png 91 | object {edge rotate <-90, 180, 90> translate <23, 46, 0> } // BackTop 231.png 92 | object {edge rotate <0, 90, 180> translate <23, 46, 46> } // FrontTop 233.png 93 | object {edge rotate <-90, 0, 0> translate <0, 23, 46> } // FrontRight 123.png 94 | object {edge rotate <0, 90, 0> translate <23, 0, 46> } // FrontDown 213.png 95 | object {edge rotate <0, 90, 90> translate <46, 23, 46> } // FrontLeft 323.png 96 | 97 | texture {Green_Glass} // personal preference 98 | finish {reflection {.9} ambient .1 diffuse .1}} 99 | 100 | myCube // build myCube structure 101 | -------------------------------------------------------------------------------- /code/dev/cubegen.pov.template: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | location="$1" 4 | pigment_fragment="$2" 5 | 6 | cat <<'EOF' | sed -e "s:/[*]${location}[*]/:${pigment_fragment}:" 7 | #include "colors.inc" // Required for rendering 8 | #include "textures.inc" 9 | #include "shapes.inc" 10 | #include "glass.inc" 11 | #include "metals.inc" 12 | 13 | background { color Black } // Black background 14 | 15 | camera { location <23,23,100> 16 | look_at <23,23,23> } // Camera Position and Angle 17 | 18 | #declare Lightbulb = union { 19 | merge { 20 | sphere { <0,0,0>, 1} // sphere radius 1 21 | texture { 22 | pigment {color rgb<1,1,1>} // white light 23 | finish {ambient .8 diffuse .6} 24 | }}} // Lightsource Properties 25 | 26 | light_source { 27 | <23,23,23> // Source is located at center of cube 28 | color White // Note - I changed this to Red for renderings of 'center' 29 | looks_like { Lightbulb }} // NOT a point source! 30 | 31 | #declare shinySphere = // declare shinySphere properties 32 | sphere { 33 | <0,0,0>, 2 // center and radius 34 | pigment { White filter 1} // no idea what all this stuff does 35 | finish { ambient .1 diffuse .1 reflection .2 specular 1 roughness .001 36 | irid { 0.35 thickness .5 turbulence .5 37 | }} // but it makes it look REALLY COOL!!! 38 | interior { ior 1.5 fade_distance 5 fade_power 1 caustics 1 39 | }} // reduces boilerplate in declarations for faces, corners, and edges 40 | 41 | #declare corner = union{ // union of sphere and 3 cylinders 42 | 43 | object {shinySphere translate <0,0,0>} 44 | 45 | cylinder { <0, 3, 0> <0, 9, 0> .5 } 46 | cylinder { <3, 0, 0> <9, 0, 0> .5 } 47 | cylinder { <0, 0, 3> <0, 0, 9> .5 }} // corner for myCube 48 | 49 | #declare face = union{ // union of 4 spheres and 4 cylinders 50 | 51 | object {shinySphere translate <8,8,0>} 52 | object {shinySphere translate <8, -8, 0>} 53 | object {shinySphere translate <-8, 8, 0>} 54 | object {shinySphere translate <-8, -8, 0>} 55 | 56 | cylinder { <8,5,0> <8,-5,0> .5 } 57 | cylinder { <-8,5,0> <-8,-5,0> .5 } 58 | cylinder { <-5,-8,0> <5,-8,0> .5 } 59 | cylinder { <-5,8,0> <5,8,0> .5 }} // face for myCube 60 | 61 | #declare edge = union{ // union of 2 spheres and 5 cylinders 62 | 63 | object {shinySphere translate <0,0,8>} 64 | object {shinySphere translate <0,0,-8>} 65 | 66 | cylinder { <3, 0, -8> <9, 0, -8> .5 } 67 | cylinder { <0, 3, -8> <0, 9, -8> .5 } 68 | cylinder { <0, 0, -5> <0, 0, 5> .5 } 69 | cylinder { <3, 0, 8> <9, 0, 8> .5 } 70 | cylinder { <0, 3, 8> <0, 9, 8> .5 }} // edge for myCube 71 | 72 | #declare myCube = union { // this was rather tedeious, however pragmatism prevailed 73 | 74 | object {face translate <23, 23, 0> /*Back*/} // Back 221.png 75 | object {face translate <23, 23, 46> /*Front*/} // Front 223.png 76 | object {face translate <23, 23, 0> rotate <90,0,0> /*Down*/} // Down 212.png 77 | object {face translate <23, 23, 0> rotate <90,0,90> /*Right*/} // Right 122.png 78 | object {face translate <23, 23, 0> rotate <90,0,90> translate <46, 0, 0> /*Left*/} // Left 322.png 79 | object {face translate <23, 23, 0> rotate <90,0,0> translate <0,46,0> /*Top*/} // Top 232.png 80 | 81 | object {corner translate <0,0,0> /*BackRightDown*/} // BackRightDown 111.png 82 | object {corner rotate <0,0,-90> translate <0,46,0> /*BackRightTop*/} // BackRightTop 131.png 83 | object {corner rotate <0,0,90> translate <46,0,0> /*BackLeftDown*/} // BackLeftDown 311.png 84 | object {corner rotate <-90,0,0> translate <0,0,46> /*FrontRightDown*/} // FrontRightDown 113.png 85 | object {corner rotate <0,0,180> translate <46,46,0> /*BackLeftTop*/} // BackLeftTop 331.png 86 | object {corner rotate <0, -180, 0> translate <46,0,46> /*FrontLeftDown*/} // FrontLeftDown 313.png 87 | object {corner rotate <-180,0,0> translate <0,46,46> /*FrontRightTop*/} // FrontRightTop 133.png 88 | object {corner rotate <0,90,180> translate <46,46,46> /*FrontLeftTop*/} // FrontLeftTop 333.png 89 | 90 | object {edge translate <0, 0, 23> /*RightDown*/} // RightDown 112.png 91 | object {edge rotate <0, 0, 90> translate <46, 0, 23> /*LeftDown*/} // LeftDown 312.png 92 | object {edge rotate <0, 0, 180> translate <46, 46, 23> /*LeftTop*/} // LeftTop 332.png 93 | object {edge rotate <0, 0, -90> translate <0, 46, 23> /*RightTop*/} // RightTop 132.png 94 | object {edge rotate <-90, 180, -90> translate <23, 0, 0> /*BackDown*/} // BackDown 211.png 95 | object {edge rotate <-90, 180, 180> translate <0, 23, 0> /*BackRight*/} // BackRight 121.png 96 | object {edge rotate <-90, -90, 180> translate <46, 23, 0> /*BackLeft*/} // BackLeft 321.png 97 | object {edge rotate <-90, 180, 90> translate <23, 46, 0> /*BackTop*/} // BackTop 231.png 98 | object {edge rotate <0, 90, 180> translate <23, 46, 46> /*FrontTop*/} // FrontTop 233.png 99 | object {edge rotate <-90, 0, 0> translate <0, 23, 46> /*FrontRight*/} // FrontRight 123.png 100 | object {edge rotate <0, 90, 0> translate <23, 0, 46> /*FrontDown*/} // FrontDown 213.png 101 | object {edge rotate <0, 90, 90> translate <46, 23, 46> /*FrontLeft*/} // FrontLeft 323.png 102 | 103 | texture {Green_Glass} // personal preference 104 | finish {reflection {.9} ambient .1 diffuse .1}} 105 | 106 | myCube // build myCube structure 107 | EOF 108 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ![wow](screenshot.png "Intro") 4 | 5 | HMB-Entertainment proudly presents NZT - Take your memory to the next level! Do you want to feel limitless? 6 | 7 | ## Intro 8 | 9 | **License** 10 | - To protect your freedom and ensure that NZT remains free software, I choose to release NZT with the GNUv2 license. 11 | 12 | **Donate** 13 | - If you love my work, I welcome a donation if you can afford it! 14 | - Bitcoin : 17emRoB1JpmAi8QsDwEpA1hsZ8srKfUKoh 15 | - Ethereum : 0xE061D64a320EE32a0b31aaCD7BBCCd3632D958C0 16 | 17 | **Contact** 18 | - You can reach me at holdmybeer@protonmail.com. HMB-Entertainment welcomes your contributions to NZT! 19 | 20 | ## Abstract 21 | The original N-back game illuminates a randomly selected square on a 3x3 tic tac toe board and asks the user to indicate when the current square matches the one shown "n" levels back. Dual N-back adds an auditory dimension to this game with a verbally indicated letter the user has to remember. Unlike single N-back, which trained only working memory, Dual N-back could increase fluid intelligence, previously seen as untrainable. Furthermore, cognitive gains from N-back transfer to other domains! 22 | 23 | NZT represents a purely visual 3D evolution of these games. I hope that it you find it vastly superiour to either of its predecessors as entertainment as well as brain food. 24 | 25 | ## Installation 26 | 27 | ***These instructions will improve when I get installation feedback from a few friends*** 28 | 29 | 1. Make Sure you have pip installed and install PyGame 30 | 31 | - pip install pygame 32 | 33 | 2. Clone the repository using git clone 34 | 35 | 3. run nzt.py using python version 2 36 | 37 | - python code/nzt.py 38 | 39 | ## Gameplay 40 | For standard gameplay, programmers and typists will appreciate that the four fingers rest gently on the home row keys: "a s d f j k l ;". DON'T PANIC, they will not have to move. 41 | 42 | By default, NZT will start at level 1. You only have to indicate the relationship the current element bears to the one that was previously displayed. NZT will communicate your input back to you by playing a single musical note. You have seven possible options. x, y, z, xy, xz, yz, xyz, as well as an eighth "No Relationship" option. Again, DON'T PANIC - by default you have 30 seconds to decide. 43 | 44 | At half-time (in this case 15 seconds) a wavering warble tune will indicate that you should select a final answer soon. After the next item appears, you will hear either a happy tune in a major key to indicate your success, or a descending chromatic cascade to indiate a wrong key. 45 | 46 | **Different Scenarios** 47 | 48 | 0 - Evaluate these scenarios one after another. 49 | 50 | 1 - If you see the same element, choose xyz. 51 | 52 | 2 - If the element occurs in the same axis (x = Horizontal, y = Vertical, or z = Depth) choose that axis. 53 | 54 | 3 - If the element occurs in the same plane, choose the plane defined by the cross product of the 2 axes it contains. 55 | 56 | 4 - If the element satisfies neither of these three conditions, then there exists no relationship. 57 | 58 | - 'a' -> no relationship -> low A // BLACK 59 | - 's' -> x axis -> B // RED 60 | - 'd' -> y axix -> C // GREEN 61 | - 'f' -> z axis -> D // BLUE 62 | - 'j' -> xy plane -> E // YELLOW 63 | - 'k' -> zx plane -> F // MAGENTA 64 | - 'l' -> zy plane -> G // CYAN 65 | - ';' -> xyz -> same element -> high A // WHITE 66 | 67 | If this terse explanation causes your eyes to glaze over, DON'T PANIC. A visual explanation using rules of RGB additive synthesis illustrates the relationship between elements. 68 | 69 | CENTER 70 | ![center](tutorial222.png "Universal Symmetry") 71 | 72 | CORNER 73 | ![corner](tutorial111.png "8x symmetry") 74 | 75 | FACE 76 | ![face](tutorial221.png "6x symmetry") 77 | 78 | EDGE 79 | ![edge](welcomeToThe231.png "12x symmetry") 80 | 81 | ## Technical Features 82 | 83 | *Hardcoded constants* 84 | - This lets me keep things simple to focus on proof of concept and enables rapid prototyping. I'd love to implement this later as an accessor class module. 85 | 86 | *Purely visual interface* 87 | - When I play NZT in 3D, I enter a flow state and let my brain provide the answer. In a way I strive to replicate meditaton. Meditation requires internal awareness to determine if you meditate correctly. A guru can't see into your mind, while a gymnastics teacher can see errors in form and technique. NZT will provide imemdiate feedback if you lose focus. Although people may have different techniques for representing the elements in working memory, the game feedback provides a degree of objectivity. 88 | - I value the flow state with utmost importance because of its fragility. Having to click something on the screen, popups, and shifting colours can break this for me. I elected for music tones to indicate user input and feedback so that the visual system could enter a flow state. 89 | - I felt inspired to design it this way after watching a Youtube video where Richard Feynman performed experiments in college with a friend and realized that Visual and Auditory systems work independently. 90 | 91 | *UI Design theory* 92 | - The fingers resting on the home row keys indicate all of these options in a way that balances the load on the left and right hands according to probability. 93 | - The low a is most likely while the high a is least likely. The remaining keys in the home row are set the opposite way. 94 | - NZT indicates half-time via a tenuous warble that elicits an uncertain feeling. 95 | - NZT indicates failure via a sad chromatic descent. 96 | - NZT indicates success via a happy major scale. 97 | - The keys "a s d f j k l ;" when played in succesion will play out an A natural minor scale. 98 | - There exists, quite literally harmony at the interface. 99 | 100 | *Ray Tracing* 101 | - Originally I tried using turtle but it fell immensely short of my standards. 102 | - Paul Grahm's ANSI Common Lisp inspired me to consider Ray Tracing. 103 | - Pov-ray install needed to run .pov files to make your own images. 104 | 105 | *Music Generation* 106 | - I designed the tunes from my own musical intuition. 107 | - Haskell enables me to express the tune with maximum ease and clarity. 108 | - You will need to install GHC (Gargantuan Haskell Compiler) and Euterpea to make custom tunes. 109 | 110 | *Probabalistic Balance* 111 | - Single N-back only has a 1/9 probability of matching the previous element. Without random weighting, this results in a very boring game. 112 | - NZT is inherently balanced and dynamic, with a probability of 19/27 (slightly higher than 2/3) of matching the previous element in one of seven ways. This results in a much more varied game compared to Single N-back. 113 | 114 | *Ranking System* 115 | - Advancement should feel like achievement! 116 | - Different colors represent different levels. I cannot upload all the pictures due to github repository size restrictions. I will make a git commit with the code for the functionality when I have a shell script for autogeneration. 117 | - Level 1 = White. Simple enough. Fairly boring at this level. In a Go style ranking, I call this at 128 Kyu. 118 | - Levels [2..8] = [Red..Violet], Kyu = [2^x|x<-[6,5..0]]. I would probably feel pretty awesome having gone through all the colors! NZT has a surprise in store. 119 | - Levels [9..] = Black, Dan = [1..] Awareness of abscense does not indicate abscence of awareness. At this level you have to go past the color to mould your awareness to notice the disappearance. 120 | 121 | ### Epilogue 122 | This project took much more time than I anticipated. I figured it would serve as a great way to jump into programming for the first time. I'd never made anything before. However this idea called to me, imploring me to will it into existence. It would not stop haunting me until I did. What a journey! 123 | 124 | I figured it would take me a few weeks to get it to version 0. After spending far more time than I care to admit, I ended up learning more than I bargained. As I pondered and implemented various ideas I learned about python, pygame, linux, bash, regular expressions, text editors, window managers, antialiasing, jitter, haskell, dependency hell, euterpea, git, benefits of commenting code, as well as balancing my wish for perfection with the neccesity of execution. It took enourmous will to fight the forces of entropy as they threw obstacle after obstacle in my path. =D 125 | 126 | I'd like to offer special thanks to Gwern for inspiring this project by mentioning this idea on his fantastic site. https://www.gwern.net/ 127 | 128 | Secondly, I'd like to thank my friend Greg for using his wizardry of Grep,Sed, and Awk in creating invaluable templates for automatic generation of images. 129 | 130 | If you like NZT, or see a way to make it better, consider contributing! Let me know your thoughts at holdmybeer@protonmail.com. Here are some ideas. 131 | 132 | ### Features to Add 133 | I would love contributions to continue making NZT a more elegant game for elite memory enhancement. Here is a list of features to implement later rated from 1 to 3 stars according to difficulty. 134 | 135 | Screencast * 136 | - Planning a screencast soon! An engaging one would serve as a great way to show new users how to get started and resolve any confusion with the presentation of the interface in the readme. 137 | 138 | Auto Image Generation * 139 | - Planning to create a shell script integrating templates to automatically generate high quality 3D images on the user's computer. This will give users the highest resolution images possible and bypass github size restrictions. Also makes for a more elegant and extensible program enabling anyone to easily modify NZT to suit their style of gameplay. 140 | 141 | 3D Support * 142 | - NZT is currently compatible with 3D and has been successfully tested with it on multiple systems. 3D images are not included with the initial release. However, if this feature has sufficient demand, this represents the next logical extension. 143 | 144 | Refactor Code * 145 | - Priority was creating a minimum viable product. With proof of concept done, improving existing code takes less effort. I used an egregious collection of if statements in the game loop, however I am new to Python and am unsure how to clean this up without lisp macros. 146 | 147 | Backwards compatibility with N-Back and Dual N-Back * 148 | - Using the existing sounds and povray code generate simpler images that are a subset of a cube and execute N-back and Dual N-back 149 | 150 | MIDI Support ** 151 | - PyGame is incompatible with MIDI files so I wrote a shell script to convert them to mp3. 152 | - Perhaps increasing the bitrate might solve this, but auditory static noise occurs at the beginning of any sound. 153 | - Personally, I want this gone, however, some may find it pleasant. It kind of resembles a keyboard click. Sort of. 154 | 155 | Logging and Statistics package ** 156 | - Log user data as CSV file and have separate python program to load user statistics and graphically display them to display progress over time. Perhaps have it pay attention to aspects of the game the user is strong and weak at and offer advice accordingly. 157 | 158 | GUI Interface ** 159 | - Currently gameplay settings are hardcoded for simplicity. However, having a gui interface that could be accessed would allow the game to reach many more people. This would also allow the game to be packaged as a binary and easily run on Mac, Windows, or phones. 160 | 161 | FPS game support *** 162 | - Unsure how this would work. Add different guns that would selectively kill blocks. Objective is to 'kill' the piece n turns back. If you remember the exact piece, sniper would kill it instantly. If not, other weapons such as shotgun would have area of effect and would take down shields. Only with shields down can you see if the piece is the correct one. Food for thought! =D 163 | 164 | Quaternion Rotations *** 165 | - A setting with perhaps lower quality but a rotating cube would add yet another dimension to NZT! Quaternions could represent these computations in a stable and fast manner while preserving quality. Algorithm thoughts : generate images prior to the game, and use them to approximate intermediate images thus mostly preserving quality. Gameplay options reduced to four as the user already has to remember a rotating structure : Same element, same axis, same plane, No Match. 166 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | --------------------------------------------------------------------------------