Skip to content

Instantly share code, notes, and snippets.

View tatarize's full-sized avatar

tatarize

View GitHub Profile
@tatarize
tatarize / head.out.svg
Created April 23, 2021 20:56
head image converted with potrace
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tatarize
tatarize / vsnoise.py
Created February 25, 2021 14:25
Port of simplex noise from pypi:noise
"""
// Copyright (c) 2008, Casey Duncan (casey dot duncan at gmail dot com)
// see LICENSE.txt for details
// $Id$
"""
import sys # Only needed for FLT_MAX, FLT_MAX is semaphore; replace with None
import numpy as np
@tatarize
tatarize / vnoise.py
Created February 22, 2021 11:28
vnoise all functions ported.
# Code is derived from the C noise code:
# Copyright (c) 2008, Casey Duncan (casey dot duncan at gmail dot com)
# MIT LICENSE.
# This port is also, MIT LICENSE.
from numpy import floor, fmod
"""
"Native-code tileable Perlin "improved" noise functions"
@tatarize
tatarize / vnoise.py
Created February 22, 2021 11:00
vnoise port of `noise` project c-code into python.
# Code is derived from the C noise code:
# Copyright (c) 2008, Casey Duncan (casey dot duncan at gmail dot com)
# MIT LICENSE.
# This port is also, MIT LICENSE.
from numpy import floor, fmod
M_1_PI = 0.31830988618379067154
@tatarize
tatarize / zinglplotter.py
Created November 18, 2020 14:03
list(ZinglPlotter.linearize(Path(Circle(0,0,5000)))) # After doing an import. Also try with any other loaded paths.
from queue import Queue
from svgelements import *
"""
The Zingl-Bresenham plotting algorithms are from Alois Zingl's "The Beauty of Bresenham's Algorithm"
( http://members.chello.at/easyfilter/bresenham.html ).
In the case of Zingl's work this isn't explicit from his website, however from personal
correspondence "'Free and open source' means you can do anything with it like the MIT licence."
@tatarize
tatarize / rect_app.py
Created June 21, 2020 14:03
Test App For Post Close Crash
#!/usr/bin/env python
import wx
class RectFrame(wx.Frame):
def __init__(self, *args, **kwds):
# begin wxGlade: RectFrame.__init__
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
self.draw_panel = wx.Panel(self, wx.ID_ANY)
@tatarize
tatarize / BitmapTileBuilder.java
Created June 9, 2020 09:03
BitmapTileBuilder.java
package com.photoembroidery.tat.olsennoise;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.util.SparseArray;
import com.photoembroidery.tat.olsennoise.olsennoise.RenderscriptOlsenNoise;
import java.util.ArrayList;
@tatarize
tatarize / test-tree.py
Created March 10, 2020 08:34
Test code for Tree Selection Problem.
import wx
class MyFrame(wx.Frame):
def __init__(self, *args, **kwds):
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
self.SetSize((400, 300))
self.tree = wx.TreeCtrl(self, wx.ID_ANY, style=wx.TR_MULTIPLE)
self.root = self.tree.AddRoot("My Tree")
sizer_1 = wx.BoxSizer(wx.VERTICAL)
ellipse_arc_length(0, 0, 50, 1e-8, 0, False, False, 0, 2e-8, n)
0001 result -157.079632679489663 error: -57.079632679489663
0002 result -78.539816355452786 error: 21.460183644547214
0003 result -104.719755119659766 error: -4.719755119659766
0004 result -94.805944904705967 error: 5.194055095294033
0005 result -101.664073846305200 error: -1.664073846305200
0006 result -97.704861670921304 error: 2.295138329078696
0007 result -100.844208797212858 error: -0.844208797212858
0008 result -98.711580101204518 error: 1.288419898795482
0009 result -100.509505797521015 error: -0.509505797521015
@tatarize
tatarize / expand.cpp
Created July 23, 2019 22:14
Archive Lib Expand Deobfuscated Source
#include <iostream>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <fstream>
#include "show_dump2.h"
using namespace std;