Feature morph (#62)

* Disable windows CI (because of hmatrix)
* Implement ear-clip triangulation.
* Implement common framework for polygon morphing.
* Draft implementations of compatible triangulation and mesh smoothing.
* Implement least-work morphing.
* Implement as-rigid-as-possible morphing.
* Implement SSSP.
* Draft article about polygon morphing.

Former-commit-id: f6f19f58b9dd58c655bcca0ed2d65f72726f0a06
This commit is contained in:
David Himmelstrup 2020-05-14 15:14:29 +08:00 committed by GitHub
commit 4356efbc7e
70 changed files with 6504 additions and 195 deletions

View file

@ -10,12 +10,12 @@ jobs:
BUILD: stack
STACK_YAML: stack.yaml
ARGS: --pedantic
stack-lts-12:
stack-lts-14:
BUILD: stack
STACK_YAML: stack-lts-12.yaml
stack-lts-11:
STACK_YAML: stack-lts-14.yaml
stack-lts-13:
BUILD: stack
STACK_YAML: stack-lts-11.yaml
STACK_YAML: stack-lts-13.yaml
#stack-nightly:
# BUILD: stack
# ARGS: --resolver nightly
@ -28,11 +28,12 @@ jobs:
cacheHitVar: CACHE_RESTORED
displayName: Cache stack root
- script: |
sudo add-apt-repository ppa:jonathonf/ffmpeg-4
#sudo add-apt-repository ppa:jonathonf/ffmpeg-4
sudo apt-get update
sudo apt-get install ffmpeg
sudo apt-get install libblas-dev liblapack-dev
#sudo apt-get install ffmpeg
#sudo apt-get install texlive texlive-latex-base texlive-latex-extra texlive-fonts-extra texlive-science texlive-xetex texlive-latex-recommended texlive-lang-english texlive-lang-chinese
sudo apt-get install povray
#sudo apt-get install povray
mkdir -p ~/.local/bin
curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
case "$BUILD" in
@ -68,7 +69,7 @@ jobs:
;;
*)
export PATH=$HOME/.local/bin:$PATH
stack --install-ghc test $ARGS --only-dependencies
stack --install-ghc test $ARGS --flag reanimate:test --only-dependencies
;;
esac
set -ex
@ -102,7 +103,7 @@ jobs:
;;
*)
stack ./examples/counter.hs check
stack test $ARGS --flag reanimate:test
stack test --flag reanimate:test --test-arguments="-j2"
;;
esac
set +ex

View file

@ -10,12 +10,12 @@ jobs:
BUILD: stack
STACK_YAML: stack.yaml
ARGS: --pedantic
stack-lts-12:
stack-lts-14:
BUILD: stack
STACK_YAML: stack-lts-12.yaml
stack-lts-11:
STACK_YAML: stack-lts-14.yaml
stack-lts-13:
BUILD: stack
STACK_YAML: stack-lts-11.yaml
STACK_YAML: stack-lts-13.yaml
maxParallel: 6
steps:
- task: Cache@2
@ -25,12 +25,14 @@ jobs:
cacheHitVar: CACHE_RESTORED
displayName: Cache stack root
- script: |
# brew install gcc
# brew install lapack
mkdir -p ~/.local/bin
curl -skL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin;
export PATH=$HOME/.local/bin:$PATH
stack --install-ghc test $ARGS --only-dependencies
stack --install-ghc test $ARGS --flag reanimate:test --only-dependencies
stack ./examples/counter.hs check
stack test $ARGS --flag reanimate:test
stack test --flag reanimate:test --test-arguments="-j2"
env:
OS_NAME: ${{ parameters.os }}
displayName: 'Installation ${{parameters.os}} & Test'

View file

