Skip to content

Instantly share code, notes, and snippets.

@zmic
zmic / graphic4.py
Created July 15, 2021 21:08
graphic4
import os
import numpy as np
from PIL import Image
#-------------------------------------------------------------------
#
# helper functions
#
def create_complex_plane(X, Y, x0, x1, y0, y1, endpoint=False):
I = np.indices((Y,X)).astype(np.float64)
@zmic
zmic / graphic3.py
Last active May 29, 2020 14:48
Graphic 3
import os
import numpy as np
from PIL import Image
#-------------------------------------------------------------------
#
# helper functions
#
def create_complex_plane(X, Y, x0, x1, y0, y1, endpoint=False):
I = np.indices((Y,X)).astype(np.float64)
@zmic
zmic / graphic2.py
Last active July 13, 2021 13:39
Snippet 2 : meltdown in the complex plane
import os
import numpy as np
from PIL import Image
#-------------------------------------------------------------------
#
# helper functions
#
def create_complex_plane(X, Y, x0, x1, y0, y1, endpoint=False):
I = np.indices((Y,X)).astype(np.float64)
@zmic
zmic / graphic1.py
Last active May 28, 2020 14:14
graphic1.py
import numpy as np
from PIL import Image
#-------------------------------------------------------------------
#
# a few helper functions
#
def create_XY(X, Y, x0, x1, y0, y1, endpoint=False, dtype=np.float64):
I = np.indices((Y,X)).astype(np.float64)
fy = (y1 - y0) / (Y - 1) if endpoint else (y1 - y0) / Y
using System;
namespace Mine
{
// helper class
public class PluginData
{
public DateTime _creation_time;
public Autodesk.Revit.UI.IExternalCommand _instance;