Skip to content

Instantly share code, notes, and snippets.

[deps]
GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
@SteffenPL
SteffenPL / di_demo1.jl
Created May 29, 2023 07:52
Solving differential inclusion (simple example)
using ForwardDiff
using OrdinaryDiffEq
using LinearAlgebra
##############
## Setup ##
##############
struct DIProblem{odeT,consT}
@SteffenPL
SteffenPL / test.jl
Created June 18, 2021 14:16
verlet list implementation
using Test
@testset "VerletList" begin
X = rand(2,100)
vl = VerletList{2}([0.0, 0.0],[1.,1.]), 0.2)
update_lists!(vl, X)
# example usage
@SteffenPL
SteffenPL / pluto_json_editor.jl
Created October 10, 2020 08:30
Pluto with json editor (draft)
### A Pluto.jl notebook ###
# v0.12.2
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local el = $(esc(element))
using CImGui
using CImGui.GLFWBackend
using CImGui.OpenGLBackend
using CImGui.GLFWBackend.GLFW
using CImGui.OpenGLBackend.ModernGL
using AbstractPlotting
using GLMakie
import GLMakie: make_context_current, render_frame, to_native, Screen
# add ImGui rendering pass to GLMakie's rendering loop