Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <climits> | |
#include <cstdlib> | |
#include <cstring> | |
#include <cstdio> | |
#include <fstream> | |
#include "show_dump2.h" | |
using namespace std; |