Skip to content

Instantly share code, notes, and snippets.

lu@Lus-MacBook-Pro ~/D/2/2/MAT 201B> mat201b2017/
lu@Lus-MacBook-Pro ~/D/2/2/M/mat201b2017> git stash
No local changes to save
lu@Lus-MacBook-Pro ~/D/2/2/M/mat201b2017> git pull
Updating 34d3a97..45ca14a
error: The following untracked working tree files would be overwritten by merge:
.atom-build.yml
.lvimrc
init_lfs
mat201b2017.sublime-project
@llliiu
llliiu / 594E Workshop 2
Last active January 27, 2017 01:26
100 doors problem
# MAT 594E: Workshop2, "100 doors"
# Problem: you have 100 doors in a row that are all initially closed. You make 100 passes by the doors starting with the first door every time. the first time through you visit every door and toggle the door (if the door is closed, you open it, if it is open, you close it). the second time you only visit every 2nd door (door #2, #4, #6). the third time, every 3rd door (door #3, #6, #9), etc, until you only visit the 100th door.
# Question: what state are the doors in after the last pass? which are open which are closed?
# Author: Lu Liu
# Date: 01/26/2017
# An array for status of doors // set 0 as closed door, 1 as opened door
lock = [False]]*100
lu@169-231-138-96 ~/m/AlloSystem> ./run.sh allocore/examples/spatial/voxels.cpp
RUN SCRIPT: Building file allocore/examples/spatial/voxels.cpp.
USING GLUT
Writing dummy header: al_Convolver.hpp ---- Unmet dependency: FFTW
Writing dummy header: al_Decorrelation.hpp ---- Unmet dependency: FFTW
Using AlloSystem Run facilties.
Not building allocv and no usable allocv binary found. Not linking application to allocv
[ 1%] Built target cuttlebone
[ 13%] Built target Gamma
[ 30%] Built target GLV
@llliiu
llliiu / index.html
Created November 2, 2016 22:40
HW4 200C
<script src = "https://rawgit.com/wolftype/200c/gh-pages/js/gfx.js"></script>
<script type="text/javascript">
var app = new GFX.App();
var flower;
/// On Initialization of the WebGL Application (this happens once)
app.onInit = function(){
@llliiu
llliiu / index.html
Created October 19, 2016 22:22
Hollow Flower
<script src = "https://rawgit.com/wolftype/200c/gh-pages/js/gfx.js"></script>
<script type="text/javascript">
var app = new GFX.App();
var box;
/// On Initialization of the WebGL Application (this happens once)
app.onInit = function(){
@llliiu
llliiu / index.html
Created October 12, 2016 22:12
Chaos Lines
<html>
<script type="text/javascript" src="https://rawgit.com/patriciogonzalezvivo/glslCanvas/master/build/GlslCanvas.js"></script>
<body>
<canvas class="glslCanvas" data-fragment="
// Author: Lu Liu
// Title: 200C HW2
#ifdef GL_ES
precision mediump float;
#endif
@llliiu
llliiu / index.html
Created October 12, 2016 19:41
Gradient Canvas
<html>
<script type="text/javascript" src="https://rawgit.com/patriciogonzalezvivo/glslCanvas/master/build/GlslCanvas.js"></script>
<body>
<canvas class="glslCanvas" data-fragment="
// Author: Lu Liu
// Title: 200C HW1
#ifdef GL_ES
precision mediump float;
#endif
uniform vec2 u_resolution;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"# Bilateral Filter\n",
"## 201 A Final Project\n",
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.