@ -9,28 +9,69 @@ jobs:
matrix:
stack:
BUILD: stack
STACK_YAML: stack.yaml
STACK_YAML: stack-lts-14.yaml # lts-15 is broken. "Access violation in generated code" :-/
ARGS: --pedantic
stack-lts-12:
stack-lts-14:
BUILD: stack
STACK_YAML: stack-lts-12.yaml
stack-lts-11:
STACK_YAML: stack-lts-14.yaml
stack-lts-13:
BUILD: stack
STACK_YAML: stack-lts-11.yaml
STACK_YAML: stack-lts-13.yaml
maxParallel: 6
steps:
- task: Cache@2
inputs:
key: ${{ parameters.name }} | ${{ parameters.vmImage }} | $(STACK_YAML) | stack-root | $(Agent.OS)
key: ${{ parameters.name }} | ${{ parameters.vmImage }} | $(STACK_YAML) | stack-root | $(Agent.OS) | version 2
path: $(STACK_ROOT)
cacheHitVar: CACHE_RESTORED
displayName: Cache stack root
- bash: |
set -o xtrace
#curl -sSkL https://icl.cs.utk.edu/lapack-for-windows/libraries/VisualStudio/3.7.0/Dynamic-MINGW/Win64/libblas.dll -o libblas.dll
# curl -sSkL https://icl.cs.utk.edu/lapack-for-windows/libraries/VisualStudio/3.7.0/Dynamic-MINGW/Win64/libblas.lib -o libblas.lib
#curl -sSkL https://icl.cs.utk.edu/lapack-for-windows/libraries/VisualStudio/3.7.0/Dynamic-MINGW/Win64/liblapack.dll -o liblapack.dll
# curl -sSkL https://icl.cs.utk.edu/lapack-for-windows/libraries/VisualStudio/3.7.0/Dynamic-MINGW/Win64/liblapack.lib -o liblapack.lib
# cp libblas.dll libblas.lib liblapack.dll liblapack.lib /usr/lib/
# cp libblas.dll libblas.lib liblapack.dll liblapack.lib /lib/
# cp libblas.dll libblas.lib liblapack.dll liblapack.lib /usr/local/lib/
# cp libblas.dll libblas.lib liblapack.dll liblapack.lib /c/mingw810/prerequisites/x86_64-binutils-nomulti/x86_64-w64-mingw32/lib
# cp libblas.dll libblas.lib liblapack.dll liblapack.lib /c/mingw810/prerequisites/x86_64-binutils-nomulti/lib
echo $CONDA
echo $PATH
CWD=`pwd`
cd "$CONDA/condabin/"
export PATH=`pwd`:$PATH
cd $CWD
echo $PATH
echo `which conda.bat`
echo `which conda`
conda info --envs
ls $CONDA/condabin
# $CONDA/condabin/conda.bat create --yes --name reanimate
# $CONDA/condabin/conda.bat activate reanimate
$CONDA/condabin/conda.bat
$CONDA/condabin/conda.bat install --yes --quiet -c conda-forge libblas
$CONDA/condabin/conda.bat install --yes --quiet -c conda-forge liblapack
find "$CONDA" -name '*libblas*'
find "$CONDA" -name '*lapack*'
# export LIBRARY_PATH="`pwd`;$LIBRARY_PATH"
curl -sSkL http://www.stackage.org/stack/windows-x86_64 -o /usr/bin/stack.zip
unzip -o /usr/bin/stack.zip -d /usr/bin/
stack --install-ghc test $ARGS --only-dependencies
stack ./examples/counter.hs check
stack test $ARGS --flag reanimate:test
env:
OS_NAME: ${{ parameters.os }}
displayName: 'Installation ${{parameters.os}} & Test'
displayName: 'Setup'
- bash: |
set -o xtrace
stack --install-ghc build $ARGS --no-keep-going --fast --extra-lib-dirs="$CONDA/Library/bin/" --only-dependencies
stack --install-ghc test $ARGS --no-keep-going --fast --flag reanimate:test --extra-lib-dirs="$CONDA/Library/bin/" --only-dependencies
env:
OS_NAME: ${{ parameters.os }}
displayName: 'Install dependencies'
- bash: |
set -o xtrace
stack ./examples/counter.hs check
rm examples/*.golden
#stack test --flag reanimate:test --test-arguments="-j2" --fast --extra-lib-dirs="$CONDA/Library/bin/"
env:
OS_NAME: ${{ parameters.os }}
displayName: 'Build & Test'