Skip to content

Instantly share code, notes, and snippets.

@jstults
jstults / solution_30.stl
Created January 24, 2019 11:30
inverse csg of openlsto example 3d cantilever
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jstults
jstults / ransac.conf
Created January 24, 2019 11:32
configuration file for InverseCSG RANSAC algorithm
target_sample_num: 50000
cluster_epsilon: 0.1
epsilon: 0.1
min_points: 500
normal_threshold: 0.8
probability: 0.5
max_iter: 100
max_diam: 0.1
gc_max_iter: 10
base: 5.0
@jstults
jstults / topopt2CSG.py
Created January 24, 2019 11:34
python script to run InverseCSG on an example part from OpenLSTO based on the run_tests script that ships with InverseCSG
import os
import sys
# Usage: python3 topopt2CSG.py <build_dir> <test_name>
# Example:
# python3 topopt2CSG.py ../build openlsto
#
if len(sys.argv) < 3:
print('Error: please specify the test case name.')
//CUSTOMIZER VARIABLES
// Overall radius of the sphere
sphereRadius = 30;
// Radius of each hole at the surface of the sphere
holeTopRadius = 5.5;
// Radius of each hole at the bottom of the hole
holeBottomRadius = 5;
@jstults
jstults / varcovid.py
Created November 20, 2020 19:20
Vector autoregression model fit to COVID-19 data
#
# filename: varcovid.py
# author: josh stults
# date: 20 Nov 2020
#
# fit some autoregressive models to deaths and cases
#
# data from:
# https://covid.ourworldindata.org/data/owid-covid-data.csv
#
@jstults
jstults / varcovid2.py
Last active December 2, 2020 10:14
Fit a vector autoregression moving average model to COVID-19 data
#
# filename: varcovid.py
# author: josh stults
# date: 30 Nov 2020
#
# fit some vector auto regression models to deaths and cases
#
# data from:
# https://covid.ourworldindata.org/data/owid-covid-data.csv
#