├── .gitattributes ├── .gitignore ├── HACKING.txt ├── LICENSE ├── README.txt ├── build_mac.sh ├── build_preflight.py ├── build_win.bat ├── deploy_mac.sh ├── deploy_win.bat ├── fix_app_qt_folder_names.py ├── icon ├── README ├── athena.icns ├── athena.ico ├── athena.iconset │ ├── icon_128x128.png │ ├── icon_128x128@2x.png │ ├── icon_16x16.png │ ├── icon_16x16@2x.png │ ├── icon_256x256.png │ ├── icon_256x256@2x.png │ ├── icon_32x32.png │ ├── icon_32x32@2x.png │ ├── icon_512x512.png │ └── icon_512x512@2x.png └── icon_512x512.png ├── requirements.txt ├── sample_inputs ├── 2D │ ├── 01_triangle.ply │ ├── 02_triangle_mesh.ply │ ├── 03_square.ply │ ├── 04_square_mesh_1.ply │ ├── 05_square_mesh_2.ply │ ├── 06_pentagon.ply │ ├── 07_pentagon_mesh.ply │ ├── 08_hexagon.ply │ ├── 09_hexagon_mesh_1.ply │ ├── 10_hexagon_mesh_2.ply │ ├── 11_octagon.ply │ ├── 12_octagon_mesh.ply │ ├── 13_decagon.ply │ ├── 14_decagon_mesh.ply │ ├── 15_circle_mesh.ply │ ├── 16_annulus_mesh_1.ply │ ├── 17_annulus_mesh_2.ply │ ├── 18_ellipse_mesh.ply │ ├── 19_quarter_circle_mesh.ply │ ├── 20_star_mesh.ply │ ├── 21_l-shape_mesh.ply │ ├── 22_cross_mesh.ply │ ├── 23_arrowhead_mesh.ply │ ├── 24_curve_arm_mesh_1.ply │ ├── 25_curve_arm_mesh_2.ply │ ├── 26_curve_arm_mesh_3.ply │ ├── 27_curve_arm_mesh_4.ply │ ├── 28_rhombic_tile.ply │ ├── 29_hexagonal_tile.ply │ ├── 30_primatic_pentagonal_tile.ply │ ├── 31_heptagonal_and_pentagonal_tile.ply │ ├── 32_cairo_pentagonal_tile.ply │ ├── 33_lotus_mesh.ply │ ├── 34_a-shape_mesh.ply │ ├── 35_t-shape_mesh.ply │ ├── 36_g-shape_mesh.ply │ ├── 37_c-shape_mesh.ply │ └── Asymmetric_Triangle.ply ├── 3D │ ├── 01_tetrahedron.ply │ ├── 02_cube.ply │ ├── 03_octahedron.ply │ ├── 04_dodecahedron.ply │ ├── 05_icosahedron.ply │ ├── 06_cuboctahedron.ply │ ├── 07_icosidodecahedron.ply │ ├── 08_rhombicuboctahedron.ply │ ├── 09_snub_cube.ply │ ├── 10_truncated_cube.ply │ ├── 11_truncated_cuboctahedron.ply │ ├── 12_truncated_dodecahedron.ply │ ├── 13_truncated_icosahedron.ply │ ├── 14_truncated_octahedron.ply │ ├── 15_truncated_tetrahedron.ply │ ├── 16_gyroelongated_pentagonal_pyramid.ply │ ├── 17_triangular_bipyramid.ply │ ├── 18_pentagonal_bipyramid.ply │ ├── 19_gyroelongated_square_bipyramid.ply │ ├── 20_square_gyrobicupola.ply │ ├── 21_pentagonal_orthocupolarotunda.ply │ ├── 22_pentagonal_orthobirotunda.ply │ ├── 23_elongated_pentagonal_gyrobicupola.ply │ ├── 24_elongated_pentagonal_gyrobirotunda.ply │ ├── 25_gyroelongated_square_bicupola.ply │ ├── 26_rhombic_dodecahedron.ply │ ├── 27_rhombic_triacontahedron.ply │ ├── 28_deltoidal_icositetrahedron.ply │ ├── 29_pentagonal_icositetrahedron.ply │ ├── 30_triakis_octahedron.ply │ ├── 31_disdyakis_dodecahedron.ply │ ├── 32_triakis_icosahedron.ply │ ├── 33_pentakis_dodecahedron.ply │ ├── 34_tetrakis_hexahedron.ply │ ├── 35_triakis_tetrahedron.ply │ ├── 36_heptagonal_bipyramid.ply │ ├── 37_enneagonal_trapezohedron.ply │ ├── 38_small_stell_dodecahedron.ply │ ├── 39_rhombic_hexecontahedron.ply │ ├── 40_goldberg_polyhedron_dk5dgD.ply │ ├── 41_double_helix.ply │ ├── 42_nested_cube.ply │ ├── 43_nested_octahedron.ply │ ├── 44_torus.ply │ ├── 45_double_torus.ply │ ├── 46_asymmetric_tetrahedron.ply │ ├── 47_pentagonal_pyramid.ply │ ├── 48_pentagonal_cupola.ply │ ├── 49_hexagonal_prism.ply │ ├── 50_pentagonal_antiprism.ply │ ├── 51_chiral_object.ply │ ├── 53_twisted_cube.ply │ ├── 54_biscribed_propello_tetrahedron.ply │ └── 55_biscribed_propello_cube.ply └── pdbgen_inputs │ ├── 01_square_DX_42bp.cndo │ ├── 01_tetrahedron_DX_42bp.cndo │ ├── 02_cube_6HBi_M_42bp.cndo │ ├── 02_cube_DX_42bp.cndo │ ├── 03_octahedron_DX_42bp.cndo │ ├── 05_icosahedron_6HBi_M_42bp.cndo │ ├── 05_icosahedron_DX_42bp.cndo │ ├── 06_cuboctahedron_DX_42bp.cndo │ ├── 07_truncated_tetrahedron_DX_42bp.cndo │ └── 47_ball_DX_42bp.cndo ├── sign_mac.sh ├── src ├── athena │ ├── __init__.py │ ├── bildparser.py │ ├── colorTable.py │ ├── decorations.py │ ├── geom.py │ ├── logwindow.py │ ├── mainwindow.py │ ├── plymesh.py │ ├── screenshot.py │ └── viewer.py ├── earcut │ ├── __init__.py │ └── earcut.py ├── main.py ├── pdbgen │ ├── README.txt │ └── pdbgen.py ├── qml │ ├── imposter.qml │ ├── meshmaterial.qml │ └── overlay.qml ├── shaders │ ├── cone_imposter.frag │ ├── cone_imposter.geom │ ├── cone_imposter.vert │ ├── cylinder_imposter.frag │ ├── cylinder_imposter.geom │ ├── cylinder_imposter.vert │ ├── flat_wireframe.frag │ ├── gooch_wireframe.frag │ ├── overlay.frag │ ├── overlay.vert │ ├── sphere_imposter.frag │ ├── sphere_imposter.geom │ ├── sphere_imposter.vert │ ├── wireframe.geom │ └── wireframe.vert └── txt │ └── About.txt ├── tools ├── DAEDALUS2 │ ├── DAEDALUS2 │ └── DAEDALUS2.exe ├── METIS │ ├── METIS │ └── METIS.exe ├── PERDIX │ ├── PERDIX │ ├── PERDIX.exe │ └── readme.txt ├── TALOS │ ├── TALOS │ ├── TALOS.exe │ └── readme.txt └── na_library │ ├── bdna_ath.pdb │ ├── bdna_cgh.pdb │ ├── bdna_gch.pdb │ └── bdna_tah.pdb └── ui ├── AthenaMainWindow.ui ├── LogWindow.ui └── ScreenshotDialog.ui /.gitattributes: -------------------------------------------------------------------------------- 1 | *.cndo binary 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | athena_tmp_output 2 | athena_outputs 3 | athena_output 4 | 5 | # Athena build process artifacts 6 | version_info.txt 7 | athena_version.py 8 | 9 | # 10 | # Byte-compiled / optimized / DLL files 11 | __pycache__/ 12 | *.py[cod] 13 | *$py.class 14 | 15 | # C extensions 16 | *.so 17 | 18 | # Distribution / packaging 19 | .Python 20 | build/ 21 | develop-eggs/ 22 | dist/ 23 | downloads/ 24 | eggs/ 25 | .eggs/ 26 | lib/ 27 | lib64/ 28 | parts/ 29 | sdist/ 30 | var/ 31 | wheels/ 32 | *.egg-info/ 33 | .installed.cfg 34 | *.egg 35 | MANIFEST 36 | 37 | # PyInstaller 38 | # Usually these files are written by a python script from a template 39 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 40 | *.manifest 41 | *.spec 42 | 43 | # Installer logs 44 | pip-log.txt 45 | pip-delete-this-directory.txt 46 | 47 | # Unit test / coverage reports 48 | htmlcov/ 49 | .tox/ 50 | .coverage 51 | .coverage.* 52 | .cache 53 | nosetests.xml 54 | coverage.xml 55 | *.cover 56 | .hypothesis/ 57 | .pytest_cache/ 58 | 59 | # Translations 60 | *.mo 61 | *.pot 62 | 63 | # Django stuff: 64 | *.log 65 | local_settings.py 66 | db.sqlite3 67 | 68 | # Flask stuff: 69 | instance/ 70 | .webassets-cache 71 | 72 | # Scrapy stuff: 73 | .scrapy 74 | 75 | # Sphinx documentation 76 | docs/_build/ 77 | 78 | # PyBuilder 79 | target/ 80 | 81 | # Jupyter Notebook 82 | .ipynb_checkpoints 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # celery beat schedule file 88 | celerybeat-schedule 89 | 90 | # SageMath parsed files 91 | *.sage.py 92 | 93 | # Environments 94 | .env 95 | .venv 96 | env/ 97 | venv/ 98 | ENV/ 99 | env.bak/ 100 | venv.bak/ 101 | 102 | # Spyder project settings 103 | .spyderproject 104 | .spyproject 105 | 106 | # Rope project settings 107 | .ropeproject 108 | 109 | # mkdocs documentation 110 | /site 111 | 112 | # mypy 113 | .mypy_cache/ 114 | -------------------------------------------------------------------------------- /HACKING.txt: -------------------------------------------------------------------------------- 1 | ############# 2 | ## Setting up a development environment 3 | ############# 4 | 5 | Athena requires a Python 3.7+ environment. Using virtualenv to manage 6 | dependencies is highly recommended. After checking out the Athena 7 | repository, run: 8 | 9 | ( On OSX ) 10 | 11 | > virtualenv env 12 | > source env/activate 13 | > pip install -r requirements.txt 14 | 15 | ( On Windows ) 16 | 17 | > virtualenv env 18 | > env\Scripts\activate 19 | > pip install -r requirements.txt 20 | 21 | Athena can then be invoked by calling `python src/main.py` from the athena directory. 22 | 23 | ############# 24 | ## Preparing Athena releases 25 | ############# 26 | 27 | 28 | Athena uses PyInstaller to prepare downloadable application bundles for Mac OS X 29 | and Windows. Deployment convenience scripts are available for both platforms: 30 | 31 | ( On OSX ) 32 | > ./deploy_mac.sh 33 | 34 | ( On Windows ) 35 | > .\deploy_win.bat 36 | 37 | The result of running these scripts is a file dist/athena_{platform}_{version}.zip, 38 | which can be uploaded to Github or otherwise shared with collaborators. This zip 39 | will include Athena's README and LICENSE files. 40 | 41 | The deploy_mac.sh script calls sign_mac.sh with the name of a signing key ("LCBB" by default). 42 | To create your own self-signed key for this purpose, follow the instructions at 43 | https://github.com/pyinstaller/pyinstaller/wiki/Recipe-OSX-Code-Signing. 44 | Without at least a self-signed binary, Athena.app has startup problems if it is 45 | downloaded from the web, due to Apple's Gatekeeper features. 46 | 47 | ############# 48 | ## Platform Support 49 | ############# 50 | 51 | As of this writing, the LCBB sequence tools are only available for Windows and Mac OSX. 52 | There's no reason Athena wouldn't also run fine on Linux, but it wouldn't be 53 | able to call sequence tools unless they were first compiled on that target. 54 | 55 | On OSX, PyInstaller creates binaries that are forward compatible with new versions 56 | of the OS, but not backward compatible. So it is necessary to build Athena on the 57 | oldest version of OSX that we want to support for our users. Athena's development 58 | through version 0.4.2 was done on OSX 10.12 Sierra. 59 | 60 | ############# 61 | ## Repository Layout 62 | ############# 63 | 64 | 65 | The ui/ directory contains Qt ui files, which can be edited with Qt Creator or Qt Designer. 66 | Chief among these is AthenaMainWindow.ui. Almost any GUI change will begin with editing 67 | this file. I have adhered to a convention of not setting up signals and slots in the 68 | ui file; all signal connections are set up manually in src/mainwindow.py 69 | 70 | All other input code is under src/, as follows: 71 | 72 | * src/athena -- Athena's GUI and graphics source code; see internal documentation within .py files 73 | * src/earcut -- The earcut library, taken from https://github.com/joshuaskelly/earcut-python 74 | (If this had been conventionally available via pip it would be a pip dependency) 75 | * src/pdbgen -- The PDBGen library 76 | * src/qml -- QML files for Athena's graphical QMaterial classes 77 | * src/shaders -- GLSL shader code 78 | (There's a lot of material here, because Athena draws spheres, cylinders, 79 | and cones using ray-traced imposter shaders.) 80 | 81 | ############# 82 | ## Athena and Qt 83 | ############# 84 | 85 | Athena uses PySide2 as an interface to the Qt5 API. 86 | 87 | Within that API, it uses Qt3D for 3D graphics. Qt3D's documentation 88 | is not great, so Athena has some idiosyncratic interactions with it: 89 | 90 | * QMaterials are defined in QML, but all other Qt3D structures (including scene 91 | graphs and frame graphs) are set up manually in Python code. 92 | 93 | * Even those QMaterial subclassess require support from Python to define paths to their 94 | shader files, since QML can't reference files outside of a qrc file. 95 | 96 | * I wanted to avoid using Qt3DWindow and implement a customized 3D widget, especially 97 | for the purposes of controlling the format of the OpenGL depth buffer (see Athena 98 | issue #6). This was impossible due to https://bugreports.qt.io/browse/PYSIDE-753 99 | but may become possible in the future if that bug is fixed or Athena migrates from 100 | PySide2 to PyQt5. 101 | 102 | 103 | 104 | ############# 105 | ## A note about dependencies 106 | ############# 107 | 108 | Any Python dependencies introduced to Athena must be installable with pip on both Windows 109 | and Mac OS X without requiring any native library compilation. This avoids dll 110 | hell on Windows, where we would have to ensure the compiled libraries are 111 | compatible with the Qt libraries in the PySide2 wheels. It also ensures that 112 | users can build Athena without needing to set up native compilers. 113 | 114 | 115 | -------------------------------------------------------------------------------- /build_mac.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | set -e 3 | 4 | if [ ! -f "athena_version.py" ] ; then 5 | echo "Warning: didn't find athena_version.py, so running build_preflight.py first" 6 | python ./build_preflight.py 7 | fi 8 | VERSION=`python athena_version.py` 9 | 10 | pyinstaller ./src/main.py --add-data "ui:ui" --add-data "tools:tools" --add-data "sample_inputs:sample_inputs" \ 11 | --add-data "src/qml:qml" --add-data "src/shaders:shaders" --add-data "src/txt:txt" \ 12 | --add-data "athena_version.py:." \ 13 | --add-binary "${VIRTUAL_ENV}/lib/python3.7/site-packages/PySide2/Qt/plugins/geometryloaders:qt5_plugins/geometryloaders" \ 14 | --osx-bundle-identifier="edu.mit.lcbb.athena" \ 15 | --name Athena --icon "icon/athena.icns" --windowed $* 16 | plutil -insert NSHighResolutionCapable -bool true dist/Athena.app/Contents/Info.plist 17 | plutil -replace CFBundleShortVersionString -string ${VERSION} dist/Athena.app/Contents/Info.plist 18 | -------------------------------------------------------------------------------- /build_preflight.py: -------------------------------------------------------------------------------- 1 | import setuptools_scm 2 | import platform 3 | import codecs 4 | 5 | # Derive a version string from git 6 | athena_version = setuptools_scm.get_version() 7 | 8 | version_hunks = athena_version.split('.') 9 | 10 | print(version_hunks) 11 | 12 | assert( hunk.isdigit() for hunk in version_hunks[0:2] ) 13 | 14 | def writeAthenaVersionFile(): 15 | template = ''' 16 | version = "{}" 17 | if __name__=='__main__': print (version) 18 | ''' 19 | content = template.format(athena_version) 20 | filename = 'athena_version.py' 21 | open(filename,'w+').write(content) 22 | print('Wrote',filename) 23 | 24 | def writeWindowsVersionFile(version_hunks): 25 | windows_version_template = u'''# UTF-8 26 | # 27 | # For more details about fixed file info 'ffi' see: 28 | # http://msdn.microsoft.com/en-us/library/ms646997.aspx 29 | VSVersionInfo( 30 | ffi=FixedFileInfo( 31 | # filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4) 32 | # Set not needed items to zero 0. 33 | filevers=({0}, {1}, {2}, 0), 34 | prodvers=({0}, {1}, {2}, 0), 35 | # Contains a bitmask that specifies the valid bits 'flags'r 36 | mask=0x3f, 37 | # Contains a bitmask that specifies the Boolean attributes of the file. 38 | flags=0x0, 39 | # The operating system for which this file was designed. 40 | # 0x4 - NT and there is no need to change it. 41 | OS=0x4, 42 | # The general type of file. 43 | # 0x1 - the file is an application. 44 | fileType=0x1, 45 | # The function of the file. 46 | # 0x0 - the function is not defined for this fileType 47 | subtype=0x0, 48 | # Creation date and time stamp. 49 | date=(0, 0) 50 | ), 51 | kids=[ 52 | StringFileInfo( 53 | [ 54 | StringTable( 55 | u'040904E4', 56 | [StringStruct(u'CompanyName', u'MIT LCCB Lab'), 57 | StringStruct(u'FileDescription', u'Athena - a GUI Toolkit for DNA Design'), 58 | StringStruct(u'FileVersion', u'0, 0, 5, 0'), 59 | StringStruct(u'InternalName', u'Athena'), 60 | StringStruct(u'LegalCopyright', u'Copyright 2019'), 61 | StringStruct(u'LegalTrademarks', u''), 62 | StringStruct(u'OriginalFilename', u'Athena.exe'), 63 | StringStruct(u'ProductName', u'Athena'), 64 | StringStruct(u'ProductVersion', u'{3}')]) 65 | ]), 66 | VarFileInfo([VarStruct(u'Translation', [1033, 1252])]) 67 | ] 68 | )''' 69 | content = windows_version_template.format(*(version_hunks[0:3]+[athena_version])) 70 | filename = 'version_info.txt' 71 | with codecs.open(filename, 'w+', 'utf_8') as f: 72 | f.write(content) 73 | print("Wrote windows exe version info to", filename) 74 | 75 | writeAthenaVersionFile() 76 | if platform.system() == 'Windows': 77 | writeWindowsVersionFile(version_hunks) 78 | elif platform.system() == 'Darwin': 79 | # Nothing specific for mac right now 80 | pass 81 | -------------------------------------------------------------------------------- /build_win.bat: -------------------------------------------------------------------------------- 1 | IF NOT EXIST "athena_version.py" ( 2 | echo "Warning: didn't find athena_version.py, so running build_preflight.py first" 3 | python .\build_preflight.py 4 | ) 5 | pyinstaller .\src\main.py --add-data "ui;ui" --add-data "tools;tools" --add-data "sample_inputs;sample_inputs" ^ 6 | --add-data "src/qml;qml" --add-data "src/shaders;shaders" --add-data "src/txt;txt" ^ 7 | --add-data "athena_version.py;version.py" ^ 8 | --add-binary "%VIRTUAL_ENV%/Lib/site-packages/PySide2/plugins/geometryloaders;qt5_plugins/geometryloaders" ^ 9 | --version-file version_info.txt --name Athena --icon icon\athena.ico %* 10 | -------------------------------------------------------------------------------- /deploy_mac.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | python build_preflight.py 5 | 6 | VERSION=`python athena_version.py` 7 | 8 | echo "Deploying as version" $VERSION 9 | 10 | ./build_mac.sh --clean --noconfirm 11 | ./sign_mac.sh "LCBB" 12 | 13 | rm -rf Athena 14 | mkdir Athena 15 | cp -a dist/Athena.app Athena 16 | cp README.txt Athena 17 | cp LICENSE Athena/LICENSE.txt 18 | 19 | ZIPFILE=dist/athena_mac_${VERSION}.zip 20 | echo "Creating ${ZIPFILE}" 21 | zip -y -q -r ${ZIPFILE} Athena 22 | 23 | -------------------------------------------------------------------------------- /deploy_win.bat: -------------------------------------------------------------------------------- 1 | python build_preflight.py 2 | 3 | for /f %%i in ('python athena_version.py') do set VERSION=%%i 4 | 5 | echo Deploying as version %VERSION% 6 | 7 | call .\build_win.bat --clean --noconfirm --onefile 8 | 9 | del /s /f /q ".\Athena" 10 | mkdir Athena 11 | xcopy "dist\Athena.exe" "Athena\" 12 | xcopy "README.txt" "Athena\" 13 | xcopy "LICENSE" "Athena\" 14 | move "Athena\LICENSE" "Athena\LICENSE.txt" 15 | 16 | set ZIPFILE=dist/athena_win_%VERSION%.zip 17 | echo Creating %ZIPFILE% 18 | zip -r -j %ZIPFILE% Athena 19 | -------------------------------------------------------------------------------- /fix_app_qt_folder_names.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | # This is a utility to support codesign --deep on MacOSX 4 | # Taken verbatim from https://github.com/pyinstaller/pyinstaller/wiki/Recipe-OSX-Code-Signing-Qt 5 | # (Specific revision: https://github.com/pyinstaller/pyinstaller/wiki/Recipe-OSX-Code-Signing-Qt/df22fb5918ac4fb65a7471542d0d5eebe30526b6 ) 6 | import os 7 | import shutil 8 | import sys 9 | from macholib.MachO import MachO 10 | from pathlib import Path 11 | from typing import Generator, List, Optional 12 | 13 | 14 | def create_symlink(folder: Path) -> None: 15 | """Create the appropriate symlink in the MacOS folder 16 | pointing to the Resources folder. 17 | """ 18 | sibbling = Path(str(folder).replace("MacOS", "")) 19 | 20 | # PyQt5/Qt/qml/QtQml/Models.2 21 | root = str(sibbling).partition("Contents")[2].lstrip("/") 22 | # ../../../../ 23 | backward = "../" * len(root.split("/")) 24 | # ../../../../Resources/PyQt5/Qt/qml/QtQml/Models.2 25 | good_path = f"{backward}Resources/{root}" 26 | 27 | folder.symlink_to(good_path) 28 | 29 | 30 | def fix_dll(dll: Path) -> None: 31 | """Fix the DLL lookup paths to use relative ones for Qt dependencies. 32 | Inspiration: PyInstaller/depend/dylib.py:mac_set_relative_dylib_deps() 33 | Currently one header is pointing to (we are in the Resources folder): 34 | @loader_path/../../../../QtCore (it is referencing to the old MacOS folder) 35 | It will be converted to: 36 | @loader_path/../../../../../../MacOS/QtCore 37 | """ 38 | 39 | def match_func(pth: str) -> Optional[str]: 40 | """Callback function for MachO.rewriteLoadCommands() that is 41 | called on every lookup path setted in the DLL headers. 42 | By returning None for system libraries, it changes nothing. 43 | Else we return a relative path pointing to the good file 44 | in the MacOS folder. 45 | """ 46 | basename = os.path.basename(pth) 47 | if not basename.startswith("Qt"): 48 | return None 49 | return f"@loader_path{good_path}/{basename}" 50 | 51 | # Resources/PyQt5/Qt/qml/QtQuick/Controls.2/Fusion 52 | root = str(dll.parent).partition("Contents")[2][1:] 53 | # /../../../../../../.. 54 | backward = "/.." * len(root.split("/")) 55 | # /../../../../../../../MacOS 56 | good_path = f"{backward}/MacOS" 57 | 58 | # Rewrite Mach headers with corrected @loader_path 59 | dll = MachO(dll) 60 | dll.rewriteLoadCommands(match_func) 61 | with open(dll.filename, "rb+") as f: 62 | for header in dll.headers: 63 | f.seek(0) 64 | dll.write(f) 65 | f.seek(0, 2) 66 | f.flush() 67 | 68 | 69 | def find_problematic_folders(folder: Path) -> Generator[Path, None, None]: 70 | """Recursively yields problematic folders (containing a dot in their name).""" 71 | for path in folder.iterdir(): 72 | if not path.is_dir() or path.is_symlink(): 73 | # Skip simlinks as they are allowed (even with a dot) 74 | continue 75 | if "." in path.name: 76 | yield path 77 | else: 78 | yield from find_problematic_folders(path) 79 | 80 | 81 | def move_contents_to_resources(folder: Path) -> Generator[Path, None, None]: 82 | """Recursively move any non symlink file from a problematic folder 83 | to the sibbling one in Resources. 84 | """ 85 | for path in folder.iterdir(): 86 | if path.is_symlink(): 87 | continue 88 | if path.is_dir(): 89 | yield from move_contents_to_resources(path) 90 | else: 91 | sibbling = Path(str(path).replace("MacOS", "Resources")) 92 | shutil.move(path, sibbling) 93 | yield sibbling 94 | 95 | 96 | def main(args: List[str]) -> int: 97 | """ 98 | Fix the application to allow codesign (NXDRIVE-1301). 99 | Take one or more .app as arguments: "Nuxeo Drive.app". 100 | 101 | To overall process will: 102 | - move problematic folders from MacOS to Resources 103 | - fix the DLLs lookup paths 104 | - create the appropriate symbolic link 105 | """ 106 | for app in args: 107 | name = os.path.basename(app) 108 | print(f">>> [{name}] Fixing Qt folder names") 109 | path = Path(app) / "Contents" / "MacOS" 110 | for folder in find_problematic_folders(path): 111 | for file in move_contents_to_resources(folder): 112 | fix_dll(file) 113 | shutil.rmtree(folder) 114 | create_symlink(folder) 115 | print(f" !! Fixed {folder}") 116 | print(f">>> [{name}] Application fixed.") 117 | 118 | 119 | if __name__ == "__main__": 120 | sys.exit(main(sys.argv[1:])) 121 | -------------------------------------------------------------------------------- /icon/README: -------------------------------------------------------------------------------- 1 | athena.iconset: created by hand by screenshotting and using Preview.app 2 | athena.icns: created on OSX with `iconutil -c icns athena.iconset` 3 | athena.ico: created with imagemagick `convert -background transparent icon_512x512.png -define icon:auto-resize=16,32,48,64,256 athena.ico` 4 | 5 | -------------------------------------------------------------------------------- /icon/athena.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/icon/athena.icns -------------------------------------------------------------------------------- /icon/athena.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/icon/athena.ico -------------------------------------------------------------------------------- /icon/athena.iconset/icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/icon/athena.iconset/icon_128x128.png -------------------------------------------------------------------------------- /icon/athena.iconset/icon_128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/icon/athena.iconset/icon_128x128@2x.png -------------------------------------------------------------------------------- /icon/athena.iconset/icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/icon/athena.iconset/icon_16x16.png -------------------------------------------------------------------------------- /icon/athena.iconset/icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/icon/athena.iconset/icon_16x16@2x.png -------------------------------------------------------------------------------- /icon/athena.iconset/icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/icon/athena.iconset/icon_256x256.png -------------------------------------------------------------------------------- /icon/athena.iconset/icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/icon/athena.iconset/icon_256x256@2x.png -------------------------------------------------------------------------------- /icon/athena.iconset/icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/icon/athena.iconset/icon_32x32.png -------------------------------------------------------------------------------- /icon/athena.iconset/icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/icon/athena.iconset/icon_32x32@2x.png -------------------------------------------------------------------------------- /icon/athena.iconset/icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/icon/athena.iconset/icon_512x512.png -------------------------------------------------------------------------------- /icon/athena.iconset/icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/icon/athena.iconset/icon_512x512@2x.png -------------------------------------------------------------------------------- /icon/icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/icon/icon_512x512.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | PySide2==5.12.3 # Do not upgrade to 5.13+ without resolving github issue #11 2 | setuptools_scm 3 | plyfile 4 | numpy>=1.16.2 5 | # A bleeding-edge pyinstaller is necessary to support PySide2 + QML 6 | git+git://github.com/pyinstaller/pyinstaller@e6c0f13#egg=pyinstaller 7 | 8 | -------------------------------------------------------------------------------- /sample_inputs/2D/01_triangle.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 3 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 1 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.0000 14.6028 0.0000 11 | 12.6455 -7.3014 0.0000 12 | -12.6455 -7.3014 0.0000 13 | 3 2 1 0 14 | -------------------------------------------------------------------------------- /sample_inputs/2D/02_triangle_mesh.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 6 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 4 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 10.6974 6.1760 0.0000 11 | 21.3948 -12.3519 0.0000 12 | 0.0000 -12.3519 0.0000 13 | -21.3948 -12.3519 0.0000 14 | -10.6974 6.1760 0.0000 15 | 0.0000 24.7039 0.0000 16 | 3 2 1 0 17 | 3 4 3 2 18 | 3 0 5 4 19 | 3 4 2 0 20 | -------------------------------------------------------------------------------- /sample_inputs/2D/03_square.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 4 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 1 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 10.1750 10.1770 0.0000 11 | 10.1750 -10.1770 0.0000 12 | -10.1750 -10.1770 0.0000 13 | -10.1750 10.1770 0.0000 14 | 4 3 2 1 0 15 | -------------------------------------------------------------------------------- /sample_inputs/2D/04_square_mesh_1.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 16 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 18 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 37.6845 -12.5615 0.0000 11 | 37.6845 -37.6845 0.0000 12 | 12.5615 -37.6845 0.0000 13 | -12.5615 -37.6845 0.0000 14 | -12.5615 -12.5615 0.0000 15 | -37.6845 -37.6845 0.0000 16 | -37.6845 -12.5615 0.0000 17 | -37.6845 12.5615 0.0000 18 | -37.6845 37.6845 0.0000 19 | -12.5615 37.6845 0.0000 20 | 12.5615 37.6845 0.0000 21 | 12.5615 12.5615 0.0000 22 | 37.6845 37.6845 0.0000 23 | 37.6845 12.5615 0.0000 24 | -12.5615 12.5615 0.0000 25 | 12.5615 -12.5615 0.0000 26 | 3 2 1 0 27 | 3 4 3 2 28 | 3 4 5 3 29 | 3 4 6 5 30 | 3 4 7 6 31 | 3 9 8 7 32 | 3 11 10 9 33 | 3 11 12 10 34 | 3 11 13 12 35 | 3 11 0 13 36 | 3 14 11 9 37 | 3 4 11 14 38 | 3 7 14 9 39 | 3 4 14 7 40 | 3 15 0 11 41 | 3 2 0 15 42 | 3 4 15 11 43 | 3 2 15 4 44 | -------------------------------------------------------------------------------- /sample_inputs/2D/05_square_mesh_2.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 25 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 32 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -42.5640 -42.5640 0.0000 11 | -21.2820 -42.5640 0.0000 12 | 0.0000 -42.5640 0.0000 13 | 21.2820 -42.5640 0.0000 14 | 42.5640 -42.5640 0.0000 15 | -42.5640 -21.2820 0.0000 16 | -21.2820 -21.2820 0.0000 17 | 0.0000 -21.2820 0.0000 18 | 21.2820 -21.2820 0.0000 19 | 42.5640 -21.2820 0.0000 20 | -42.5640 0.0000 0.0000 21 | -21.2820 0.0000 0.0000 22 | 0.0000 0.0000 0.0000 23 | 21.2820 0.0000 0.0000 24 | 42.5640 0.0000 0.0000 25 | -42.5640 21.2820 0.0000 26 | -21.2820 21.2820 0.0000 27 | 0.0000 21.2820 0.0000 28 | 21.2820 21.2820 0.0000 29 | 42.5640 21.2820 0.0000 30 | -42.5640 42.5640 0.0000 31 | -21.2820 42.5640 0.0000 32 | 0.0000 42.5640 0.0000 33 | 21.2820 42.5640 0.0000 34 | 42.5640 42.5640 0.0000 35 | 3 0 6 5 36 | 3 0 1 6 37 | 3 1 2 6 38 | 3 2 7 6 39 | 3 2 8 7 40 | 3 2 3 8 41 | 3 3 4 8 42 | 3 4 9 8 43 | 3 5 6 10 44 | 3 6 11 10 45 | 3 6 12 11 46 | 3 6 7 12 47 | 3 7 8 12 48 | 3 8 13 12 49 | 3 8 14 13 50 | 3 8 9 14 51 | 3 10 16 15 52 | 3 10 11 16 53 | 3 11 12 16 54 | 3 12 17 16 55 | 3 12 18 17 56 | 3 12 13 18 57 | 3 13 14 18 58 | 3 14 19 18 59 | 3 15 16 20 60 | 3 16 21 20 61 | 3 16 22 21 62 | 3 16 17 22 63 | 3 17 18 22 64 | 3 18 23 22 65 | 3 18 24 23 66 | 3 18 19 24 67 | -------------------------------------------------------------------------------- /sample_inputs/2D/06_pentagon.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 5 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 1 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -8.4388 -11.6092 0.0000 11 | -13.6516 4.4352 0.0000 12 | 0.0000 14.3480 0.0000 13 | 13.6516 4.4352 0.0000 14 | 8.4388 -11.6092 0.0000 15 | 5 4 3 2 1 0 16 | -------------------------------------------------------------------------------- /sample_inputs/2D/07_pentagon_mesh.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 6 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 5 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 13.9497 -19.5650 0.0000 11 | -13.9497 -19.5650 0.0000 12 | 0.0000 1.8717 0.0000 13 | -22.5668 6.9572 0.0000 14 | 0.0000 23.3437 0.0000 15 | 22.5668 6.9572 0.0000 16 | 3 2 1 0 17 | 3 2 3 1 18 | 3 2 4 3 19 | 3 2 5 4 20 | 3 2 0 5 21 | -------------------------------------------------------------------------------- /sample_inputs/2D/08_hexagon.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 6 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 1 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 8.7492 15.1542 0.0000 11 | 17.4984 0.0020 0.0000 12 | 8.7492 -15.1562 0.0000 13 | -8.7492 -15.1562 0.0000 14 | -17.4984 0.0020 0.0000 15 | -8.7492 15.1542 0.0000 16 | 6 5 4 3 2 1 0 17 | -------------------------------------------------------------------------------- /sample_inputs/2D/09_hexagon_mesh_1.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 18 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 18 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 21.9143 -37.9578 0.0000 11 | 0.0000 -50.6194 0.0000 12 | 0.0000 -25.2962 0.0000 13 | -21.9143 -37.9578 0.0000 14 | -43.8287 -25.2962 0.0000 15 | -21.9143 -12.6616 0.0000 16 | -43.8287 -0.0000 0.0000 17 | -43.8287 25.2962 0.0000 18 | -21.9143 12.6616 0.0000 19 | -21.9143 37.9578 0.0000 20 | 0.0000 50.6194 0.0000 21 | 0.0000 25.2962 0.0000 22 | 21.9143 37.9578 0.0000 23 | 43.8287 25.2962 0.0000 24 | 21.9143 12.6616 0.0000 25 | 43.8287 -0.0000 0.0000 26 | 43.8287 -25.2962 0.0000 27 | 21.9143 -12.6616 0.0000 28 | 3 2 1 0 29 | 3 2 3 1 30 | 3 5 4 3 31 | 3 5 6 4 32 | 3 8 7 6 33 | 3 8 9 7 34 | 3 11 10 9 35 | 3 11 12 10 36 | 3 14 13 12 37 | 3 14 15 13 38 | 3 17 16 15 39 | 3 17 0 16 40 | 3 12 11 14 41 | 3 15 14 17 42 | 3 0 17 2 43 | 3 3 2 5 44 | 3 6 5 8 45 | 3 9 8 11 46 | -------------------------------------------------------------------------------- /sample_inputs/2D/10_hexagon_mesh_2.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 7 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 6 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 21.4052 0.0000 0.0000 11 | 10.6934 -18.5396 0.0000 12 | 0.0074 0.0000 0.0000 13 | -10.7044 -18.5396 0.0000 14 | -21.3905 0.0000 0.0000 15 | -10.7044 18.5396 0.0000 16 | 10.6934 18.5396 0.0000 17 | 3 2 1 0 18 | 3 2 3 1 19 | 3 2 4 3 20 | 3 2 5 4 21 | 3 2 6 5 22 | 3 2 0 6 23 | -------------------------------------------------------------------------------- /sample_inputs/2D/11_octagon.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 8 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 1 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 8.1974 19.7951 0.0000 11 | 19.7987 8.2010 0.0000 12 | 19.7987 -8.2010 0.0000 13 | 8.1974 -19.7951 0.0000 14 | -8.1974 -19.7951 0.0000 15 | -19.7987 -8.2010 0.0000 16 | -19.7987 8.2010 0.0000 17 | -8.1974 19.7951 0.0000 18 | 8 7 6 5 4 3 2 1 0 19 | -------------------------------------------------------------------------------- /sample_inputs/2D/12_octagon_mesh.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 9 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 8 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 24.5857 -10.2022 0.0000 11 | 10.2022 -24.5857 0.0000 12 | -0.0130 0.0130 0.0000 13 | -10.1696 -24.5857 0.0000 14 | -24.6118 -10.2022 0.0000 15 | -24.6118 10.1696 0.0000 16 | -10.1696 24.6118 0.0000 17 | 10.2022 24.6118 0.0000 18 | 24.5857 10.1696 0.0000 19 | 3 2 1 0 20 | 3 2 3 1 21 | 3 2 4 3 22 | 3 2 5 4 23 | 3 2 6 5 24 | 3 2 7 6 25 | 3 2 8 7 26 | 3 2 0 8 27 | -------------------------------------------------------------------------------- /sample_inputs/2D/13_decagon.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 10 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 1 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 7.5328 -23.2177 0.0000 11 | -7.5463 -23.2177 0.0000 12 | -19.7307 -14.3318 0.0000 13 | -24.4092 0.0067 0.0000 14 | -19.7307 14.3453 0.0000 15 | -7.5463 23.1975 0.0000 16 | 7.5328 23.1975 0.0000 17 | 19.7509 14.3453 0.0000 18 | 24.3958 0.0067 0.0000 19 | 19.7509 -14.3318 0.0000 20 | 10 9 8 7 6 5 4 3 2 1 0 21 | -------------------------------------------------------------------------------- /sample_inputs/2D/14_decagon_mesh.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 11 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 10 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 25.9103 18.8249 0.0000 11 | 9.8969 30.4594 0.0000 12 | -9.8969 30.4594 0.0000 13 | -25.9103 18.8249 0.0000 14 | -32.0269 0.0000 0.0000 15 | -25.9103 -18.8249 0.0000 16 | -9.8969 -30.4594 0.0000 17 | 9.8969 -30.4594 0.0000 18 | 25.9103 -18.8249 0.0000 19 | 32.0269 -0.0000 0.0000 20 | 0.0000 0.0000 0.0000 21 | 3 10 0 1 22 | 3 10 1 2 23 | 3 10 2 3 24 | 3 10 3 4 25 | 3 10 4 5 26 | 3 10 5 6 27 | 3 10 6 7 28 | 3 10 7 8 29 | 3 10 8 9 30 | 3 10 9 0 31 | -------------------------------------------------------------------------------- /sample_inputs/2D/15_circle_mesh.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 19 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 24 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -44.4423 0.3273 0.0000 11 | -38.6654 -22.0466 0.0000 12 | -38.3125 22.3967 0.0000 13 | -23.6462 -0.0769 0.0000 14 | -22.4207 -38.5056 0.0000 15 | -22.0241 38.4734 0.0000 16 | -11.8726 -20.6399 0.0000 17 | -11.7735 20.3143 0.0000 18 | 0.0000 44.3141 0.0000 19 | 0.0000 -0.2246 0.0000 20 | 0.0000 -44.5752 0.0000 21 | 11.7735 20.3143 0.0000 22 | 11.8726 -20.6399 0.0000 23 | 22.0241 38.4734 0.0000 24 | 22.4207 -38.5056 0.0000 25 | 23.6462 -0.0769 0.0000 26 | 38.3125 22.3967 0.0000 27 | 38.6654 -22.0466 0.0000 28 | 44.4423 0.3273 0.0000 29 | 3 11 7 9 30 | 3 8 7 11 31 | 3 10 6 4 32 | 3 9 6 12 33 | 3 14 17 12 34 | 3 10 14 12 35 | 3 12 6 10 36 | 3 9 7 3 37 | 3 3 6 9 38 | 3 0 3 2 39 | 3 2 3 7 40 | 3 15 11 9 41 | 3 9 12 15 42 | 3 15 17 18 43 | 3 15 12 17 44 | 3 16 15 18 45 | 3 11 15 16 46 | 3 1 4 6 47 | 3 1 3 0 48 | 3 6 3 1 49 | 3 5 7 8 50 | 3 5 2 7 51 | 3 8 11 13 52 | 3 11 16 13 53 | -------------------------------------------------------------------------------- /sample_inputs/2D/16_annulus_mesh_1.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 20 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 10 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 54.5946 -0.0000 0.0000 11 | 44.1675 -32.0810 0.0000 12 | 27.4042 -19.9314 0.0000 13 | 33.8942 -0.0000 0.0000 14 | 16.8541 -51.9202 0.0000 15 | 10.4563 -32.2348 0.0000 16 | -16.8571 -51.9202 0.0000 17 | -10.4594 -32.2348 0.0000 18 | -44.1706 -32.0810 0.0000 19 | -27.4073 -19.9314 0.0000 20 | -54.5977 -0.0000 0.0000 21 | -33.8665 -0.0000 0.0000 22 | -44.1706 32.0810 0.0000 23 | -27.4073 19.9314 0.0000 24 | -16.8571 51.9202 0.0000 25 | -10.4594 32.2348 0.0000 26 | 16.8541 51.9202 0.0000 27 | 10.4563 32.2348 0.0000 28 | 44.1675 32.0810 0.0000 29 | 27.4042 19.9314 0.0000 30 | 4 3 2 1 0 31 | 4 2 5 4 1 32 | 4 5 7 6 4 33 | 4 7 9 8 6 34 | 4 9 11 10 8 35 | 4 11 13 12 10 36 | 4 13 15 14 12 37 | 4 15 17 16 14 38 | 4 17 19 18 16 39 | 4 19 3 0 18 40 | -------------------------------------------------------------------------------- /sample_inputs/2D/17_annulus_mesh_2.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 30 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 20 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 32.3897 0.0000 0.0000 11 | 52.1834 0.0000 0.0000 12 | 71.9772 0.0000 0.0000 13 | 26.2038 19.0382 0.0000 14 | 42.2173 30.6727 0.0000 15 | 58.2307 42.3071 0.0000 16 | 10.0090 30.8045 0.0000 17 | 16.1256 49.6294 0.0000 18 | 22.2422 68.4543 0.0000 19 | -10.0090 30.8045 0.0000 20 | -16.1256 49.6294 0.0000 21 | -22.2422 68.4543 0.0000 22 | -26.2038 19.0382 0.0000 23 | -42.2173 30.6727 0.0000 24 | -58.2307 42.3071 0.0000 25 | -32.3897 0.0000 0.0000 26 | -52.1834 0.0000 0.0000 27 | -71.9772 0.0000 0.0000 28 | -26.2038 -19.0382 0.0000 29 | -42.2173 -30.6727 0.0000 30 | -58.2307 -42.3071 0.0000 31 | -10.0090 -30.8045 0.0000 32 | -16.1256 -49.6294 0.0000 33 | -22.2422 -68.4543 0.0000 34 | 10.0090 -30.8045 0.0000 35 | 16.1256 -49.6294 0.0000 36 | 22.2422 -68.4543 0.0000 37 | 26.2038 -19.0382 0.0000 38 | 42.2173 -30.6727 0.0000 39 | 58.2307 -42.3071 0.0000 40 | 4 0 1 4 3 41 | 4 1 2 5 4 42 | 4 3 4 7 6 43 | 4 4 5 8 7 44 | 4 6 7 10 9 45 | 4 7 8 11 10 46 | 4 9 10 13 12 47 | 4 10 11 14 13 48 | 4 12 13 16 15 49 | 4 13 14 17 16 50 | 4 15 16 19 18 51 | 4 16 17 20 19 52 | 4 18 19 22 21 53 | 4 19 20 23 22 54 | 4 21 22 25 24 55 | 4 22 23 26 25 56 | 4 24 25 28 27 57 | 4 25 26 29 28 58 | 4 27 28 1 0 59 | 4 28 29 2 1 60 | -------------------------------------------------------------------------------- /sample_inputs/2D/18_ellipse_mesh.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 27 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 36 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -98.0446 -2.0151 0.0000 11 | -86.5885 24.0078 0.0000 12 | -82.8584 -25.6187 0.0000 13 | -67.4102 4.6276 0.0000 14 | -60.7493 39.3518 0.0000 15 | -56.6498 -39.4231 0.0000 16 | -49.7975 -15.3608 0.0000 17 | -40.3642 16.4488 0.0000 18 | -30.3333 47.4603 0.0000 19 | -28.5206 -46.2241 0.0000 20 | -24.4484 -13.9472 0.0000 21 | -13.0507 17.8132 0.0000 22 | -0.0000 -48.3392 0.0000 23 | -0.0000 49.8485 0.0000 24 | -0.0000 -15.7504 0.0000 25 | 13.0507 17.8132 0.0000 26 | 24.4484 -13.9472 0.0000 27 | 28.5206 -46.2241 0.0000 28 | 30.3333 47.4603 0.0000 29 | 40.3642 16.4488 0.0000 30 | 49.7975 -15.3608 0.0000 31 | 56.6498 -39.4231 0.0000 32 | 60.7492 39.3518 0.0000 33 | 67.4102 4.6276 0.0000 34 | 82.8584 -25.6187 0.0000 35 | 86.5886 24.0078 0.0000 36 | 98.0446 -2.0151 0.0000 37 | 3 16 20 19 38 | 3 19 20 23 39 | 3 26 25 23 40 | 3 23 24 26 41 | 3 20 24 23 42 | 3 22 18 19 43 | 3 19 23 22 44 | 3 22 23 25 45 | 3 0 2 3 46 | 3 3 1 0 47 | 3 1 3 4 48 | 3 21 24 20 49 | 3 12 14 9 50 | 3 9 14 10 51 | 3 10 14 11 52 | 3 13 8 11 53 | 3 6 9 10 54 | 3 5 9 6 55 | 3 2 5 6 56 | 3 6 3 2 57 | 3 17 14 12 58 | 3 16 14 17 59 | 3 20 16 17 60 | 3 17 21 20 61 | 3 15 14 16 62 | 3 15 11 14 63 | 3 15 16 19 64 | 3 19 18 15 65 | 3 15 18 13 66 | 3 13 11 15 67 | 3 7 4 3 68 | 3 3 6 7 69 | 3 8 4 7 70 | 3 7 11 8 71 | 3 10 11 7 72 | 3 7 6 10 73 | -------------------------------------------------------------------------------- /sample_inputs/2D/19_quarter_circle_mesh.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 19 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 12 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -43.8236 -43.8236 0.0000 11 | -43.8236 -14.5208 0.0000 12 | -43.8236 14.7819 0.0000 13 | -14.5208 -43.8236 0.0000 14 | -19.4046 -19.4046 0.0000 15 | -24.2884 5.0143 0.0000 16 | 14.7819 -43.8236 0.0000 17 | 5.0143 -24.2884 0.0000 18 | -4.7533 -4.7533 0.0000 19 | 17.1520 17.1520 0.0000 20 | 39.0572 39.0572 0.0000 21 | -11.6287 34.7399 0.0000 22 | 1.0311 64.4654 0.0000 23 | -43.8236 44.0847 0.0000 24 | -43.8236 73.3875 0.0000 25 | 34.7399 -11.6287 0.0000 26 | 64.4654 1.0311 0.0000 27 | 44.0847 -43.8236 0.0000 28 | 73.3875 -43.8236 0.0000 29 | 4 3 4 1 0 30 | 4 4 5 2 1 31 | 4 6 7 4 3 32 | 4 7 8 5 4 33 | 4 8 9 11 5 34 | 4 9 10 12 11 35 | 4 5 11 13 2 36 | 4 11 12 14 13 37 | 4 7 15 9 8 38 | 4 15 16 10 9 39 | 4 6 17 15 7 40 | 4 17 18 16 15 41 | -------------------------------------------------------------------------------- /sample_inputs/2D/20_star_mesh.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 13 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 6 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 18.5345 -10.6943 0.0000 11 | 18.5345 -32.1120 0.0000 12 | 0.0000 -21.4032 0.0000 13 | 0.0000 -0.0026 0.0000 14 | -18.5345 -32.1120 0.0000 15 | -18.5345 -10.6943 0.0000 16 | -37.0691 -0.0026 0.0000 17 | -18.5345 10.7062 0.0000 18 | -18.5345 32.1067 0.0000 19 | 0.0000 21.3979 0.0000 20 | 18.5345 32.1067 0.0000 21 | 18.5345 10.7062 0.0000 22 | 37.0691 -0.0026 0.0000 23 | 4 3 2 1 0 24 | 4 3 5 4 2 25 | 4 3 7 6 5 26 | 4 3 9 8 7 27 | 4 3 11 10 9 28 | 4 3 0 12 11 29 | -------------------------------------------------------------------------------- /sample_inputs/2D/21_l-shape_mesh.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 21 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 12 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -31.0286 -31.0286 0.0000 11 | -12.9286 -31.0286 0.0000 12 | 5.1714 -31.0286 0.0000 13 | 23.2714 -31.0286 0.0000 14 | 41.3714 -31.0286 0.0000 15 | -31.0286 -12.9286 0.0000 16 | -12.9286 -12.9286 0.0000 17 | 5.1714 -12.9286 0.0000 18 | 23.2714 -12.9286 0.0000 19 | 41.3714 -12.9286 0.0000 20 | -31.0286 5.1714 0.0000 21 | -12.9286 5.1714 0.0000 22 | 5.1714 5.1714 0.0000 23 | 23.2714 5.1714 0.0000 24 | 41.3714 5.1714 0.0000 25 | -31.0286 23.2714 0.0000 26 | -12.9286 23.2714 0.0000 27 | 5.1714 23.2714 0.0000 28 | -31.0286 41.3714 0.0000 29 | -12.9286 41.3714 0.0000 30 | 5.1714 41.3714 0.0000 31 | 4 0 1 6 5 32 | 4 1 2 7 6 33 | 4 2 3 8 7 34 | 4 3 4 9 8 35 | 4 5 6 11 10 36 | 4 6 7 12 11 37 | 4 7 8 13 12 38 | 4 8 9 14 13 39 | 4 10 11 16 15 40 | 4 11 12 17 16 41 | 4 15 16 19 18 42 | 4 16 17 20 19 43 | -------------------------------------------------------------------------------- /sample_inputs/2D/22_cross_mesh.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 33 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 20 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 25.5973 -51.1945 0.0000 11 | 38.3959 -38.3959 0.0000 12 | 51.1945 -25.5973 0.0000 13 | 12.7986 -38.3959 0.0000 14 | 25.5973 -25.5973 0.0000 15 | 38.3959 -12.7986 0.0000 16 | -25.5973 -51.1945 0.0000 17 | -12.7986 -38.3959 0.0000 18 | 0.0000 -25.5973 0.0000 19 | 12.7986 -12.7986 0.0000 20 | 25.5973 -0.0000 0.0000 21 | 38.3959 12.7986 0.0000 22 | 51.1945 25.5973 0.0000 23 | -38.3959 -38.3959 0.0000 24 | -25.5973 -25.5973 0.0000 25 | -12.7986 -12.7986 0.0000 26 | 0.0000 0.0000 0.0000 27 | 12.7986 12.7986 0.0000 28 | 25.5973 25.5973 0.0000 29 | 38.3959 38.3959 0.0000 30 | -51.1945 -25.5973 0.0000 31 | -38.3959 -12.7986 0.0000 32 | -25.5973 0.0000 0.0000 33 | -12.7986 12.7986 0.0000 34 | 0.0000 25.5973 0.0000 35 | 12.7986 38.3959 0.0000 36 | 25.5973 51.1945 0.0000 37 | -38.3959 12.7986 0.0000 38 | -25.5973 25.5973 0.0000 39 | -12.7986 38.3959 0.0000 40 | -51.1945 25.5973 0.0000 41 | -38.3959 38.3959 0.0000 42 | -25.5973 51.1945 0.0000 43 | 4 0 1 4 3 44 | 4 1 2 5 4 45 | 4 3 4 9 8 46 | 4 4 5 10 9 47 | 4 6 7 14 13 48 | 4 7 8 15 14 49 | 4 8 9 16 15 50 | 4 9 10 17 16 51 | 4 10 11 18 17 52 | 4 11 12 19 18 53 | 4 13 14 21 20 54 | 4 14 15 22 21 55 | 4 15 16 23 22 56 | 4 16 17 24 23 57 | 4 17 18 25 24 58 | 4 18 19 26 25 59 | 4 22 23 28 27 60 | 4 23 24 29 28 61 | 4 27 28 31 30 62 | 4 28 29 32 31 63 | -------------------------------------------------------------------------------- /sample_inputs/2D/23_arrowhead_mesh.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 24 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 14 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -18.7361 -45.2790 0.0000 11 | -37.4723 -45.2790 0.0000 12 | -37.4723 -20.2975 0.0000 13 | -18.7361 -14.0521 0.0000 14 | -37.4723 4.6840 0.0000 15 | -18.7361 17.1747 0.0000 16 | -56.2084 -7.8067 0.0000 17 | -56.2084 10.9294 0.0000 18 | -37.4723 29.6656 0.0000 19 | -18.7361 48.4017 0.0000 20 | 0.0000 67.1378 0.0000 21 | 0.0000 29.6656 0.0000 22 | 18.7361 48.4017 0.0000 23 | 18.7361 17.1747 0.0000 24 | 37.4723 29.6656 0.0000 25 | 37.4723 4.6840 0.0000 26 | 56.2084 10.9294 0.0000 27 | 56.2084 -7.8067 0.0000 28 | 37.4723 -20.2975 0.0000 29 | 18.7361 -14.0521 0.0000 30 | 37.4723 -45.2790 0.0000 31 | 18.7361 -45.2790 0.0000 32 | 0.0000 -45.2790 0.0000 33 | 0.0000 -7.8067 0.0000 34 | 4 3 2 1 0 35 | 4 3 5 4 2 36 | 4 8 7 6 4 37 | 4 4 5 9 8 38 | 4 5 11 10 9 39 | 4 11 13 12 10 40 | 4 13 15 14 12 41 | 4 15 17 16 14 42 | 4 13 19 18 15 43 | 4 19 21 20 18 44 | 4 19 23 22 21 45 | 4 23 3 0 22 46 | 4 3 23 11 5 47 | 4 19 13 11 23 48 | -------------------------------------------------------------------------------- /sample_inputs/2D/24_curve_arm_mesh_1.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 14 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 6 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -19.4608 -33.4900 0.0000 11 | -22.0116 -52.8606 0.0000 12 | -44.4633 -52.8606 0.0000 13 | -41.1549 -27.6814 0.0000 14 | -31.4317 -4.1941 0.0000 15 | -11.9853 -15.4327 0.0000 16 | -15.9504 15.9594 0.0000 17 | -0.0649 0.0740 0.0000 18 | 4.2032 31.4407 0.0000 19 | 15.4164 11.9691 0.0000 20 | 27.6651 41.1639 0.0000 21 | 33.4990 19.4446 0.0000 22 | 52.8697 44.4724 0.0000 23 | 52.8697 21.9954 0.0000 24 | 4 3 2 1 0 25 | 4 0 5 4 3 26 | 4 5 7 6 4 27 | 4 7 9 8 6 28 | 4 9 11 10 8 29 | 4 11 13 12 10 30 | -------------------------------------------------------------------------------- /sample_inputs/2D/25_curve_arm_mesh_2.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 21 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 12 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -53.8938 -53.6487 0.0000 11 | -33.7296 -53.6487 0.0000 12 | -13.5653 -53.6487 0.0000 13 | -50.2294 -25.8147 0.0000 14 | -30.7522 -31.0336 0.0000 15 | -11.2751 -36.2525 0.0000 16 | -39.4858 0.1225 0.0000 17 | -22.0231 -9.9596 0.0000 18 | -4.5604 -20.0417 0.0000 19 | -22.3953 22.3953 0.0000 20 | -8.1370 8.1370 0.0000 21 | 6.1212 -6.1212 0.0000 22 | -0.1225 39.4858 0.0000 23 | 9.9596 22.0231 0.0000 24 | 20.0417 4.5604 0.0000 25 | 25.8147 50.2294 0.0000 26 | 31.0336 30.7522 0.0000 27 | 36.2525 11.2751 0.0000 28 | 53.6487 53.8938 0.0000 29 | 53.6487 33.7296 0.0000 30 | 53.6487 13.5653 0.0000 31 | 4 0 1 4 3 32 | 4 1 2 5 4 33 | 4 3 4 7 6 34 | 4 4 5 8 7 35 | 4 6 7 10 9 36 | 4 7 8 11 10 37 | 4 9 10 13 12 38 | 4 10 11 14 13 39 | 4 12 13 16 15 40 | 4 13 14 17 16 41 | 4 15 16 19 18 42 | 4 16 17 20 19 43 | -------------------------------------------------------------------------------- /sample_inputs/2D/26_curve_arm_mesh_3.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 21 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 24 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -75.3616 -75.0189 0.0000 11 | -47.1652 -75.0189 0.0000 12 | -18.9689 -75.0189 0.0000 13 | -70.2375 -36.0976 0.0000 14 | -43.0019 -43.3953 0.0000 15 | -15.7663 -50.6931 0.0000 16 | -55.2144 0.1713 0.0000 17 | -30.7957 -13.9269 0.0000 18 | -6.3769 -28.0250 0.0000 19 | -31.3162 31.3162 0.0000 20 | -11.3783 11.3783 0.0000 21 | 8.5595 -8.5595 0.0000 22 | -0.1713 55.2144 0.0000 23 | 13.9269 30.7957 0.0000 24 | 28.0250 6.3769 0.0000 25 | 36.0976 70.2375 0.0000 26 | 43.3953 43.0019 0.0000 27 | 50.6931 15.7663 0.0000 28 | 75.0189 75.3616 0.0000 29 | 75.0189 47.1652 0.0000 30 | 75.0189 18.9689 0.0000 31 | 3 0 4 3 32 | 3 0 1 4 33 | 3 1 5 4 34 | 3 1 2 5 35 | 3 3 7 6 36 | 3 3 4 7 37 | 3 4 8 7 38 | 3 4 5 8 39 | 3 6 10 9 40 | 3 6 7 10 41 | 3 7 11 10 42 | 3 7 8 11 43 | 3 9 13 12 44 | 3 9 10 13 45 | 3 10 14 13 46 | 3 10 11 14 47 | 3 12 16 15 48 | 3 12 13 16 49 | 3 13 17 16 50 | 3 13 14 17 51 | 3 15 19 18 52 | 3 15 16 19 53 | 3 16 20 19 54 | 3 16 17 20 55 | -------------------------------------------------------------------------------- /sample_inputs/2D/27_curve_arm_mesh_4.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 21 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 24 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -64.6277 -64.3338 0.0000 11 | -40.4474 -64.3338 0.0000 12 | -16.2671 -64.3338 0.0000 13 | -60.2334 -30.9561 0.0000 14 | -36.8771 -37.2145 0.0000 15 | -13.5207 -43.4728 0.0000 16 | -47.3501 0.1469 0.0000 17 | -26.4094 -11.9432 0.0000 18 | -5.4686 -24.0334 0.0000 19 | -26.8557 26.8557 0.0000 20 | -9.7577 9.7577 0.0000 21 | 7.3404 -7.3404 0.0000 22 | -0.1469 47.3501 0.0000 23 | 11.9432 26.4094 0.0000 24 | 24.0334 5.4686 0.0000 25 | 30.9561 60.2334 0.0000 26 | 37.2145 36.8771 0.0000 27 | 43.4728 13.5207 0.0000 28 | 64.3338 64.6277 0.0000 29 | 64.3338 40.4474 0.0000 30 | 64.3338 16.2671 0.0000 31 | 3 0 4 3 32 | 3 0 1 4 33 | 3 1 2 4 34 | 3 2 5 4 35 | 3 3 4 6 36 | 3 4 7 6 37 | 3 4 8 7 38 | 3 4 5 8 39 | 3 6 10 9 40 | 3 6 7 10 41 | 3 7 8 10 42 | 3 8 11 10 43 | 3 9 10 12 44 | 3 10 13 12 45 | 3 10 14 13 46 | 3 10 11 14 47 | 3 12 16 15 48 | 3 12 13 16 49 | 3 13 14 16 50 | 3 14 17 16 51 | 3 15 16 18 52 | 3 16 19 18 53 | 3 16 20 19 54 | 3 16 17 20 55 | -------------------------------------------------------------------------------- /sample_inputs/2D/28_rhombic_tile.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 19 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 12 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 16.2779 -28.1942 0.0000 11 | 0.0000 -37.5924 0.0000 12 | -16.2779 -28.1942 0.0000 13 | 0.0000 -18.7962 0.0000 14 | -32.5560 -18.7962 0.0000 15 | -32.5560 0.0000 0.0000 16 | -16.2779 -9.3981 0.0000 17 | -32.5560 18.7962 0.0000 18 | -16.2779 28.1942 0.0000 19 | -16.2779 9.3981 0.0000 20 | 0.0000 37.5923 0.0000 21 | 16.2779 28.1942 0.0000 22 | 0.0000 18.7962 0.0000 23 | 32.5560 18.7962 0.0000 24 | 32.5560 0.0000 0.0000 25 | 16.2779 9.3981 0.0000 26 | 32.5560 -18.7962 0.0000 27 | 16.2779 -9.3981 0.0000 28 | 0.0000 0.0000 0.0000 29 | 4 3 2 1 0 30 | 4 6 5 4 2 31 | 4 9 8 7 5 32 | 4 12 11 10 8 33 | 4 15 14 13 11 34 | 4 17 0 16 14 35 | 4 3 18 6 2 36 | 4 9 5 6 18 37 | 4 0 17 18 3 38 | 4 18 12 8 9 39 | 4 12 18 15 11 40 | 4 17 14 15 18 41 | -------------------------------------------------------------------------------- /sample_inputs/2D/29_hexagonal_tile.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 38 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 12 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -8.0990 -66.4482 0.0000 11 | 8.0990 -66.4482 0.0000 12 | -32.3962 -52.4202 0.0000 13 | -16.1981 -52.4202 0.0000 14 | 16.1981 -52.4202 0.0000 15 | 32.3962 -52.4202 0.0000 16 | -40.4952 -38.3923 0.0000 17 | -8.0990 -38.3923 0.0000 18 | 8.0990 -38.3923 0.0000 19 | 40.4952 -38.3923 0.0000 20 | -32.3962 -24.3644 0.0000 21 | -16.1981 -24.3644 0.0000 22 | 16.1981 -24.3644 0.0000 23 | 32.3962 -24.3644 0.0000 24 | -40.4952 -10.3364 0.0000 25 | -8.0990 -10.3364 0.0000 26 | 8.0990 -10.3364 0.0000 27 | 40.4952 -10.3364 0.0000 28 | -32.3962 3.6915 0.0000 29 | -16.1981 3.6915 0.0000 30 | 16.1981 3.6915 0.0000 31 | 32.3962 3.6915 0.0000 32 | -40.4952 17.7195 0.0000 33 | -8.0990 17.7195 0.0000 34 | 8.0990 17.7195 0.0000 35 | 40.4952 17.7195 0.0000 36 | -32.3962 31.7475 0.0000 37 | -16.1981 31.7475 0.0000 38 | 16.1981 31.7475 0.0000 39 | 32.3962 31.7475 0.0000 40 | -40.4952 45.7755 0.0000 41 | -8.0990 45.7755 0.0000 42 | 8.0990 45.7755 0.0000 43 | 40.4952 45.7755 0.0000 44 | -32.3962 59.8034 0.0000 45 | -16.1981 59.8034 0.0000 46 | 16.1981 59.8034 0.0000 47 | 32.3962 59.8034 0.0000 48 | 6 0 1 4 8 7 3 49 | 6 2 3 7 11 10 6 50 | 6 4 5 9 13 12 8 51 | 6 7 8 12 16 15 11 52 | 6 10 11 15 19 18 14 53 | 6 12 13 17 21 20 16 54 | 6 15 16 20 24 23 19 55 | 6 18 19 23 27 26 22 56 | 6 20 21 25 29 28 24 57 | 6 23 24 28 32 31 27 58 | 6 26 27 31 35 34 30 59 | 6 28 29 33 37 36 32 60 | -------------------------------------------------------------------------------- /sample_inputs/2D/30_primatic_pentagonal_tile.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 31 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 14 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -44.5537 -42.8724 0.0000 11 | -44.5537 -25.7234 0.0000 12 | -29.7025 -17.1490 0.0000 13 | -14.8512 -25.7234 0.0000 14 | -14.8512 -42.8724 0.0000 15 | -59.4049 -17.1490 0.0000 16 | -59.4049 -0.0000 0.0000 17 | -29.7025 -0.0000 0.0000 18 | -59.4049 17.1490 0.0000 19 | -44.5537 25.7234 0.0000 20 | -29.7025 17.1490 0.0000 21 | -44.5537 42.8724 0.0000 22 | -14.8512 42.8724 0.0000 23 | -14.8512 25.7234 0.0000 24 | 14.8512 42.8724 0.0000 25 | 14.8512 25.7234 0.0000 26 | -0.0000 17.1490 0.0000 27 | 44.5537 42.8724 0.0000 28 | 44.5537 25.7234 0.0000 29 | 29.7025 17.1490 0.0000 30 | 59.4050 17.1490 0.0000 31 | 59.4050 -0.0000 0.0000 32 | 29.7025 -0.0000 0.0000 33 | 59.4050 -17.1490 0.0000 34 | 44.5537 -25.7234 0.0000 35 | 29.7025 -17.1490 0.0000 36 | 44.5537 -42.8724 0.0000 37 | 14.8512 -42.8724 0.0000 38 | 14.8512 -25.7234 0.0000 39 | -0.0000 -17.1490 0.0000 40 | -0.0000 -0.0000 0.0000 41 | 5 4 3 2 1 0 42 | 5 2 7 6 5 1 43 | 5 7 10 9 8 6 44 | 5 10 13 12 11 9 45 | 5 13 16 15 14 12 46 | 5 15 19 18 17 14 47 | 5 19 22 21 20 18 48 | 5 22 25 24 23 21 49 | 5 25 28 27 26 24 50 | 5 28 29 3 4 27 51 | 5 29 30 7 2 3 52 | 5 22 30 29 28 25 53 | 5 30 22 19 15 16 54 | 5 10 7 30 16 13 55 | -------------------------------------------------------------------------------- /sample_inputs/2D/31_heptagonal_and_pentagonal_tile.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 30 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 8 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 26.5213 -41.4704 0.0000 11 | 11.8031 -59.9265 0.0000 12 | -11.8031 -59.9265 0.0000 13 | -26.5213 -41.4704 0.0000 14 | -21.2684 -18.4561 0.0000 15 | -0.0000 -8.2138 0.0000 16 | 21.2684 -18.4561 0.0000 17 | -47.7897 -51.7128 0.0000 18 | -69.0581 -41.4705 0.0000 19 | -74.3110 -18.4562 0.0000 20 | -59.5928 -0.0001 0.0000 21 | -35.9866 -0.0001 0.0000 22 | -74.3110 18.4562 0.0000 23 | -69.0581 41.4705 0.0000 24 | -47.7897 51.7128 0.0000 25 | -26.5213 41.4705 0.0000 26 | -21.2684 18.4562 0.0000 27 | -11.8031 59.9265 0.0000 28 | 11.8031 59.9265 0.0000 29 | 26.5213 41.4705 0.0000 30 | 21.2684 18.4562 0.0000 31 | -0.0000 8.2138 0.0000 32 | 47.7897 51.7127 0.0000 33 | 69.0581 41.4704 0.0000 34 | 74.3110 18.4561 0.0000 35 | 59.5928 -0.0000 0.0000 36 | 35.9866 -0.0000 0.0000 37 | 74.3110 -18.4560 0.0000 38 | 69.0581 -41.4704 0.0000 39 | 47.7897 -51.7127 0.0000 40 | 7 6 5 4 3 2 1 0 41 | 7 4 11 10 9 8 7 3 42 | 7 11 16 15 14 13 12 10 43 | 7 16 21 20 19 18 17 15 44 | 7 20 26 25 24 23 22 19 45 | 7 26 6 0 29 28 27 25 46 | 5 20 21 5 6 26 47 | 5 16 11 4 5 21 48 | -------------------------------------------------------------------------------- /sample_inputs/2D/32_cairo_pentagonal_tile.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 36 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 16 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 19.1625 -57.4876 0.0000 11 | 0.0000 -68.5511 0.0000 12 | -19.1626 -57.4876 0.0000 13 | -8.0990 -38.3251 0.0000 14 | 8.0991 -38.3251 0.0000 15 | -38.3251 -46.4241 0.0000 16 | -38.3251 -30.2260 0.0000 17 | -19.1626 -19.1626 0.0000 18 | -57.4876 -19.1626 0.0000 19 | -46.4241 0.0000 0.0000 20 | -30.2260 0.0000 0.0000 21 | -76.6501 -8.0990 0.0000 22 | -76.6501 8.0991 0.0000 23 | -57.4876 19.1625 0.0000 24 | -38.3251 30.2260 0.0000 25 | -19.1626 19.1625 0.0000 26 | -38.3251 46.4241 0.0000 27 | -19.1626 57.4876 0.0000 28 | -8.0990 38.3251 0.0000 29 | 0.0000 68.5511 0.0000 30 | 19.1625 57.4876 0.0000 31 | 8.0991 38.3251 0.0000 32 | 38.3251 46.4241 0.0000 33 | 38.3251 30.2260 0.0000 34 | 19.1625 19.1625 0.0000 35 | 57.4877 19.1625 0.0000 36 | 46.4241 0.0000 0.0000 37 | 30.2260 0.0000 0.0000 38 | 76.6502 8.0991 0.0000 39 | 76.6502 -8.0990 0.0000 40 | 57.4877 -19.1626 0.0000 41 | 38.3251 -30.2260 0.0000 42 | 19.1625 -19.1626 0.0000 43 | 38.3251 -46.4241 0.0000 44 | 0.0000 -8.0990 0.0000 45 | 0.0000 8.0991 0.0000 46 | 5 4 3 2 1 0 47 | 5 3 7 6 5 2 48 | 5 7 10 9 8 6 49 | 5 9 13 12 11 8 50 | 5 9 10 15 14 13 51 | 5 15 18 17 16 14 52 | 5 18 21 20 19 17 53 | 5 21 24 23 22 20 54 | 5 24 27 26 25 23 55 | 5 26 30 29 28 25 56 | 5 26 27 32 31 30 57 | 5 32 4 0 33 31 58 | 5 32 34 7 3 4 59 | 5 34 35 15 10 7 60 | 5 27 24 35 34 32 61 | 5 24 21 18 15 35 62 | -------------------------------------------------------------------------------- /sample_inputs/2D/33_lotus_mesh.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 36 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 13 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -58.0509 -81.6707 0.0000 11 | -48.1328 -45.9638 0.0000 12 | 0.4683 -65.3049 0.0000 13 | -28.7916 -77.7035 0.0000 14 | -89.0469 -23.1509 0.0000 15 | -100.7012 0.1575 0.0000 16 | -77.3922 -1.8261 0.0000 17 | -63.0105 -17.6957 0.0000 18 | -82.3518 45.7832 0.0000 19 | -59.0428 35.8645 0.0000 20 | -48.6285 21.9786 0.0000 21 | -50.6121 63.1403 0.0000 22 | -19.8647 50.7423 0.0000 23 | -15.0047 29.2189 0.0000 24 | -30.2791 12.0599 0.0000 25 | 0.4683 77.5224 0.0000 26 | 19.8095 50.7423 0.0000 27 | 14.9495 29.2189 0.0000 28 | -0.5235 45.2870 0.0000 29 | 50.5574 63.1403 0.0000 30 | 58.9881 35.8645 0.0000 31 | 48.5732 21.9786 0.0000 32 | 30.2239 12.0599 0.0000 33 | 82.2966 45.7832 0.0000 34 | 77.3375 -1.8261 0.0000 35 | 62.9553 -17.6957 0.0000 36 | 100.6460 0.1575 0.0000 37 | 88.9917 -23.1509 0.0000 38 | 48.0776 -45.9638 0.0000 39 | 57.9963 -81.6707 0.0000 40 | 29.2321 -77.7035 0.0000 41 | -17.4844 -8.9277 0.0000 42 | -23.3364 -37.0369 0.0000 43 | 17.4292 -8.9277 0.0000 44 | -0.0273 12.5555 0.0000 45 | 23.2811 -37.0369 0.0000 46 | 4 3 2 1 0 47 | 5 7 6 5 4 1 48 | 5 7 10 9 8 6 49 | 6 10 14 13 12 11 9 50 | 6 13 18 17 16 15 12 51 | 6 17 22 21 20 19 16 52 | 5 21 25 24 23 20 53 | 5 25 28 27 26 24 54 | 4 2 30 29 28 55 | 7 32 31 14 10 7 1 2 56 | 8 31 34 33 22 17 18 13 14 57 | 7 33 35 2 28 25 21 22 58 | 6 2 35 33 34 31 32 59 | -------------------------------------------------------------------------------- /sample_inputs/2D/34_a-shape_mesh.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 18 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 10 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 55.2755 -24.8370 0.0000 11 | 63.3882 -48.8852 0.0000 12 | 26.5915 -47.7262 0.0000 13 | 19.6378 -23.6780 0.0000 14 | -15.1307 -22.5190 0.0000 15 | -9.3360 -3.3964 0.0000 16 | 14.4225 -3.3964 0.0000 17 | -22.9537 -46.8570 0.0000 18 | -55.6940 -46.2775 0.0000 19 | -48.7403 -23.0985 0.0000 20 | -42.6558 -3.1066 0.0000 21 | -37.1508 13.9879 0.0000 22 | -29.3279 37.1669 0.0000 23 | 1.3843 35.4285 0.0000 24 | -16.2897 74.2533 0.0000 25 | 21.9557 74.2533 0.0000 26 | 31.5170 46.4385 0.0000 27 | 43.1065 12.2495 0.0000 28 | 4 3 2 1 0 29 | 4 6 5 4 3 30 | 4 9 8 7 4 31 | 5 4 5 11 10 9 32 | 4 5 13 12 11 33 | 3 13 14 12 34 | 3 13 15 14 35 | 3 13 16 15 36 | 4 13 6 17 16 37 | 4 6 3 0 17 38 | -------------------------------------------------------------------------------- /sample_inputs/2D/35_t-shape_mesh.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 16 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 11 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 19.4416 -51.3327 0.0000 11 | 19.4416 -83.4700 0.0000 12 | -10.5735 -81.6509 0.0000 13 | -9.9671 -51.0295 0.0000 14 | -11.1799 -18.2857 0.0000 15 | 19.1384 -20.1048 0.0000 16 | -9.9671 14.7612 0.0000 17 | -33.9186 16.5803 0.0000 18 | -27.2486 45.3827 0.0000 19 | -2.3876 44.4731 0.0000 20 | -54.2318 19.9153 0.0000 21 | -52.7159 43.8668 0.0000 22 | 22.4734 45.6859 0.0000 23 | 21.2607 15.6708 0.0000 24 | 55.5204 44.4731 0.0000 25 | 54.9140 15.0644 0.0000 26 | 3 2 1 0 27 | 3 0 3 2 28 | 3 5 4 3 29 | 3 5 6 4 30 | 4 9 8 7 6 31 | 4 8 11 10 7 32 | 3 13 12 9 33 | 4 13 15 14 12 34 | 3 6 5 13 35 | 3 3 0 5 36 | 3 13 9 6 37 | -------------------------------------------------------------------------------- /sample_inputs/2D/36_g-shape_mesh.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 24 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 13 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 21.8988 -62.8729 0.0000 11 | -5.5820 -64.7466 0.0000 12 | -4.9575 -33.5183 0.0000 13 | 20.3374 -34.4552 0.0000 14 | -32.7506 -54.1289 0.0000 15 | -54.9227 -33.2060 0.0000 16 | -23.6944 -18.2165 0.0000 17 | -60.5438 -3.2269 0.0000 18 | -27.1295 0.8328 0.0000 19 | -60.2315 24.8785 0.0000 20 | -22.7576 28.3136 0.0000 21 | -44.6173 50.7979 0.0000 22 | -12.1400 67.0366 0.0000 23 | 7.5338 38.6189 0.0000 24 | 25.9585 67.9735 0.0000 25 | 46.2568 47.0506 0.0000 26 | 31.2673 27.3767 0.0000 27 | 23.1479 -11.0340 0.0000 28 | 51.8779 -16.9673 0.0000 29 | 50.3165 -42.2622 0.0000 30 | 0.6636 -11.9708 0.0000 31 | -1.2101 13.6363 0.0000 32 | 22.8356 13.9486 0.0000 33 | 48.4428 6.1416 0.0000 34 | 4 3 2 1 0 35 | 3 2 4 1 36 | 4 2 6 5 4 37 | 4 6 8 7 5 38 | 4 8 10 9 7 39 | 3 10 11 9 40 | 4 10 13 12 11 41 | 3 13 14 12 42 | 4 13 16 15 14 43 | 4 19 18 17 3 44 | 4 22 21 20 17 45 | 4 17 18 23 22 46 | 3 3 0 19 47 | -------------------------------------------------------------------------------- /sample_inputs/2D/37_c-shape_mesh.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 18 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 12 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.8044 -31.4338 0.0000 11 | 19.8256 -33.7050 0.0000 12 | 19.5417 -60.1075 0.0000 13 | -11.9710 -55.8491 0.0000 14 | 36.0077 -22.0652 0.0000 15 | 47.6476 -45.0609 0.0000 16 | -34.9668 -44.2092 0.0000 17 | -15.0939 -16.1033 0.0000 18 | -48.5939 -20.6457 0.0000 19 | -48.5939 6.6085 0.0000 20 | -44.3354 34.7144 0.0000 21 | -17.0812 13.4221 0.0000 22 | -20.4880 54.3034 0.0000 23 | 4.4951 60.8331 0.0000 24 | 5.0629 33.5788 0.0000 25 | 28.9103 57.4263 0.0000 26 | 30.0459 25.9136 0.0000 27 | 48.7832 42.3797 0.0000 28 | 4 3 2 1 0 29 | 4 2 5 4 1 30 | 4 0 7 6 3 31 | 3 7 8 6 32 | 3 7 9 8 33 | 3 11 10 9 34 | 3 11 12 10 35 | 3 14 13 12 36 | 4 14 16 15 13 37 | 3 16 17 15 38 | 3 12 11 14 39 | 3 9 7 11 40 | -------------------------------------------------------------------------------- /sample_inputs/2D/Asymmetric_Triangle.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 3 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 1 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0 0 0 11 | 0 84.0000 0 12 | 53.0987 50.0952 0 13 | 3 0 1 2 14 | -------------------------------------------------------------------------------- /sample_inputs/3D/01_tetrahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 4 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 4 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.000000 0.000000 0.612372 11 | -0.288675 -0.500000 -0.204124 12 | -0.288675 0.500000 -0.204124 13 | 0.577350 0.000000 -0.204124 14 | 3 0 2 1 15 | 3 0 1 3 16 | 3 0 3 2 17 | 3 1 2 3 18 | -------------------------------------------------------------------------------- /sample_inputs/3D/02_cube.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 8 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 6 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.707000 0.707000 0.707000 11 | -0.707000 0.707000 0.707000 12 | -0.707000 -0.707000 0.707000 13 | 0.707000 -0.707000 0.707000 14 | 0.707000 -0.707000 -0.707000 15 | 0.707000 0.707000 -0.707000 16 | -0.707000 0.707000 -0.707000 17 | -0.707000 -0.707000 -0.707000 18 | 4 3 0 1 2 19 | 4 3 4 5 0 20 | 4 0 5 6 1 21 | 4 1 6 7 2 22 | 4 2 7 4 3 23 | 4 5 4 7 6 24 | -------------------------------------------------------------------------------- /sample_inputs/3D/03_octahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 6 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 8 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.000000 0.000000 1.000000 11 | 0.000000 0.000000 -1.000000 12 | 0.000000 1.000000 0.000000 13 | 0.000000 -1.000000 0.000000 14 | 1.000000 0.000000 0.000000 15 | -1.000000 0.000000 0.000000 16 | 3 0 4 2 17 | 3 0 3 4 18 | 3 0 5 3 19 | 3 0 2 5 20 | 3 1 2 4 21 | 3 1 4 3 22 | 3 1 3 5 23 | 3 1 5 2 24 | -------------------------------------------------------------------------------- /sample_inputs/3D/04_dodecahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 20 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 12 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.000000 0.000000 1.070470 11 | 0.713640 0.000000 0.797880 12 | -0.356820 0.618000 0.797880 13 | -0.356820 -0.618000 0.797880 14 | 0.797880 0.618030 0.356820 15 | 0.797880 -0.618000 0.356820 16 | -0.934170 0.381970 0.356820 17 | 0.136290 1.000000 0.356820 18 | 0.136290 -1.000000 0.356820 19 | -0.934170 -0.381970 0.356820 20 | 0.934170 0.381970 -0.356820 21 | 0.934170 -0.381970 -0.356820 22 | -0.797880 0.618000 -0.356820 23 | -0.136290 1.000000 -0.356820 24 | -0.136290 -1.000000 -0.356820 25 | -0.797880 -0.618030 -0.356820 26 | 0.356820 0.618000 -0.797880 27 | 0.356820 -0.618000 -0.797880 28 | -0.713640 0.000000 -0.797880 29 | 0.000000 0.000000 -1.070470 30 | 5 0 1 4 7 2 31 | 5 0 2 6 9 3 32 | 5 0 3 8 5 1 33 | 5 1 5 11 10 4 34 | 5 2 7 13 12 6 35 | 5 3 9 15 14 8 36 | 5 4 10 16 13 7 37 | 5 5 8 14 17 11 38 | 5 6 12 18 15 9 39 | 5 10 11 17 19 16 40 | 5 12 13 16 19 18 41 | 5 14 15 18 19 17 42 | -------------------------------------------------------------------------------- /sample_inputs/3D/05_icosahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 12 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 20 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.000000 0.000000 1.176000 11 | 1.051000 0.000000 0.526000 12 | 0.324000 1.000000 0.525000 13 | -0.851000 0.618000 0.526000 14 | -0.851000 -0.618000 0.526000 15 | 0.325000 -1.000000 0.526000 16 | 0.851000 0.618000 -0.526000 17 | 0.851000 -0.618000 -0.526000 18 | -0.325000 1.000000 -0.526000 19 | -1.051000 0.000000 -0.526000 20 | -0.325000 -1.000000 -0.526000 21 | 0.000000 0.000000 -1.176000 22 | 3 0 1 2 23 | 3 0 2 3 24 | 3 0 3 4 25 | 3 0 4 5 26 | 3 0 5 1 27 | 3 1 5 7 28 | 3 1 7 6 29 | 3 1 6 2 30 | 3 2 6 8 31 | 3 2 8 3 32 | 3 3 8 9 33 | 3 3 9 4 34 | 3 4 9 10 35 | 3 4 10 5 36 | 3 5 10 7 37 | 3 6 7 11 38 | 3 6 11 8 39 | 3 7 10 11 40 | 3 8 11 9 41 | 3 9 11 10 42 | -------------------------------------------------------------------------------- /sample_inputs/3D/06_cuboctahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 12 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 14 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0 0 1.1547 11 | 1 0 0.57735 12 | 0.333333 0.942809 0.57735 13 | -1 0 0.57735 14 | -0.333333 -0.942809 0.57735 15 | 1 0 -0.57735 16 | 0.666667 -0.942809 0 17 | -0.666667 0.942809 0 18 | 0.333333 0.942809 -0.57735 19 | -1 0 -0.57735 20 | -0.333333 -0.942809 -0.57735 21 | 0 0 -1.1547 22 | 3 0 1 2 23 | 3 0 3 4 24 | 3 1 6 5 25 | 3 2 8 7 26 | 3 3 7 9 27 | 3 4 10 6 28 | 3 5 11 8 29 | 3 9 11 10 30 | 4 0 2 7 3 31 | 4 0 4 6 1 32 | 4 1 5 8 2 33 | 4 3 9 10 4 34 | 4 5 6 10 11 35 | 4 7 8 11 9 36 | -------------------------------------------------------------------------------- /sample_inputs/3D/07_icosidodecahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 30 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 32 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0 0 1.05146 11 | 0.618034 0 0.850651 12 | 0.276393 0.552786 0.850651 13 | -0.618034 0 0.850651 14 | -0.276393 -0.552786 0.850651 15 | 1 0 0.32492 16 | 0.723607 -0.552786 0.525731 17 | -0.17082 0.894427 0.525731 18 | 0.447214 0.894427 0.32492 19 | -1 0 0.32492 20 | -0.723607 0.552786 0.525731 21 | 0.17082 -0.894427 0.525731 22 | -0.447214 -0.894427 0.32492 23 | 1 0 -0.32492 24 | 0.894427 0.552786 0 25 | 0.552786 -0.894427 0 26 | -0.552786 0.894427 0 27 | 0.447214 0.894427 -0.32492 28 | -1 0 -0.32492 29 | -0.894427 -0.552786 0 30 | -0.447214 -0.894427 -0.32492 31 | 0.618034 0 -0.850651 32 | 0.723607 -0.552786 -0.525731 33 | 0.17082 -0.894427 -0.525731 34 | -0.723607 0.552786 -0.525731 35 | -0.17082 0.894427 -0.525731 36 | 0.276393 0.552786 -0.850651 37 | -0.618034 0 -0.850651 38 | -0.276393 -0.552786 -0.850651 39 | 0 0 -1.05146 40 | 3 0 1 2 41 | 3 0 3 4 42 | 3 1 6 5 43 | 3 2 8 7 44 | 3 3 10 9 45 | 3 4 12 11 46 | 3 5 13 14 47 | 3 6 11 15 48 | 3 7 16 10 49 | 3 8 14 17 50 | 3 9 18 19 51 | 3 12 19 20 52 | 3 13 22 21 53 | 3 15 23 22 54 | 3 16 25 24 55 | 3 17 26 25 56 | 3 18 24 27 57 | 3 20 28 23 58 | 3 21 29 26 59 | 3 27 29 28 60 | 5 0 2 7 10 3 61 | 5 0 4 11 6 1 62 | 5 1 5 14 8 2 63 | 5 3 9 19 12 4 64 | 5 5 6 15 22 13 65 | 5 7 8 17 25 16 66 | 5 9 10 16 24 18 67 | 5 11 12 20 23 15 68 | 5 13 21 26 17 14 69 | 5 18 27 28 20 19 70 | 5 21 22 23 28 29 71 | 5 24 25 26 29 27 72 | -------------------------------------------------------------------------------- /sample_inputs/3D/08_rhombicuboctahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 24 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 26 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0 0 1.07072 11 | 0.714813 0 0.797175 12 | -0.104682 0.707107 0.797175 13 | -0.684153 0.207107 0.797175 14 | -0.104682 -0.707107 0.797175 15 | 0.610132 0.707107 0.523628 16 | 1.04156 0.207107 0.136774 17 | 0.610132 -0.707107 0.523628 18 | -0.357407 1 0.136774 19 | -0.788835 -0.5 0.523628 20 | -0.936878 0.5 0.136774 21 | -0.357407 -1 0.136774 22 | 0.357407 1 -0.136774 23 | 0.936878 -0.5 -0.136774 24 | 0.788835 0.5 -0.523628 25 | 0.357407 -1 -0.136774 26 | -0.610132 0.707107 -0.523628 27 | -1.04156 -0.207107 -0.136774 28 | -0.610132 -0.707107 -0.523628 29 | 0.104682 0.707107 -0.797175 30 | 0.684153 -0.207107 -0.797175 31 | 0.104682 -0.707107 -0.797175 32 | -0.714813 0 -0.797175 33 | 0 0 -1.07072 34 | 3 0 2 3 35 | 3 1 6 5 36 | 3 4 9 11 37 | 3 7 15 13 38 | 3 8 16 10 39 | 3 12 14 19 40 | 3 17 22 18 41 | 3 20 21 23 42 | 4 0 1 5 2 43 | 4 0 3 9 4 44 | 4 0 4 7 1 45 | 4 1 7 13 6 46 | 4 2 5 12 8 47 | 4 2 8 10 3 48 | 4 3 10 17 9 49 | 4 4 11 15 7 50 | 4 5 6 14 12 51 | 4 6 13 20 14 52 | 4 8 12 19 16 53 | 4 9 17 18 11 54 | 4 10 16 22 17 55 | 4 11 18 21 15 56 | 4 13 15 21 20 57 | 4 14 20 23 19 58 | 4 16 19 23 22 59 | 4 18 22 23 21 60 | -------------------------------------------------------------------------------- /sample_inputs/3D/09_snub_cube.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 24 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 38 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0 0 1.07736 11 | 0.744206 0 0.779019 12 | 0.312301 0.675508 0.779019 13 | -0.482096 0.566945 0.779019 14 | -0.716918 -0.199679 0.779019 15 | -0.119604 -0.734532 0.779019 16 | 0.624602 -0.734532 0.480673 17 | 1.05651 -0.199679 0.0680691 18 | 0.886713 0.566945 0.230276 19 | 0.26211 1.04277 0.0680691 20 | -0.532287 0.934211 0.0680691 21 | -1.00632 0.308242 0.230276 22 | -0.702082 -0.784071 0.230276 23 | 0.0272883 -1.07486 0.0680691 24 | 0.666727 -0.784071 -0.318466 25 | 0.821685 -0.0911155 -0.690829 26 | 0.651891 0.675508 -0.528621 27 | -0.119604 0.875187 -0.616812 28 | -0.809234 0.475829 -0.528621 29 | -0.99148 -0.276151 -0.318466 30 | -0.446741 -0.825648 -0.528621 31 | 0.192697 -0.534854 -0.915157 32 | 0.184631 0.258703 -1.02942 33 | -0.504999 -0.140654 -0.941226 34 | 3 0 1 2 35 | 3 0 2 3 36 | 3 0 3 4 37 | 3 0 4 5 38 | 3 1 6 7 39 | 3 1 7 8 40 | 3 1 8 2 41 | 3 2 8 9 42 | 3 3 10 11 43 | 3 3 11 4 44 | 3 4 12 5 45 | 3 5 12 13 46 | 3 5 13 6 47 | 3 6 13 14 48 | 3 6 14 7 49 | 3 7 14 15 50 | 3 8 16 9 51 | 3 9 16 17 52 | 3 9 17 10 53 | 3 10 17 18 54 | 3 10 18 11 55 | 3 11 18 19 56 | 3 12 19 20 57 | 3 12 20 13 58 | 3 14 21 15 59 | 3 15 21 22 60 | 3 15 22 16 61 | 3 16 22 17 62 | 3 18 23 19 63 | 3 19 23 20 64 | 3 20 23 21 65 | 3 21 23 22 66 | 4 0 5 6 1 67 | 4 2 9 10 3 68 | 4 4 11 19 12 69 | 4 7 15 16 8 70 | 4 13 20 21 14 71 | 4 17 22 23 18 72 | -------------------------------------------------------------------------------- /sample_inputs/3D/10_truncated_cube.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 24 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 14 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0 0 1.04201 11 | 0.562169 0 0.877355 12 | -0.479842 0.292893 0.877355 13 | 0.256971 -0.5 0.877355 14 | 0.877355 0.292893 0.479842 15 | -0.901468 0.207107 0.479842 16 | -0.596271 0.707107 0.479842 17 | 0.140542 -0.914214 0.479842 18 | 1.0179 0.207107 -0.0823278 19 | 0.760926 0.707107 0.0823278 20 | -1.0179 -0.207107 0.0823278 21 | -0.281085 1 0.0823278 22 | -0.281085 -1 0.0823278 23 | 0.281085 -1 -0.0823278 24 | 0.901468 -0.207107 -0.479842 25 | 0.281085 1 -0.0823278 26 | -0.760926 -0.707107 -0.0823278 27 | -0.877355 -0.292893 -0.479842 28 | -0.140542 0.914214 -0.479842 29 | 0.596271 -0.707107 -0.479842 30 | 0.479842 -0.292893 -0.877355 31 | -0.562169 0 -0.877355 32 | -0.256971 0.5 -0.877355 33 | 0 0 -1.04201 34 | 3 0 3 1 35 | 3 2 6 5 36 | 3 4 8 9 37 | 3 7 12 13 38 | 3 10 17 16 39 | 3 11 15 18 40 | 3 14 19 20 41 | 3 21 22 23 42 | 8 0 1 4 9 15 11 6 2 43 | 8 0 2 5 10 16 12 7 3 44 | 8 1 3 7 13 19 14 8 4 45 | 8 5 6 11 18 22 21 17 10 46 | 8 8 14 20 23 22 18 15 9 47 | 8 12 16 17 21 23 20 19 13 48 | -------------------------------------------------------------------------------- /sample_inputs/3D/11_truncated_cuboctahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 48 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 26 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0 0 1.02412 11 | 0.431479 0 0.928785 12 | -0.0210629 0.430964 0.928785 13 | -0.341058 -0.264298 0.928785 14 | 0.410416 0.430964 0.833453 15 | 0.700624 -0.264298 0.698633 16 | -0.383184 0.597631 0.738121 17 | -0.391908 -0.638071 0.698633 18 | -0.703179 -0.0976311 0.738121 19 | 0.658498 0.597631 0.507969 20 | 0.649774 -0.638071 0.468482 21 | 0.948706 -0.0976311 0.37315 22 | -0.463822 0.833333 0.37315 23 | -0.724242 0.333333 0.642789 24 | -0.75403 -0.471404 0.507969 25 | -0.122763 -0.902369 0.468482 26 | 0.57786 0.833333 0.142998 27 | 0.927643 0.333333 0.277818 28 | 0.897856 -0.471404 0.142998 29 | 0.308715 -0.902369 0.37315 30 | -0.80488 0.569036 0.277818 31 | -0.215739 1 0.047666 32 | -0.847005 -0.569036 0.0871538 33 | -0.215739 -1 0.047666 34 | 0.847005 0.569036 -0.0871538 35 | 0.215739 1 -0.047666 36 | 0.80488 -0.569036 -0.277818 37 | 0.215739 -1 -0.047666 38 | -0.897856 0.471404 -0.142998 39 | -0.308715 0.902369 -0.37315 40 | -0.927643 -0.333333 -0.277818 41 | -0.57786 -0.833333 -0.142998 42 | 0.75403 0.471404 -0.507969 43 | 0.122763 0.902369 -0.468482 44 | 0.724242 -0.333333 -0.642789 45 | 0.463822 -0.833333 -0.37315 46 | -0.948706 0.0976311 -0.37315 47 | -0.649774 0.638071 -0.468482 48 | -0.658498 -0.597631 -0.507969 49 | 0.703179 0.0976311 -0.738121 50 | 0.391908 0.638071 -0.698633 51 | 0.383184 -0.597631 -0.738121 52 | -0.700624 0.264298 -0.698633 53 | -0.410416 -0.430964 -0.833453 54 | 0.341058 0.264298 -0.928785 55 | 0.0210629 -0.430964 -0.928785 56 | -0.431479 0 -0.928785 57 | 0 0 -1.02412 58 | 4 0 1 4 2 59 | 4 3 8 14 7 60 | 4 5 10 18 11 61 | 4 6 12 20 13 62 | 4 9 17 24 16 63 | 4 15 23 27 19 64 | 4 21 25 33 29 65 | 4 22 30 38 31 66 | 4 26 35 41 34 67 | 4 28 37 42 36 68 | 4 32 39 44 40 69 | 4 43 46 47 45 70 | 6 0 2 6 13 8 3 71 | 6 1 5 11 17 9 4 72 | 6 7 14 22 31 23 15 73 | 6 10 19 27 35 26 18 74 | 6 12 21 29 37 28 20 75 | 6 16 24 32 40 33 25 76 | 6 30 36 42 46 43 38 77 | 6 34 41 45 47 44 39 78 | 8 0 3 7 15 19 10 5 1 79 | 8 2 4 9 16 25 21 12 6 80 | 8 8 13 20 28 36 30 22 14 81 | 8 11 18 26 34 39 32 24 17 82 | 8 23 31 38 43 45 41 35 27 83 | 8 29 33 40 44 47 46 42 37 84 | -------------------------------------------------------------------------------- /sample_inputs/3D/12_truncated_dodecahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 60 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 32 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0 0 1.01449 11 | 0.336763 0 0.956959 12 | -0.290223 0.17082 0.956959 13 | 0.163468 -0.294427 0.956959 14 | 0.591433 0.17082 0.806354 15 | -0.596346 0.152786 0.806354 16 | -0.423052 0.447214 0.806354 17 | 0.137742 -0.6 0.806354 18 | 0.830204 0.152786 0.56267 19 | 0.666736 0.447214 0.620196 20 | -0.801441 -0.0472136 0.620196 21 | -0.347749 0.723607 0.620196 22 | -0.0673526 -0.8 0.620196 23 | 0.26941 -0.8 0.56267 24 | 0.961872 -0.0472136 0.318986 25 | 0.533907 0.723607 0.469591 26 | -0.827167 -0.352786 0.469591 27 | -0.959996 -0.0763932 0.318986 28 | -0.399202 0.876393 0.318986 29 | -0.0930789 0.894427 0.469591 30 | -0.373476 -0.818034 0.469591 31 | 0.508181 -0.818034 0.318986 32 | 0.936146 -0.352786 0.168381 33 | 1.01145 -0.0763932 -0.0177765 34 | 0.482454 0.876393 0.168381 35 | 0.243684 0.894427 0.412065 36 | -0.663699 -0.647214 0.412065 37 | -1.01145 0.0763932 0.0177765 38 | -0.557757 0.847214 0.0177765 39 | -0.532031 -0.847214 0.168381 40 | 0.557757 -0.847214 -0.0177765 41 | 0.762851 -0.647214 0.168381 42 | 0.959996 0.0763932 -0.318986 43 | 0.532031 0.847214 -0.168381 44 | -0.961872 0.0472136 -0.318986 45 | -0.936146 0.352786 -0.168381 46 | -0.762851 0.647214 -0.168381 47 | -0.508181 0.818034 -0.318986 48 | -0.482454 -0.876393 -0.168381 49 | 0.399202 -0.876393 -0.318986 50 | 0.801441 0.0472136 -0.620196 51 | 0.827167 0.352786 -0.469591 52 | 0.663699 0.647214 -0.412065 53 | 0.373476 0.818034 -0.469591 54 | -0.830204 -0.152786 -0.56267 55 | -0.26941 0.8 -0.56267 56 | -0.533907 -0.723607 -0.469591 57 | -0.243684 -0.894427 -0.412065 58 | 0.0930789 -0.894427 -0.469591 59 | 0.347749 -0.723607 -0.620196 60 | 0.596346 -0.152786 -0.806354 61 | 0.0673526 0.8 -0.620196 62 | -0.666736 -0.447214 -0.620196 63 | -0.591433 -0.17082 -0.806354 64 | -0.137742 0.6 -0.806354 65 | 0.423052 -0.447214 -0.806354 66 | 0.290223 -0.17082 -0.956959 67 | -0.336763 0 -0.956959 68 | -0.163468 0.294427 -0.956959 69 | 0 0 -1.01449 70 | 3 0 3 1 71 | 3 2 6 5 72 | 3 4 8 9 73 | 3 7 12 13 74 | 3 10 17 16 75 | 3 11 19 18 76 | 3 14 22 23 77 | 3 15 24 25 78 | 3 20 26 29 79 | 3 21 30 31 80 | 3 27 35 34 81 | 3 28 37 36 82 | 3 32 40 41 83 | 3 33 42 43 84 | 3 38 46 47 85 | 3 39 48 49 86 | 3 44 53 52 87 | 3 45 51 54 88 | 3 50 55 56 89 | 3 57 58 59 90 | 10 0 1 4 9 15 25 19 11 6 2 91 | 10 0 2 5 10 16 26 20 12 7 3 92 | 10 1 3 7 13 21 31 22 14 8 4 93 | 10 5 6 11 18 28 36 35 27 17 10 94 | 10 8 14 23 32 41 42 33 24 15 9 95 | 10 12 20 29 38 47 48 39 30 21 13 96 | 10 16 17 27 34 44 52 46 38 29 26 97 | 10 18 19 25 24 33 43 51 45 37 28 98 | 10 22 31 30 39 49 55 50 40 32 23 99 | 10 34 35 36 37 45 54 58 57 53 44 100 | 10 40 50 56 59 58 54 51 43 42 41 101 | 10 46 52 53 57 59 56 55 49 48 47 102 | -------------------------------------------------------------------------------- /sample_inputs/3D/13_truncated_icosahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 60 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 32 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0 0 1.021 11 | 0.403548 0 0.937864 12 | -0.227464 0.333333 0.937864 13 | -0.147123 -0.375774 0.937864 14 | 0.579632 0.333333 0.771593 15 | 0.505832 -0.375774 0.803348 16 | -0.602051 0.290893 0.771593 17 | -0.0513806 0.666667 0.771593 18 | 0.165499 -0.608015 0.803348 19 | -0.52171 -0.418215 0.771593 20 | 0.858 0.290893 0.470806 21 | 0.352168 0.666667 0.688458 22 | 0.7842 -0.418215 0.502561 23 | -0.657475 0.597996 0.502561 24 | -0.749174 -0.0848813 0.688458 25 | -0.317142 0.830237 0.502561 26 | 0.103533 -0.882697 0.502561 27 | -0.583675 -0.692896 0.470806 28 | 0.802576 0.597996 0.201774 29 | 0.960284 -0.0848813 0.33629 30 | 0.489955 0.830237 0.33629 31 | 0.722234 -0.692896 0.201774 32 | -0.860021 0.529326 0.150394 33 | -0.95172 -0.153552 0.33629 34 | -0.179355 0.993808 0.150394 35 | 0.381901 -0.925138 0.201774 36 | -0.271054 -0.925138 0.33629 37 | -0.849436 -0.529326 0.201774 38 | 0.849436 0.529326 -0.201774 39 | 1.00714 -0.153552 -0.067258 40 | 0.224193 0.993808 0.067258 41 | 0.860021 -0.529326 -0.150394 42 | -0.722234 0.692896 -0.201774 43 | -1.00714 0.153552 0.067258 44 | -0.381901 0.925138 -0.201774 45 | 0.179355 -0.993808 -0.150394 46 | -0.224193 -0.993808 -0.067258 47 | -0.802576 -0.597996 -0.201774 48 | 0.583675 0.692896 -0.470806 49 | 0.95172 0.153552 -0.33629 50 | 0.271054 0.925138 -0.33629 51 | 0.657475 -0.597996 -0.502561 52 | -0.7842 0.418215 -0.502561 53 | -0.960284 0.0848813 -0.33629 54 | -0.103533 0.882697 -0.502561 55 | 0.317142 -0.830237 -0.502561 56 | -0.489955 -0.830237 -0.33629 57 | -0.858 -0.290893 -0.470806 58 | 0.52171 0.418215 -0.771593 59 | 0.749174 0.0848813 -0.688458 60 | 0.602051 -0.290893 -0.771593 61 | -0.505832 0.375774 -0.803348 62 | -0.165499 0.608015 -0.803348 63 | 0.0513806 -0.666667 -0.771593 64 | -0.352168 -0.666667 -0.688458 65 | -0.579632 -0.333333 -0.771593 66 | 0.147123 0.375774 -0.937864 67 | 0.227464 -0.333333 -0.937864 68 | -0.403548 0 -0.937864 69 | 0 0 -1.021 70 | 5 0 3 8 5 1 71 | 5 2 7 15 13 6 72 | 5 4 10 18 20 11 73 | 5 9 14 23 27 17 74 | 5 12 21 31 29 19 75 | 5 16 26 36 35 25 76 | 5 22 32 42 43 33 77 | 5 24 30 40 44 34 78 | 5 28 39 49 48 38 79 | 5 37 47 55 54 46 80 | 5 41 45 53 57 50 81 | 5 51 52 56 59 58 82 | 6 0 1 4 11 7 2 83 | 6 0 2 6 14 9 3 84 | 6 1 5 12 19 10 4 85 | 6 3 9 17 26 16 8 86 | 6 5 8 16 25 21 12 87 | 6 6 13 22 33 23 14 88 | 6 7 11 20 30 24 15 89 | 6 10 19 29 39 28 18 90 | 6 13 15 24 34 32 22 91 | 6 17 27 37 46 36 26 92 | 6 18 28 38 40 30 20 93 | 6 21 25 35 45 41 31 94 | 6 23 33 43 47 37 27 95 | 6 29 31 41 50 49 39 96 | 6 32 34 44 52 51 42 97 | 6 35 36 46 54 53 45 98 | 6 38 48 56 52 44 40 99 | 6 42 51 58 55 47 43 100 | 6 48 49 50 57 59 56 101 | 6 53 54 55 58 59 57 102 | -------------------------------------------------------------------------------- /sample_inputs/3D/14_truncated_octahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 24 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 14 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0 0 1.05409 11 | 0.632456 0 0.843274 12 | -0.421637 0.471404 0.843274 13 | -0.0702728 -0.628539 0.843274 14 | 0.843274 0.471404 0.421637 15 | 0.562183 -0.628539 0.632456 16 | -0.913547 0.31427 0.421637 17 | -0.210818 0.942809 0.421637 18 | -0.562183 -0.785674 0.421637 19 | 0.98382 0.31427 -0.210818 20 | 0.421637 0.942809 0.210818 21 | 0.702728 -0.785674 0 22 | -0.702728 0.785674 0 23 | -0.98382 -0.31427 0.210818 24 | -0.421637 -0.942809 -0.210818 25 | 0.562183 0.785674 -0.421637 26 | 0.913547 -0.31427 -0.421637 27 | 0.210818 -0.942809 -0.421637 28 | -0.562183 0.628539 -0.632456 29 | -0.843274 -0.471404 -0.421637 30 | 0.0702728 0.628539 -0.843274 31 | 0.421637 -0.471404 -0.843274 32 | -0.632456 0 -0.843274 33 | 0 0 -1.05409 34 | 4 0 3 5 1 35 | 4 2 7 12 6 36 | 4 4 9 15 10 37 | 4 8 13 19 14 38 | 4 11 17 21 16 39 | 4 18 20 23 22 40 | 6 0 1 4 10 7 2 41 | 6 0 2 6 13 8 3 42 | 6 1 5 11 16 9 4 43 | 6 3 8 14 17 11 5 44 | 6 6 12 18 22 19 13 45 | 6 7 10 15 20 18 12 46 | 6 9 16 21 23 20 15 47 | 6 14 19 22 23 21 17 48 | -------------------------------------------------------------------------------- /sample_inputs/3D/15_truncated_tetrahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 12 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 8 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0 0 1.10554 11 | 0.852803 0 0.703526 12 | -0.710669 0.471404 0.703526 13 | 0.331646 -0.785674 0.703526 14 | 0.994937 0.471404 -0.100504 15 | -1.08969 0.157135 -0.100504 16 | -0.568535 0.942809 -0.100504 17 | -0.0473779 -1.09994 -0.100504 18 | 0.615913 0.157135 -0.904534 19 | 0.284268 0.942809 -0.502519 20 | -0.758047 -0.628539 -0.502519 21 | 0.0947559 -0.628539 -0.904534 22 | 3 0 3 1 23 | 3 2 6 5 24 | 3 4 8 9 25 | 3 7 10 11 26 | 6 0 1 4 9 6 2 27 | 6 0 2 5 10 7 3 28 | 6 1 3 7 11 8 4 29 | 6 5 6 9 8 11 10 30 | -------------------------------------------------------------------------------- /sample_inputs/3D/16_gyroelongated_pentagonal_pyramid.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 11 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 16 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -0.684500 -0.403400 0.595200 11 | -0.633900 0.589400 0.486200 12 | -0.475500 -0.822300 -0.288500 13 | -0.393500 0.784000 -0.464800 14 | -0.295600 -0.088500 -0.943600 15 | 0.127800 0.092500 0.902000 16 | 0.225700 -0.780000 0.423200 17 | 0.307700 0.826300 0.246900 18 | 0.466100 -0.585400 -0.527800 19 | 0.516700 0.407400 -0.636800 20 | 0.839000 -0.020000 0.208000 21 | 3 6 2 8 22 | 3 8 2 4 23 | 3 8 4 9 24 | 3 9 4 3 25 | 3 9 3 7 26 | 3 7 3 1 27 | 3 7 1 5 28 | 3 5 1 0 29 | 3 5 0 6 30 | 3 6 0 2 31 | 3 6 8 10 32 | 3 8 9 10 33 | 3 9 7 10 34 | 3 7 5 10 35 | 3 5 6 10 36 | 5 1 3 4 2 0 37 | -------------------------------------------------------------------------------- /sample_inputs/3D/17_triangular_bipyramid.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 5 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 6 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -0.417000 0.166700 0.362900 11 | -0.128300 -0.333300 -0.453600 12 | -0.128300 0.666700 -0.453600 13 | 0.128300 -0.666700 0.453600 14 | 0.545300 0.166700 0.090700 15 | 3 1 3 0 16 | 3 3 4 0 17 | 3 3 1 4 18 | 3 0 2 1 19 | 3 0 4 2 20 | 3 2 4 1 21 | -------------------------------------------------------------------------------- /sample_inputs/3D/18_pentagonal_bipyramid.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 7 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 10 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -0.794100 0.302600 -0.037700 11 | -0.494400 -0.498800 0.480000 12 | -0.096600 -0.305400 -0.416900 13 | 0.003600 0.685800 -0.503300 14 | 0.096600 0.305400 0.416900 15 | 0.488600 -0.610900 0.334300 16 | 0.796300 0.121200 -0.273400 17 | 3 3 2 0 18 | 3 2 1 0 19 | 3 2 5 1 20 | 3 0 4 3 21 | 3 0 1 4 22 | 3 4 1 5 23 | 3 2 3 6 24 | 3 3 4 6 25 | 3 5 2 6 26 | 3 4 5 6 27 | -------------------------------------------------------------------------------- /sample_inputs/3D/19_gyroelongated_square_bipyramid.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 10 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 16 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -0.693300 0.433100 0.091900 11 | -0.602400 -0.504400 -0.243800 12 | -0.338800 -0.281600 0.694800 13 | -0.197900 0.252100 -0.757700 14 | -0.030900 1.098600 -0.252100 15 | 0.030900 -1.098600 0.252100 16 | 0.174900 0.567200 0.569600 17 | 0.361800 -0.537700 -0.506700 18 | 0.625500 -0.314900 0.431800 19 | 0.670300 0.386100 -0.279900 20 | 3 6 8 9 21 | 3 9 8 7 22 | 3 9 7 3 23 | 3 3 7 1 24 | 3 3 1 0 25 | 3 0 1 2 26 | 3 0 2 6 27 | 3 6 2 8 28 | 3 6 9 4 29 | 3 9 3 4 30 | 3 3 0 4 31 | 3 0 6 4 32 | 3 7 8 5 33 | 3 1 7 5 34 | 3 2 1 5 35 | 3 8 2 5 36 | -------------------------------------------------------------------------------- /sample_inputs/3D/20_square_gyrobicupola.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 16 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 18 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -1.285600 -0.090100 -0.215100 11 | -1.004100 0.835100 0.039100 12 | -0.814000 -0.962600 -0.343300 13 | -0.718100 -0.464300 0.518400 14 | -0.567500 0.374200 -0.733500 15 | -0.436600 0.461000 0.772600 16 | -0.134400 1.271200 0.270400 17 | -0.095900 -0.498300 -0.861700 18 | 0.134400 -1.271200 -0.270400 19 | 0.230300 -0.772900 0.591300 20 | 0.302200 0.810200 -0.502200 21 | 0.511800 0.152400 0.845500 22 | 0.773800 -0.062200 -0.630400 23 | 0.814000 0.962600 0.343300 24 | 1.004100 -0.835100 -0.039100 25 | 1.285600 0.090100 0.215100 26 | 3 4 0 1 27 | 3 10 6 13 28 | 3 12 15 14 29 | 3 7 8 2 30 | 3 3 0 2 31 | 3 9 8 14 32 | 3 11 15 13 33 | 3 5 6 1 34 | 4 7 4 10 12 35 | 4 4 7 2 0 36 | 4 10 4 1 6 37 | 4 12 10 13 15 38 | 4 7 12 14 8 39 | 4 5 3 9 11 40 | 4 3 5 1 0 41 | 4 9 3 2 8 42 | 4 11 9 14 15 43 | 4 5 11 13 6 44 | -------------------------------------------------------------------------------- /sample_inputs/3D/21_pentagonal_orthocupolarotunda.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 25 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 27 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -1.604100 0.399600 -0.032800 11 | -1.404400 0.024100 0.872300 12 | -1.246000 0.509900 -0.959900 13 | -1.074100 -0.335900 -0.454900 14 | -1.001200 0.895300 0.592400 15 | -0.874500 -0.711500 0.450200 16 | -0.723200 -0.473300 1.409500 17 | -0.466800 0.312800 -1.555000 18 | -0.421700 1.073800 -0.907800 19 | -0.295000 -0.533000 -1.050000 20 | -0.270500 1.312000 0.051600 21 | -0.070800 0.936500 0.956600 22 | 0.028000 -1.140600 0.414400 23 | 0.101000 0.090600 1.461700 24 | 0.179300 -0.902400 1.373800 25 | 0.386200 -1.030300 -0.512700 26 | 0.435700 -0.116300 -1.590700 27 | 0.508600 1.114900 -0.543500 28 | 0.831700 0.507300 0.920900 29 | 0.958400 -1.099500 0.778700 30 | 1.038600 0.379400 -0.965600 31 | 1.116900 -0.613700 -1.053500 32 | 1.189800 0.617600 -0.006200 33 | 1.316600 -0.989200 -0.148400 34 | 1.361600 -0.228200 0.498800 35 | 3 3 0 2 36 | 3 9 7 16 37 | 3 15 21 23 38 | 3 12 19 14 39 | 3 5 6 1 40 | 3 18 24 22 41 | 3 24 19 23 42 | 3 22 20 17 43 | 3 20 21 16 44 | 3 17 8 10 45 | 3 8 7 2 46 | 3 10 4 11 47 | 3 4 0 1 48 | 3 11 13 18 49 | 3 13 6 14 50 | 4 3 5 1 0 51 | 4 9 3 2 7 52 | 4 15 9 16 21 53 | 4 12 15 23 19 54 | 4 5 12 14 6 55 | 5 5 3 9 15 12 56 | 5 18 22 17 10 11 57 | 5 18 13 14 19 24 58 | 5 22 24 23 21 20 59 | 5 17 20 16 7 8 60 | 5 10 8 2 0 4 61 | 5 11 4 1 6 13 62 | -------------------------------------------------------------------------------- /sample_inputs/3D/22_pentagonal_orthobirotunda.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 30 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 32 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -1.579200 0.034300 0.350500 11 | -1.454000 -0.545000 -0.454900 12 | -1.295800 0.962700 0.110400 13 | -1.259500 -0.907300 0.456700 14 | -1.101300 0.600500 1.022000 15 | -1.093100 0.025400 -1.192700 16 | -0.995300 0.957200 -0.843300 17 | -0.847800 -1.333300 -0.348900 18 | -0.584000 -0.922900 1.193800 19 | -0.517300 1.523400 -0.171800 20 | -0.486200 0.008900 1.543200 21 | -0.314600 0.586100 -1.475000 22 | -0.263800 -0.410300 -1.542800 23 | -0.202700 0.937400 1.303200 24 | -0.112200 -1.250000 -1.021200 25 | 0.082200 -1.612200 -0.109700 26 | 0.158200 1.507800 0.565400 27 | 0.245300 -1.358600 0.843800 28 | 0.314600 -0.586100 1.475000 29 | 0.458700 1.502300 -0.388400 30 | 0.584000 0.922900 -1.193800 31 | 0.666200 -0.689300 -1.303500 32 | 0.773300 0.916200 1.086600 33 | 0.980900 -1.275400 0.171500 34 | 1.093100 -0.025400 1.192700 35 | 1.190200 0.134700 -1.087800 36 | 1.259500 0.907300 -0.456700 37 | 1.341800 -0.705000 -0.566300 38 | 1.454000 0.545000 0.454900 39 | 1.504800 -0.451400 0.387100 40 | 3 15 7 14 41 | 3 7 3 1 42 | 3 14 12 21 43 | 3 12 5 11 44 | 3 21 25 27 45 | 3 25 20 26 46 | 3 27 29 23 47 | 3 29 28 24 48 | 3 23 17 15 49 | 3 17 18 8 50 | 3 4 10 13 51 | 3 10 8 18 52 | 3 13 22 16 53 | 3 22 24 28 54 | 3 16 19 9 55 | 3 19 26 20 56 | 3 9 6 2 57 | 3 6 11 5 58 | 3 2 0 4 59 | 3 0 1 3 60 | 5 15 14 21 27 23 61 | 5 15 17 8 3 7 62 | 5 14 7 1 5 12 63 | 5 21 12 11 20 25 64 | 5 27 25 26 28 29 65 | 5 23 29 24 18 17 66 | 5 4 13 16 9 2 67 | 5 4 0 3 8 10 68 | 5 13 10 18 24 22 69 | 5 16 22 28 26 19 70 | 5 9 19 20 11 6 71 | 5 2 6 5 1 0 72 | -------------------------------------------------------------------------------- /sample_inputs/3D/23_elongated_pentagonal_gyrobicupola.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 30 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 32 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -1.593200 0.343700 -0.459800 11 | -1.567100 0.347800 0.539800 12 | -1.494500 -0.651400 -0.458400 13 | -1.468400 -0.647300 0.541300 14 | -1.088400 1.206800 -0.476600 15 | -1.062200 1.210800 0.523100 16 | -0.873100 -0.088100 -1.002900 17 | -0.830000 -1.398500 -0.472700 18 | -0.803800 -1.394400 0.526900 19 | -0.707100 0.433800 1.042800 20 | -0.608400 -0.561300 1.044300 21 | -0.368200 0.775000 -1.019600 22 | -0.208500 -0.835200 -1.017200 23 | -0.172800 1.608100 -0.502200 24 | -0.146600 1.612200 0.497500 25 | 0.146600 -1.612200 -0.497500 26 | 0.172800 -1.608100 0.502200 27 | 0.208500 0.835200 1.017200 28 | 0.368200 -0.775000 1.019600 29 | 0.608400 0.561300 -1.044300 30 | 0.707100 -0.433800 -1.042800 31 | 0.803800 1.394400 -0.526900 32 | 0.830000 1.398500 0.472700 33 | 0.873100 0.088100 1.002900 34 | 1.062200 -1.210800 -0.523100 35 | 1.088400 -1.206800 0.476600 36 | 1.468400 0.647300 -0.541300 37 | 1.494500 0.651400 0.458400 38 | 1.567100 -0.347800 -0.539800 39 | 1.593200 -0.343700 0.459800 40 | 3 11 4 13 41 | 3 19 21 26 42 | 3 20 28 24 43 | 3 12 15 7 44 | 3 6 2 0 45 | 3 9 5 1 46 | 3 10 3 8 47 | 3 18 16 25 48 | 3 23 29 27 49 | 3 17 22 14 50 | 4 11 6 0 4 51 | 4 19 11 13 21 52 | 4 20 19 26 28 53 | 4 12 20 24 15 54 | 4 6 12 7 2 55 | 4 9 17 14 5 56 | 4 10 9 1 3 57 | 4 18 10 8 16 58 | 4 23 18 25 29 59 | 4 17 23 27 22 60 | 4 24 25 16 15 61 | 4 15 16 8 7 62 | 4 7 8 3 2 63 | 4 2 3 1 0 64 | 4 0 1 5 4 65 | 4 4 5 14 13 66 | 4 13 14 22 21 67 | 4 21 22 27 26 68 | 4 26 27 29 28 69 | 4 28 29 25 24 70 | 5 6 11 19 20 12 71 | 5 17 9 10 18 23 72 | -------------------------------------------------------------------------------- /sample_inputs/3D/24_elongated_pentagonal_gyrobirotunda.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 40 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 42 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -2.035500 -0.316000 -0.033800 11 | -1.879800 0.341500 -0.770900 12 | -1.811900 0.634300 0.182900 13 | -1.648900 -1.194000 -0.316000 14 | -1.581100 -0.901200 0.637800 15 | -1.396900 -0.130100 -1.508700 16 | -1.254200 -1.079100 -1.227600 17 | -1.219200 0.636400 0.988300 18 | -1.173200 0.820200 -1.292100 19 | -1.076500 -0.312600 1.269400 20 | -1.063400 1.293900 0.251100 21 | -0.799700 -1.664300 -0.556000 22 | -0.689900 -1.190600 0.987200 23 | -0.668700 1.408800 -0.660500 24 | -0.547600 -0.600400 -1.748800 25 | -0.343500 0.889800 1.399400 26 | -0.207000 -1.662200 0.249400 27 | -0.200900 -0.059200 1.680500 28 | -0.187700 1.547300 0.662200 29 | -0.185800 0.937200 -1.398300 30 | 0.185800 -0.937200 1.398300 31 | 0.187700 -1.547300 -0.662200 32 | 0.200900 0.059200 -1.680500 33 | 0.207000 1.662200 -0.249400 34 | 0.343500 -0.889800 -1.399400 35 | 0.547600 0.600400 1.748800 36 | 0.668700 -1.408800 0.660500 37 | 0.689900 1.190600 -0.987200 38 | 0.799700 1.664300 0.556000 39 | 1.063400 -1.293900 -0.251100 40 | 1.076500 0.312600 -1.269400 41 | 1.173200 -0.820200 1.292100 42 | 1.219200 -0.636400 -0.988300 43 | 1.254200 1.079100 1.227600 44 | 1.396900 0.130100 1.508700 45 | 1.581100 0.901200 -0.637800 46 | 1.648900 1.194000 0.316000 47 | 1.811900 -0.634300 -0.182900 48 | 1.879800 -0.341500 0.770900 49 | 2.035500 0.316000 0.033800 50 | 3 0 2 1 51 | 3 2 7 10 52 | 3 1 8 5 53 | 3 8 13 19 54 | 3 5 14 6 55 | 3 14 22 24 56 | 3 6 11 3 57 | 3 11 21 16 58 | 3 3 4 0 59 | 3 4 12 9 60 | 3 33 25 34 61 | 3 25 15 17 62 | 3 34 31 38 63 | 3 31 20 26 64 | 3 38 37 39 65 | 3 37 29 32 66 | 3 39 35 36 67 | 3 35 30 27 68 | 3 36 28 33 69 | 3 28 23 18 70 | 4 24 32 29 21 71 | 4 21 29 26 16 72 | 4 16 26 20 12 73 | 4 12 20 17 9 74 | 4 9 17 15 7 75 | 4 7 15 18 10 76 | 4 10 18 23 13 77 | 4 13 23 27 19 78 | 4 19 27 30 22 79 | 4 22 30 32 24 80 | 5 0 1 5 6 3 81 | 5 0 4 9 7 2 82 | 5 1 2 10 13 8 83 | 5 5 8 19 22 14 84 | 5 6 14 24 21 11 85 | 5 3 11 16 12 4 86 | 5 33 34 38 39 36 87 | 5 33 28 18 15 25 88 | 5 34 25 17 20 31 89 | 5 38 31 26 29 37 90 | 5 39 37 32 30 35 91 | 5 36 35 27 23 28 92 | -------------------------------------------------------------------------------- /sample_inputs/3D/25_gyroelongated_square_bicupola.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 24 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 34 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -1.342600 -0.293700 0.058400 11 | -1.138700 0.568600 0.521800 12 | -1.059000 0.107300 -0.812700 13 | -0.929000 -0.301000 0.968800 14 | -0.876400 -0.857500 -0.623400 15 | -0.855100 0.969600 -0.349300 16 | -0.787000 -1.072800 0.349000 17 | -0.410300 0.520700 1.205300 18 | -0.384200 1.224400 0.495300 19 | -0.195800 0.172300 -1.313500 20 | -0.093600 -0.846800 1.033200 21 | -0.067600 -1.342700 -0.291000 22 | -0.013300 -0.792500 -1.124200 23 | 0.008000 1.034700 -0.850100 24 | 0.425100 -0.025200 1.269700 25 | 0.465100 0.910800 0.919900 26 | 0.478900 1.289500 -0.005500 27 | 0.625800 -1.116800 0.393200 28 | 0.741200 -0.136700 -1.150700 29 | 0.807800 -0.952600 -0.576400 30 | 0.945100 0.725700 -0.687300 31 | 1.144500 -0.295100 0.629600 32 | 1.184500 0.640900 0.279900 33 | 1.326400 -0.131000 -0.339900 34 | 3 13 16 20 35 | 3 9 18 12 36 | 3 2 4 0 37 | 3 5 1 8 38 | 3 14 15 7 39 | 3 10 3 6 40 | 3 17 11 19 41 | 3 21 23 22 42 | 3 12 11 4 43 | 3 4 11 6 44 | 3 4 6 0 45 | 3 0 6 3 46 | 3 0 3 1 47 | 3 1 3 7 48 | 3 1 7 8 49 | 3 8 7 15 50 | 3 8 15 16 51 | 3 16 15 22 52 | 3 16 22 20 53 | 3 20 22 23 54 | 3 20 23 18 55 | 3 18 23 19 56 | 3 18 19 12 57 | 3 12 19 11 58 | 4 5 13 9 2 59 | 4 13 5 8 16 60 | 4 9 13 20 18 61 | 4 2 9 12 4 62 | 4 5 2 0 1 63 | 4 21 14 10 17 64 | 4 14 21 22 15 65 | 4 10 14 7 3 66 | 4 17 10 6 11 67 | 4 21 17 19 23 68 | -------------------------------------------------------------------------------- /sample_inputs/3D/26_rhombic_dodecahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 14 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 12 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.5 0.353553 0.866025 11 | -0.5 0.707107 0.866025 12 | -0.5 -0.353553 0.866025 13 | 0.5 -0.707107 0.866025 14 | 1 -0.353553 0 15 | 1 0.707107 0 16 | 0 1.06066 0 17 | -1 0.353553 0 18 | -1 -0.707107 0 19 | 0 -1.06066 0 20 | 0.5 -0.707107 -0.866025 21 | 0.5 0.353553 -0.866025 22 | -0.5 0.707107 -0.866025 23 | -0.5 -0.353553 -0.866025 24 | 4 3 0 1 2 25 | 4 3 4 5 0 26 | 4 0 5 6 1 27 | 4 1 7 8 2 28 | 4 2 8 9 3 29 | 4 5 4 10 11 30 | 4 4 3 9 10 31 | 4 1 6 12 7 32 | 4 6 5 11 12 33 | 4 8 7 12 13 34 | 4 9 8 13 10 35 | 4 10 13 12 11 36 | -------------------------------------------------------------------------------- /sample_inputs/3D/27_rhombic_triacontahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 32 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 30 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.309017 0.190983 0.951056 11 | -0.309017 0.5 0.951056 12 | -0.309017 -0.190983 0.951056 13 | 0.309017 -0.5 0.951056 14 | 0.809017 -0.190983 0.587785 15 | 0.809017 0.5 0.587785 16 | 0.190983 0.809017 0.587785 17 | -0.809017 0.190983 0.587785 18 | -0.809017 -0.5 0.587785 19 | -0.190983 -0.809017 0.587785 20 | 1 -0.5 0 21 | 1 0.190983 0 22 | 0.5 -0.809017 0.363271 23 | 0 1.11803 0 24 | -0.5 0.809017 0.363271 25 | 0.618034 0.809017 0 26 | -1 0.5 0 27 | -1 -0.190983 0 28 | 0 -1.11803 0 29 | -0.618034 -0.809017 0 30 | 0.809017 -0.190983 -0.587785 31 | 0.809017 0.5 -0.587785 32 | 0.5 -0.809017 -0.363271 33 | -0.5 0.809017 -0.363271 34 | 0.190983 0.809017 -0.587785 35 | -0.809017 0.190983 -0.587785 36 | -0.809017 -0.5 -0.587785 37 | -0.190983 -0.809017 -0.587785 38 | 0.309017 -0.5 -0.951056 39 | 0.309017 0.190983 -0.951056 40 | -0.309017 0.5 -0.951056 41 | -0.309017 -0.190983 -0.951056 42 | 4 3 0 1 2 43 | 4 3 4 5 0 44 | 4 0 5 6 1 45 | 4 1 7 8 2 46 | 4 2 8 9 3 47 | 4 5 4 10 11 48 | 4 4 3 12 10 49 | 4 1 6 13 14 50 | 4 6 5 15 13 51 | 4 8 7 16 17 52 | 4 7 1 14 16 53 | 4 3 9 18 12 54 | 4 9 8 19 18 55 | 4 10 20 21 11 56 | 4 11 21 15 5 57 | 4 12 18 22 10 58 | 4 13 23 16 14 59 | 4 15 21 24 13 60 | 4 16 25 26 17 61 | 4 17 26 19 8 62 | 4 19 26 27 18 63 | 4 21 20 28 29 64 | 4 20 10 22 28 65 | 4 22 18 27 28 66 | 4 16 23 30 25 67 | 4 23 13 24 30 68 | 4 24 21 29 30 69 | 4 26 25 30 31 70 | 4 27 26 31 28 71 | 4 28 31 30 29 72 | -------------------------------------------------------------------------------- /sample_inputs/3D/28_deltoidal_icositetrahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 26 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 24 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.357407 0.414214 0.933949 11 | -0.276439 0.320377 0.933949 12 | -0.462089 -0.292893 0.933949 13 | 0.357407 -0.414214 0.933949 14 | 0.967538 -0.292893 0.386854 15 | 0.829319 0.320377 0.510794 16 | 0.148043 1 0.386854 17 | -0.610132 0.707107 0.547095 18 | -1.0109 0 0.386854 19 | -0.438374 -0.773459 0.510794 20 | 0.148043 -1 0.386854 21 | 0.819495 0.707107 0 22 | 1.0109 0 -0.386854 23 | 0.667384 -0.773459 0.0876383 24 | -0.148043 1 -0.386854 25 | -0.667384 0.773459 -0.0876383 26 | -0.819495 -0.707107 0 27 | -0.967538 0.292893 -0.386854 28 | -0.148043 -1 -0.386854 29 | 0.438374 0.773459 -0.510794 30 | 0.610132 -0.707107 -0.547095 31 | 0.462089 0.292893 -0.933949 32 | -0.357407 0.414214 -0.933949 33 | -0.829319 -0.320377 -0.510794 34 | -0.357407 -0.414214 -0.933949 35 | 0.276439 -0.320377 -0.933949 36 | 4 3 0 1 2 37 | 4 3 4 5 0 38 | 4 0 6 7 1 39 | 4 1 7 8 2 40 | 4 2 9 10 3 41 | 4 0 5 11 6 42 | 4 5 4 12 11 43 | 4 4 3 10 13 44 | 4 7 6 14 15 45 | 4 2 8 16 9 46 | 4 8 7 15 17 47 | 4 10 9 16 18 48 | 4 11 19 14 6 49 | 4 4 13 20 12 50 | 4 12 21 19 11 51 | 4 10 18 20 13 52 | 4 14 22 17 15 53 | 4 8 17 23 16 54 | 4 16 23 24 18 55 | 4 14 19 21 22 56 | 4 12 20 25 21 57 | 4 20 18 24 25 58 | 4 17 22 24 23 59 | 4 21 25 24 22 60 | -------------------------------------------------------------------------------- /sample_inputs/3D/29_pentagonal_icositetrahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 38 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 24 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.372103 0.237915 0.928191 11 | -0.0598019 0.437593 0.928191 12 | -0.422294 0.129352 0.928191 13 | -0.294624 -0.32903 0.928191 14 | 0.372103 -0.437593 0.928191 15 | 0.854199 -0.32903 0.467639 16 | 0.946515 0.129352 0.379449 17 | 0.684404 0.437593 0.629846 18 | 0.51461 0.80486 0.379449 19 | -0.131055 0.95898 0.504647 20 | -0.711693 0.637272 0.379449 21 | -0.77672 0.237915 0.629846 22 | -1.01777 -0.283472 0.274371 23 | -0.541898 -0.605181 0.629846 24 | -0.279788 -0.913423 0.379449 25 | 0.187472 -0.895975 0.467639 26 | 0.464419 -0.913423 0.0811035 27 | 0.826911 -0.605181 0.0811035 28 | 0.896324 -0.378569 -0.331501 29 | 1.01777 0.283472 -0.274371 30 | 0.634214 0.80486 -0.0811035 31 | 0.279788 0.913423 -0.379449 32 | -0.137281 1.00454 -0.169294 33 | -0.51461 0.80486 -0.379449 34 | -0.826911 0.605181 -0.0811035 35 | -0.988639 0.17889 -0.217242 36 | -0.753817 -0.664205 -0.217242 37 | -0.395006 -0.945514 -0.0811035 38 | 0.131055 -0.95898 -0.504647 39 | 0.592089 -0.496618 -0.677794 40 | 0.422294 -0.129352 -0.928191 41 | 0.584023 0.296939 -0.792053 42 | 0.252499 0.637272 -0.765984 43 | -0.372103 0.437593 -0.928191 44 | -0.812075 0.0207885 -0.629846 45 | -0.684404 -0.437593 -0.629846 46 | -0.267336 -0.528709 -0.840001 47 | -0.0449656 -0.146799 -1.01638 48 | 5 4 0 1 2 3 49 | 5 0 4 5 6 7 50 | 5 1 0 7 8 9 51 | 5 2 1 9 10 11 52 | 5 3 2 11 12 13 53 | 5 4 3 13 14 15 54 | 5 5 4 15 16 17 55 | 5 6 5 17 18 19 56 | 5 7 6 19 20 8 57 | 5 9 8 20 21 22 58 | 5 10 9 22 23 24 59 | 5 11 10 24 25 12 60 | 5 13 12 26 27 14 61 | 5 15 14 27 28 16 62 | 5 17 16 28 29 18 63 | 5 19 18 29 30 31 64 | 5 20 19 31 32 21 65 | 5 22 21 32 33 23 66 | 5 24 23 33 34 25 67 | 5 12 25 34 35 26 68 | 5 27 26 35 36 28 69 | 5 29 28 36 37 30 70 | 5 31 30 37 33 32 71 | 5 34 33 37 36 35 72 | -------------------------------------------------------------------------------- /sample_inputs/3D/30_triakis_octahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 14 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 24 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.281085 1 0.959683 11 | -0.760926 -0.707107 0.959683 12 | 0.281085 -0.171573 0.959683 13 | 1.15844 -0.707107 0.397514 14 | -0.678598 0.414214 0.630372 15 | 0.911457 0.414214 0.164656 16 | -1.15844 0.707107 -0.397514 17 | 0.0482265 -1 0.164656 18 | 0.760926 0.707107 -0.959683 19 | -0.911457 -0.414214 -0.164656 20 | -0.0482265 1 -0.164656 21 | -0.281085 -1 -0.959683 22 | 0.678598 -0.414214 -0.630372 23 | -0.281085 0.171573 -0.959683 24 | 3 2 0 1 25 | 3 2 3 0 26 | 3 0 4 1 27 | 3 1 3 2 28 | 3 0 3 5 29 | 3 1 4 6 30 | 3 4 0 6 31 | 3 3 1 7 32 | 3 3 8 5 33 | 3 5 8 0 34 | 3 6 9 1 35 | 3 0 10 6 36 | 3 1 11 7 37 | 3 7 11 3 38 | 3 8 3 12 39 | 3 0 8 10 40 | 3 1 9 11 41 | 3 9 6 11 42 | 3 6 10 8 43 | 3 3 11 12 44 | 3 12 11 8 45 | 3 6 13 11 46 | 3 8 13 6 47 | 3 8 11 13 48 | -------------------------------------------------------------------------------- /sample_inputs/3D/31_disdyakis_dodecahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 26 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 48 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.215739 0.226541 0.976451 11 | -0.424251 0.195262 0.976451 12 | 0.215739 -0.630602 0.976451 13 | 0.796155 0.195262 0.706811 14 | 0.136046 1 0.615752 15 | -0.575644 -0.38673 0.755245 16 | 0.840257 -0.38673 0.442412 17 | -0.624518 0.613271 0.534039 18 | -0.568077 -0.861929 0.325484 19 | -1.15439 0 0.255053 20 | 0.791384 0.613271 0.221206 21 | 0.652329 -0.861929 0.0558442 22 | 1.15439 0 -0.255053 23 | -0.652329 0.861929 -0.0558442 24 | 0.0488738 -1 0.221206 25 | 0.568077 0.861929 -0.325484 26 | -0.0488738 1 -0.221206 27 | -0.791384 -0.613271 -0.221206 28 | -0.136046 -1 -0.615752 29 | 0.624518 -0.613271 -0.534039 30 | -0.840257 0.38673 -0.442412 31 | -0.215739 0.630602 -0.976451 32 | -0.796155 -0.195262 -0.706811 33 | 0.575644 0.38673 -0.755245 34 | 0.424251 -0.195262 -0.976451 35 | -0.215739 -0.226541 -0.976451 36 | 3 2 0 1 37 | 3 2 3 0 38 | 3 0 4 1 39 | 3 1 5 2 40 | 3 0 3 4 41 | 3 3 2 6 42 | 3 1 4 7 43 | 3 2 5 8 44 | 3 5 1 9 45 | 3 3 10 4 46 | 3 2 11 6 47 | 3 6 12 3 48 | 3 4 13 7 49 | 3 7 9 1 50 | 3 5 9 8 51 | 3 8 14 2 52 | 3 4 10 15 53 | 3 10 3 12 54 | 3 6 11 12 55 | 3 11 2 14 56 | 3 7 13 9 57 | 3 13 4 16 58 | 3 8 9 17 59 | 3 14 8 18 60 | 3 10 12 15 61 | 3 15 16 4 62 | 3 11 19 12 63 | 3 14 18 11 64 | 3 13 20 9 65 | 3 16 21 13 66 | 3 9 22 17 67 | 3 17 18 8 68 | 3 15 12 23 69 | 3 16 15 21 70 | 3 12 19 24 71 | 3 19 11 18 72 | 3 9 20 22 73 | 3 20 13 21 74 | 3 17 22 18 75 | 3 12 24 23 76 | 3 23 21 15 77 | 3 19 18 24 78 | 3 20 21 22 79 | 3 22 25 18 80 | 3 23 24 21 81 | 3 24 18 25 82 | 3 22 21 25 83 | 3 24 25 21 84 | -------------------------------------------------------------------------------- /sample_inputs/3D/32_triakis_icosahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 32 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 60 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.168381 0.618034 0.985722 11 | -0.458605 -0.447214 0.985722 12 | 0.168381 -0.0991064 0.985722 13 | 0.759815 -0.447214 0.777591 14 | -0.440828 0.259464 0.864969 15 | 0.702962 0.259464 0.669586 16 | -0.939182 0.552786 0.440828 17 | 0.114379 -0.740536 0.669586 18 | 1.03226 0.552786 0.104065 19 | -0.871343 -0.160358 0.474204 20 | -0.28276 0.839643 0.474204 21 | 0.0177765 -1.17082 0.104065 22 | 0.979348 -0.160358 0.158068 23 | 0.424141 0.839643 0.353451 24 | -1.03226 -0.552786 -0.104065 25 | -0.0177765 1.17082 -0.104065 26 | -0.528206 -0.778391 0.353451 27 | 0.615584 -0.778391 0.158068 28 | 0.939182 -0.552786 -0.440828 29 | -0.979348 0.160358 -0.158068 30 | -0.615584 0.778391 -0.158068 31 | 0.871343 0.160358 -0.474204 32 | 0.528206 0.778391 -0.353451 33 | -0.759815 0.447214 -0.777591 34 | -0.424141 -0.839643 -0.353451 35 | 0.28276 -0.839643 -0.474204 36 | 0.458605 0.447214 -0.985722 37 | -0.702962 -0.259464 -0.669586 38 | -0.114379 0.740536 -0.669586 39 | -0.168381 -0.618034 -0.985722 40 | 0.440828 -0.259464 -0.864969 41 | -0.168381 0.0991064 -0.985722 42 | 3 2 0 1 43 | 3 2 3 0 44 | 3 0 4 1 45 | 3 1 3 2 46 | 3 0 3 5 47 | 3 1 4 6 48 | 3 4 0 6 49 | 3 3 1 7 50 | 3 3 8 5 51 | 3 5 8 0 52 | 3 6 9 1 53 | 3 0 10 6 54 | 3 1 11 7 55 | 3 7 11 3 56 | 3 8 3 12 57 | 3 0 8 13 58 | 3 1 9 14 59 | 3 9 6 14 60 | 3 6 10 15 61 | 3 10 0 15 62 | 3 11 1 16 63 | 3 3 11 17 64 | 3 3 18 12 65 | 3 12 18 8 66 | 3 8 15 13 67 | 3 13 15 0 68 | 3 14 16 1 69 | 3 6 19 14 70 | 3 15 20 6 71 | 3 16 14 11 72 | 3 11 18 17 73 | 3 17 18 3 74 | 3 8 18 21 75 | 3 15 8 22 76 | 3 14 19 23 77 | 3 19 6 23 78 | 3 6 20 23 79 | 3 20 15 23 80 | 3 11 14 24 81 | 3 18 11 25 82 | 3 18 26 21 83 | 3 21 26 8 84 | 3 8 26 22 85 | 3 22 26 15 86 | 3 23 27 14 87 | 3 15 28 23 88 | 3 14 29 24 89 | 3 24 29 11 90 | 3 11 29 25 91 | 3 25 29 18 92 | 3 26 18 30 93 | 3 15 26 28 94 | 3 14 27 29 95 | 3 27 23 29 96 | 3 23 28 26 97 | 3 18 29 30 98 | 3 30 29 26 99 | 3 23 31 29 100 | 3 26 31 23 101 | 3 26 29 31 102 | -------------------------------------------------------------------------------- /sample_inputs/3D/33_pentakis_dodecahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 32 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 60 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.201774 0.381966 0.979432 11 | -0.429238 -0.0486327 0.979432 12 | 0.201774 -0.295686 0.979432 13 | 0.781406 -0.0486327 0.730026 14 | -0.403548 0.591372 0.758194 15 | -0.239594 -0.745356 0.730026 16 | 0.670364 0.591372 0.536956 17 | 0.508626 -0.745356 0.575884 18 | -0.921987 0.254644 0.480619 19 | 0.099013 0.951367 0.480619 20 | -0.795067 -0.408628 0.536956 21 | 1.03688 0.254644 0.0770708 22 | 0.942559 -0.408628 0.178985 23 | -0.59551 0.872678 0.172336 24 | 0.036873 -1.02666 0.178985 25 | -0.615135 -0.872678 0.0770708 26 | 0.615135 0.872678 -0.0770708 27 | 0.59551 -0.872678 -0.172336 28 | -0.942559 0.408628 -0.178985 29 | -1.03688 -0.254644 -0.0770708 30 | -0.036873 1.02666 -0.178985 31 | 0.795067 0.408628 -0.536956 32 | 0.921987 -0.254644 -0.480619 33 | -0.508626 0.745356 -0.575884 34 | -0.099013 -0.951367 -0.480619 35 | -0.670364 -0.591372 -0.536956 36 | 0.239594 0.745356 -0.730026 37 | 0.403548 -0.591372 -0.758194 38 | -0.781406 0.0486327 -0.730026 39 | 0.429238 0.0486327 -0.979432 40 | -0.201774 0.295686 -0.979432 41 | -0.201774 -0.381966 -0.979432 42 | 3 2 0 1 43 | 3 2 3 0 44 | 3 0 4 1 45 | 3 1 5 2 46 | 3 0 3 6 47 | 3 3 2 7 48 | 3 1 4 8 49 | 3 4 0 9 50 | 3 2 5 7 51 | 3 5 1 10 52 | 3 3 11 6 53 | 3 6 9 0 54 | 3 7 12 3 55 | 3 4 13 8 56 | 3 8 10 1 57 | 3 9 13 4 58 | 3 5 14 7 59 | 3 10 15 5 60 | 3 6 11 16 61 | 3 11 3 12 62 | 3 9 6 16 63 | 3 12 7 17 64 | 3 8 13 18 65 | 3 10 8 19 66 | 3 13 9 20 67 | 3 7 14 17 68 | 3 14 5 15 69 | 3 15 10 19 70 | 3 11 21 16 71 | 3 12 22 11 72 | 3 16 20 9 73 | 3 17 22 12 74 | 3 13 23 18 75 | 3 18 19 8 76 | 3 20 23 13 77 | 3 14 24 17 78 | 3 15 24 14 79 | 3 19 25 15 80 | 3 16 21 26 81 | 3 21 11 22 82 | 3 20 16 26 83 | 3 22 17 27 84 | 3 18 23 28 85 | 3 19 18 28 86 | 3 23 20 26 87 | 3 17 24 27 88 | 3 24 15 25 89 | 3 25 19 28 90 | 3 21 29 26 91 | 3 22 29 21 92 | 3 27 29 22 93 | 3 23 30 28 94 | 3 26 30 23 95 | 3 24 31 27 96 | 3 25 31 24 97 | 3 28 31 25 98 | 3 26 29 30 99 | 3 29 27 31 100 | 3 28 30 31 101 | 3 29 31 30 102 | -------------------------------------------------------------------------------- /sample_inputs/3D/34_tetrakis_hexahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 14 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 24 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.316228 0.707107 0.948683 11 | -0.737865 -0.235702 0.948683 12 | 0.316228 -0.353553 0.948683 13 | 1.1595 -0.235702 0.316228 14 | -0.632456 0.707107 0.474342 15 | 0.105409 -1.17851 0.316228 16 | 0.790569 0.707107 0 17 | -1.1595 0.235702 -0.316228 18 | -0.105409 1.17851 -0.316228 19 | -0.790569 -0.707107 0 20 | 0.737865 0.235702 -0.948683 21 | 0.632456 -0.707107 -0.474342 22 | -0.316228 -0.707107 -0.948683 23 | -0.316228 0.353553 -0.948683 24 | 3 2 0 1 25 | 3 2 3 0 26 | 3 0 4 1 27 | 3 1 5 2 28 | 3 0 3 6 29 | 3 3 2 5 30 | 3 1 4 7 31 | 3 4 0 8 32 | 3 5 1 9 33 | 3 3 10 6 34 | 3 6 8 0 35 | 3 5 11 3 36 | 3 4 8 7 37 | 3 7 9 1 38 | 3 9 12 5 39 | 3 6 10 8 40 | 3 10 3 11 41 | 3 11 5 12 42 | 3 7 8 13 43 | 3 9 7 12 44 | 3 10 13 8 45 | 3 11 12 10 46 | 3 13 12 7 47 | 3 13 10 12 48 | -------------------------------------------------------------------------------- /sample_inputs/3D/35_triakis_tetrahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 8 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 12 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.426401 1.41421 0.904534 11 | -1.13707 -0.942809 0.904534 12 | 0.426401 -0.282843 0.904534 13 | 1.42134 -0.942809 -0.301511 14 | -0.852803 0.565685 0.180907 15 | 0.682242 0.565685 -0.54272 16 | -0.710669 0.471404 -1.50756 17 | -0.255841 -0.848528 -0.54272 18 | 3 2 0 1 19 | 3 2 3 0 20 | 3 0 4 1 21 | 3 1 3 2 22 | 3 0 3 5 23 | 3 1 4 6 24 | 3 4 0 6 25 | 3 3 1 7 26 | 3 3 6 5 27 | 3 5 6 0 28 | 3 6 7 1 29 | 3 7 6 3 30 | -------------------------------------------------------------------------------- /sample_inputs/3D/36_heptagonal_bipyramid.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 9 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 14 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.413300 0.500000 0.952500 11 | -0.568900 0.311700 0.952500 12 | 0.413300 -2.156000 0.952500 13 | 1.084200 0.311700 0.235200 14 | -0.413300 2.156000 -0.952500 15 | -1.122600 -0.111300 0.235200 16 | 0.938700 -0.111300 -0.659100 17 | -0.831000 -0.450500 -0.659100 18 | 0.086400 -0.450500 -1.057200 19 | 3 2 0 1 20 | 3 2 3 0 21 | 3 0 4 1 22 | 3 1 5 2 23 | 3 0 3 4 24 | 3 3 2 6 25 | 3 1 4 5 26 | 3 2 5 7 27 | 3 3 6 4 28 | 3 2 8 6 29 | 3 4 7 5 30 | 3 7 8 2 31 | 3 4 6 8 32 | 3 7 4 8 33 | -------------------------------------------------------------------------------- /sample_inputs/3D/37_enneagonal_trapezohedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 20 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 18 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.801500 0.500000 2.307800 11 | -0.096700 0.939700 2.307800 12 | -0.886500 0.326400 2.307800 13 | 0.801500 -7.790900 2.307800 14 | 2.126100 0.326400 1.261500 15 | 1.506300 0.939700 1.751100 16 | -0.801500 7.790900 -2.307800 17 | -1.666100 0.613300 1.751100 18 | -2.148000 -0.113300 1.261500 19 | 2.467500 -0.113300 -0.341400 20 | 2.392800 0.613300 0.341400 21 | -2.467500 0.113300 0.341400 22 | -2.392800 -0.613300 -0.341400 23 | 1.666100 -0.613300 -1.751100 24 | 2.148000 0.113300 -1.261500 25 | -2.126100 -0.326400 -1.261500 26 | -1.506300 -0.939700 -1.751100 27 | 0.096700 -0.939700 -2.307800 28 | 0.886500 -0.326400 -2.307800 29 | -0.801500 -0.500000 -2.307800 30 | 4 3 0 1 2 31 | 4 0 3 4 5 32 | 4 1 0 5 6 33 | 4 2 1 6 7 34 | 4 3 2 7 8 35 | 4 4 3 9 10 36 | 4 5 4 10 6 37 | 4 7 6 11 8 38 | 4 3 8 11 12 39 | 4 9 3 13 14 40 | 4 10 9 14 6 41 | 4 11 6 15 12 42 | 4 3 12 15 16 43 | 4 13 3 17 18 44 | 4 14 13 18 6 45 | 4 15 6 19 16 46 | 4 3 16 19 17 47 | 4 18 17 19 6 48 | -------------------------------------------------------------------------------- /sample_inputs/3D/38_small_stell_dodecahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 32 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 60 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.000000 0.000000 1.070470 11 | 0.713640 0.000000 0.797880 12 | -0.356820 0.618000 0.797880 13 | -0.356820 -0.618000 0.797880 14 | 0.797880 0.618030 0.356820 15 | 0.797880 -0.618000 0.356820 16 | -0.934170 0.381970 0.356820 17 | 0.136290 1.000000 0.356820 18 | 0.136290 -1.000000 0.356820 19 | -0.934170 -0.381970 0.356820 20 | 0.934170 0.381970 -0.356820 21 | 0.934170 -0.381970 -0.356820 22 | -0.797880 0.618000 -0.356820 23 | -0.136290 1.000000 -0.356820 24 | -0.136290 -1.000000 -0.356820 25 | -0.797880 -0.618030 -0.356820 26 | 0.356820 0.618000 -0.797880 27 | 0.356820 -0.618000 -0.797880 28 | -0.713640 0.000000 -0.797880 29 | 0.000000 0.000000 -1.070470 30 | 0.577351 0.999993 1.511517 31 | -1.154680 0.000002 1.511490 32 | 0.577303 -0.999980 1.511497 33 | 1.868310 0.000015 0.356815 34 | -0.934221 1.618015 0.356837 35 | -0.934124 -1.618038 0.356829 36 | 0.934126 1.618041 -0.356830 37 | 0.934217 -1.618027 -0.356835 38 | -1.868322 -0.000015 -0.356817 39 | 1.154709 0.000000 -1.511529 40 | -0.577367 0.999973 -1.511563 41 | -0.577355 -1.000000 -1.511528 42 | 3 0 1 20 43 | 3 1 4 20 44 | 3 4 7 20 45 | 3 7 2 20 46 | 3 2 0 20 47 | 3 0 2 21 48 | 3 2 6 21 49 | 3 6 9 21 50 | 3 9 3 21 51 | 3 3 0 21 52 | 3 0 3 22 53 | 3 3 8 22 54 | 3 8 5 22 55 | 3 5 1 22 56 | 3 1 0 22 57 | 3 1 5 23 58 | 3 5 11 23 59 | 3 11 10 23 60 | 3 10 4 23 61 | 3 4 1 23 62 | 3 2 7 24 63 | 3 7 13 24 64 | 3 13 12 24 65 | 3 12 6 24 66 | 3 6 2 24 67 | 3 3 9 25 68 | 3 9 15 25 69 | 3 15 14 25 70 | 3 14 8 25 71 | 3 8 3 25 72 | 3 4 10 26 73 | 3 10 16 26 74 | 3 16 13 26 75 | 3 13 7 26 76 | 3 7 4 26 77 | 3 5 8 27 78 | 3 8 14 27 79 | 3 14 17 27 80 | 3 17 11 27 81 | 3 11 5 27 82 | 3 6 12 28 83 | 3 12 18 28 84 | 3 18 15 28 85 | 3 15 9 28 86 | 3 9 6 28 87 | 3 10 11 29 88 | 3 11 17 29 89 | 3 17 19 29 90 | 3 19 16 29 91 | 3 16 10 29 92 | 3 12 13 30 93 | 3 13 16 30 94 | 3 16 19 30 95 | 3 19 18 30 96 | 3 18 12 30 97 | 3 14 15 31 98 | 3 15 18 31 99 | 3 18 19 31 100 | 3 19 17 31 101 | 3 17 14 31 102 | -------------------------------------------------------------------------------- /sample_inputs/3D/39_rhombic_hexecontahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 62 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 60 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.000000 0.000000 1.401263 11 | 0.934167 0.000000 1.044438 12 | -0.467083 0.808973 1.044438 13 | -0.467083 -0.808973 1.044438 14 | 1.044438 0.809012 0.467083 15 | 1.044438 -0.808973 0.467083 16 | -1.222844 0.500005 0.467083 17 | 0.178406 1.309017 0.467083 18 | 0.178406 -1.309017 0.467083 19 | -1.222844 -0.500005 0.467083 20 | 1.222844 0.500005 -0.467083 21 | 1.222844 -0.500005 -0.467083 22 | -1.044438 0.808973 -0.467083 23 | -0.178406 1.309017 -0.467083 24 | -0.178406 -1.309017 -0.467083 25 | -1.044438 -0.809012 -0.467083 26 | 0.467083 0.808973 -1.044438 27 | 0.467083 -0.808973 -1.044438 28 | -0.934167 0.000000 -1.044438 29 | 0.000000 0.000000 -1.401263 30 | 0.356820 0.000000 0.934175 31 | 0.755760 0.309015 0.577350 32 | 0.467085 0.809015 0.356820 33 | -0.178410 0.309000 0.934175 34 | -0.645495 0.499985 0.577350 35 | -0.934170 0.000000 0.356820 36 | -0.178410 -0.309000 0.934175 37 | -0.110265 -0.809000 0.577350 38 | 0.755760 -0.309000 0.577350 39 | 0.866025 -0.499985 0.000000 40 | -0.110265 0.809000 0.577350 41 | 0.000000 1.000000 0.000000 42 | -0.645495 -0.499985 0.577350 43 | -0.866025 -0.500000 0.000000 44 | 0.866025 0.500000 0.000000 45 | 0.645495 0.499985 -0.577350 46 | 0.467085 -0.809000 0.356820 47 | 0.000000 -1.000000 0.000000 48 | 0.110265 -0.809000 -0.577350 49 | -0.866025 0.499985 0.000000 50 | -0.755760 0.309000 -0.577350 51 | 0.934170 0.000000 -0.356820 52 | 0.645495 -0.499985 -0.577350 53 | 0.178410 -0.309000 -0.934175 54 | -0.467085 0.809000 -0.356820 55 | 0.110265 0.809000 -0.577350 56 | 0.178410 0.309000 -0.934175 57 | -0.467085 -0.809015 -0.356820 58 | -0.755760 -0.309015 -0.577350 59 | -0.356820 0.000000 -0.934175 60 | 0.178410 0.309012 0.467087 61 | -0.356821 0.000000 0.467087 62 | 0.178410 -0.309008 0.467087 63 | 0.577349 0.000004 0.110264 64 | -0.288675 0.499991 0.110264 65 | -0.288675 -0.499995 0.110264 66 | 0.288675 0.499995 -0.110264 67 | 0.288675 -0.499991 -0.110264 68 | -0.577349 -0.000004 -0.110264 69 | 0.356821 0.000000 -0.467087 70 | -0.178410 0.309008 -0.467087 71 | -0.178410 -0.309012 -0.467087 72 | 4 50 20 1 21 73 | 4 50 21 4 22 74 | 4 50 22 7 30 75 | 4 50 30 2 23 76 | 4 50 23 0 20 77 | 4 51 23 2 24 78 | 4 51 24 6 25 79 | 4 51 25 9 32 80 | 4 51 32 3 26 81 | 4 51 26 0 23 82 | 4 52 26 3 27 83 | 4 52 27 8 36 84 | 4 52 36 5 28 85 | 4 52 28 1 20 86 | 4 52 20 0 26 87 | 4 53 28 5 29 88 | 4 53 29 11 41 89 | 4 53 41 10 34 90 | 4 53 34 4 21 91 | 4 53 21 1 28 92 | 4 54 30 7 31 93 | 4 54 31 13 44 94 | 4 54 44 12 39 95 | 4 54 39 6 24 96 | 4 54 24 2 30 97 | 4 55 32 9 33 98 | 4 55 33 15 47 99 | 4 55 47 14 37 100 | 4 55 37 8 27 101 | 4 55 27 3 32 102 | 4 56 34 10 35 103 | 4 56 35 16 45 104 | 4 56 45 13 31 105 | 4 56 31 7 22 106 | 4 56 22 4 34 107 | 4 57 36 8 37 108 | 4 57 37 14 38 109 | 4 57 38 17 42 110 | 4 57 42 11 29 111 | 4 57 29 5 36 112 | 4 58 39 12 40 113 | 4 58 40 18 48 114 | 4 58 48 15 33 115 | 4 58 33 9 25 116 | 4 58 25 6 39 117 | 4 59 41 11 42 118 | 4 59 42 17 43 119 | 4 59 43 19 46 120 | 4 59 46 16 35 121 | 4 59 35 10 41 122 | 4 60 44 13 45 123 | 4 60 45 16 46 124 | 4 60 46 19 49 125 | 4 60 49 18 40 126 | 4 60 40 12 44 127 | 4 61 47 15 48 128 | 4 61 48 18 49 129 | 4 61 49 19 43 130 | 4 61 43 17 38 131 | 4 61 38 14 47 132 | -------------------------------------------------------------------------------- /sample_inputs/3D/41_double_helix.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 36 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 66 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -4.000000 0.000000 -1.306563 11 | -4.000000 0.923880 -0.923880 12 | -4.000000 0.000000 1.306563 13 | -4.000000 -0.923880 0.923880 14 | -3.000000 0.923880 -0.923880 15 | -3.000000 1.306563 -0.000000 16 | -3.000000 -0.923880 0.923880 17 | -3.000000 -1.306563 0.000000 18 | -2.000000 1.306563 -0.000000 19 | -2.000000 0.923880 0.923880 20 | -2.000000 -1.306563 0.000000 21 | -2.000000 -0.923880 -0.923880 22 | -1.000000 0.923880 0.923880 23 | -1.000000 0.000000 1.306563 24 | -1.000000 -0.923880 -0.923880 25 | -1.000000 -0.000000 -1.306563 26 | -0.000000 0.000000 1.306563 27 | -0.000000 -0.923880 0.923880 28 | 0.000000 -0.000000 -1.306563 29 | 0.000000 0.923880 -0.923880 30 | 1.000000 -0.923880 0.923880 31 | 1.000000 -1.306563 0.000000 32 | 1.000000 0.923880 -0.923880 33 | 1.000000 1.306563 -0.000000 34 | 2.000000 -1.306563 0.000000 35 | 2.000000 -0.923880 -0.923880 36 | 2.000000 1.306563 -0.000000 37 | 2.000000 0.923880 0.923880 38 | 3.000000 -0.923880 -0.923880 39 | 3.000000 -0.000000 -1.306563 40 | 3.000000 0.923880 0.923880 41 | 3.000000 0.000000 1.306563 42 | 4.000000 -0.000000 -1.306563 43 | 4.000000 0.923880 -0.923880 44 | 4.000000 0.000000 1.306563 45 | 4.000000 -0.923880 0.923880 46 | 3 4 0 1 47 | 3 4 1 5 48 | 3 5 1 2 49 | 3 5 2 6 50 | 3 6 2 3 51 | 3 6 3 7 52 | 3 7 3 4 53 | 3 3 0 4 54 | 3 8 4 5 55 | 3 8 5 9 56 | 3 9 5 6 57 | 3 9 6 10 58 | 3 10 6 7 59 | 3 10 7 11 60 | 3 11 7 8 61 | 3 7 4 8 62 | 3 12 8 9 63 | 3 12 9 13 64 | 3 13 9 10 65 | 3 13 10 14 66 | 3 14 10 11 67 | 3 14 11 15 68 | 3 15 11 12 69 | 3 11 8 12 70 | 3 16 12 13 71 | 3 16 13 17 72 | 3 17 13 14 73 | 3 17 14 18 74 | 3 18 14 15 75 | 3 18 15 19 76 | 3 19 15 16 77 | 3 15 12 16 78 | 3 20 16 17 79 | 3 20 17 21 80 | 3 21 17 18 81 | 3 21 18 22 82 | 3 22 18 19 83 | 3 22 19 23 84 | 3 23 19 20 85 | 3 19 16 20 86 | 3 24 20 21 87 | 3 24 21 25 88 | 3 25 21 22 89 | 3 25 22 26 90 | 3 26 22 23 91 | 3 26 23 27 92 | 3 27 23 24 93 | 3 23 20 24 94 | 3 28 24 25 95 | 3 28 25 29 96 | 3 29 25 26 97 | 3 29 26 30 98 | 3 30 26 27 99 | 3 30 27 31 100 | 3 31 27 28 101 | 3 27 24 28 102 | 3 32 28 29 103 | 3 32 29 33 104 | 3 33 29 30 105 | 3 33 30 34 106 | 3 34 30 31 107 | 3 34 31 35 108 | 3 35 31 32 109 | 3 31 28 32 110 | 4 3 2 1 0 111 | 4 32 33 34 35 112 | -------------------------------------------------------------------------------- /sample_inputs/3D/42_nested_cube.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 16 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 16 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.707000 0.707000 0.707000 11 | -0.707000 0.707000 0.707000 12 | -0.707000 -0.707000 0.707000 13 | 0.707000 -0.707000 0.707000 14 | 0.707000 -0.707000 -0.707000 15 | 0.707000 0.707000 -0.707000 16 | -0.707000 0.707000 -0.707000 17 | -0.707000 -0.707000 -0.707000 18 | 1.414000 1.414000 1.414000 19 | -1.414000 1.414000 1.414000 20 | -1.414000 -1.414000 1.414000 21 | 1.414000 -1.414000 1.414000 22 | 1.414000 -1.414000 -1.414000 23 | 1.414000 1.414000 -1.414000 24 | -1.414000 1.414000 -1.414000 25 | -1.414000 -1.414000 -1.414000 26 | 4 0 1 6 5 27 | 4 1 2 7 6 28 | 4 2 3 4 7 29 | 4 3 0 5 4 30 | 4 8 13 14 9 31 | 4 9 14 15 10 32 | 4 10 15 12 11 33 | 4 11 12 13 8 34 | 4 1 0 8 9 35 | 4 2 1 9 10 36 | 4 3 2 10 11 37 | 4 0 3 11 8 38 | 4 4 5 13 12 39 | 4 5 6 14 13 40 | 4 6 7 15 14 41 | 4 7 4 12 15 42 | -------------------------------------------------------------------------------- /sample_inputs/3D/43_nested_octahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 12 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 18 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.000000 0.000000 1.000000 11 | 0.000000 0.000000 -1.000000 12 | 0.000000 1.000000 0.000000 13 | 0.000000 -1.000000 0.000000 14 | 1.000000 0.000000 0.000000 15 | -1.000000 0.000000 0.000000 16 | 0.000000 0.000000 2.000000 17 | 0.000000 0.000000 -2.000000 18 | 0.000000 2.000000 0.000000 19 | 0.000000 -2.000000 0.000000 20 | 2.000000 0.000000 0.000000 21 | -2.000000 0.000000 0.000000 22 | 3 0 4 3 23 | 3 0 3 5 24 | 3 0 5 2 25 | 3 1 4 2 26 | 3 1 3 4 27 | 3 1 2 5 28 | 3 6 9 10 29 | 3 6 11 9 30 | 3 6 8 11 31 | 3 7 8 10 32 | 3 7 10 9 33 | 3 7 11 8 34 | 4 0 2 8 6 35 | 4 4 0 6 10 36 | 4 2 4 10 8 37 | 4 1 5 11 7 38 | 4 3 1 7 9 39 | 4 5 3 9 11 40 | -------------------------------------------------------------------------------- /sample_inputs/3D/44_torus.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment VCGLIB generated 4 | element vertex 36 5 | property float x 6 | property float y 7 | property float z 8 | element face 72 9 | property list uchar int vertex_indices 10 | end_header 11 | -37.6104 4.33013 -31.3467 12 | -40.1104 7.45058e-007 -31.3467 13 | -42.6104 1.11759e-006 -27.0165 14 | -31.3604 -6.49519 -27.0165 15 | -30.1104 0 -31.3467 16 | -27.6104 9.61481e-016 -27.0165 17 | -31.3604 6.49519 -27.0165 18 | -38.8604 6.49519 -27.0165 19 | -38.8604 -6.49519 -27.0165 20 | -22.6104 9.61481e-016 -27.0165 21 | -28.8604 10.8253 -27.0165 22 | -50.1104 2.23517e-006 -31.3467 23 | -41.3604 10.8253 -27.0165 24 | -42.6104 12.9904 -31.3467 25 | -47.6104 1.86265e-006 -27.0165 26 | -41.3604 -10.8253 -27.0165 27 | -28.8604 -10.8253 -27.0165 28 | -27.6104 12.9904 -31.3467 29 | -47.6104 1.86265e-006 -35.6768 30 | -27.6104 -12.9904 -31.3467 31 | -28.8604 -10.8253 -35.6768 32 | -42.6104 -12.9904 -31.3467 33 | -41.3604 -10.8253 -35.6768 34 | -22.6104 -9.61481e-016 -35.6768 35 | -28.8604 10.8253 -35.6768 36 | -20.1104 -1.65436e-022 -31.3467 37 | -41.3604 10.8253 -35.6768 38 | -42.6104 1.11759e-006 -35.6768 39 | -27.6104 -9.61481e-016 -35.6768 40 | -31.3604 6.49519 -35.6768 41 | -38.8604 6.49519 -35.6768 42 | -38.8604 -6.49519 -35.6768 43 | -32.6104 -4.33013 -31.3467 44 | -37.6104 -4.33013 -31.3467 45 | -31.3604 -6.49519 -35.6768 46 | -32.6104 4.33013 -31.3467 47 | 3 0 35 7 48 | 3 7 35 6 49 | 3 1 0 2 50 | 3 2 0 7 51 | 3 33 1 8 52 | 3 8 1 2 53 | 3 32 33 3 54 | 3 3 33 8 55 | 3 4 32 5 56 | 3 5 32 3 57 | 3 35 4 6 58 | 3 6 4 5 59 | 3 7 6 12 60 | 3 12 6 10 61 | 3 2 7 14 62 | 3 14 7 12 63 | 3 8 2 15 64 | 3 15 2 14 65 | 3 3 8 16 66 | 3 16 8 15 67 | 3 5 3 9 68 | 3 9 3 16 69 | 3 6 5 10 70 | 3 10 5 9 71 | 3 12 10 13 72 | 3 13 10 17 73 | 3 14 12 11 74 | 3 11 12 13 75 | 3 15 14 21 76 | 3 21 14 11 77 | 3 16 15 19 78 | 3 19 15 21 79 | 3 9 16 25 80 | 3 25 16 19 81 | 3 10 9 17 82 | 3 17 9 25 83 | 3 13 17 26 84 | 3 26 17 24 85 | 3 11 13 18 86 | 3 18 13 26 87 | 3 21 11 22 88 | 3 22 11 18 89 | 3 19 21 20 90 | 3 20 21 22 91 | 3 25 19 23 92 | 3 23 19 20 93 | 3 17 25 24 94 | 3 24 25 23 95 | 3 26 24 30 96 | 3 30 24 29 97 | 3 18 26 27 98 | 3 27 26 30 99 | 3 22 18 31 100 | 3 31 18 27 101 | 3 20 22 34 102 | 3 34 22 31 103 | 3 23 20 28 104 | 3 28 20 34 105 | 3 24 23 29 106 | 3 29 23 28 107 | 3 30 29 0 108 | 3 0 29 35 109 | 3 27 30 1 110 | 3 1 30 0 111 | 3 31 27 33 112 | 3 33 27 1 113 | 3 34 31 32 114 | 3 32 31 33 115 | 3 28 34 4 116 | 3 4 34 32 117 | 3 29 28 35 118 | 3 35 28 4 119 | -------------------------------------------------------------------------------- /sample_inputs/3D/45_double_torus.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 44 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 46 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 2.598076 0.500000 1.000000 11 | 1.732051 1.000000 1.000000 12 | 0.866025 0.500000 1.000000 13 | 0.866025 -0.500000 1.000000 14 | 1.732051 -1.000000 1.000000 15 | 2.598076 -0.500000 1.000000 16 | 2.598076 0.500000 -1.000000 17 | 1.732051 1.000000 -1.000000 18 | 0.866025 0.500000 -1.000000 19 | 0.866025 -0.500000 -1.000000 20 | 1.732051 -1.000000 -1.000000 21 | 2.598076 -0.500000 -1.000000 22 | 3.464102 1.000000 1.000000 23 | 1.732051 2.000000 1.000000 24 | 0.000000 1.000000 1.000000 25 | -0.000000 -1.000000 1.000000 26 | 1.732051 -2.000000 1.000000 27 | 3.464102 -1.000000 1.000000 28 | 3.464102 1.000000 -1.000000 29 | 1.732051 2.000000 -1.000000 30 | 0.000000 1.000000 -1.000000 31 | -0.000000 -1.000000 -1.000000 32 | 1.732051 -2.000000 -1.000000 33 | 3.464102 -1.000000 -1.000000 34 | -0.866025 1.000000 -0.500000 35 | -1.732051 1.000000 -1.000000 36 | -2.598076 1.000000 -0.500000 37 | -2.598076 1.000000 0.500000 38 | -1.732051 1.000000 1.000000 39 | -0.866025 1.000000 0.500000 40 | -0.866025 -1.000000 -0.500000 41 | -1.732051 -1.000000 -1.000000 42 | -2.598076 -1.000000 -0.500000 43 | -2.598076 -1.000000 0.500000 44 | -1.732051 -1.000000 1.000000 45 | -0.866025 -1.000000 0.500000 46 | -1.732051 1.000000 -2.000000 47 | -3.464102 1.000000 -1.000000 48 | -3.464102 1.000000 1.000000 49 | -1.732051 1.000000 2.000000 50 | -1.732051 -1.000000 -2.000000 51 | -3.464102 -1.000000 -1.000000 52 | -3.464102 -1.000000 1.000000 53 | -1.732051 -1.000000 2.000000 54 | 4 12 13 1 0 55 | 4 13 14 2 1 56 | 4 14 15 3 2 57 | 4 15 16 4 3 58 | 4 16 17 5 4 59 | 4 17 12 0 5 60 | 4 6 7 19 18 61 | 4 7 8 20 19 62 | 4 8 9 21 20 63 | 4 9 10 22 21 64 | 4 10 11 23 22 65 | 4 11 6 18 23 66 | 4 0 1 7 6 67 | 4 1 2 8 7 68 | 4 2 3 9 8 69 | 4 3 4 10 9 70 | 4 4 5 11 10 71 | 4 5 0 6 11 72 | 4 13 12 18 19 73 | 4 14 13 19 20 74 | 4 16 15 21 22 75 | 4 17 16 22 23 76 | 4 12 17 23 18 77 | 4 20 36 25 24 78 | 4 36 37 26 25 79 | 4 37 38 27 26 80 | 4 38 39 28 27 81 | 4 39 14 29 28 82 | 4 14 20 24 29 83 | 4 30 31 40 21 84 | 4 31 32 41 40 85 | 4 32 33 42 41 86 | 4 33 34 43 42 87 | 4 34 35 15 43 88 | 4 35 30 21 15 89 | 4 24 25 31 30 90 | 4 25 26 32 31 91 | 4 26 27 33 32 92 | 4 27 28 34 33 93 | 4 28 29 35 34 94 | 4 29 24 30 35 95 | 4 36 20 21 40 96 | 4 37 36 40 41 97 | 4 38 37 41 42 98 | 4 39 38 42 43 99 | 4 14 39 43 15 100 | -------------------------------------------------------------------------------- /sample_inputs/3D/46_asymmetric_tetrahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 4 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 4 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -12.6688 -6.0149 -4.5893 11 | 0.9504 0.8726 12.7094 12 | -1.0516 11.6757 -4.1371 13 | 12.7700 -6.5333 -3.9830 14 | 3 1 0 3 15 | 3 1 3 2 16 | 3 1 2 0 17 | 3 3 0 2 18 | -------------------------------------------------------------------------------- /sample_inputs/3D/47_pentagonal_pyramid.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 6 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 6 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -0.0000 4.5602 7.8984 11 | -0.0000 -16.2480 7.2745 12 | 16.8417 -5.6511 1.1564 13 | 10.4087 11.4950 -8.7429 14 | -10.4087 11.4950 -8.7429 15 | -16.8417 -5.6511 1.1564 16 | 3 1 2 0 17 | 3 2 3 0 18 | 3 3 4 0 19 | 3 4 5 0 20 | 3 5 1 0 21 | 5 5 4 3 2 1 22 | -------------------------------------------------------------------------------- /sample_inputs/3D/48_pentagonal_cupola.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 15 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 12 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -34.5771 -1.9286 -2.8642 11 | -28.3846 -16.3141 11.6474 12 | -27.5771 12.1755 -17.2846 13 | -17.0801 9.6363 1.1339 14 | -10.8876 -4.7492 15.6454 15 | -11.3649 -25.4863 20.7071 16 | -10.0584 20.6109 -26.1059 17 | 0.4386 18.0717 -7.6874 18 | 10.4582 -5.2046 15.7928 19 | 9.9809 -25.9416 20.8545 20 | 17.4582 8.8995 1.3723 21 | 11.2875 20.1555 -25.9585 22 | 27.4996 -17.5063 12.0332 23 | 28.3071 10.9834 -16.8988 24 | 34.4997 -3.4022 -2.3873 25 | 3 4 1 5 26 | 3 8 9 12 27 | 3 10 14 13 28 | 3 7 11 6 29 | 3 3 2 0 30 | 4 4 3 0 1 31 | 4 8 4 5 9 32 | 4 10 8 12 14 33 | 4 7 10 13 11 34 | 4 3 7 6 2 35 | 5 3 4 8 10 7 36 | 10 2 6 11 13 14 12 9 5 1 0 37 | -------------------------------------------------------------------------------- /sample_inputs/3D/49_hexagonal_prism.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 12 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 8 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 8.7706 -16.6176 6.0911 11 | 17.6080 -6.8893 -5.7156 12 | 8.8886 -3.0264 17.3783 13 | -8.8964 -16.5240 6.1630 14 | 17.7260 6.7020 5.5717 15 | 8.7784 2.9327 -17.4502 16 | -8.7784 -2.9327 17.4502 17 | -17.7260 -6.7020 -5.5717 18 | 8.8964 16.5240 -6.1630 19 | -8.8886 3.0264 -17.3783 20 | -17.6080 6.8893 5.7156 21 | -8.7706 16.6176 -6.0911 22 | 4 0 1 4 2 23 | 4 0 2 6 3 24 | 4 1 5 8 4 25 | 4 3 6 10 7 26 | 4 5 9 11 8 27 | 4 7 10 11 9 28 | 6 0 3 7 9 5 1 29 | 6 2 4 8 11 10 6 30 | -------------------------------------------------------------------------------- /sample_inputs/3D/50_pentagonal_antiprism.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 10 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 12 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 0.1048 -15.6392 12.5066 11 | 17.0749 -10.3929 1.2002 12 | 10.5905 2.0918 16.8664 13 | -10.4649 2.0202 16.9532 14 | -16.9934 -10.5087 1.3408 15 | 10.4649 -2.0202 -16.9532 16 | 16.9934 10.5087 -1.3408 17 | -17.0749 10.3929 -1.2002 18 | -10.5905 -2.0918 -16.8664 19 | -0.1048 15.6392 -12.5066 20 | 3 0 1 2 21 | 3 0 2 3 22 | 3 0 3 4 23 | 3 1 5 6 24 | 3 1 6 2 25 | 3 3 7 4 26 | 3 4 7 8 27 | 3 5 8 9 28 | 3 5 9 6 29 | 3 7 9 8 30 | 5 0 4 8 5 1 31 | 5 2 6 9 7 3 32 | -------------------------------------------------------------------------------- /sample_inputs/3D/51_chiral_object.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 9 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 14 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | -5.2191 -10.0688 15.1449 11 | 2.8954 -2.2308 -14.1070 12 | -1.1619 8.9921 4.5762 13 | -1.1619 -21.2917 -3.5383 14 | 13.9800 -7.1999 4.4380 15 | -16.3038 -5.0997 -3.4000 16 | -12.2465 13.9612 -13.9687 17 | 9.2951 18.9147 -12.2663 18 | 9.9228 4.0230 23.1212 19 | 3 0 4 8 20 | 3 0 8 2 21 | 3 8 4 2 22 | 3 0 3 4 23 | 3 0 5 3 24 | 3 0 2 5 25 | 3 1 2 4 26 | 3 1 4 3 27 | 3 1 3 5 28 | 3 1 5 6 29 | 3 2 6 5 30 | 3 2 7 6 31 | 3 2 1 7 32 | 3 1 6 7 33 | -------------------------------------------------------------------------------- /sample_inputs/3D/53_twisted_cube.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 9 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 14 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 25.6823 1.8528 -21.8656 11 | -20.6271 -17.3537 12.9307 12 | 2.0070 -5.4201 -3.6998 13 | 11.0129 15.7380 -3.7817 14 | 13.4188 -18.7887 23.5223 15 | -7.7382 -7.3125 -24.9387 16 | -13.1969 16.5526 -15.9213 17 | 6.9758 6.4635 23.0103 18 | -17.5346 8.2681 10.7438 19 | 3 8 1 7 20 | 3 7 1 4 21 | 3 1 2 4 22 | 3 2 0 4 23 | 3 5 0 2 24 | 3 1 5 2 25 | 3 7 3 8 26 | 3 3 6 8 27 | 3 0 3 4 28 | 3 4 3 7 29 | 3 6 5 8 30 | 3 8 5 1 31 | 3 6 3 0 32 | 3 5 6 0 33 | -------------------------------------------------------------------------------- /sample_inputs/3D/54_biscribed_propello_tetrahedron.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 16 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 16 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 11.9594 1.1015 23.8680 11 | 11.9594 -1.1015 -23.8680 12 | -11.9594 -1.1015 23.8680 13 | -11.9594 1.1015 -23.8680 14 | 23.8680 11.9594 1.1015 15 | 23.8680 -11.9594 -1.1015 16 | -23.8680 -11.9594 1.1015 17 | -23.8680 11.9594 -1.1015 18 | 1.1015 23.8680 11.9594 19 | 1.1015 -23.8680 -11.9594 20 | -1.1015 -23.8680 11.9594 21 | -1.1015 23.8680 -11.9594 22 | 15.4264 -15.4264 15.4264 23 | 15.4264 15.4264 -15.4264 24 | -15.4264 15.4264 15.4264 25 | -15.4264 -15.4264 -15.4264 26 | 4 12 0 2 10 27 | 4 12 10 9 5 28 | 4 12 5 4 0 29 | 4 13 1 3 11 30 | 4 13 11 8 4 31 | 4 13 4 5 1 32 | 4 14 2 0 8 33 | 4 14 8 11 7 34 | 4 14 7 6 2 35 | 4 15 3 1 9 36 | 4 15 9 10 6 37 | 4 15 6 7 3 38 | 3 0 4 8 39 | 3 1 5 9 40 | 3 2 6 10 41 | 3 3 7 11 42 | -------------------------------------------------------------------------------- /sample_inputs/3D/55_biscribed_propello_cube.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | element vertex 32 4 | property float32 x 5 | property float32 y 6 | property float32 z 7 | element face 30 8 | property list uint8 int32 vertex_indices 9 | end_header 10 | 14.4123 8.8309 32.9121 11 | 14.4123 -8.8309 -32.9121 12 | -14.4123 -8.8309 32.9121 13 | -14.4123 8.8309 -32.9121 14 | 32.9121 14.4123 8.8309 15 | 32.9121 -14.4123 -8.8309 16 | -32.9121 -14.4123 8.8309 17 | -32.9121 14.4123 -8.8309 18 | 8.8309 32.9121 14.4123 19 | 8.8309 -32.9121 -14.4123 20 | -8.8309 -32.9121 14.4123 21 | -8.8309 32.9121 -14.4123 22 | 8.8309 -14.4123 32.9121 23 | 8.8309 14.4123 -32.9121 24 | -8.8309 14.4123 32.9121 25 | -8.8309 -14.4123 -32.9121 26 | 32.9121 -8.8309 14.4123 27 | 32.9121 8.8309 -14.4123 28 | -32.9121 8.8309 14.4123 29 | -32.9121 -8.8309 -14.4123 30 | 14.4123 -32.9121 8.8309 31 | 14.4123 32.9121 -8.8309 32 | -14.4123 32.9121 8.8309 33 | -14.4123 -32.9121 -8.8309 34 | 21.3613 21.3613 21.3613 35 | 21.3613 21.3613 -21.3613 36 | 21.3613 -21.3613 21.3613 37 | 21.3613 -21.3613 -21.3613 38 | -21.3613 21.3613 21.3613 39 | -21.3613 21.3613 -21.3613 40 | -21.3613 -21.3613 21.3613 41 | -21.3613 -21.3613 -21.3613 42 | 4 2 12 0 14 43 | 4 3 13 1 15 44 | 4 4 16 5 17 45 | 4 7 19 6 18 46 | 4 8 21 11 22 47 | 4 9 20 10 23 48 | 4 24 0 16 4 49 | 4 24 4 21 8 50 | 4 24 8 14 0 51 | 4 25 13 11 21 52 | 4 25 21 4 17 53 | 4 25 17 1 13 54 | 4 26 12 10 20 55 | 4 26 20 5 16 56 | 4 26 16 0 12 57 | 4 27 1 17 5 58 | 4 27 5 20 9 59 | 4 27 9 15 1 60 | 4 28 14 8 22 61 | 4 28 22 7 18 62 | 4 28 18 2 14 63 | 4 29 3 19 7 64 | 4 29 7 22 11 65 | 4 29 11 13 3 66 | 4 30 2 18 6 67 | 4 30 6 23 10 68 | 4 30 10 12 2 69 | 4 31 15 9 23 70 | 4 31 23 6 19 71 | 4 31 19 3 15 72 | -------------------------------------------------------------------------------- /sign_mac.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | set -e 3 | # Usages: ./sign_mac.sh "Signing Certificate Identity" 4 | # the certificate identity is the signing cert's name in the Keychain Access app. 5 | # Be sure the cert's key is allowed access (e.g. 'Allow all applications to access this item') 6 | echo "Running path fixup script" 7 | python ./fix_app_qt_folder_names.py dist/Athena.app 8 | echo "Signing Athena.app with certificate" ${1} 9 | codesign -vvvv --deep -s "${1}" dist/Athena.app 10 | echo "Assessing signature of Athena.app" 11 | # Test that signing went okay. 12 | # deploy_mac.sh won't build a zip unless this script succeeds. 13 | spctl --assess -vv dist/Athena.app 14 | -------------------------------------------------------------------------------- /src/athena/__init__.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os, os.path 3 | import platform 4 | import tempfile 5 | from pathlib import Path 6 | 7 | # Set up Athena's global data 8 | __version__ = None 9 | 10 | # First look for a version.py, which is only installed by pyinstaller 11 | try: 12 | import athena_version 13 | __version__ = athena_version.version 14 | except ImportError: 15 | print("No version.py available") 16 | 17 | # If no version.py, then ask setuptools_scm to compute a version number from our tree 18 | if( __version__ is None ): 19 | try: 20 | from setuptools_scm import get_version 21 | __version__ = get_version() 22 | except: 23 | __version__ = "unknown" 24 | 25 | print('Athena version is', __version__) 26 | 27 | # Set ATHENA_DIR, the base project path, relative to which files and tools will be found, 28 | # and ATHENA_OUTPUT_HOME, the path where an ouput directory will be created 29 | if getattr(sys, 'frozen', False): 30 | # We're inside a PyInstaller bundle of some kind 31 | ATHENA_DIR = sys._MEIPASS 32 | ATHENA_SRC_DIR = ATHENA_DIR 33 | else: 34 | # Not bundled, __file__ is within src/athena 35 | ATHENA_SRC_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 36 | ATHENA_DIR = os.path.dirname(ATHENA_SRC_DIR) 37 | 38 | ATHENA_OUTPUT_HOME = tempfile.TemporaryDirectory(prefix='Athena') 39 | ATHENA_OUTPUT_DIR = Path(ATHENA_OUTPUT_HOME.name) 40 | 41 | def athena_cleanup(): 42 | ATHENA_OUTPUT_HOME.cleanup() 43 | print("Athena cleanup complete") 44 | 45 | print("Athena's output directory will be", ATHENA_OUTPUT_DIR) 46 | 47 | -------------------------------------------------------------------------------- /src/athena/bildparser.py: -------------------------------------------------------------------------------- 1 | from pathlib import Path 2 | from collections import namedtuple 3 | 4 | from athena import colorTable 5 | 6 | from PySide2.QtGui import QColor, QVector3D as vec3d 7 | from PySide2.Qt3DCore import Qt3DCore 8 | from PySide2.Qt3DExtras import Qt3DExtras 9 | 10 | # A parser module for the subset of the bild file format used by LCBB 11 | # sequence design tools 12 | 13 | Sphere = namedtuple( 'Sphere', 'color, x, y, z, r' ) 14 | Cylinder = namedtuple ( 'Cylinder', 'color, x1, y1, z1, x2, y2, z2, r' ) 15 | # There are no cones in the input file, but we include a cone type for parity with cylinders 16 | Cone = namedtuple('Cone', 'color, x1, y1, z1, x2, y2, z2, r' ) 17 | # We'll give defaults for r1, r2, and rho, which are optional in a file. 18 | # This isn't perfect because the default for r2 should be r1*4. Parser 19 | # code should watch for the case where r1 is given and r2 is not, and update 20 | # the r2 value appropriately. FIXME 21 | Arrow = namedtuple ( 'Arrow', 'color, x1, y1, z1, x2, y2, z2, r1, r2, rho', defaults=[0.1,0.4,0.75] ) 22 | 23 | class OutputDecorations: 24 | def __init__(self, scale_factor ): 25 | self.colors = dict() # maps normalized bild strings to QColors 26 | self.current_color = None 27 | self.spheres = list() 28 | self.cylinders = list() 29 | self.arrows = list() 30 | self.scale_factor = scale_factor 31 | 32 | def addColor( self, tokens ): 33 | color_key = ' '.join(tokens) 34 | if color_key not in self.colors: 35 | if color_key in colorTable.colors: 36 | self.colors[color_key] = QColor( *colorTable.colors[color_key] ) 37 | else: 38 | self.colors[color_key] = QColor( *(float(x)*255 for x in tokens) ) 39 | self.current_color = self.colors[color_key] 40 | 41 | def addSphere( self, tokens ): 42 | self.spheres.append( Sphere( self.current_color, *(float(x)*(self.scale_factor) for x in tokens) ) ) 43 | 44 | def addCylinder( self, tokens ): 45 | self.cylinders.append( Cylinder( self.current_color, *(float(x)*(self.scale_factor) for x in tokens) ) ) 46 | 47 | def addArrow( self, tokens ): 48 | self.arrows.append( Arrow( self.current_color, *(float(x)*(self.scale_factor) for x in tokens[:8]), float(tokens[8] ) ) ) 49 | 50 | def debugSummary( self ): 51 | pattern = 'parsed BILD: {0} unique colors, {1} spheres, {2} cylinders, {3} arrows' +\ 52 | '\n unknown keywords/counts: {4}' +\ 53 | '\n comment lines: {5}' 54 | return pattern.format( len(self.colors), len(self.spheres), len(self.cylinders), len(self.arrows), 55 | self.unknown_keyword_map, len(self.other_line_list) ) 56 | 57 | 58 | def cylindersFromArrows( self ): 59 | for arrow in self.arrows: 60 | xyz1 = vec3d( arrow.x1, arrow.y1, arrow.z1) 61 | axis = vec3d( arrow.x2, arrow.y2, arrow.z2 ) - xyz1 62 | axis *= arrow.rho 63 | xyz2 = xyz1 + axis 64 | yield Cylinder(arrow.color, xyz1.x(), xyz1.y(), xyz1.z(), xyz2.x(), xyz2.y(), xyz2.z(), arrow.r1 ) 65 | 66 | def conesFromArrows( self ): 67 | for arrow in self.arrows: 68 | xyz1 = vec3d( arrow.x1, arrow.y1, arrow.z1) 69 | end = vec3d( arrow.x2, arrow.y2, arrow.z2) 70 | axis = xyz1 - end 71 | axis *= 1.0 - arrow.rho 72 | base = end + axis 73 | yield Cone( arrow.color, base.x(), base.y(), base.z(), end.x(), end.y(), end.z(), arrow.r2 ) 74 | 75 | def allVertices( self ): 76 | for s in self.spheres: 77 | yield (s.x, s.y, s.z) 78 | for c in self.cylinders: 79 | yield (c.x1, c.y1, c.z1) 80 | yield (c.x2, c.y2, c.z2) 81 | for c in self.arrows: 82 | yield (c.x1, c.y1, c.z1) 83 | yield (c.x2, c.y2, c.z2) 84 | 85 | 86 | def parseBildFile( filename, scale_factor = 1.0 ): 87 | results = OutputDecorations(scale_factor) 88 | with open(filename,'r') as bild: 89 | unknown_keyword_map = dict() 90 | other_line_list = list() 91 | for line in bild: 92 | tokens = line.split() 93 | token0 = tokens[0] 94 | if( token0 == '.arrow' ): 95 | results.addArrow( tokens[1:] ) 96 | elif( token0 == '.color' ): 97 | results.addColor( tokens[1:] ) 98 | elif token0 == '.cylinder': 99 | results.addCylinder( tokens[1:] ) 100 | elif token0 == '.sphere': 101 | results.addSphere( tokens[1:] ) 102 | elif( tokens[0].startswith('.')): 103 | v = unknown_keyword_map.get(tokens[0],0) 104 | unknown_keyword_map[tokens[0]] = v + 1 105 | else: 106 | other_line_list.append(tokens) 107 | results.unknown_keyword_map = unknown_keyword_map 108 | results.other_line_list = other_line_list 109 | return results 110 | -------------------------------------------------------------------------------- /src/athena/colorTable.py: -------------------------------------------------------------------------------- 1 | # --- UCSF Chimera Copyright --- 2 | # Copyright (c) 2000 Regents of the University of California. 3 | # All rights reserved. This software provided pursuant to a 4 | # license agreement containing restrictions on its disclosure, 5 | # duplication and use. This notice must be embedded in or 6 | # attached to all copies, including partial copies, of the 7 | # software or any revisions or derivations thereof. 8 | # --- UCSF Chimera Copyright --- 9 | # 10 | # Permission has been given by the Chimera team to distribute 11 | # this file with Athena. 12 | # 13 | # $Id: colorTable.py 26655 2009-01-07 22:02:30Z pett $ 14 | 15 | colors = { 16 | "aquamarine": (127, 255, 212), 17 | "black": (0, 0, 0), 18 | "blue": (0, 0, 255), 19 | "brown": (165, 42, 42), 20 | "chartreuse": (127, 255, 0), 21 | "coral": (255, 127, 80), 22 | "cornflower blue": (100, 149, 237), 23 | "cyan": (0, 255, 255), 24 | "dark cyan": (0, 139, 139), 25 | "dark gray": (169, 169, 169), 26 | "dark grey": (169, 169, 169), 27 | "dark green": (0, 100, 0), 28 | "dark khaki": (189, 183, 107), 29 | "dark magenta": (139, 0, 139), 30 | "dark olive green": (85, 107, 47), 31 | "dark red": (139, 0, 0), 32 | "dark slate blue": (72, 61, 139), 33 | "dark slate gray": (47, 79, 79), 34 | "dark slate grey": (47, 79, 79), 35 | "deep pink": (255, 20, 147), 36 | "deep sky blue": (0, 191, 255), 37 | "dim gray": (105, 105, 105), 38 | "dim grey": (105, 105, 105), 39 | "dodger blue": (30, 144, 255), 40 | "firebrick": (178, 34, 34), 41 | "forest green": (34, 139, 34), 42 | "gold": (255, 215, 0), 43 | "goldenrod": (218, 165, 32), 44 | "gray": (190, 190, 190), 45 | "grey": (190, 190, 190), 46 | "green": (0, 255, 0), 47 | "hot pink": (255, 105, 180), 48 | "khaki": (240, 230, 140), 49 | "light blue": (173, 216, 230), 50 | "light gray": (211, 211, 211), 51 | "light grey": (211, 211, 211), 52 | "light green": (144, 238, 144), 53 | "light sea green": (32, 178, 170), 54 | "lime green": (50, 205, 50), 55 | "magenta": (255, 0, 255), 56 | "medium blue": (50, 50, 205), 57 | "medium purple": (147, 112, 219), 58 | "navy blue": (0, 0, 128), 59 | "olive drab": (107, 142, 35), 60 | "orange red": (255, 69, 0), 61 | "orange": (255, 127, 0), 62 | "orchid": (218, 112, 214), 63 | "pink": (255, 192, 203), 64 | "plum": (221, 160, 221), 65 | "purple": (160, 32, 240), 66 | "red": (255, 0, 0), 67 | "rosy brown": (188, 143, 143), 68 | "salmon": (250, 128, 114), 69 | "sandy brown": (244, 164, 96), 70 | "sea green": (46, 139, 87), 71 | "sienna": (160, 82, 45), 72 | "sky blue": (135, 206, 235), 73 | "slate gray": (112, 128, 144), 74 | "slate grey": (112, 128, 144), 75 | "spring green": (0, 255, 127), 76 | "steel blue": (70, 130, 180), 77 | "tan": (210, 180, 140), 78 | "turquoise": (64, 224, 208), 79 | "violet red": (208, 32, 144), 80 | "white": (255, 255, 255), 81 | "yellow": (255, 255, 0), 82 | } 83 | -------------------------------------------------------------------------------- /src/athena/logwindow.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from PySide2.QtUiTools import QUiLoader 4 | from PySide2.QtWidgets import QMainWindow, QApplication, QLabel, QPushButton, QStatusBar, QFileDialog, QWidget, QSizePolicy, QColorDialog, QStackedWidget, QTreeWidget, QTreeWidgetItem, QHeaderView, QDialog 5 | from PySide2.QtGui import QKeySequence, QPixmap, QIcon, QColor, QFont, QFontInfo 6 | from PySide2.QtCore import QFile, Qt, Signal 7 | 8 | from athena import mainwindow, ATHENA_DIR 9 | 10 | # Function to find some kind of monospace font in Qt 11 | # Thanks to the answer at https://stackoverflow.com/questions/18896933/qt-qfont-selection-of-a-monospace-font-doesnt-work 12 | 13 | def findMonospaceFont(): 14 | def isFixedPitch(font): 15 | return QFontInfo(font).fixedPitch() 16 | font = QFont('monospace') 17 | if isFixedPitch(font): return font 18 | font.setStyleHint(QFont.Monospace) 19 | if isFixedPitch(font): return font 20 | font.setStyleHint(QFont.TypeWriter) 21 | if isFixedPitch(font): return font 22 | font.setFamily("courier") 23 | if isFixedPitch(font): return font 24 | return font 25 | 26 | class LogWindow(QDialog): 27 | default_ui_path = os.path.join( ATHENA_DIR, 'ui', 'LogWindow.ui' ) 28 | def __init__( self, parent, ui_filepath=default_ui_path ): 29 | super().__init__(parent) 30 | mainwindow.UiLoader.populateUI( self, ui_filepath ) 31 | self.font = findMonospaceFont() 32 | self.textView.setFont(self.font) 33 | 34 | 35 | def appendText( self, text ): 36 | self.textView.appendPlainText( text ) 37 | self.textView.verticalScrollBar().setValue( self.textView.verticalScrollBar().maximum() ) 38 | 39 | class WriteWrapper: 40 | '''A file-like wrapper for the log window, useful to pass to an external 41 | tool that wants to write to a log file (i.e. pdbgen)''' 42 | def __init__(self, wrapped): 43 | self.wrapped = wrapped 44 | def write(self, string): 45 | stripped = string.strip() 46 | if(len(stripped) > 0): 47 | self.wrapped.appendText(stripped) 48 | def close(self): pass 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/earcut/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/src/earcut/__init__.py -------------------------------------------------------------------------------- /src/main.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | 3 | import sys 4 | from PySide2.QtCore import Qt, QObject, QEvent 5 | from PySide2.QtGui import QSurfaceFormat, QPaintEvent, QMouseEvent, QWindow, QCursor 6 | from PySide2.QtWidgets import QApplication 7 | from athena import athena_cleanup 8 | from athena.mainwindow import AthenaWindow 9 | 10 | # Workaround function borrowed from https://github.com/biolab/orange3/blob/master/Orange/canvas/__main__.py 11 | def fix_macos_nswindow_tabbing(): 12 | """ 13 | Disable automatic NSWindow tabbing on macOS Sierra and higher. 14 | See QTBUG-61707 15 | """ 16 | import platform 17 | if sys.platform != "darwin": 18 | return 19 | 20 | ver, _, _ = platform.mac_ver() 21 | ver = tuple(map(int, ver.split(".")[:2])) 22 | if ver < (10, 12): 23 | return 24 | 25 | import ctypes 26 | import ctypes.util 27 | 28 | c_char_p, c_void_p = ctypes.c_char_p, ctypes.c_void_p 29 | id = Sel = Class = c_void_p 30 | 31 | def annotate(func, restype, argtypes): 32 | func.restype = restype 33 | func.argtypes = argtypes 34 | return func 35 | try: 36 | libobjc = ctypes.cdll.LoadLibrary(ctypes.util.find_library("libobjc")) 37 | # Load AppKit.framework which contains NSWindow class 38 | # pylint: disable=unused-variable 39 | AppKit = ctypes.cdll.LoadLibrary(ctypes.util.find_library("AppKit")) 40 | objc_getClass = annotate( 41 | libobjc.objc_getClass, Class, [c_char_p]) 42 | objc_msgSend = annotate( 43 | libobjc.objc_msgSend, id, [id, Sel]) 44 | sel_registerName = annotate( 45 | libobjc.sel_registerName, Sel, [c_char_p]) 46 | class_getClassMethod = annotate( 47 | libobjc.class_getClassMethod, c_void_p, [Class, Sel]) 48 | except (OSError, AttributeError): 49 | return 50 | 51 | NSWindow = objc_getClass(b"NSWindow") 52 | if NSWindow is None: 53 | return 54 | setAllowsAutomaticWindowTabbing = sel_registerName( 55 | b'setAllowsAutomaticWindowTabbing:' 56 | ) 57 | # class_respondsToSelector does not work (for class methods) 58 | if class_getClassMethod(NSWindow, setAllowsAutomaticWindowTabbing): 59 | # [NSWindow setAllowsAutomaticWindowTabbing: NO] 60 | objc_msgSend( 61 | NSWindow, 62 | setAllowsAutomaticWindowTabbing, 63 | ctypes.c_bool(False), 64 | ) 65 | 66 | fix_macos_nswindow_tabbing() 67 | f = QSurfaceFormat() 68 | f.setDepthBufferSize(24) 69 | f.setSamples(4) 70 | QSurfaceFormat.setDefaultFormat(f) 71 | 72 | class DebugApp(QApplication): 73 | 74 | def notify( self, x, y ): 75 | if( x.__class__ == QWindow and y.__class__ == QMouseEvent ): 76 | x.event(y) 77 | return True 78 | if( y.__class__ == QMouseEvent ): 79 | print('App:', x, y) 80 | print(y.isAccepted(), int(y.buttons()), int(y.source())) 81 | return super().notify(x,y) 82 | 83 | class MacMouseReleaseFilter(QObject): 84 | ''' 85 | Ugly workaround for an elusive bug in Mac OSX, wherein mouse release 86 | events generated from touchpad taps are not properly dispatched. 87 | This occurs only on fairly recent mac laptops with a force touch 88 | trackpad and "Tap To Click" enabled. 89 | 90 | Since the lost mouse release events do get delivered to the containing QWindow 91 | object, this filter is installed on that object and manually dispatches 92 | the events down to the widget under the mouse cursor. 93 | 94 | This was bug #10 in the Athena github repository. I am uncertain how 95 | robust this fix will prove to be, but here's hoping it sticks. 96 | ''' 97 | 98 | def eventFilter(self, receiver, event): 99 | if( event.type() == QEvent.MouseButtonRelease ): 100 | curs = QCursor.pos() 101 | widget = QApplication.widgetAt(curs) 102 | local = widget.mapFromGlobal(curs) 103 | newEvent = QMouseEvent( event.type(), local, event.button(), event.buttons(), event.modifiers()) 104 | ret = widget.event(newEvent) 105 | return ret and newEvent.isAccepted() 106 | return False 107 | 108 | 109 | #app = DebugApp(sys.argv) 110 | app = QApplication(sys.argv) 111 | app.setAttribute(Qt.AA_SynthesizeMouseForUnhandledTouchEvents, False) 112 | app.setAttribute(Qt.AA_SynthesizeTouchForUnhandledMouseEvents, False) 113 | app.aboutToQuit.connect( athena_cleanup ) 114 | window = AthenaWindow( ) 115 | if sys.platform == "darwin": 116 | mousefilter = MacMouseReleaseFilter() 117 | app.topLevelWindows()[0].installEventFilter( mousefilter ) 118 | sys.exit(app.exec_()) 119 | -------------------------------------------------------------------------------- /src/pdbgen/README.txt: -------------------------------------------------------------------------------- 1 | PDBGen v1.5 Documentation 2 | 3 | Written by William P. Bricker 4 | at Massachusetts Institute of Technology 5 | last updated May 14, 2019 6 | 7 | Main function: pdbgen 8 | 9 | Inputs: filename --> name of structure file (omit .cndo) 10 | abtype --> type of DNA/RNA helical structure ('A' or 'B') 11 | note: 'A'-type structure not supported yet 12 | natype --> type of nucleic acid ('DNA' or 'RNA') 13 | note: 'RNA' structure not supported yet 14 | inputdir --> directory that includes input .cndo file (see filename 15 | above) 16 | outputdir --> directory for PDBGen output files 17 | 18 | Outputs: logfile --> writes to outputdir + filename + '-pdbgen.log' 19 | standard PDB file --> writes to outputdir + filename + '.pdb' 20 | multimodel PDB file --> writes to outputdir + filename + '-multimodel.pdb' 21 | segment PDB file --> writes to outputdir + filename + '-chseg.pdb' 22 | 23 | Reference average B-DNA Structure is loaded from the class BDNA(), and is based 24 | on the 3DNA parameter set. -------------------------------------------------------------------------------- /src/qml/imposter.qml: -------------------------------------------------------------------------------- 1 | import Qt3D.Core 2.0 2 | import Qt3D.Render 2.0 3 | import Qt3D.Input 2.0 4 | import Qt3D.Extras 2.0 5 | 6 | Material { 7 | id: impostermaterial 8 | effect: Effect { 9 | id: root 10 | 11 | parameters: [ 12 | ] 13 | 14 | techniques: [ 15 | Technique { 16 | graphicsApiFilter { 17 | api: GraphicsApiFilter.OpenGL 18 | profile: GraphicsApiFilter.CoreProfile 19 | majorVersion: 3 20 | minorVersion: 1 21 | } 22 | 23 | filterKeys: [ //FilterKey { name: "renderingStyle"; value: "forward" }, 24 | FilterKey { name: "pass"; value: "solid" } ] 25 | 26 | parameters: [] 27 | 28 | renderPasses: [ 29 | RenderPass { 30 | // populated with a shader within geomview.py, since qml cannot usefully work with 31 | // relative file paths for shader loading 32 | renderStates: [ CullFace{ mode: CullFace.NoCulling }, 33 | DepthTest{ depthFunction: DepthTest.LessOrEqual }, 34 | MultiSampleAntiAliasing{} ] 35 | } ] 36 | } 37 | ] 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/qml/meshmaterial.qml: -------------------------------------------------------------------------------- 1 | 2 | import Qt3D.Core 2.0 3 | import Qt3D.Render 2.0 4 | 5 | Material { 6 | id: wireframeMaterial 7 | effect: Effect { 8 | id: root 9 | 10 | parameters: [ 11 | Parameter { name: "ka"; value: Qt.vector3d( 0.1, 0.1, 0.1 ) }, 12 | Parameter { name: "kd"; value: Qt.vector3d( 0.7, 0.7, 0.7 ) }, 13 | Parameter { name: "ks"; value: Qt.vector3d( 0.05, 0.05, 0.05 ) }, 14 | Parameter { name: "shininess"; value: 150.0 } 15 | ] 16 | 17 | techniques: [ 18 | Technique { 19 | graphicsApiFilter { 20 | api: GraphicsApiFilter.OpenGL 21 | profile: GraphicsApiFilter.CoreProfile 22 | majorVersion: 3 23 | minorVersion: 1 24 | } 25 | 26 | filterKeys: [ //FilterKey { name: "renderingStyle"; value: "forward" }, 27 | FilterKey { name: "pass"; value: "transp" } ] 28 | 29 | parameters: [] 30 | 31 | // As ever, it's tricky to display the inside of a complex transparent mesh. We don't 32 | // have any way to depth-sort our triangles, so true back-to-front rendering is not easy 33 | // to implement here. Here's a decent potemkin version of that: render all the back faces 34 | // first, when the depth test disabled, then render the front faces in the usual way. 35 | // It's goofy-looking for certain models but looks good for most. 36 | renderPasses: [ 37 | RenderPass { 38 | renderStates:[ 39 | CullFace{ mode : CullFace.Front }, 40 | //DepthTest{ depthFunction: DepthTest.Always }, 41 | NoDepthMask {}, 42 | BlendEquationArguments{ 43 | sourceRgb: BlendEquationArguments.SourceAlpha 44 | destinationRgb: BlendEquationArguments.OneMinusSourceAlpha 45 | }, 46 | BlendEquation{ blendFunction: BlendEquation.Add} 47 | ] 48 | // populated with a shader within geomview.py, since qml cannot usefully work with 49 | // relative file paths for shader loading 50 | }, 51 | RenderPass { 52 | renderStates:[ 53 | CullFace{ mode : CullFace.Back }, 54 | DepthTest{ depthFunction: DepthTest.Less }, 55 | //NoDepthMask {}, 56 | BlendEquationArguments{ 57 | sourceRgb: BlendEquationArguments.SourceAlpha 58 | destinationRgb: BlendEquationArguments.OneMinusSourceAlpha 59 | }, 60 | BlendEquation{ blendFunction: BlendEquation.Add} 61 | ] 62 | // populated with a shader within geomview.py, since qml cannot usefully work with 63 | // relative file paths for shader loading 64 | } 65 | ] 66 | } 67 | ] 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/qml/overlay.qml: -------------------------------------------------------------------------------- 1 | import Qt3D.Core 2.0 2 | import Qt3D.Render 2.0 3 | import Qt3D.Input 2.0 4 | import Qt3D.Extras 2.0 5 | 6 | Material { 7 | id: overlaymaterial 8 | effect: Effect { 9 | id: root 10 | 11 | parameters: [ 12 | ] 13 | 14 | techniques: [ 15 | Technique { 16 | graphicsApiFilter { 17 | api: GraphicsApiFilter.OpenGL 18 | profile: GraphicsApiFilter.CoreProfile 19 | majorVersion: 3 20 | minorVersion: 1 21 | } 22 | 23 | filterKeys: [ //FilterKey { name: "renderingStyle"; value: "forward" }, 24 | FilterKey { name: "pass"; value: "overlay" } ] 25 | 26 | parameters: [] 27 | 28 | renderPasses: [ 29 | RenderPass { 30 | // populated with a shader within geomview.py, since qml cannot usefully work with 31 | // relative file paths for shader loading 32 | renderStates: [ CullFace{ mode: CullFace.NoCulling }, 33 | DepthTest{ depthFunction: DepthTest.Always }, 34 | MultiSampleAntiAliasing{} ] 35 | } ] 36 | } 37 | ] 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/shaders/cone_imposter.frag: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | // Adapted from cylinder shader, which was adapted from PyMOL 4 | 5 | in CylinderPoint { 6 | vec3 surface_point; 7 | vec3 axis; 8 | vec3 base; 9 | vec3 end_cyl; 10 | vec3 U; 11 | vec3 V; 12 | float H; 13 | float radius; 14 | float cap; 15 | float inv_sqr_height; 16 | vec4 color; 17 | } fs_in; 18 | 19 | 20 | out vec4 fragColor; 21 | 22 | uniform mat4 projectionMatrix; 23 | uniform float proj_orthographic; 24 | 25 | void main(void) 26 | { 27 | vec3 ray_target = fs_in.surface_point; 28 | vec3 ray_origin = vec3(0, 0, 0); 29 | vec3 ray_direction = normalize(-ray_target); 30 | 31 | if( proj_orthographic > 0.5 ){ 32 | ray_direction = vec3(0., 0, 1); 33 | ray_origin = fs_in.surface_point; 34 | } 35 | 36 | // refer to the helpful derivation at 37 | // http://www.illusioncatalyst.com/notes_files/mathematics/line_cone_intersection.php 38 | 39 | float len = length(fs_in.end_cyl - fs_in.base); 40 | float radius2 = fs_in.radius * fs_in.radius; 41 | float m = (radius2) / ( len * len ); 42 | 43 | vec3 v = ray_direction; 44 | vec3 w = ray_origin - fs_in.end_cyl; 45 | vec3 h = fs_in.axis; 46 | vec3 H = fs_in.end_cyl - fs_in.base; 47 | 48 | float vdoth = dot( v, h ); 49 | float vdoth2 = vdoth * vdoth; 50 | float wdoth = dot( w, h ); 51 | float wdoth2 = wdoth * wdoth; 52 | 53 | float a = dot( v, v ) - m * vdoth2 - vdoth2; 54 | float b = 2 * ( dot( v, w ) - m * vdoth * wdoth - vdoth*wdoth ); 55 | float c = dot( w, w ) - m * (wdoth2) - wdoth2; 56 | float d = b*b - 4 * a *c; 57 | 58 | vec4 color = fs_in.color; 59 | 60 | if (d < 0.0){ 61 | // outside of the cone 62 | discard; 63 | } 64 | 65 | float dist = (-b + sqrt(d)) / (2 * a); 66 | 67 | // point of intersection on cone surface 68 | vec3 new_point = ray_origin + dist * ray_direction; 69 | vec3 tmp_point = fs_in.end_cyl - new_point; 70 | vec3 tangent = -cross( tmp_point, fs_in.axis ); // tangent to cone 71 | vec3 normal = normalize( cross( tmp_point, tangent ) ); 72 | 73 | bool in_cone = true; 74 | float HH = dot( (new_point - fs_in.base) , h ); 75 | if( HH < 0 || HH > length(H) ) { in_cone = false; } 76 | 77 | // now test for intersection with the base cap 78 | bool in_base = false; 79 | vec3 thisaxis = -fs_in.axis; 80 | vec3 thisbase = fs_in.base; 81 | 82 | // ray-plane intersection 83 | float dNV = dot(thisaxis, ray_direction); 84 | if (dNV >= 0.0 ){ 85 | float cap_dist = dot( thisaxis, thisbase - ray_origin) / dNV; 86 | vec3 cap_point = ray_direction * cap_dist + ray_origin; 87 | if( dot(cap_point - thisbase, cap_point - thisbase) <= radius2 ){ 88 | if( cap_dist < dist || in_cone == false ){ 89 | new_point = cap_point; 90 | normal = thisaxis; 91 | in_base = true; 92 | } 93 | } 94 | } 95 | if( in_base == false && in_cone == false ){ 96 | discard; 97 | } 98 | 99 | vec2 clipZW = new_point.z * projectionMatrix[2].zw + 100 | projectionMatrix[3].zw; 101 | 102 | float depth = 0.5 + 0.5 * clipZW.x / clipZW.y; 103 | 104 | // front clipping 105 | if (depth <= 0.0) 106 | discard; 107 | 108 | gl_FragDepth = depth; 109 | fragColor = color * min(1, dot(ray_direction, normal)); 110 | 111 | } 112 | -------------------------------------------------------------------------------- /src/shaders/cone_imposter.geom: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | // Adapted from the cylinder shader, which was adapted from PyMOL 4 | 5 | layout( lines ) in; 6 | layout( triangle_strip, max_vertices = 14 ) out; 7 | //layout( points, max_vertices = 16 ) out; 8 | 9 | in EyeSpaceVertex { 10 | vec3 vertex; 11 | float radius; 12 | vec4 color; 13 | } gs_in[]; 14 | 15 | out CylinderPoint { 16 | vec3 surface_point; 17 | vec3 axis; 18 | vec3 base; 19 | vec3 end_cyl; 20 | vec3 U; 21 | vec3 V; 22 | float H; 23 | float radius; 24 | float cap; 25 | float inv_sqr_height; 26 | vec4 color; 27 | } gs_out; 28 | 29 | uniform mat4 projectionMatrix; 30 | uniform mat4 modelView; 31 | uniform mat4 viewportMatrix; 32 | uniform mat3 modelViewNormal; 33 | uniform mat4 mvp; 34 | 35 | // static unsigned char cyl_flags[] = { 0, 4, 6, 2, 1, 5, 7, 3 }; // right(4)/up(2)/out(1) 36 | const int box_vertices[] = int[]( 0, 4, 6, 2, 1, 5, 7, 3 ); 37 | const float box_tristrip_indices[] = float[]( 3, 7, 1, 5, 4, 7, 6, 3, 2, 1, 0, 6, 3, 5 ); 38 | //const float box_tristrip_indices[] = float[]( ); 39 | const float idx_right[] = float[]( 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1 ); 40 | const float idx_up[] = float[]( 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1 ); 41 | const float idx_out[] = float[]( 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0 ); 42 | 43 | 44 | void main(){ 45 | 46 | vec3 attr_vertex1 = gs_in[0].vertex; 47 | vec3 attr_vertex2 = gs_in[1].vertex; 48 | 49 | vec3 attr_axis = attr_vertex2 - attr_vertex1; 50 | 51 | float radius = gs_in[0].radius; 52 | //float radius = 1; 53 | gs_out.radius = radius; 54 | gs_out.color = gs_in[0].color; 55 | 56 | gs_out.cap = 1; 57 | float uniformglscale = 1; 58 | 59 | // calculate reciprocal of squared height 60 | gs_out.inv_sqr_height = length(attr_axis) / uniformglscale; 61 | gs_out.inv_sqr_height *= gs_out.inv_sqr_height; 62 | gs_out.inv_sqr_height = 1.0 / gs_out.inv_sqr_height; 63 | 64 | gl_Position = mvp * vec4( attr_vertex1, 1.); 65 | //EmitVertex(); 66 | gl_Position = mvp * vec4( attr_vertex2, 1.); 67 | //EmitVertex(); 68 | //EndPrimitive(); 69 | //return; 70 | 71 | // h is a normalized cylinder axis 72 | vec3 h = normalize(attr_axis); 73 | // axis is the cylinder axis in modelview coordinates 74 | gs_out.axis = normalize(modelViewNormal * h); 75 | // u, v, h is local system of coordinates 76 | vec3 u = cross(h, vec3(1.0, 0.0, 0.0)); 77 | if (dot(u,u) < 0.001) 78 | u = cross(h, vec3(0.0, 1.0, 0.0)); 79 | u = normalize(u); 80 | vec3 v = normalize(cross(u, h)); 81 | 82 | // transform to modelview coordinates 83 | gs_out.U = normalize(modelViewNormal * u); 84 | gs_out.V = normalize(modelViewNormal * v); 85 | gs_out.radius = length( modelViewNormal * (v * radius ) ); 86 | 87 | vec4 base4 = modelView * vec4(attr_vertex1, 1.0); 88 | gs_out.base = base4.xyz; 89 | vec4 end4 = modelView * vec4(attr_vertex2, 1.0); 90 | gs_out.end_cyl = end4.xyz; 91 | //vec4 rad4 = modelView * vec4(attr_vertex1 + (v*radius) , 1.0); 92 | //gs_out.radius = length( rad4.xyz ); 93 | 94 | // compute properties of each of the 12 vertices of imposter box as tristrip 95 | //for( int i = 11; i >= 0; --i ){ 96 | for( int i = 0; i < 14; ++i ){ 97 | 98 | vec4 vertex = vec4(attr_vertex1, 1.0); 99 | float packed_flags = box_tristrip_indices[i]; 100 | float out_v = idx_out[i]; 101 | float up_v = idx_up[i]; 102 | gs_out.H = 1.0 - up_v; 103 | float right_v = idx_right[i]; 104 | vertex.xyz += up_v * attr_axis; 105 | vertex.xyz += (2.0 * right_v - 1.0) * radius * u; 106 | vertex.xyz += (2.0 * out_v - 1.0) * radius * v; 107 | vertex.xyz += (2.0 * up_v - 1.0) * radius * h; 108 | 109 | vec4 tvertex = modelView * vertex; 110 | gs_out.surface_point = tvertex.xyz; 111 | 112 | gl_Position = projectionMatrix * modelView * vertex; 113 | 114 | // support uniform scaling 115 | //gs_out.radius /= uniformglscale; 116 | 117 | // clamp z on front clipping plane if impostor box would be clipped. 118 | // (we ultimatly want to clip on the calculated depth in the fragment 119 | // shader, not the depth of the box face) 120 | if (gl_Position.z / gl_Position.w < -1.0) { 121 | // upper bound of possible cylinder z extend 122 | float diff = abs(base4.z - end4.z) + radius * 3.5; 123 | 124 | // z-`diff`-offsetted vertex 125 | vec4 inset = modelView * vertex; 126 | inset.z -= diff; 127 | inset = projectionMatrix * inset; 128 | 129 | // if offsetted vertex is within front clipping plane, then clamp 130 | if (inset.z / inset.w > -1.0) { 131 | gl_Position.z = -gl_Position.w; 132 | } 133 | } 134 | EmitVertex(); 135 | } 136 | 137 | EndPrimitive(); 138 | 139 | } 140 | -------------------------------------------------------------------------------- /src/shaders/cone_imposter.vert: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | // Adapted from cylinder shader, which was adapted from PyMOL 4 | 5 | in vec3 vertexPosition; 6 | in float radius; 7 | in vec4 vertexColor; 8 | 9 | out EyeSpaceVertex { 10 | vec3 vertex; 11 | float radius; 12 | vec4 color; 13 | } vs_out; 14 | 15 | uniform mat4 modelView; 16 | uniform mat3 modelViewNormal; 17 | uniform mat4 mvp; 18 | 19 | void main() 20 | { 21 | 22 | vs_out.vertex = vertexPosition; 23 | vs_out.radius = radius; 24 | vs_out.color = vertexColor; 25 | gl_Position = modelView * vec4( vertexPosition, 1.0 ); 26 | } 27 | -------------------------------------------------------------------------------- /src/shaders/cylinder_imposter.frag: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | // Adapted from PyMOL 4 | 5 | uniform mat4 projectionMatrix; 6 | uniform float proj_orthographic; 7 | 8 | in CylinderPoint { 9 | vec3 surface_point; 10 | vec3 axis; 11 | vec3 base; 12 | vec3 end_cyl; 13 | vec3 U; 14 | vec3 V; 15 | float radius; 16 | vec4 color; 17 | } fs_in; 18 | 19 | 20 | out vec4 fragColor; 21 | 22 | void main(void) 23 | { 24 | vec3 ray_target = fs_in.surface_point; 25 | 26 | vec3 ray_origin; 27 | vec3 ray_direction; 28 | if( proj_orthographic >= 0.5f ){ 29 | // orthographic projection 30 | ray_origin = fs_in.surface_point; 31 | ray_direction = vec3(0., 0., 1.); 32 | } 33 | else{ 34 | // perspective projection 35 | ray_origin = vec3(0, 0, 0); 36 | ray_direction = normalize(-ray_target); 37 | } 38 | 39 | // basis is local system of coordinates for the cylinder 40 | mat3 basis = mat3(fs_in.U, fs_in.V, fs_in.axis); 41 | 42 | // vectors in cylinder xy-plane 43 | vec2 P = ((ray_target - fs_in.base) * basis).xy; 44 | vec2 D = (ray_direction * basis).xy; 45 | 46 | float radius2 = fs_in.radius*fs_in.radius; 47 | vec4 color = fs_in.color; 48 | 49 | // test if the ray is exactly tangent to the whole of the cylinder surface. 50 | // If this happens, everything we compute below will be garbage (because a2 will be 0), 51 | // and we need to jump straight into the cap test. 52 | // This was not in the original PyMol code, did they never have axis-aligned 53 | // cylinders in orthographic camera mode? 54 | bool bogus_tangent_ray = all( equal( D, vec2(0, 0) ) ); 55 | vec3 new_point; 56 | vec3 normal; 57 | 58 | if( !bogus_tangent_ray ){ 59 | // calculate distance to the cylinder from ray origin 60 | float a0 = P.x*P.x + P.y*P.y - radius2; 61 | float a1 = P.x*D.x + P.y*D.y; 62 | float a2 = D.x*D.x + D.y*D.y; 63 | // calculate a dicriminant of the above quadratic equation 64 | float d = a1*a1 - a0*a2; 65 | if (d < 0.0){ 66 | // outside of the cylinder 67 | discard; 68 | } 69 | 70 | float dist = (-a1 + sqrt(d))/a2; 71 | 72 | // point of intersection on cylinder surface 73 | new_point = ray_target + dist * ray_direction; 74 | 75 | vec3 tmp_point = new_point - fs_in.base; 76 | normal = normalize(tmp_point - fs_in.axis * dot(tmp_point, fs_in.axis)); 77 | } 78 | else{ 79 | new_point = ray_origin; 80 | } 81 | 82 | bool cap_test_base = 0.0 > dot((new_point - fs_in.base), fs_in.axis); 83 | bool cap_test_end = 0.0 < dot((new_point - fs_in.end_cyl), fs_in.axis); 84 | 85 | if (cap_test_base || cap_test_end || bogus_tangent_ray ){ 86 | vec3 thisaxis = -fs_in.axis; 87 | vec3 thisbase = fs_in.base; 88 | 89 | if (cap_test_end) { 90 | thisaxis = fs_in.axis; 91 | thisbase = fs_in.end_cyl; 92 | } 93 | 94 | // ray-plane intersection 95 | float dNV = dot(thisaxis, ray_direction); 96 | if (dNV <= 0.0) 97 | discard; 98 | 99 | float near = dot(thisaxis, thisbase - ray_origin) / dNV; 100 | new_point = ray_direction * near + ray_origin; 101 | // within the cap radius? 102 | if (dot(new_point - thisbase, new_point - thisbase) > radius2) 103 | discard; 104 | 105 | normal = thisaxis; 106 | } 107 | 108 | vec2 clipZW = new_point.z * projectionMatrix[2].zw + 109 | projectionMatrix[3].zw; 110 | 111 | float depth = 0.5 + 0.5 * clipZW.x / clipZW.y; 112 | 113 | // front clipping 114 | if (depth <= 0.0) 115 | discard; 116 | 117 | gl_FragDepth = depth; 118 | fragColor = fs_in.color * min( 1, dot( ray_direction, normal ) ); 119 | 120 | } 121 | -------------------------------------------------------------------------------- /src/shaders/cylinder_imposter.geom: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | // Adapted from PyMOL 4 | 5 | // Imposter shader converts line segment + radius information, specifying a cylinder, 6 | // into the vertices of an oriented bounding box around the cylinder. The fragment 7 | // shader goes on to draw a ray-traced cylinder onto that box. 8 | layout( lines ) in; 9 | layout( triangle_strip, max_vertices = 14 ) out; 10 | 11 | in EyeSpaceVertex { 12 | vec3 vertex; 13 | float radius; 14 | vec4 color; 15 | } gs_in[]; 16 | 17 | out CylinderPoint { 18 | vec3 surface_point; 19 | vec3 axis; 20 | vec3 base; 21 | vec3 end_cyl; 22 | vec3 U; 23 | vec3 V; 24 | float radius; 25 | vec4 color; 26 | } gs_out; 27 | 28 | uniform mat4 projectionMatrix; 29 | uniform mat4 modelView; 30 | uniform mat4 viewportMatrix; 31 | uniform mat3 modelViewNormal; 32 | uniform mat4 mvp; 33 | 34 | // 14 tristrip vertices that visit the 8 corners of the output OBB 35 | const float idx_right[] = float[]( 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1 ); 36 | const float idx_up[] = float[]( 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1 ); 37 | const float idx_out[] = float[]( 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0 ); 38 | 39 | void main(){ 40 | 41 | vec3 attr_vertex1 = gs_in[0].vertex; 42 | vec3 attr_vertex2 = gs_in[1].vertex; 43 | 44 | vec3 attr_axis = attr_vertex2 - attr_vertex1; 45 | 46 | float radius = gs_in[0].radius; 47 | //float radius = 1; 48 | gs_out.radius = radius; 49 | gs_out.color = gs_in[0].color; 50 | 51 | // h is a normalized cylinder axis 52 | vec3 h = normalize(attr_axis); 53 | // axis is the cylinder axis in modelview coordinates 54 | gs_out.axis = normalize(modelViewNormal * h); 55 | // u, v, h is local system of coordinates 56 | vec3 u = cross(h, vec3(0.0, 1.0, 0.0)); 57 | if (dot(u,u) < 0.001) 58 | u = cross(h, vec3(1.0, 0.0, 0.0)); 59 | u = normalize(u); 60 | vec3 v = normalize(cross(u, h)); 61 | 62 | // transform to modelview coordinates 63 | gs_out.U = normalize(modelViewNormal * u); 64 | gs_out.V = normalize(modelViewNormal * v); 65 | 66 | vec4 base4 = modelView * vec4(attr_vertex1, 1.0); 67 | gs_out.base = base4.xyz; 68 | vec4 end4 = modelView * vec4(attr_vertex2, 1.0); 69 | gs_out.end_cyl = end4.xyz; 70 | 71 | // compute properties of each of the 14 vertices of imposter box as tristrip 72 | //for( int i = 11; i >= 0; --i ){ 73 | for( int i = 0; i < 14; ++i ){ 74 | 75 | vec4 vertex = vec4(attr_vertex1, 1.0); 76 | float out_v = idx_out[i]; 77 | float up_v = idx_up[i]; 78 | float right_v = idx_right[i]; 79 | vertex.xyz += up_v * attr_axis; 80 | vertex.xyz += (2.0 * right_v - 1.0) * radius * u; 81 | vertex.xyz += (2.0 * out_v - 1.0) * radius * v; 82 | vertex.xyz += (2.0 * up_v - 1.0) * radius * h; 83 | 84 | vec4 tvertex = modelView * vertex; 85 | gs_out.surface_point = tvertex.xyz; 86 | 87 | gl_Position = projectionMatrix * modelView * vertex; 88 | 89 | // clamp z on front clipping plane if impostor box would be clipped. 90 | // (we ultimatly want to clip on the calculated depth in the fragment 91 | // shader, not the depth of the box face) 92 | if (gl_Position.z / gl_Position.w < -1.0) { 93 | // upper bound of possible cylinder z extend 94 | float diff = abs(base4.z - end4.z) + radius * 3.5; 95 | 96 | // z-`diff`-offsetted vertex 97 | vec4 inset = modelView * vertex; 98 | inset.z -= diff; 99 | inset = projectionMatrix * inset; 100 | 101 | // if offsetted vertex is within front clipping plane, then clamp 102 | if (inset.z / inset.w > -1.0) { 103 | gl_Position.z = -gl_Position.w; 104 | } 105 | } 106 | EmitVertex(); 107 | } 108 | 109 | EndPrimitive(); 110 | 111 | } 112 | -------------------------------------------------------------------------------- /src/shaders/cylinder_imposter.vert: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | // Adapted from PyMOL 4 | 5 | in vec3 vertexPosition; 6 | in float radius; 7 | in vec4 vertexColor; 8 | 9 | out EyeSpaceVertex { 10 | vec3 vertex; 11 | float radius; 12 | vec4 color; 13 | } vs_out; 14 | 15 | uniform mat4 modelView; 16 | uniform mat3 modelViewNormal; 17 | uniform mat4 mvp; 18 | 19 | void main() 20 | { 21 | 22 | vs_out.vertex = vertexPosition; 23 | vs_out.radius = radius; 24 | vs_out.color = vertexColor; 25 | gl_Position = modelView * vec4( vertexPosition, 1.0 ); 26 | } 27 | -------------------------------------------------------------------------------- /src/shaders/flat_wireframe.frag: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | // Adapted from Qt outline shader example 4 | 5 | uniform struct LightInfo { 6 | vec4 position; 7 | vec3 intensity; 8 | } light; 9 | 10 | uniform struct LineInfo { 11 | float width; 12 | vec4 color; 13 | } line; 14 | 15 | uniform vec3 flat_color; 16 | uniform float face_enable; 17 | uniform float wire_enable; 18 | uniform float dpi; 19 | 20 | in WireframeVertex { 21 | vec3 position; 22 | flat vec3 normal; 23 | flat vec2 segments[9]; 24 | } fs_in; 25 | 26 | out vec4 fragColor; 27 | 28 | uniform mat4 viewportMatrix; 29 | uniform mat4 athena_viewport; 30 | 31 | vec2 transformToViewport( const in vec4 p ) 32 | { 33 | return vec2( athena_viewport * ( p / p.w ) ); 34 | } 35 | 36 | float cross2( const in vec2 a, const in vec2 b ) 37 | { 38 | return a.x * b.y - b.x * a.y; 39 | } 40 | 41 | float distance_to_line_segment( const in vec2 P, const in vec2 A, const in vec2 B, float d ){ 42 | vec2 AP = P - A; 43 | vec2 AB = B - A; 44 | vec2 dist = AP - AB * clamp (dot(AP,AB)/dot(AB,AB), 0.0, 1.0); 45 | return min( d, length(dist) ); 46 | } 47 | 48 | vec4 shadeLine( const in vec4 color, const in float linewidth ) 49 | { 50 | // Find the smallest distance between the fragment and a triangle edge 51 | float d = 10000; 52 | 53 | vec2 point = gl_FragCoord.xy; // transformToViewport( gl_FragCoord ); 54 | 55 | d = distance_to_line_segment( point, fs_in.segments[0], fs_in.segments[1], d); 56 | d = distance_to_line_segment( point, fs_in.segments[1], fs_in.segments[2], d); 57 | 58 | d = distance_to_line_segment( point, fs_in.segments[3], fs_in.segments[4], d); 59 | d = distance_to_line_segment( point, fs_in.segments[4], fs_in.segments[5], d); 60 | 61 | d = distance_to_line_segment( point, fs_in.segments[6], fs_in.segments[7], d); 62 | d = distance_to_line_segment( point, fs_in.segments[7], fs_in.segments[8], d); 63 | 64 | // Blend between line color and phong color 65 | float mixVal; 66 | if ( d < linewidth - 1.0 ) 67 | { 68 | mixVal = 1.0; 69 | } 70 | else if ( d > linewidth + 1.0 ) 71 | { 72 | mixVal = 0.0; 73 | } 74 | else 75 | { 76 | float x = d - ( linewidth - 1.0 ); 77 | mixVal = exp2( -2.0 * ( x * x ) ); 78 | } 79 | 80 | return mix( color, line.color, mixVal ); 81 | } 82 | 83 | void main() 84 | { 85 | vec4 color = vec4( line.color.xyz, 0.0 ); 86 | float effective_line_width = line.width * (dpi / 100); 87 | if( face_enable > 0.0 ){ 88 | color = vec4( flat_color, 1.0 ); 89 | } 90 | if( wire_enable > 0.0 ){ 91 | fragColor = shadeLine( color, effective_line_width ); 92 | } 93 | else{ 94 | fragColor = color; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /src/shaders/gooch_wireframe.frag: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | // Adapted from Qt outline shader example 4 | 5 | uniform struct LightInfo { 6 | vec4 position; 7 | vec3 intensity; 8 | } light; 9 | 10 | uniform struct LineInfo { 11 | float width; 12 | vec4 color; 13 | } line; 14 | 15 | uniform vec3 ka; // Ambient reflectivity 16 | uniform vec3 kd; // Diffuse reflectivity 17 | uniform vec3 ks; // Specular reflectivity 18 | uniform float shininess; // Specular shininess factor 19 | uniform vec3 cool_color; 20 | uniform vec3 warm_color; 21 | uniform float alpha; 22 | uniform float dpi; 23 | uniform float face_enable; 24 | uniform float wire_enable; 25 | 26 | //const vec3 kblue = vec3 ( 0, .1, .8 ); 27 | //const vec3 kyellow = vec3( .7, .7, 0 ); 28 | const float gooch_beta = .35; 29 | const float gooch_alpha = .2; 30 | uniform mat4 viewportMatrix; 31 | uniform mat4 athena_viewport; 32 | 33 | in WireframeVertex { 34 | vec3 position; 35 | flat vec3 normal; 36 | flat vec2 segments[9]; 37 | } fs_in; 38 | 39 | out vec4 fragColor; 40 | 41 | vec2 transformToViewport( const in vec4 p ) 42 | { 43 | return vec2( viewportMatrix * ( p / p.w ) ); 44 | } 45 | 46 | float cross2( const in vec2 a, const in vec2 b ) 47 | { 48 | return a.x * b.y - b.x * a.y; 49 | } 50 | 51 | float distance_to_line_segment( const in vec2 P, const in vec2 A, const in vec2 B, float d ){ 52 | vec2 AP = P - A; 53 | vec2 AB = B - A; 54 | vec2 dist = AP - AB * clamp (dot(AP,AB)/dot(AB,AB), 0.0, 1.0); 55 | return min( d, length(dist) ); 56 | } 57 | 58 | vec3 goochModel( const in vec3 pos, const in vec3 n ) 59 | { 60 | // Based upon the original Gooch lighting model paper at: 61 | // http://www.cs.northwestern.edu/~ago820/SIG98/abstract.html 62 | 63 | // Calculate the vector from the fragment to the eye position 64 | // (origin since this is in "eye" or "camera" space) 65 | vec3 v = normalize( -pos ); 66 | // Calculate the vector from the light to the fragment 67 | vec3 s = normalize( vec3( light.position ) - pos ); 68 | 69 | // Calculate kcool and kwarm from equation (3) 70 | vec3 kcool = clamp(cool_color + gooch_alpha * kd, 0.0, 1.0); 71 | vec3 kwarm = clamp(warm_color + gooch_beta * kd, 0.0, 1.0); 72 | 73 | // Calculate the cos theta factor mapped onto the range [0,1] 74 | float sDotNFactor = ( 1.0 + dot( s, n ) ) / 2.0; 75 | 76 | // Calculate the tone by blending the kcool and kwarm contributions 77 | // as per equation (2) 78 | vec3 intensity = mix( kcool, kwarm, sDotNFactor ); 79 | return intensity; 80 | 81 | 82 | // Reflect the light beam using the normal at this fragment 83 | vec3 r = reflect( -s, n ); 84 | 85 | // Calculate the specular component 86 | float specular = 0.0; 87 | if ( dot( s, n ) > 0.0 ) 88 | specular = pow( max( dot( r, v ), 0.0 ), shininess ); 89 | 90 | // Sum the blended tone and specular highlight 91 | return intensity + ks * specular; 92 | } 93 | 94 | 95 | vec4 shadeLine( const in vec4 color, const in float linewidth ) 96 | { 97 | // Find the smallest distance between the fragment and a triangle edge 98 | float d = 10000; 99 | 100 | vec2 point = gl_FragCoord.xy; // transformToViewport( gl_FragCoord ); 101 | 102 | d = distance_to_line_segment( point, fs_in.segments[0], fs_in.segments[1], d); 103 | d = distance_to_line_segment( point, fs_in.segments[1], fs_in.segments[2], d); 104 | 105 | d = distance_to_line_segment( point, fs_in.segments[3], fs_in.segments[4], d); 106 | d = distance_to_line_segment( point, fs_in.segments[4], fs_in.segments[5], d); 107 | 108 | d = distance_to_line_segment( point, fs_in.segments[6], fs_in.segments[7], d); 109 | d = distance_to_line_segment( point, fs_in.segments[7], fs_in.segments[8], d); 110 | 111 | // Blend between line color and phong color 112 | float mixVal; 113 | if ( d < linewidth - 1.0 ) 114 | { 115 | mixVal = 1.0; 116 | } 117 | else if ( d > linewidth + 1.0 ) 118 | { 119 | mixVal = 0.0; 120 | } 121 | else 122 | { 123 | float x = d - ( linewidth - 1.0 ); 124 | mixVal = exp2( -2.0 * ( x * x ) ); 125 | } 126 | 127 | return mix( color, line.color, mixVal ); 128 | } 129 | 130 | void main() 131 | { 132 | // Calculate the color from the phong model 133 | 134 | float effective_line_width = line.width * (dpi / 100); 135 | vec4 color = vec4( line.color.xyz, 0.0 ); 136 | if( face_enable > 0.0 ){ 137 | float effective_alpha = min( alpha, face_enable ); 138 | color = vec4( goochModel( fs_in.position, normalize( fs_in.normal ) ), effective_alpha ); 139 | } 140 | if( wire_enable > 0.0 ){ 141 | fragColor = shadeLine( color, effective_line_width ); 142 | } 143 | else{ 144 | fragColor = color; 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /src/shaders/overlay.frag: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | in EyeSpaceVertex{ 4 | vec3 position; 5 | vec4 color; 6 | } fs_in; 7 | 8 | out vec4 fragColor; 9 | 10 | 11 | void main() 12 | { 13 | fragColor = fs_in.color; 14 | } 15 | -------------------------------------------------------------------------------- /src/shaders/overlay.vert: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | in vec3 vertexPosition; 4 | in vec4 vertexColor; 5 | 6 | out EyeSpaceVertex { 7 | vec3 position; 8 | vec4 color; 9 | } vs_out; 10 | 11 | uniform mat4 modelView; 12 | uniform mat3 modelViewNormal; 13 | uniform mat4 mvp; 14 | 15 | void main() 16 | { 17 | //vs_out.normal = normalize( modelViewNormal * vertexNormal ); 18 | vs_out.position = vec3( modelView * vec4( vertexPosition, 1.0 ) ); 19 | vs_out.color = vertexColor; 20 | gl_Position = mvp * vec4( vertexPosition, 1.0 ); 21 | } 22 | -------------------------------------------------------------------------------- /src/shaders/sphere_imposter.frag: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | // Adapted from PyMOL 4 | 5 | in SphereVertex { 6 | vec3 sphere_center; 7 | vec3 point; 8 | float radius2; 9 | vec4 color; 10 | } fs_in; 11 | 12 | out vec4 fragColor; 13 | 14 | uniform mat4 projectionMatrix; 15 | uniform float proj_orthographic; 16 | 17 | void main() 18 | { 19 | vec3 ray_origin = vec3(0, 0, 0); 20 | vec3 ray_direction = normalize( fs_in.point ); 21 | vec3 sphere_direction = fs_in.sphere_center; 22 | 23 | if( proj_orthographic > 0.5 ){ 24 | ray_origin = fs_in.point; 25 | ray_direction = vec3(0., 0., -1.); 26 | sphere_direction = ray_origin - fs_in.sphere_center; 27 | } 28 | 29 | // Calculate sphere-ray intersection 30 | float b = dot(sphere_direction, ray_direction); 31 | 32 | float position = b * b + fs_in.radius2 - dot(sphere_direction, sphere_direction); 33 | 34 | // Check if the ray missed the sphere 35 | if (position < 0.0) 36 | discard; 37 | 38 | // Calculate nearest point of intersection 39 | float nearest = b - sqrt(position); 40 | 41 | // Calculate intersection point on the sphere surface. The ray 42 | // origin is at the quad (center point), so we need to project 43 | // back towards the user to get the front face. 44 | vec3 ipoint = nearest * ray_direction + ray_origin; 45 | 46 | // Calculate normal at the intersection point 47 | vec3 normal = normalize(ipoint - fs_in.sphere_center); 48 | 49 | // Calculate depth in clipping space 50 | vec2 clipZW = ipoint.z * projectionMatrix[2].zw + 51 | projectionMatrix[3].zw; 52 | 53 | float depth = 0.5 + 0.5 * clipZW.x / clipZW.y; 54 | 55 | // this is a workaround necessary for Mac 56 | // otherwise the modified fragment won't clip properly 57 | 58 | /* 59 | float isDiscarded = step(.5, step(depth, 0.) + step(1.-depth, 0.)); 60 | if (isDiscarded > 0.0) 61 | discard; 62 | */ 63 | if (depth <= 0.0 || depth >= 1.0) 64 | discard; 65 | 66 | gl_FragDepth = depth; 67 | 68 | fragColor = fs_in.color * min( 1, dot( -ray_direction, normal ) ); 69 | 70 | } 71 | -------------------------------------------------------------------------------- /src/shaders/sphere_imposter.geom: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | layout( points ) in; 4 | layout( triangle_strip, max_vertices = 4 ) out; 5 | 6 | 7 | in EyeSpaceVertex { 8 | //vec4 sphere_center; 9 | float radius; 10 | float radius2; 11 | vec4 color; 12 | } gs_in[]; 13 | 14 | out SphereVertex { 15 | vec3 sphere_center; 16 | vec3 point; 17 | float radius2; 18 | vec4 color; 19 | } gs_out; 20 | 21 | uniform mat4 projectionMatrix; 22 | uniform mat4 viewportMatrix; 23 | uniform mat3 modelViewNormal; 24 | 25 | /* 26 | * horizontial and vertical adjustment of outer tangent hitting the 27 | * impostor quad, in model view space. 28 | */ 29 | vec2 outer_tangent_adjustment(vec3 center, float radius_sq) { 30 | vec2 xy_dist = vec2(length(center.xz), length(center.yz)); 31 | 32 | // without clamping, this caused flickering (divide-by-zero) 33 | vec2 cos_a = clamp(center.z / xy_dist, -1., 1.); 34 | vec2 cos_b = xy_dist / sqrt(radius_sq + (xy_dist * xy_dist)); 35 | 36 | // numerically more stable version of: 37 | // vec2 tan_ab_sq = pow(tan(acos(cos_b) + acos(cos_a)), 2); 38 | vec2 cos_ab = (cos_a * cos_b + sqrt( 39 | (1. - cos_a * cos_a) * 40 | (1. - cos_b * cos_b))); 41 | vec2 cos_ab_sq = cos_ab * cos_ab; 42 | vec2 tan_ab_sq = (1. - cos_ab_sq) / cos_ab_sq; 43 | 44 | vec2 adjustment = sqrt(tan_ab_sq + 1.); 45 | 46 | // max out (empirical) to avoid exploding (can happen for spheres outside of the viewport) 47 | return min(adjustment, 10.); 48 | } 49 | 50 | void main() 51 | { 52 | 53 | vec4 tmppos = gl_in[0].gl_Position; 54 | gs_out.sphere_center = tmppos.xyz / tmppos.w; 55 | gs_out.radius2 = gs_in[0].radius2; 56 | gs_out.color = gs_in[0].color; 57 | float radius = gs_in[0].radius; 58 | 59 | vec2 ot_adjust = outer_tangent_adjustment( tmppos.xyz, gs_in[0].radius2 ); 60 | 61 | // corner -1, -1 62 | vec2 corner_offset = ot_adjust * vec2(-radius, -radius); 63 | vec4 eye_space_pos = tmppos; 64 | eye_space_pos.xy += corner_offset; 65 | gs_out.point = eye_space_pos.xyz / eye_space_pos.w; 66 | gl_Position = projectionMatrix * eye_space_pos; 67 | EmitVertex(); 68 | 69 | // corner 1, -1 70 | corner_offset = ot_adjust * vec2(radius, -radius); 71 | eye_space_pos = tmppos; 72 | eye_space_pos.xy += corner_offset; 73 | gs_out.point = eye_space_pos.xyz / eye_space_pos.w; 74 | gl_Position = projectionMatrix * eye_space_pos; 75 | EmitVertex(); 76 | 77 | // corner -1, 1 78 | corner_offset = ot_adjust * vec2(-radius, radius); 79 | eye_space_pos = tmppos; 80 | eye_space_pos.xy += corner_offset; 81 | gs_out.point = eye_space_pos.xyz / eye_space_pos.w; 82 | gl_Position = projectionMatrix * eye_space_pos; 83 | EmitVertex(); 84 | 85 | // corner 1, 1 86 | corner_offset = ot_adjust * vec2(radius, radius); 87 | eye_space_pos = tmppos; 88 | eye_space_pos.xy += corner_offset; 89 | gs_out.point = eye_space_pos.xyz / eye_space_pos.w; 90 | gl_Position = projectionMatrix * eye_space_pos; 91 | EmitVertex(); 92 | 93 | EndPrimitive(); 94 | 95 | } 96 | -------------------------------------------------------------------------------- /src/shaders/sphere_imposter.vert: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | // Adapted from PyMOL 4 | 5 | in vec3 vertexPosition; 6 | in float sphereRadius; 7 | in vec4 vertexColor; 8 | 9 | out EyeSpaceVertex { 10 | //vec4 sphere_center; 11 | float radius; 12 | float radius2; 13 | vec4 color; 14 | } vs_out; 15 | 16 | uniform mat4 modelView; 17 | uniform mat3 modelViewNormal; 18 | uniform mat4 mvp; 19 | 20 | void main() 21 | { 22 | vs_out.radius = sphereRadius; 23 | vs_out.radius2 = sphereRadius * sphereRadius; 24 | vs_out.color = vertexColor; 25 | gl_Position = modelView * vec4( vertexPosition, 1.0 ); 26 | } 27 | -------------------------------------------------------------------------------- /src/shaders/wireframe.geom: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | // Adapted from Qt outline shader example 4 | 5 | layout( triangles ) in; 6 | layout( triangle_strip, max_vertices = 3 ) out; 7 | 8 | uniform struct LineInfo { 9 | float width; 10 | vec4 color; 11 | } line; 12 | 13 | in EyeSpaceVertex { 14 | vec3 origPosition; 15 | vec3 position; 16 | vec4 wing1; 17 | vec4 wing2; 18 | } gs_in[]; 19 | 20 | out WireframeVertex { 21 | vec3 position; 22 | flat vec3 normal; 23 | flat vec2 segments[9]; 24 | } gs_out; 25 | 26 | uniform mat4 viewportMatrix; 27 | uniform mat4 athena_viewport; 28 | uniform mat3 modelViewNormal; 29 | 30 | vec2 transformToViewport( const in vec4 p ) 31 | { 32 | return vec2( athena_viewport * ( p / p.w ) ); 33 | } 34 | 35 | float cross2( const in vec2 a, const in vec2 b ) 36 | { 37 | return a.x * b.y - b.x * a.y; 38 | } 39 | 40 | void main() 41 | { 42 | gs_out.normal = normalize( modelViewNormal * normalize( cross( gs_in[1].origPosition - gs_in[0].origPosition, 43 | gs_in[2].origPosition - gs_in[0].origPosition ) )); 44 | 45 | 46 | // Transform each vertex into viewport space 47 | vec2 p[3]; 48 | p[0] = transformToViewport( gl_in[0].gl_Position ); 49 | p[1] = transformToViewport( gl_in[1].gl_Position ); 50 | p[2] = transformToViewport( gl_in[2].gl_Position ); 51 | 52 | gs_out.segments[0] = transformToViewport( gs_in[0].wing1 ); 53 | gs_out.segments[1] = transformToViewport( gl_in[0].gl_Position ); 54 | gs_out.segments[2] = transformToViewport( gs_in[0].wing2 ); 55 | 56 | gs_out.segments[3] = transformToViewport( gs_in[1].wing1 ); 57 | gs_out.segments[4] = transformToViewport( gl_in[1].gl_Position ); 58 | gs_out.segments[5] = transformToViewport( gs_in[1].wing2 ); 59 | 60 | gs_out.segments[6] = transformToViewport( gs_in[2].wing1 ); 61 | gs_out.segments[7] = transformToViewport( gl_in[2].gl_Position ); 62 | gs_out.segments[8] = transformToViewport( gs_in[2].wing2 ); 63 | 64 | 65 | // Vertex 0 (a) 66 | gs_out.position = gs_in[0].position; 67 | gl_Position = gl_in[0].gl_Position; 68 | EmitVertex(); 69 | 70 | // Vertex 1 (b) 71 | gs_out.position = gs_in[1].position; 72 | gl_Position = gl_in[1].gl_Position; 73 | EmitVertex(); 74 | 75 | // Vertex 2 (c) 76 | gs_out.position = gs_in[2].position; 77 | gl_Position = gl_in[2].gl_Position; 78 | EmitVertex(); 79 | 80 | // Finish the primitive off 81 | EndPrimitive(); 82 | } 83 | -------------------------------------------------------------------------------- /src/shaders/wireframe.vert: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | // Adapted from Qt outline shader example 4 | 5 | in vec3 vertexPosition; 6 | in vec3 wing1Vtx; 7 | in vec3 wing2Vtx; 8 | 9 | out EyeSpaceVertex { 10 | vec3 origPosition; 11 | vec3 position; 12 | vec4 wing1; 13 | vec4 wing2; 14 | } vs_out; 15 | 16 | uniform mat4 modelView; 17 | uniform mat3 modelViewNormal; 18 | uniform mat4 mvp; 19 | 20 | void main() 21 | { 22 | vs_out.origPosition = vertexPosition; 23 | vs_out.position = vec3( modelView * vec4( vertexPosition, 1.0 ) ); 24 | vs_out.wing1 = mvp * vec4( wing1Vtx, 1.0 ); 25 | vs_out.wing2 = mvp * vec4( wing2Vtx, 1.0 ); 26 | 27 | gl_Position = mvp * vec4( vertexPosition, 1.0 ); 28 | } 29 | -------------------------------------------------------------------------------- /src/txt/About.txt: -------------------------------------------------------------------------------- 1 |
by Steve Jackson and Dr. Hyungmin Jun
5 | 6 |Version: {version}
7 | 8 |https://github.com/lcbb/athena
9 | 10 |Copyright © 2019-2020, Laboratory of Prof. Mark Bathe, MIT
11 | 12 |Licensed under the General Public License; see the file LICENSE for details.
13 | 14 | 15 | -------------------------------------------------------------------------------- /tools/DAEDALUS2/DAEDALUS2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/tools/DAEDALUS2/DAEDALUS2 -------------------------------------------------------------------------------- /tools/DAEDALUS2/DAEDALUS2.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/tools/DAEDALUS2/DAEDALUS2.exe -------------------------------------------------------------------------------- /tools/METIS/METIS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/tools/METIS/METIS -------------------------------------------------------------------------------- /tools/METIS/METIS.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/tools/METIS/METIS.exe -------------------------------------------------------------------------------- /tools/PERDIX/PERDIX: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/tools/PERDIX/PERDIX -------------------------------------------------------------------------------- /tools/PERDIX/PERDIX.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/tools/PERDIX/PERDIX.exe -------------------------------------------------------------------------------- /tools/PERDIX/readme.txt: -------------------------------------------------------------------------------- 1 | Examples of running PERDIX with 9 input arguments 2 | 3 | For Windows 4 | PERDIX.exe output input\2D_1.ply input\seq.txt 1 2 0 42 0.0 s 5 | For Mac 6 | ./PERDIX output input/2D_1.ply input/seq.txt 1 2 0 63 0.0 s -------------------------------------------------------------------------------- /tools/TALOS/TALOS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/tools/TALOS/TALOS -------------------------------------------------------------------------------- /tools/TALOS/TALOS.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcbb/athena/70052339c85c145b7d2e5abb73a4aa0c10a0c689/tools/TALOS/TALOS.exe -------------------------------------------------------------------------------- /tools/TALOS/readme.txt: -------------------------------------------------------------------------------- 1 | Examples of running TALOS with 9 input arguments 2 | 3 | For Windows 4 | TALOS.exe output input\3D_1.ply input\seq.txt 2 2 0 42 0.0 s 5 | For Mac 6 | ./TALOS output input/3D_1.ply input/seq.txt 2 2 0 63 0.0 s -------------------------------------------------------------------------------- /tools/na_library/bdna_cgh.pdb: -------------------------------------------------------------------------------- 1 | ATOM 1 P CYT A 1 -0.275 9.443 -1.528 1.00 0.00 ADNA P 2 | ATOM 2 O1P CYT A 1 -0.347 10.779 -2.161 1.00 0.00 ADNA O 3 | ATOM 3 O2P CYT A 1 0.736 9.284 -0.459 1.00 0.00 ADNA O 4 | ATOM 4 O5' CYT A 1 -1.717 9.036 -0.967 1.00 0.00 ADNA O 5 | ATOM 5 C5' CYT A 1 -2.657 8.399 -1.854 1.00 0.00 ADNA C 6 | ATOM 6 H5' CYT A 1 -2.158 7.987 -2.616 0.00 0.00 ADNA H 7 | ATOM 7 'H5' CYT A 1 -3.391 9.044 -2.068 0.00 0.00 ADNA H 8 | ATOM 8 C4' CYT A 1 -3.334 7.242 -1.148 1.00 0.00 ADNA C 9 | ATOM 9 H4' CYT A 1 -4.238 7.127 -1.559 0.00 0.00 ADNA H 10 | ATOM 10 O4' CYT A 1 -2.590 5.997 -1.284 1.00 0.00 ADNA O 11 | ATOM 11 C1' CYT A 1 -2.477 5.402 0.000 1.00 0.00 ADNA C 12 | ATOM 12 H1' CYT A 1 -3.322 4.896 0.171 0.00 0.00 ADNA H 13 | ATOM 13 N1 CYT A 1 -1.285 4.542 0.000 1.00 0.00 ADNA N 14 | ATOM 14 C6 CYT A 1 -0.023 5.068 0.000 1.00 0.00 ADNA C 15 | ATOM 15 H6 CYT A 1 0.275 6.023 0.000 0.00 0.00 ADNA H 16 | ATOM 16 C5 CYT A 1 1.056 4.275 0.000 1.00 0.00 ADNA C 17 | ATOM 17 H5 CYT A 1 2.040 4.451 0.000 0.00 0.00 ADNA H 18 | ATOM 18 C2 CYT A 1 -1.472 3.158 0.000 1.00 0.00 ADNA C 19 | ATOM 19 O2 CYT A 1 -2.628 2.709 0.001 1.00 0.00 ADNA O 20 | ATOM 20 N3 CYT A 1 -0.391 2.344 0.000 1.00 0.00 ADNA N 21 | ATOM 21 C4 CYT A 1 0.837 2.868 0.000 1.00 0.00 ADNA C 22 | ATOM 22 N4 CYT A 1 1.875 2.027 0.001 1.00 0.00 ADNA N 23 | ATOM 23 H41 CYT A 1 1.698 1.033 0.002 0.00 0.00 ADNA H 24 | ATOM 24 H42 CYT A 1 2.822 2.377 0.001 0.00 0.00 ADNA H 25 | ATOM 25 C2' CYT A 1 -2.390 6.569 0.977 1.00 0.00 ADNA C 26 | ATOM 26 'H2' CYT A 1 -1.527 7.063 0.871 0.00 0.00 ADNA H 27 | ATOM 27 H2' CYT A 1 -2.659 6.287 1.898 0.00 0.00 ADNA H 28 | ATOM 28 C3' CYT A 1 -3.517 7.399 0.362 1.00 0.00 ADNA C 29 | ATOM 29 H3' CYT A 1 -3.361 8.355 0.611 0.00 0.00 ADNA H 30 | ATOM 30 O3' CYT A 1 -4.762 6.819 0.737 1.00 0.00 ADNA O 31 | ATOM 31 P GUA B 1 -0.296 -9.452 1.527 1.00 0.00 BDNA P 32 | ATOM 32 O1P GUA B 1 -0.375 -10.788 2.160 1.00 0.00 BDNA O 33 | ATOM 33 O2P GUA B 1 0.716 -9.298 0.458 1.00 0.00 BDNA O 34 | ATOM 34 O5' GUA B 1 -1.736 -9.038 0.967 1.00 0.00 BDNA O 35 | ATOM 35 C5' GUA B 1 -2.672 -8.396 1.854 1.00 0.00 BDNA C 36 | ATOM 36 H5' GUA B 1 -2.170 -7.987 2.616 0.00 0.00 BDNA H 37 | ATOM 37 'H5' GUA B 1 -3.409 -9.037 2.069 0.00 0.00 BDNA H 38 | ATOM 38 C4' GUA B 1 -3.344 -7.235 1.148 1.00 0.00 BDNA C 39 | ATOM 39 H4' GUA B 1 -4.248 -7.115 1.559 0.00 0.00 BDNA H 40 | ATOM 40 O4' GUA B 1 -2.593 -5.994 1.284 1.00 0.00 BDNA O 41 | ATOM 41 C1' GUA B 1 -2.477 -5.399 -0.000 1.00 0.00 BDNA C 42 | ATOM 42 H1' GUA B 1 -3.320 -4.889 -0.171 0.00 0.00 BDNA H 43 | ATOM 43 N9 GUA B 1 -1.289 -4.551 -0.000 1.00 0.00 BDNA N 44 | ATOM 44 C4 GUA B 1 -1.265 -3.177 -0.000 1.00 0.00 BDNA C 45 | ATOM 45 N2 GUA B 1 -2.949 -0.139 0.001 1.00 0.00 BDNA N 46 | ATOM 46 H21 GUA B 1 -2.809 0.861 0.002 0.00 0.00 BDNA H 47 | ATOM 47 H22 GUA B 1 -3.906 -0.460 0.001 0.00 0.00 BDNA H 48 | ATOM 48 N3 GUA B 1 -2.342 -2.364 -0.001 1.00 0.00 BDNA N 49 | ATOM 49 C2 GUA B 1 -1.999 -1.087 -0.000 1.00 0.00 BDNA C 50 | ATOM 50 N1 GUA B 1 -0.700 -0.641 -0.000 1.00 0.00 BDNA N 51 | ATOM 51 H1 GUA B 1 -0.549 0.378 -0.000 0.00 0.00 BDNA H 52 | ATOM 52 C6 GUA B 1 0.424 -1.460 0.000 1.00 0.00 BDNA C 53 | ATOM 53 O6 GUA B 1 1.554 -0.955 0.000 1.00 0.00 BDNA O 54 | ATOM 54 C5 GUA B 1 0.071 -2.833 0.000 1.00 0.00 BDNA C 55 | ATOM 55 N7 GUA B 1 0.870 -3.969 0.000 1.00 0.00 BDNA N 56 | ATOM 56 C8 GUA B 1 0.023 -4.962 0.000 1.00 0.00 BDNA C 57 | ATOM 57 H8 GUA B 1 0.531 -5.823 -0.000 0.00 0.00 BDNA H 58 | ATOM 58 C2' GUA B 1 -2.396 -6.566 -0.977 1.00 0.00 BDNA C 59 | ATOM 59 'H2' GUA B 1 -1.535 -7.064 -0.871 0.00 0.00 BDNA H 60 | ATOM 60 H2' GUA B 1 -2.663 -6.283 -1.898 0.00 0.00 BDNA H 61 | ATOM 61 C3' GUA B 1 -3.528 -7.391 -0.362 1.00 0.00 BDNA C 62 | ATOM 62 H3' GUA B 1 -3.377 -8.348 -0.611 0.00 0.00 BDNA H 63 | ATOM 63 O3' GUA B 1 -4.769 -6.805 -0.737 1.00 0.00 BDNA O 64 | -------------------------------------------------------------------------------- /ui/LogWindow.ui: -------------------------------------------------------------------------------- 1 | 2 |