Skip to content

Instantly share code, notes, and snippets.

View germ13's full-sized avatar

juan serrano germ13

  • east los angeles
View GitHub Profile
@germ13
germ13 / NewtonFractal.cs
Created October 11, 2021 06:40 — forked from kjellski/NewtonFractal.cs
LinqPad Compatible Fractal Drawing
/* Idea and clojure from http://nakkaya.com/2010/04/20/fractals-in-clojure-newton-fractal */
Func<Complex, Complex> f1 = c => (c * c * c) - Complex.One;
Func<Complex, Complex> f2 = c => ((c * c * c) - (c * 2)) + 2;
Func<Complex, Complex> f3 = c => new Complex(Math.Sin(c.Real) * Math.Cosh(c.Imaginary),
Math.Cos(c.Real) * Math.Sinh(c.Imaginary));
Func<Complex, Complex> f4 = c => (c * c * c * c) - Complex.One;
double step = 0.000006;
double delta = 0.003;
Tuple<int,int> formDimensions = new Tuple<int,int>(800, 600);

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results