<commit_before>homepage: http://code.mathr.co.uk/bowntz
changelog-type: ''
hash: 5108321bc957877be5cd1b18c2766a4ec258c79bf4507bfad022053bcd709a45
test-bench-deps: {}
maintainer: <EMAIL>
synopsis: audio-visual pseudo-physical simulation of colliding circles
changelog: ''
basic-deps:
  GLUT: ! '>=2.7 && <2.8'
  base: ! '>=4.8 && <4.9'
  containers: ! '>=0.5 && <0.6'
  hosc: ! '>=0.15 && <0.16'
  random: ! '>=1.1 && <1.2'
  hsc3: ! '>=0.15 && <0.16'
all-versions:
- '0'
author: <NAME>
latest: '0'
description-type: text
description: ! "Bowntz -- an audio-visual pseudo-physical simulation of colliding
  circles\nCopyright (C) 2010,2013,2015 Claude-Heiland-Allen <<EMAIL>>\n\n\nBuild\n-----\n\n
  \   $ cabal sandbox init\n    $ cabal install\n\n\nUsage\n-----\n\n    $ scsynth
  -u 57110 &\n    -- wait for scsynth to start, connect its JACK ports --\n    $ ./bowntz\n\n
  \   Bowntz requires a \"clean\" SC3 server to be running on its usual port.\n    Bowntz
  leaves this SC3 server in an \"unclean\" state when it exits.\n\n    This situation
  is far from ideal, but it's the current state of the code.\n\n\nNotes\n-----\n\n
  \   The world is a collection of N circles which each move at a constant speed\n
  \   in a straight line (in the absence of collisions).  Given two such circles\n
  \   it is possible to calculate the precise time of their next collision.  For\n
  \   N circles, O(N^2) such \"next\" collisions may occur.\n\n    Pick the soonest
  next collision between circles A and B.  This collision\n    will change the velocities
  of A and B, but no other circle.  Update the\n    collection of collisions, by removing
  all the other \"next\" collisions\n    involving either A or B, and computing the
  new collisions of A and B with\n    all the other circles (O(N) collisions).  For
  maintaining a consistent\n    time-base for all circles in the world, it makes sense
  to advance in a\n    straight line each circle to its position at the time of the
  collision.\n\n    Given a world at time T, to find the world at time T+dT simply
  step\n    through the future collisions one by one until the soonest collision is\n
  \   after T+dT, at which point one can just advance the circles in straight\n    lines
  to T+dT.\n\n        T       T+1      T+2      T+3      T+4      T+5      T+6      T+7\n
  \   ... |        |        |        |        |        |        |        | ...\n        ----*---*---*---------*---------------**-*--*-*-------*------*--\n\n
  \   Care needs to be taken in case of numerical imprecision: one can get an\n    infinite
  number of collisions without time increasing.\n\n\nTo do\n-----\n\n    General code
  clean-up and documentation.\n\n    Optimizations based on collision possibility
  tree, example:\n\n        A               7 possible\n        |               A~*~B\n
  \       +---B           A~*~E    5 impossible\n        |   +---C       B~*~C    !A~*~C\n
  \       |   +---D       B~*~D    !A~*~D\n        |               C~*~D    !C~*~F\n
  \       +---E           B~*~E    !D~*~F\n            +---F       E~*~F    !A~*~F\n\n
  \       data Node = Node ID [Node]\n        possibles n@(Node _ ns) = possible n
  `map` ns ++ liftM2 possible ns\n\n    Infinite zoom into circles within circles
  within circles within circles?\n    When (if ever) would it be safe to prune \"outside\"?\n\n
  \   Some kind of loop where circles contain themselves (I did try this in\n    another
  unreleased version but it resulted in hyperexponential kinetic\n    energy increase,
  which naturally caused problems).\n\n    Non-flat space.\n\n    Angular momentum
  affecting collisions.\n\n    Remove all sources of non-determinism to enable two-pass
  rendering:\n        1 pass to record audio from SC3    in realtime\n        2 pass
  to record video from OpenGL in non-realtime\n    Or just record ball positions in
  the first pass for later drawing (because\n    callback races and/or timing instability
  might affect the reproducibility\n    unless very precise care is taken at all stages..)\n\n
  \   Interactivity.\n\n    More impressive audio-visuals.\n\n\nWon't\n-----\n\n    Anything
  other than circles (ok, maybe infinite lines would be ok, but\n    asymmetry with
  angular momentum would quickly make collision detection\n    get horribly complicated).\n\n\nLegal\n-----\n\n
  \   License: GPL\n\n    This program is free software: you can redistribute it and/or
  modify\n    it under the terms of the GNU General Public License as published by\n
  \   the Free Software Foundation, either version 3 of the License, or\n    (at your
  option) any later version.\n\n    This program is distributed in the hope that it
  will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty
  of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General
  Public License for more details.\n\n    You should have received a copy of the GNU
  General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\n"<commit_msg>Update from Hackage at 2016-06-18T00:22:51+0000<commit_after>homepage: https://code.mathr.co.uk/bowntz
