The purpose of this library is to support the creation of geometric constructions in the inversive
geometry of circles on the 2-sphere. The design of the code base was heavily influenced by Sherif Ghali's Introduction to Geometric Computing. This is an excellent reference for anyone interesting in coding a geometric library and gives a good overview of the various design decisions involved. Ghali also gives plenty of companion C++ code, which we referred to for coding several of the operations on various geometric objects and the structure of the geometry.primitives
package is in line with Ghali's suggestion for how to structure such libraries.
The code base also has one application (well, there are a few dummy ones that I need to remove/clean up) that is a first version of what I hope will eventually become a GeoGebra-like application for inversive geometric constructions. That is the SphericalSketch
found in the sketches
package. This application loads a little bare-bones Python IDE and 3D view that allows a user to create and visualize geometric constructions on the fly. Eventually we will post some sample scripts somewhere in this repository.
This is a very alpha-level release. I'm just getting started with this code base, and have some ideas for applications to build on top of it, but I decided to go ahead and release it, because some others are starting to use the code base and thus there needs to be a public repository.
The codebase is written in Kotlin and is developed in JetBrain’s IDEA IntelliJ.
Here is a set-up guide for getting a development environment up and running.
The codebase has some weird dependencies.
They are all managed with Gradle and do not need to be retreived manually.
- cpcore.jar 2.8 - Extracted from CirclePack link
- jython-standalone 2.7.0 - link
- rsyntaxtextarea 2.6.1 - link
- jogl-all-main 2.3.2 - need native libraries - link
- gluegen-rt-main 2.3.2 - need native libraries - link
- processing-core 3.3.6 - link
- antlr4 4.7.1 - link
I have also included an ArcBall class that was converted to Kotlin and lightly modified. The original can be found here.
Dependency gathering and building is done with Gradle.
A local installation can be used, or a Gradle wrapper is available in the bin directory.
To use the wrapper substitute ../bin/gradlew
for gradle
in the steps below.
The goal of this method is to easily retrieve all dependency JARs and register them as dependencies in the IntelliJ project. Building and Running is all done through IntelliJ's systems.
- Clone the repo
- In the
lib
directory rungradle all
- This will download all dependencies to
<project-path>/lib/jar
- Create a new project
- Select 'Kotlin' in the left pane and 'Kotlin (JVM)' and click 'Next'
- Name the project whatever you want, like 'Koebe-Lib'
- Change the project location to the cloned repo and click 'Finish'
- Open Project Structure dialog (Command+; or Ctrl+Shift+Alt+S)
- Click 'Modules' and open the Dependencies tab
- Click '+' and select 'JARs or directories...'
- Select the
<project-path>/lib/jar
folder - Click the 'Export' checkbox and click 'Apply' and 'OK'
- Right click on the the
src/sketches/SphericalSketch.kt
file - Select the Run option
The goal of this method is to allow for building and running without using IntelliJ.
All standalone building is done in the builder directory.
Configuration options are available in settings.gradle
- From the
builder
directory rungradle jar
- A standalone executable JAR will be built in
build/lib/koebelib.jar
- This can be run with
java -jar build/lib/koebelib.jar
- From the
builder
directory rungradle build
- A tarball and a zip file distribution will be built in
build/distibutions/koebelib.tar|zip
- From the
builder
directory rungradle install
- A distribution will be installed in
build/install/koebelib
- This can be run with the start script at
build/install/koebelib/bin/koebelib
- From the
builder
directory rungradle compileKotlin
Because of how Gradle handles dependencies we cannot run the program from a gradle build
that has not been bundled in some form (ie options 1-3 above).
Attempting to use gradle run
or other methods may result in missing native libraries.
#koebe-lib