float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);
return mix(rand(fl), rand(fl + 1.0), fc);
}
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
<svg width="0" height="0"> | |
<defs> | |
<filter id="distort"> | |
<feTurbulence baseFrequency=".001" type="fractalNoise" seed="200" /> | |
<feColorMatrix type="hueRotate" values="0"> | |
<animate attributeName="values" from="0" to="360" dur="8s" repeatCount="indefinite" /> | |
</feColorMatrix> | |
<feDisplacementMap in="SourceGraphic" in2="main" xChannelSelector="R" yChannelSelector="B" scale="200" /> | |
<feGaussianBlur id="blur-amount" stdDeviation="3" /> | |
<feComponentTransfer result="main"> |
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 bpy | |
import os | |
import ntpath | |
D = bpy.data | |
C=bpy.context | |
path = 'D:\odrive\Cloud\Gutter\Outlier 2.0\Blends' | |
def listdir_fullpath(d): |
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 bpy | |
from bpy_extras.image_utils import load_image | |
from mathutils import Vector, Euler | |
import math | |
from math import sqrt | |
C = bpy.context | |
D = bpy.data | |
def SetupDriverVariables(scene, driver, imageplane): |
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
; This is a simple and pretty generic example of an AutoHotkey script to run a | |
; program when you press a keyboard shortcut. Add as many of these as you want | |
; to a .ahk file, and set that to be run at startup. | |
; See the Hotkeys reference [1] for details of the modifiers and keys available. | |
; [1]: http://www.autohotkey.com/docs/Hotkeys.htm | |
; Win+Alt+G - Open Gmail in Chrome |
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
# ##### BEGIN GPL LICENSE BLOCK ##### | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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
for file in ./Layers\ PNG/*.png; do | |
filename=$(basename -- "$file") | |
filename=${filename%.*} | |
convert $file ./Layers\ BMP/"${filename}.bmp" | |
done | |
for file in ./Layers\ BMP/*.bmp; do | |
filename=$(basename -- "$file") | |
filename=${filename%.*} | |
mkbitmap -o ./Layers\ PBM/"${filename}.pbm" -x -t 0.9 -i -b 20 $file |
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 https://blender.stackexchange.com/questions/882/how-to-find-image-coordinates-of-the-rendered-vertex | |
# =================== | |
# |(0,0) | | |
# | | | |
# | | | |
# | | | |
# | (x,y)| | |
# =================== | |
import bpy |
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
try: | |
from bokeh.io import push_notebook, output_notebook, show | |
from bokeh.plotting import figure | |
output_notebook() | |
def dynamic_image_figure(w,h): | |
"""create an RGB image figure in current cell and return an update function for it""" | |
def im2bokeh(img): | |
img = (img*255).astype(np.uint8) | |
img = np.dstack([img, np.ones(img.shape[:2], np.uint8) * 255]) | |
img = np.squeeze(img.view(np.uint32)) |