Skip to content

Instantly share code, notes, and snippets.

View tatarize's full-sized avatar

tatarize

View GitHub Profile
@tatarize
tatarize / index.js
Created February 11, 2013 18:15
voxel.js game
// Voxel Tetris by @tatarize
// Click the board side to make the piece go that way.
// Click something on the board (eg, the falling piece) to make it turn.
// Turns are currently logged counter clockwise/counter-clockwise depending on the height you clicked at.
var createGame = require('voxel-engine')
var chunkSize = 32
var chunkDistance = 3
var game = createGame({
@tatarize
tatarize / starry.svg
Created July 29, 2018 21:03
Starry Night Rendered As Line Segments.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tatarize
tatarize / venus-head.svg
Created July 30, 2018 17:46
Birth Of Venus Head.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tatarize
tatarize / serpfam.svg
Created August 29, 2018 09:51
Sierpinski Family
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/*
MIT LICENSE.
(feel free to drop this entire comments section, and use for any commercial or open projects).
Written by Tatarize.
Iterable fast csv stream parser.
You would typically process this quite helpfully like:
for (String[] csv : parseCSV(stream)) {
<deal with parsed csv data>
import math
value = math.pi * 2
best = 1e-5
for i in range(1, 1000000):
fraction = float(i) / 12
numer = round(value * fraction)
v = numer / float(fraction)
err = v - value
import com.t_oster.liblasercut.BlackWhiteRaster;
import com.t_oster.liblasercut.utils.BufferedImageAdapter;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import javax.imageio.ImageIO;
public class TimeBWRaster {
@tatarize
tatarize / BlackWhiteRaster.java
Created June 18, 2019 18:12
Sample BlackWhiteRaster with PixelWindow
/**
* This file is part of LibLaserCut.
* Copyright (C) 2011 - 2014 Thomas Oster <[email protected]>
*
* LibLaserCut is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LibLaserCut is distributed in the hope that it will be useful,
@tatarize
tatarize / gist:178f1d543716613a3acb135225c2b7af
Created June 18, 2019 19:56
Total Effect Timing BlackWhiteRaster.
import com.t_oster.liblasercut.BlackWhiteRaster;
import com.t_oster.liblasercut.ByteArrayList;
import com.t_oster.liblasercut.FloatPowerSpeedFocusFrequencyProperty;
import com.t_oster.liblasercut.RasterPart;
import com.t_oster.liblasercut.platform.Point;
import com.t_oster.liblasercut.utils.BufferedImageAdapter;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FilenameFilter;