diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e33609d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.png diff --git a/chrome/chrome.pde b/chrome/chrome.pde new file mode 100644 index 0000000..8ac16e3 --- /dev/null +++ b/chrome/chrome.pde @@ -0,0 +1,72 @@ +int numFrames = 50; +float size = 10; +twoCircle tc; +line l, l2, l3; + +void setup(){ + size(500,500); + tc = new twoCircle(); + l = new line(250, 300); + l2 = new line(250, 200); +} + +class twoCircle { + float size = 10; + int y = 250; + int x = 250; + + void show(float t){ + stroke(0, 30, 225); + strokeWeight(size * 1.5); + point(x, y); + stroke(255); + strokeWeight(size*0.75); + point(x, y); + + size = size + 2*sin(TWO_PI*t); + } +} + +class line { + float start, end, size; + + line(float s, float e) { + start = s; + end = e; + size = 10; + } + + float x1(float t){ + return start + size*0.1; + } + float y1(float t){ + return start - size*0.75; + } + + float x2(float t){ + return end + size*0.1 + 10*abs(cos(TWO_PI*t)); + } + float y2(float t){ + return end - 50 + 10*sin(TWO_PI*t) - size*0.75; + } + + void show(float t) { + strokeWeight(2); + line(x1(t),y1(t),x2(t),y2(t)); + size = size + 2*sin(TWO_PI*t); + } +} + +void draw(){ + background(0); + + float t = 1.0*(frameCount-1)/numFrames; + tc.show(t); + l.show(t); + l2.show(t); + + if(frameCount<=numFrames){ + saveFrame("fr###.png"); + } + +} diff --git a/coding_challenge/starfield/full-source.pde b/coding_challenge/starfield/full-source.pde new file mode 100644 index 0000000..e71864e --- /dev/null +++ b/coding_challenge/starfield/full-source.pde @@ -0,0 +1,73 @@ +/** +Bryn Mawr College, Department of Computer Science
+Classic starfield using 2D transformations and z-scaling. +*/ + +// Array of stars +Star[] stars = new Star[400]; + +void setup() { + size(600, 600); + smooth(); + stroke(255); + strokeWeight(5); + + // Init all stars + for (int i=0; i(emmet-merge-lines) =emmet#util#closePopup() =emmet#mergeLines() +inoremap (emmet-anchorize-summary) =emmet#util#closePopup() =emmet#anchorizeURL(1) +inoremap (emmet-anchorize-url) =emmet#util#closePopup() =emmet#anchorizeURL(0) +inoremap (emmet-remove-tag) =emmet#util#closePopup() =emmet#removeTag() +inoremap (emmet-split-join-tag) :call emmet#splitJoinTag() +inoremap (emmet-toggle-comment) =emmet#util#closePopup() =emmet#toggleComment() +inoremap (emmet-image-encode) =emmet#util#closePopup() =emmet#imageEncode() +inoremap (emmet-image-size) =emmet#util#closePopup() =emmet#imageSize() +inoremap (emmet-move-prev-item) :call emmet#moveNextPrevItem(1) +inoremap (emmet-move-next-item) :call emmet#moveNextPrevItem(0) +inoremap (emmet-move-prev) =emmet#util#closePopup() =emmet#moveNextPrev(1) +inoremap (emmet-move-next) =emmet#util#closePopup() =emmet#moveNextPrev(0) +inoremap (emmet-balance-tag-outword) :call emmet#balanceTag(-1) +inoremap (emmet-balance-tag-inward) :call emmet#balanceTag(1) +inoremap (emmet-update-tag) =emmet#util#closePopup() =emmet#updateTag() +inoremap (emmet-expand-word) =emmet#util#closePopup() =emmet#expandAbbr(1,"") +inoremap (emmet-expand-abbr) =emmet#util#closePopup() =emmet#expandAbbr(0,"") +inoremap CocRefresh =coc#_complete() +inoremap coc#refresh() +inoremap pumvisible() ? "\" : "\" +inoremap =strftime("%Y-%m-%d %H:%M:") +inoremap l +inoremap k +inoremap j +inoremap h +xmap  (coc-range-select) +nmap  (coc-range-select) +vmap c (emmet-code-pretty) +nmap m (emmet-merge-lines) +nmap A (emmet-anchorize-summary) +nmap a (emmet-anchorize-url) +nmap k (emmet-remove-tag) +nmap j (emmet-split-join-tag) +nmap / (emmet-toggle-comment) +nmap I (emmet-image-encode) +nmap i (emmet-image-size) +nmap N (emmet-move-prev) +nmap n (emmet-move-next) +vmap D (emmet-balance-tag-outword) +nmap D (emmet-balance-tag-outword) +vmap d (emmet-balance-tag-inward) +nmap d (emmet-balance-tag-inward) +nmap u (emmet-update-tag) +nmap ; (emmet-expand-word) +vmap , (emmet-expand-abbr) +nmap , (emmet-expand-abbr) +map  ds DrawItStop +map  di DrawItStart +map  rwp RestoreWinPosn +map  swp SaveWinPosn +nmap  w m VimwikiMakeTomorrowDiaryNote +nmap  w y VimwikiMakeYesterdayDiaryNote +nmap  w t VimwikiTabMakeDiaryNote +nmap  w w VimwikiMakeDiaryNote +nmap  w i VimwikiDiaryGenerateLinks +nmap  wi VimwikiDiaryIndex +nmap  ws VimwikiUISelect +nmap  wt VimwikiTabIndex +nmap  ww VimwikiIndex +nnoremap  p :CocListResume +nnoremap  k :CocPrev +nnoremap  j :CocNext +nnoremap  s :CocList -I symbols +nnoremap  o :CocList outline +nnoremap  c :CocList commands +nnoremap  e :CocList extensions +nmap  qf (coc-fix-current) +nmap  ac (coc-codeaction) +nnoremap  a :CocList diagnostics +xmap  a (coc-codeaction-selected) +nmap  f (coc-format-selected) +xmap  f (coc-format-selected) +nmap  rn (coc-rename) +map  z :NV +map  q :wq +vmap  s :w +omap  s :w +map  t :NERDTreeToggle +xmap , Sneak_, +omap , Sneak_, +nmap , Sneak_, +xmap ; Sneak_; +omap ; Sneak_; +nmap ; Sneak_; +nmap S Sneak_S +xmap S VSurround +xmap Z Sneak_S +omap Z Sneak_S +vmap [% [%m'gv`` +nmap [g (coc-diagnostic-prev) +vmap ]% ]%m'gv`` +nmap ]g (coc-diagnostic-next) +vmap a% [%v]% +omap af (coc-funcobj-a) +xmap af (coc-funcobj-a) +nmap cS CSurround +nmap cs Csurround +nmap ds Dsurround +vmap gx NetrwBrowseXVis +nmap gx NetrwBrowseX +xmap gS VgSurround +nmap gr (coc-references) +nmap gi (coc-implementation) +nmap gy (coc-type-definition) +nmap gd (coc-definition) +omap if (coc-funcobj-i) +xmap if (coc-funcobj-i) +xmap s Sneak_s +nmap s Sneak_s +nmap ySS YSsurround +nmap ySs YSsurround +nmap yss Yssurround +nmap yS YSurround +nmap ys Ysurround +omap z Sneak_s +vnoremap NetrwBrowseXVis :call netrw#BrowseXVis() +nnoremap NetrwBrowseX :call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '')),netrw#CheckIfRemote()) +noremap DrawItStop :set lz :call DrawIt#DrawItStop() :set nolz +noremap DrawItStart :set lz :call DrawIt#DrawItStart() :set nolz +nmap RestoreWinPosn :call RestoreWinPosn() +nmap SaveWinPosn :call SaveWinPosn() +omap SneakPrevious Sneak_, +omap SneakNext Sneak_; +xmap SneakPrevious Sneak_, +xmap SneakNext Sneak_; +nmap SneakPrevious Sneak_, +nmap SneakNext Sneak_; +omap (SneakStreakBackward) SneakLabel_S +omap (SneakStreak) SneakLabel_s +xmap (SneakStreakBackward) SneakLabel_S +xmap (SneakStreak) SneakLabel_s +nmap (SneakStreakBackward) SneakLabel_S +nmap (SneakStreak) SneakLabel_s +xmap VSneakPrevious Sneak_, +xmap VSneakNext Sneak_; +xmap VSneakBackward Sneak_S +xmap VSneakForward Sneak_s +nmap SneakBackward Sneak_S +nmap SneakForward Sneak_s +onoremap SneakLabel_S :call sneak#wrap(v:operator, 2, 1, 2, 2) +onoremap SneakLabel_s :call sneak#wrap(v:operator, 2, 0, 2, 2) +xnoremap SneakLabel_S :call sneak#wrap(visualmode(), 2, 1, 2, 2) +xnoremap SneakLabel_s :call sneak#wrap(visualmode(), 2, 0, 2, 2) +nnoremap SneakLabel_S :call sneak#wrap('', 2, 1, 2, 2) +nnoremap SneakLabel_s :call sneak#wrap('', 2, 0, 2, 2) +onoremap Sneak_T :call sneak#wrap(v:operator, 1, 1, 0, 0) +onoremap Sneak_t :call sneak#wrap(v:operator, 1, 0, 0, 0) +xnoremap Sneak_T :call sneak#wrap(visualmode(), 1, 1, 0, 0) +xnoremap Sneak_t :call sneak#wrap(visualmode(), 1, 0, 0, 0) +nnoremap Sneak_T :call sneak#wrap('', 1, 1, 0, 0) +nnoremap Sneak_t :call sneak#wrap('', 1, 0, 0, 0) +onoremap Sneak_F :call sneak#wrap(v:operator, 1, 1, 1, 0) +onoremap Sneak_f :call sneak#wrap(v:operator, 1, 0, 1, 0) +xnoremap Sneak_F :call sneak#wrap(visualmode(), 1, 1, 1, 0) +xnoremap Sneak_f :call sneak#wrap(visualmode(), 1, 0, 1, 0) +nnoremap Sneak_F :call sneak#wrap('', 1, 1, 1, 0) +nnoremap Sneak_f :call sneak#wrap('', 1, 0, 1, 0) +onoremap SneakRepeat :call sneak#wrap(v:operator, sneak#util#getc(), sneak#util#getc(), sneak#util#getc(), sneak#util#getc()) +onoremap Sneak_S :call sneak#wrap(v:operator, 2, 1, 2, 1) +onoremap Sneak_s :call sneak#wrap(v:operator, 2, 0, 2, 1) +xnoremap Sneak_S :call sneak#wrap(visualmode(), 2, 1, 2, 1) +xnoremap Sneak_s :call sneak#wrap(visualmode(), 2, 0, 2, 1) +nnoremap Sneak_S :call sneak#wrap('', 2, 1, 2, 1) +nnoremap Sneak_s :call sneak#wrap('', 2, 0, 2, 1) +nnoremap SurroundRepeat . +vnoremap (emmet-code-pretty) :call emmet#codePretty() +nnoremap (emmet-merge-lines) :call emmet#mergeLines() +nnoremap (emmet-anchorize-summary) :call emmet#anchorizeURL(1) +nnoremap (emmet-anchorize-url) :call emmet#anchorizeURL(0) +nnoremap (emmet-remove-tag) :call emmet#removeTag() +nnoremap (emmet-split-join-tag) :call emmet#splitJoinTag() +nnoremap (emmet-toggle-comment) :call emmet#toggleComment() +nnoremap (emmet-image-encode) :call emmet#imageEncode() +nnoremap (emmet-image-size) :call emmet#imageSize() +nnoremap (emmet-move-prev-item) :call emmet#moveNextPrevItem(1) +nnoremap (emmet-move-next-item) :call emmet#moveNextPrevItem(0) +nnoremap (emmet-move-prev) :call emmet#moveNextPrev(1) +nnoremap (emmet-move-next) :call emmet#moveNextPrev(0) +vnoremap (emmet-balance-tag-outword) :call emmet#balanceTag(-1) +nnoremap (emmet-balance-tag-outword) :call emmet#balanceTag(-1) +vnoremap (emmet-balance-tag-inward) :call emmet#balanceTag(1) +nnoremap (emmet-balance-tag-inward) :call emmet#balanceTag(1) +nnoremap (emmet-update-tag) :call emmet#updateTag() +nnoremap (emmet-expand-word) :call emmet#expandAbbr(1,"") +vnoremap (emmet-expand-abbr) :call emmet#expandAbbr(2,"") +nnoremap (emmet-expand-abbr) :call emmet#expandAbbr(3,"") +onoremap (coc-funcobj-a) :call coc#rpc#request('selectFunction', [v:false, '']) +onoremap (coc-funcobj-i) :call coc#rpc#request('selectFunction', [v:true, '']) +vnoremap (coc-funcobj-a) :call coc#rpc#request('selectFunction', [v:false, visualmode()]) +vnoremap (coc-funcobj-i) :call coc#rpc#request('selectFunction', [v:true, visualmode()]) +nnoremap (coc-cursors-position) :call coc#rpc#request('cursorsSelect', [bufnr('%'), 'position', 'n']) +nnoremap (coc-cursors-word) :call coc#rpc#request('cursorsSelect', [bufnr('%'), 'word', 'n']) +vnoremap (coc-cursors-range) :call coc#rpc#request('cursorsSelect', [bufnr('%'), 'range', visualmode()]) +nnoremap (coc-refactor) :call CocActionAsync('refactor') +nnoremap (coc-command-repeat) :call CocAction('repeatCommand') +nnoremap (coc-float-jump) :call coc#util#float_jump() +nnoremap (coc-float-hide) :call coc#util#float_hide() +nnoremap (coc-fix-current) :call CocActionAsync('doQuickfix') +nnoremap (coc-openlink) :call CocActionAsync('openLink') +nnoremap (coc-references) :call CocAction('jumpReferences') +nnoremap (coc-type-definition) :call CocAction('jumpTypeDefinition') +nnoremap (coc-implementation) :call CocAction('jumpImplementation') +nnoremap (coc-declaration) :call CocAction('jumpDeclaration') +nnoremap (coc-definition) :call CocAction('jumpDefinition') +nnoremap (coc-diagnostic-prev-error) :call CocActionAsync('diagnosticPrevious', 'error') +nnoremap (coc-diagnostic-next-error) :call CocActionAsync('diagnosticNext', 'error') +nnoremap (coc-diagnostic-prev) :call CocActionAsync('diagnosticPrevious') +nnoremap (coc-diagnostic-next) :call CocActionAsync('diagnosticNext') +nnoremap (coc-diagnostic-info) :call CocActionAsync('diagnosticInfo') +nnoremap (coc-format) :call CocActionAsync('format') +nnoremap (coc-rename) :call CocActionAsync('rename') +nnoremap (coc-codeaction) :call CocActionAsync('codeAction', '') +vnoremap (coc-codeaction-selected) :call CocActionAsync('codeAction', visualmode()) +vnoremap (coc-format-selected) :call CocActionAsync('formatSelected', visualmode()) +nnoremap (coc-codelens-action) :call CocActionAsync('codeLensAction') +nnoremap (coc-range-select) :call CocAction('rangeSelect', '', v:true) +vnoremap (coc-range-select-backward) :call CocAction('rangeSelect', visualmode(), v:false) +vnoremap (coc-range-select) :call CocAction('rangeSelect', visualmode(), v:true) +nnoremap "=strftime("%Y-%m-%d %H:%M:") +nnoremap l +nnoremap k +nnoremap j +nnoremap h +tnoremap l +tnoremap k +tnoremap j +tnoremap h +imap S ISurround +imap s Isurround +inoremap  pumvisible() ? "\" : "\u\ " +imap  Isurround +imap m (emmet-merge-lines) +imap A (emmet-anchorize-summary) +imap a (emmet-anchorize-url) +imap k (emmet-remove-tag) +imap j (emmet-split-join-tag) +imap / (emmet-toggle-comment) +imap I (emmet-image-encode) +imap i (emmet-image-size) +imap N (emmet-move-prev) +imap n (emmet-move-next) +imap D (emmet-balance-tag-outword) +imap d (emmet-balance-tag-inward) +imap u (emmet-update-tag) +imap ; (emmet-expand-word) +imap , (emmet-expand-abbr) +let &cpo=s:cpo_save +unlet s:cpo_save +set cmdheight=2 +set helplang=en +set hidden +set runtimepath=~/.config/nvim,~/.vim/plugged/LanguageClient-neovim/,~/.vim/plugged/coc.nvim/,~/.vim/plugged/vim-elixir/,~/.vim/plugged/rust.vim/,~/.vim/plugged/vim-processing/,~/.vim/plugged/vim-fish/,~/.vim/plugged/scvim/,~/.vim/plugged/emmet-vim/,~/.vim/plugged/fzf/,~/.vim/plugged/nerdtree/,~/.vim/plugged/goyo.vim/,~/.vim/plugged/lightline.vim/,~/.vim/plugged/vim-surround/,~/.vim/plugged/vim-sneak/,~/.vim/plugged/vim-pairtools/,~/.vim/plugged/csv.vim/,~/.vim/plugged/vim-tidal/,~/.vim/plugged/taskwiki/,~/.vim/plugged/vim-taskwarrior/,~/.vim/plugged/vimwiki/,~/.vim/plugged/vim-plugin-AnsiEsc/,~/.vim/plugged/vim-tiddlywiki/,~/.vim/plugged/notational-fzf-vim/,~/.vim/plugged/DrawIt/,~/.vim/plugged/firenvim/,/etc/xdg/nvim,~/.local/share/nvim/site,~/.local/share/flatpak/exports/share/nvim/site,/var/lib/flatpak/exports/share/nvim/site,/usr/local/share/nvim/site,/usr/share/nvim/site,/var/lib/snapd/desktop/nvim/site,/usr/share/nvim/runtime,/var/lib/snapd/desktop/nvim/site/after,/usr/share/nvim/site/after,/usr/local/share/nvim/site/after,/var/lib/flatpak/exports/share/nvim/site/after,~/.local/share/flatpak/exports/share/nvim/site/after,~/.local/share/nvim/site/after,/etc/xdg/nvim/after,~/.vim/plugged/rust.vim/after,~/.vim/plugged/taskwiki/after,~/.config/nvim/after +set shiftwidth=2 +set shortmess=filnxtToOFc +set showmatch +set statusline=%{coc#status()}%{get(b:,'coc_current_function','')} +set tabline=%!lightline#tabline() +set tabstop=2 +set updatetime=300 +set window=52 +set nowritebackup +" vim: set ft=vim : diff --git a/setSquare/out.gif b/setSquare/out.gif new file mode 100644 index 0000000..683fc51 Binary files /dev/null and b/setSquare/out.gif differ diff --git a/setSquare/setSquare.pde b/setSquare/setSquare.pde new file mode 100644 index 0000000..2a80c56 --- /dev/null +++ b/setSquare/setSquare.pde @@ -0,0 +1,45 @@ +int numFrames = 50; +int n = 500; + +class Thing { + float x = random(100, 400); + float y = random(100, 400); + float radius = random(2,15); + float size = random(1,2.5); + float offset = 9*noise(0.02*x, 0.02*y); + + void show(){ + stroke(255); + strokeWeight(size); + float t = 1.0*(frameCount-1)/numFrames; + rect(x,y, radius*sin(TWO_PI*t + offset), radius*sin(TWO_PI*t + offset)); + //point(x + radius*cos(TWO_PI*t + offset), y + radius*sin(TWO_PI*t + offset)); + } +} + +Thing[] array = new Thing[n]; + +void setup(){ + size(500,500); + + for(int i=0;i(emmet-merge-lines) =emmet#util#closePopup() =emmet#mergeLines() +inoremap (emmet-anchorize-summary) =emmet#util#closePopup() =emmet#anchorizeURL(1) +inoremap (emmet-anchorize-url) =emmet#util#closePopup() =emmet#anchorizeURL(0) +inoremap (emmet-remove-tag) =emmet#util#closePopup() =emmet#removeTag() +inoremap (emmet-split-join-tag) :call emmet#splitJoinTag() +inoremap (emmet-toggle-comment) =emmet#util#closePopup() =emmet#toggleComment() +inoremap (emmet-image-encode) =emmet#util#closePopup() =emmet#imageEncode() +inoremap (emmet-image-size) =emmet#util#closePopup() =emmet#imageSize() +inoremap (emmet-move-prev-item) :call emmet#moveNextPrevItem(1) +inoremap (emmet-move-next-item) :call emmet#moveNextPrevItem(0) +inoremap (emmet-move-prev) =emmet#util#closePopup() =emmet#moveNextPrev(1) +inoremap (emmet-move-next) =emmet#util#closePopup() =emmet#moveNextPrev(0) +inoremap (emmet-balance-tag-outword) :call emmet#balanceTag(-1) +inoremap (emmet-balance-tag-inward) :call emmet#balanceTag(1) +inoremap (emmet-update-tag) =emmet#util#closePopup() =emmet#updateTag() +inoremap (emmet-expand-word) =emmet#util#closePopup() =emmet#expandAbbr(1,"") +inoremap (emmet-expand-abbr) =emmet#util#closePopup() =emmet#expandAbbr(0,"") +inoremap CocRefresh =coc#_complete() +inoremap coc#refresh() +inoremap pumvisible() ? "\" : "\" +inoremap =strftime("%Y-%m-%d %H:%M:") +inoremap l +inoremap k +inoremap j +inoremap h +xmap  (coc-range-select) +nmap  (coc-range-select) +vmap c (emmet-code-pretty) +nmap m (emmet-merge-lines) +nmap A (emmet-anchorize-summary) +nmap a (emmet-anchorize-url) +nmap k (emmet-remove-tag) +nmap j (emmet-split-join-tag) +nmap / (emmet-toggle-comment) +nmap I (emmet-image-encode) +nmap i (emmet-image-size) +nmap N (emmet-move-prev) +nmap n (emmet-move-next) +vmap D (emmet-balance-tag-outword) +nmap D (emmet-balance-tag-outword) +vmap d (emmet-balance-tag-inward) +nmap d (emmet-balance-tag-inward) +nmap u (emmet-update-tag) +nmap ; (emmet-expand-word) +vmap , (emmet-expand-abbr) +nmap , (emmet-expand-abbr) +map  ds DrawItStop +map  di DrawItStart +nmap  n (pad-new) +nmap   (pad-list) +nmap  s! (pad-incremental-new-note) +nmap  s (pad-incremental-search) +nmap  ss (pad-search) +map  rwp RestoreWinPosn +map  swp SaveWinPosn +nmap  w m VimwikiMakeTomorrowDiaryNote +nmap  w y VimwikiMakeYesterdayDiaryNote +nmap  w t VimwikiTabMakeDiaryNote +nmap  w w VimwikiMakeDiaryNote +nmap  w i VimwikiDiaryGenerateLinks +nmap  wi VimwikiDiaryIndex +nmap  ws VimwikiUISelect +nmap  wt VimwikiTabIndex +nmap  ww VimwikiIndex +nnoremap  p :CocListResume +nnoremap  k :CocPrev +nnoremap  j :CocNext +nnoremap  s :CocList -I symbols +nnoremap  o :CocList outline +nnoremap  c :CocList commands +nnoremap  e :CocList extensions +nmap  qf (coc-fix-current) +nmap  ac (coc-codeaction) +nnoremap  a :CocList diagnostics +xmap  a (coc-codeaction-selected) +nmap  f (coc-format-selected) +xmap  f (coc-format-selected) +nmap  rn (coc-rename) +map  q :wq +vmap  s :w +omap  s :w +map  t :NERDTreeToggle +xmap , Sneak_, +omap , Sneak_, +nmap , Sneak_, +xmap ; Sneak_; +omap ; Sneak_; +nmap ; Sneak_; +nmap S Sneak_S +xmap S VSurround +xmap Z Sneak_S +omap Z Sneak_S +vmap [% [%m'gv`` +nmap [g (coc-diagnostic-prev) +vmap ]% ]%m'gv`` +nmap ]g (coc-diagnostic-next) +vmap a% [%v]% +omap af (coc-funcobj-a) +xmap af (coc-funcobj-a) +nmap cS CSurround +nmap cs Csurround +nmap ds Dsurround +vmap gx NetrwBrowseXVis +nmap gx NetrwBrowseX +xmap gS VgSurround +nmap gr (coc-references) +nmap gi (coc-implementation) +nmap gy (coc-type-definition) +nmap gd (coc-definition) +omap if (coc-funcobj-i) +xmap if (coc-funcobj-i) +xmap s Sneak_s +nmap s Sneak_s +nmap ySS YSsurround +nmap ySs YSsurround +nmap yss Yssurround +nmap yS YSurround +nmap ys Ysurround +omap z Sneak_s +vnoremap NetrwBrowseXVis :call netrw#BrowseXVis() +nnoremap NetrwBrowseX :call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '')),netrw#CheckIfRemote()) +noremap DrawItStop :set lz :call DrawIt#DrawItStop() :set nolz +noremap DrawItStart :set lz :call DrawIt#DrawItStart() :set nolz +noremap (pad-incremental-new-note) :call pad#GlobalIncrementalSearch(0) +noremap (pad-incremental-search) :call pad#GlobalIncrementalSearch(1) +noremap (pad-search) :call pad#SearchPads() +noremap (pad-new) :Pad new +noremap (pad-list) :Pad ls +nmap RestoreWinPosn :call RestoreWinPosn() +nmap SaveWinPosn :call SaveWinPosn() +omap SneakPrevious Sneak_, +omap SneakNext Sneak_; +xmap SneakPrevious Sneak_, +xmap SneakNext Sneak_; +nmap SneakPrevious Sneak_, +nmap SneakNext Sneak_; +omap (SneakStreakBackward) SneakLabel_S +omap (SneakStreak) SneakLabel_s +xmap (SneakStreakBackward) SneakLabel_S +xmap (SneakStreak) SneakLabel_s +nmap (SneakStreakBackward) SneakLabel_S +nmap (SneakStreak) SneakLabel_s +xmap VSneakPrevious Sneak_, +xmap VSneakNext Sneak_; +xmap VSneakBackward Sneak_S +xmap VSneakForward Sneak_s +nmap SneakBackward Sneak_S +nmap SneakForward Sneak_s +onoremap SneakLabel_S :call sneak#wrap(v:operator, 2, 1, 2, 2) +onoremap SneakLabel_s :call sneak#wrap(v:operator, 2, 0, 2, 2) +xnoremap SneakLabel_S :call sneak#wrap(visualmode(), 2, 1, 2, 2) +xnoremap SneakLabel_s :call sneak#wrap(visualmode(), 2, 0, 2, 2) +nnoremap SneakLabel_S :call sneak#wrap('', 2, 1, 2, 2) +nnoremap SneakLabel_s :call sneak#wrap('', 2, 0, 2, 2) +onoremap Sneak_T :call sneak#wrap(v:operator, 1, 1, 0, 0) +onoremap Sneak_t :call sneak#wrap(v:operator, 1, 0, 0, 0) +xnoremap Sneak_T :call sneak#wrap(visualmode(), 1, 1, 0, 0) +xnoremap Sneak_t :call sneak#wrap(visualmode(), 1, 0, 0, 0) +nnoremap Sneak_T :call sneak#wrap('', 1, 1, 0, 0) +nnoremap Sneak_t :call sneak#wrap('', 1, 0, 0, 0) +onoremap Sneak_F :call sneak#wrap(v:operator, 1, 1, 1, 0) +onoremap Sneak_f :call sneak#wrap(v:operator, 1, 0, 1, 0) +xnoremap Sneak_F :call sneak#wrap(visualmode(), 1, 1, 1, 0) +xnoremap Sneak_f :call sneak#wrap(visualmode(), 1, 0, 1, 0) +nnoremap Sneak_F :call sneak#wrap('', 1, 1, 1, 0) +nnoremap Sneak_f :call sneak#wrap('', 1, 0, 1, 0) +onoremap SneakRepeat :call sneak#wrap(v:operator, sneak#util#getc(), sneak#util#getc(), sneak#util#getc(), sneak#util#getc()) +onoremap Sneak_S :call sneak#wrap(v:operator, 2, 1, 2, 1) +onoremap Sneak_s :call sneak#wrap(v:operator, 2, 0, 2, 1) +xnoremap Sneak_S :call sneak#wrap(visualmode(), 2, 1, 2, 1) +xnoremap Sneak_s :call sneak#wrap(visualmode(), 2, 0, 2, 1) +nnoremap Sneak_S :call sneak#wrap('', 2, 1, 2, 1) +nnoremap Sneak_s :call sneak#wrap('', 2, 0, 2, 1) +nnoremap SurroundRepeat . +vnoremap (emmet-code-pretty) :call emmet#codePretty() +nnoremap (emmet-merge-lines) :call emmet#mergeLines() +nnoremap (emmet-anchorize-summary) :call emmet#anchorizeURL(1) +nnoremap (emmet-anchorize-url) :call emmet#anchorizeURL(0) +nnoremap (emmet-remove-tag) :call emmet#removeTag() +nnoremap (emmet-split-join-tag) :call emmet#splitJoinTag() +nnoremap (emmet-toggle-comment) :call emmet#toggleComment() +nnoremap (emmet-image-encode) :call emmet#imageEncode() +nnoremap (emmet-image-size) :call emmet#imageSize() +nnoremap (emmet-move-prev-item) :call emmet#moveNextPrevItem(1) +nnoremap (emmet-move-next-item) :call emmet#moveNextPrevItem(0) +nnoremap (emmet-move-prev) :call emmet#moveNextPrev(1) +nnoremap (emmet-move-next) :call emmet#moveNextPrev(0) +vnoremap (emmet-balance-tag-outword) :call emmet#balanceTag(-1) +nnoremap (emmet-balance-tag-outword) :call emmet#balanceTag(-1) +vnoremap (emmet-balance-tag-inward) :call emmet#balanceTag(1) +nnoremap (emmet-balance-tag-inward) :call emmet#balanceTag(1) +nnoremap (emmet-update-tag) :call emmet#updateTag() +nnoremap (emmet-expand-word) :call emmet#expandAbbr(1,"") +vnoremap (emmet-expand-abbr) :call emmet#expandAbbr(2,"") +nnoremap (emmet-expand-abbr) :call emmet#expandAbbr(3,"") +onoremap (coc-funcobj-a) :call coc#rpc#request('selectFunction', [v:false, '']) +onoremap (coc-funcobj-i) :call coc#rpc#request('selectFunction', [v:true, '']) +vnoremap (coc-funcobj-a) :call coc#rpc#request('selectFunction', [v:false, visualmode()]) +vnoremap (coc-funcobj-i) :call coc#rpc#request('selectFunction', [v:true, visualmode()]) +nnoremap (coc-cursors-position) :call coc#rpc#request('cursorsSelect', [bufnr('%'), 'position', 'n']) +nnoremap (coc-cursors-word) :call coc#rpc#request('cursorsSelect', [bufnr('%'), 'word', 'n']) +vnoremap (coc-cursors-range) :call coc#rpc#request('cursorsSelect', [bufnr('%'), 'range', visualmode()]) +nnoremap (coc-refactor) :call CocActionAsync('refactor') +nnoremap (coc-command-repeat) :call CocAction('repeatCommand') +nnoremap (coc-float-jump) :call coc#util#float_jump() +nnoremap (coc-float-hide) :call coc#util#float_hide() +nnoremap (coc-fix-current) :call CocActionAsync('doQuickfix') +nnoremap (coc-openlink) :call CocActionAsync('openLink') +nnoremap (coc-references) :call CocAction('jumpReferences') +nnoremap (coc-type-definition) :call CocAction('jumpTypeDefinition') +nnoremap (coc-implementation) :call CocAction('jumpImplementation') +nnoremap (coc-declaration) :call CocAction('jumpDeclaration') +nnoremap (coc-definition) :call CocAction('jumpDefinition') +nnoremap (coc-diagnostic-prev-error) :call CocActionAsync('diagnosticPrevious', 'error') +nnoremap (coc-diagnostic-next-error) :call CocActionAsync('diagnosticNext', 'error') +nnoremap (coc-diagnostic-prev) :call CocActionAsync('diagnosticPrevious') +nnoremap (coc-diagnostic-next) :call CocActionAsync('diagnosticNext') +nnoremap (coc-diagnostic-info) :call CocActionAsync('diagnosticInfo') +nnoremap (coc-format) :call CocActionAsync('format') +nnoremap (coc-rename) :call CocActionAsync('rename') +nnoremap (coc-codeaction) :call CocActionAsync('codeAction', '') +vnoremap (coc-codeaction-selected) :call CocActionAsync('codeAction', visualmode()) +vnoremap (coc-format-selected) :call CocActionAsync('formatSelected', visualmode()) +nnoremap (coc-codelens-action) :call CocActionAsync('codeLensAction') +nnoremap (coc-range-select) :call CocAction('rangeSelect', '', v:true) +vnoremap (coc-range-select-backward) :call CocAction('rangeSelect', visualmode(), v:false) +vnoremap (coc-range-select) :call CocAction('rangeSelect', visualmode(), v:true) +nnoremap "=strftime("%Y-%m-%d %H:%M:") +nnoremap l +nnoremap k +nnoremap j +nnoremap h +tnoremap l +tnoremap k +tnoremap j +tnoremap h +imap S ISurround +imap s Isurround +inoremap  pumvisible() ? "\" : "\u\ " +imap  Isurround +imap m (emmet-merge-lines) +imap A (emmet-anchorize-summary) +imap a (emmet-anchorize-url) +imap k (emmet-remove-tag) +imap j (emmet-split-join-tag) +imap / (emmet-toggle-comment) +imap I (emmet-image-encode) +imap i (emmet-image-size) +imap N (emmet-move-prev) +imap n (emmet-move-next) +imap D (emmet-balance-tag-outword) +imap d (emmet-balance-tag-inward) +imap u (emmet-update-tag) +imap ; (emmet-expand-word) +imap , (emmet-expand-abbr) +let &cpo=s:cpo_save +unlet s:cpo_save +set cmdheight=2 +set helplang=en +set hidden +set runtimepath=~/.config/nvim,~/.vim/plugged/LanguageClient-neovim/,~/.vim/plugged/coc.nvim/,~/.vim/plugged/vim-elixir/,~/.vim/plugged/rust.vim/,~/.vim/plugged/vim-processing/,~/.vim/plugged/vim-fish/,~/.vim/plugged/scvim/,~/.vim/plugged/emmet-vim/,~/.vim/plugged/fzf/,~/.vim/plugged/nerdtree/,~/.vim/plugged/goyo.vim/,~/.vim/plugged/lightline.vim/,~/.vim/plugged/vim-surround/,~/.vim/plugged/vim-sneak/,~/.vim/plugged/vim-pairtools/,~/.vim/plugged/csv.vim/,~/.vim/plugged/vim-tidal/,~/.vim/plugged/taskwiki/,~/.vim/plugged/vim-taskwarrior/,~/.vim/plugged/vimwiki/,~/.vim/plugged/vim-plugin-AnsiEsc/,~/.vim/plugged/vim-pad/,~/.vim/plugged/vim-tiddlywiki/,~/.vim/plugged/DrawIt/,~/.vim/plugged/firenvim/,/etc/xdg/nvim,~/.local/share/nvim/site,~/.local/share/flatpak/exports/share/nvim/site,/var/lib/flatpak/exports/share/nvim/site,/usr/local/share/nvim/site,/usr/share/nvim/site,/var/lib/snapd/desktop/nvim/site,/usr/share/nvim/runtime,/var/lib/snapd/desktop/nvim/site/after,/usr/share/nvim/site/after,/usr/local/share/nvim/site/after,/var/lib/flatpak/exports/share/nvim/site/after,~/.local/share/flatpak/exports/share/nvim/site/after,~/.local/share/nvim/site/after,/etc/xdg/nvim/after,~/.vim/plugged/rust.vim/after,~/.vim/plugged/taskwiki/after,~/.config/nvim/after +set shiftwidth=2 +set shortmess=filnxtToOFc +set showmatch +set statusline=%{coc#status()}%{get(b:,'coc_current_function','')} +set tabline=%!lightline#tabline() +set tabstop=2 +set updatetime=300 +set window=52 +set nowritebackup +" vim: set ft=vim : diff --git a/square/out.gif b/square/out.gif new file mode 100644 index 0000000..ee785f4 Binary files /dev/null and b/square/out.gif differ diff --git a/square/square.pde b/square/square.pde new file mode 100644 index 0000000..ecfc386 --- /dev/null +++ b/square/square.pde @@ -0,0 +1,35 @@ +int samplesPerFrame = 5; +int numFrames = 50; +float shutterAngle = 1.5; + +void setup(){ + size(500,500); +} + +void draw(){ + background(0); + + float t = 1.0*(frameCount-1)/numFrames; + + stroke(144 - 63 * sin(TWO_PI*t)); + strokeWeight(4 + 2 * sin(TWO_PI*t)); + + for(int i = 100; i < 250; i += 10) { + //right quarter + line(500 - i, 500 - i - 10*sin(TWO_PI*t), 500 - i + 10 * cos(TWO_PI*t), i + 10 * cos(TWO_PI*t)); + line(500 - i, 500 - i - 10*sin(TWO_PI*t), 500 - i + 10 * cos(TWO_PI*t), 500 - i + 10 * cos(TWO_PI*t)); + //top quarter + line(i + 50, i - i/10*sin(TWO_PI*t), 500 - i + 10 * cos(TWO_PI*t), i + 10 * cos(TWO_PI*t)); + line(i + 50, i - i/10*sin(TWO_PI*t), i + 10 * cos(TWO_PI*t), i + 10 * cos(TWO_PI*t)); + //left quarter + line(i, i - 10*sin(TWO_PI*t), i + 10 * cos(TWO_PI*t), 500 - i + 10 * cos(TWO_PI*t)); + line(i, i - 10*sin(TWO_PI*t), i + 10 * cos(TWO_PI*t), i + 10 * cos(TWO_PI*t)); + //bottom quarter + line(i + 50, 500 - i - i/10*sin(TWO_PI*t), 500 - i + 10 * cos(TWO_PI*t), 500 - i + 10 * cos(TWO_PI*t)); + line(i + 50, 500 - i - i/10*sin(TWO_PI*t), i + 10 * cos(TWO_PI*t), 500 - i + 10 * cos(TWO_PI*t)); + } + + if(frameCount<=numFrames){ + saveFrame("fr###.png"); + } +} diff --git a/triSize/out.gif b/triSize/out.gif new file mode 100644 index 0000000..52edb62 Binary files /dev/null and b/triSize/out.gif differ diff --git a/triSize/out2.gif b/triSize/out2.gif new file mode 100644 index 0000000..f182b28 Binary files /dev/null and b/triSize/out2.gif differ diff --git a/triSize/triSize.pde b/triSize/triSize.pde new file mode 100644 index 0000000..25ea908 --- /dev/null +++ b/triSize/triSize.pde @@ -0,0 +1,57 @@ +int numFrames = 50; +int n = 40; + +class Tri { + float h, x, y, offset, stroke; + + Tri(float h_) { + h = 5*h_; + x = 250; + y = 250; + stroke = random(255); + offset = 9*noise(0.02*x, 0.03*y); + } + + void show() { + float x1,y1,x2,y2,x3,y3; + x1 = x + (h/2) + offset; + y1 = y + offset; + x2 = y2 = y - (h/2) - offset; + x3 = x + (h/2) - offset; + y3 = y - (h/2) + offset; + stroke(0, stroke, 0); + line(x1, y1, x2, y2); + line(x2, y2, x3, y3); + line(x3, y3, x1, y1); + } +} + +Tri[] array = new Tri[n]; + +void setup(){ + size(500,500); + + for(int i=0;i