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 function for capturing screenshots with GDScript | |
# from: https://gist.github.com/jotson/84681c2064653d093083a690e9fa5998 | |
# Adapted for Godot4.2.1 by ale2x72 | |
func screenshot(): | |
# Capture the screenshot | |
var image = get_viewport().get_texture().get_image() | |
# Setup path and screenshot filename | |
var date = Time.get_datetime_dict_from_system() |
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 rhinoscriptsyntax as rs | |
import scriptcontext as sc | |
""" | |
Script written by Alessio Erioli - mod of willemderks.com | |
Script version October 6, 2020 | |
""" | |
def AutolabelPoints(): | |
text_height = 10 |
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 rhinoscriptsyntax as rs | |
import Rhino.Geometry as rg | |
import Rhino | |
from Rhino.Commands import * | |
from scriptcontext import doc | |
# Script written by Alessio Erioli | |
__commandname__ = "ConnectHandle" |
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; | |
using System.Collections.Generic; | |
using System.IO; | |
using UnityEngine; | |
using UnityEditor; | |
/* | |
Script by Alessio Erioli - Co-de-iT | |
(c) Co-de-iT 2022 | |
*/ |
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; | |
using System.IO; | |
using UnityEngine; | |
public class ReadAssemblage : MonoBehaviour | |
{ | |
public bool debugMode; | |
[Range(0.5f, 5)] | |
public float axisLength; | |
[Header("AssemblyObjects")] |
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
// conversion between dimensional indices for a multidimensional or jagged array to sequential index | |
// and vice-versa | |
// 2D array (nX, nY) created as [i,j] or jagged array indexed as [i][j] | |
// array created with nested for loops, i (nX), then j (nY) (outmost to innermost) | |
private int GetSequentialIndex(int i, int j, int nY) => i * nY + j; | |
private int[] GetDimensionalIndices(int index, int nY) | |
{ |
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; | |
using System.IO; | |
using UnityEngine; | |
public class ReadAssemblage : MonoBehaviour | |
{ | |
public bool debugMode; | |
[Range(0.5f, 5)] | |
public float axisLength; | |
[Header("AssemblyObjects")] |
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
/* | |
an improvement upon the fading rectangle technique | |
using blendMode() to get rid of the 'streaks' that | |
usually remained | |
code for Processing 3 | |
*/ |
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
/* | |
weighted division | |
divides an interval d in n parts l, l1, l2...ln | |
so that l1 = l * f, l2 = l1 *f, etc | |
the weighing factor f is mapped to mouseX | |
code for Processing 3 |
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
/* | |
image processing sketch | |
puts a pixel grid of variable size over a picture | |
code for Processing 3 | |
code © Alessio Erioli - Co-de-iT | |
Keys: |