changelog-type: ''
hash: c1accbde9027c5d1f74677bb246ab0d813b25cc9cf0b204101b7651d1231b2c3
test-bench-deps: {}
maintainer: <EMAIL>
synopsis: audio-visual pseudo-physical simulation of colliding circles
changelog: ''
basic-deps:
  GLUT: ! '>=2.7 && <2.8'
  base: ! '>=4.8 && <4.10'
  containers: ! '>=0.5 && <0.6'
  hosc: ! '>=0.15 && <0.16'
  random: ! '>=1.1 && <1.2'
  hsc3: ! '>=0.15 && <0.16'
all-versions:
- '0'
- '1'
author: <NAME>
latest: '1'
description-type: text
description: ! "Bowntz -- an audio-visual pseudo-physical simulation of colliding
  circles\nCopyright (C) 2010,2013,2015,2016 Claude-Heiland-Allen <<EMAIL>>\n\n\nBuild\n-----\n\n
  \   $ ghc -O2 -Wall --make bowntz.hs\n\n    Bowntz requires hsc3 >= 0.8 (newer than
  Hackage, as of 2010-03-12).\n\n\nUsage\n-----\n\n    $ scsynth -u 57110 &\n    --
  wait for scsynth to start, connect its JACK ports --\n    $ ./bowntz\n\n    Bowntz
  requires a \"clean\" SC3 server to be running on its usual port.\n    Bowntz leaves
  this SC3 server in an \"unclean\" state when it exits.\n\n    This situation is
  far from ideal, but it's the current state of the code.\n\n\nNotes\n-----\n\n    The
  world is a collection of N circles which each move at a constant speed\n    in a
  straight line (in the absence of collisions).  Given two such circles\n    it is
  possible to calculate the precise time of their next collision.  For\n    N circles,
  O(N^2) such \"next\" collisions may occur.\n\n    Pick the soonest next collision
  between circles A and B.  This collision\n    will change the velocities of A and
  B, but no other circle.  Update the\n    collection of collisions, by removing all
  the other \"next\" collisions\n    involving either A or B, and computing the new
  collisions of A and B with\n    all the other circles (O(N) collisions).  For maintaining
  a consistent\n    time-base for all circles in the world, it makes sense to advance
  in a\n    straight line each circle to its position at the time of the collision.\n\n
  \   Given a world at time T, to find the world at time T+dT simply step\n    through
  the future collisions one by one until the soonest collision is\n    after T+dT,
  at which point one can just advance the circles in straight\n    lines to T+dT.\n\n
  \       T       T+1      T+2      T+3      T+4      T+5      T+6      T+7\n    ...
  |        |        |        |        |        |        |        | ...\n        ----*---*---*---------*---------------**-*--*-*-------*------*--\n\n
  \   Care needs to be taken in case of numerical imprecision: one can get an\n    infinite
  number of collisions without time increasing.\n\n\nTo do\n-----\n\n    General code
  clean-up and documentation.\n\n    Optimizations based on collision possibility
  tree, example:\n\n        A               7 possible\n        |               A~*~B\n
  \       +---B           A~*~E    5 impossible\n        |   +---C       B~*~C    !A~*~C\n
  \       |   +---D       B~*~D    !A~*~D\n        |               C~*~D    !C~*~F\n
  \       +---E           B~*~E    !D~*~F\n            +---F       E~*~F    !A~*~F\n\n
  \       data Node = Node ID [Node]\n        possibles n@(Node _ ns) = possible n
  `map` ns ++ liftM2 possible ns\n\n    Infinite zoom into circles within circles
  within circles within circles?\n    When (if ever) would it be safe to prune \"outside\"?\n\n
  \   Some kind of loop where circles contain themselves (I did try this in\n    another
  unreleased version but it resulted in hyperexponential kinetic\n    energy increase,
  which naturally caused problems).\n\n    Non-flat space.\n\n    Angular momentum
  affecting collisions.\n\n    Remove all sources of non-determinism to enable two-pass
  rendering:\n        1 pass to record audio from SC3    in realtime\n        2 pass
  to record video from OpenGL in non-realtime\n    Or just record ball positions in
  the first pass for later drawing (because\n    callback races and/or timing instability
  might affect the reproducibility\n    unless very precise care is taken at all stages..)\n\n
  \   Interactivity.\n\n    More impressive audio-visuals.\n\n\nWon't\n-----\n\n    Anything
  other than circles (ok, maybe infinite lines would be ok, but\n    asymmetry with
  angular momentum would quickly make collision detection\n    get horribly complicated).\n\n\nLegal\n-----\n\n
  \   License: GPL\n\n    This program is free software: you can redistribute it and/or
  modify\n    it under the terms of the GNU General Public License as published by\n
  \   the Free Software Foundation, either version 3 of the License, or\n    (at your
  option) any later version.\n\n    This program is distributed in the hope that it
  will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty
  of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General
  Public License for more details.\n\n    You should have received a copy of the GNU
  General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\n"
{'fraction_non_alphanumeric': 0.11557985162046076, 'fraction_numerical': 0.024111675126903553, 'mean_word_length': 2.24516946468166, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 26, 'https://': 1, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1967629', 'n_tokens_mistral': 3408, 'n_tokens_neox': 3237, 'n_words': 1248}