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
Shader "Custom/VertexColor" { | |
SubShader { | |
Tags { "RenderType"="Opaque" } | |
LOD 200 | |
CGPROGRAM | |
#pragma surface surf Lambert vertex:vert | |
#pragma target 3.0 | |
struct Input { |
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
public class Script_Instance : GH_ScriptInstance | |
{ | |
#region Utility functions | |
/// <summary>Print a String to the [Out] Parameter of the Script component.</summary> | |
/// <param name="text">String to print.</param> | |
private void Print(string text) { /* Implementation hidden. */ } | |
/// <summary>Print a formatted String to the [Out] Parameter of the Script component.</summary> | |
/// <param name="format">String format.</param> | |
/// <param name="args">Formatting parameters.</param> | |
private void Print(string format, params object[] args) { /* Implementation hidden. */ } |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
using OpenCVForUnity; | |
public class Scanner : MonoBehaviour { | |
public Texture2D baseTexture; | |
public RawImage sourceRawImage; | |
public RawImage targetRawImage; |
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
float sigma = chf("sigma"); | |
int res = chi("res"); | |
int resx = chi("resx"); | |
int resy = chi("resy"); | |
int resn = floor(res / 2.0); | |
float weightTotal = 0; | |
float valTotal = 0; | |
for(int i=-resn; i<=resn; i++){ | |
for(int n=-resn; n<=resn; n++){ | |
float ix = @ptnum % resx + i; |
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 pprint | |
import requests | |
import os | |
from urllib.request import urlopen | |
accessToken = "xxxxxxxxxx" | |
boardId = "0000000000" | |
folderPath = "./images" | |
response = requests.get( |
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
private void RunScript(double ang, ref object A) | |
{ | |
double dang = ang * Math.PI / 180.0; | |
int div1 = (int) Math.Round(Math.PI / dang); | |
List<Point3d> points = new List<Point3d>(); | |
for(int i = 0; i < div1; i++){ |
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
float val = noise(@P * chf("smoothness") + chf("seed")); | |
float ang = val * $PI * chf("num_wave"); | |
float tval = fit(sin(ang), -1.0, 1.0, 0, 1.0); | |
@Cd = set(tval, tval, tval); | |
@P += @N * fit(tval, 0, 1.0, 0, chf("offset")); |
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
r=64 | |
t=0 | |
function _draw() | |
cls(1) | |
for n=0,6,1 do | |
for i=0,100,1 do | |
ang=3.1415/180.0*2 | |
x1=cos((i+t)*ang)*i+r | |
y1=sin((i+t)*ang)*i+r | |
x2=cos((i+1+t)*ang)*(i+1)+r |
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
r=128 | |
t=0 | |
num=4 | |
rad=9 | |
sp=0.5 | |
function _draw() | |
cls(13) | |
val=sin(330/360) | |
nnum=ceil(num/val) | |
for i=0,num do |
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
r=64 | |
function _draw() | |
cls(1) | |
--print("abc") | |
num=200.0 | |
rad=50 | |
xss={} | |
yss={} | |
sep=3 |
NewerOlder