Skip to content

Instantly share code, notes, and snippets.

View volfegan's full-sized avatar
💭
Still Operational

Daniel Leite Lacerda volfegan

💭
Still Operational
View GitHub Profile
@OthmanT
OthmanT / IsPointInArc.pde
Last active June 26, 2020 02:00
How to check if a point is in an arc.
Arc arc;
void setup() {
size(500, 500);
arc = new Arc(width/2, height/2, -PI, PI/4, 200);
}
void draw() {
background(51);
arc.rotateBy(0.03);
@marcedwards
marcedwards / splitlines.pde
Last active April 9, 2021 19:07
Split Lines in Processing
//
// Split Lines.
// Created using Processing 3.5.3.
//
// Code by @marcedwards from @bjango.
//
// A GIF of this code can be seen here:
// https://twitter.com/marcedwards/status/1212718884224040965
//
// Very, very, very heavily inspired by this animation:
@chandeeland
chandeeland / perfect_spiral.pde
Created December 17, 2019 23:34
Circles in Circles moving to give the illusion of spirals (processing v3)
// inspired by https://gist.github.com/volfegan/e55decad6814e63fb450379c9bf13a61
// attempt to recreate: https://twitter.com/Borrachas/status/1204855395006763009
float a=0, b=0, x,y;
float shrink, spin_speed;
void setup() {
size(800,800);
shrink = 0.900;
spin_speed = 0.1;
import math
from moviepy.editor import concatenate, ImageClip
import os
import platform
import subprocess
import random
import torch
# pip install pytorch-pretrained-biggan
from pytorch_pretrained_biggan import (BigGAN, truncated_noise_sample, convert_to_images)
import numpy as np
public void setup() {
size(800, 800, P3D);
smooth(8);
}
public void draw() {
float t = radians(frameCount*.2f);
background(0);
translate(width*.5f, height*.5f);
rotateX(t*.5);
import java.util.UUID;
ArrayList<P> ps = new ArrayList<P>();
int pointCount = 1000;
PImage source;
private float t;
private int framesToCapture = 300;
private int captureStart = -1;
String id = "";
@KrabCode
KrabCode / Colorsort.pde
Created May 8, 2019 22:21
Noise directed pixel sort
import java.util.UUID;
PImage src;
PGraphics temp;
PVector[] directions;
public void settings() {
// fullScreen(P2D, 2);
size(800, 800, P2D);
}
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active April 29, 2024 17:57
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@KdotJPG
KdotJPG / OpenSimplex2S.java
Last active April 29, 2024 17:30
Visually isotropic coherent noise algorithm based on alternate constructions of the A* lattice.
/**
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
*
* More language ports, as well as legacy 2014 OpenSimplex, can be found here:
* https://github.com/KdotJPG/OpenSimplex2
*/
public class OpenSimplex2S {
private static final long PRIME_X = 0x5205402B9270C86FL;
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//