Thursday, November 25, 2010

pycurry

A friend of mine wrote a very interesting function that makes arbitrary methods good for currying when used as a decorator. This is an example he wrote,

import pycurry


@pycurry.curryfunc
def test(aa, bb, cc):
    print aa, bb, cc

f = test(10) # => currying
test(10, 20, 30) # => execute the func

f(40, 50) # => execute the func since sufficient arguments are given
f(200, cc=400) # => You can execute the func like this as well

g = f('aaa') # => curring again
g([10]) # => execute


One example use case is making similar functions that takes some of arguments in common, and some of arguments given previously, like
import pycurry

@pycurry.curryfunc
def myShotMessageSlot(buttonName, toggled):
    print 'Button ' + buttonName + "'s current state is " + str(toggled)

qtToggleButtonAAA.someSignal.connect(myShotMessageSlot('AAA'))
qtToggleButtonBBB.someSignal.connect(myShotMessageSlot('BBB'))
qtToggleButtonCCC.someSignal.connect(myShotMessageSlot('CCC'))

I usually do the same thing using a closure (you can also use partial),
def slotFactory(buttonName):
    def myShotMessageSlot(toggled):
        print 'Button ' + buttonName + "'s current state is " + str(toggled)
    return myShotMessageSlot
qtToggleButtonAAA.someSignal.connect(slotFactory('AAA'))
qtToggleButtonBBB.someSignal.connect(slotFactory('BBB'))
qtToggleButtonCCC.someSignal.connect(slotFactory('CCC'))

but using his pycurry makes it nicer.

https://github.com/shomah4a/pycurry

By the way I just noticed syntaxhighlighter doesn't work anymore. The JavaScript files were on a free hosting site that has ended its service, I need to put it somewhere else, ahhhh...

Sunday, November 21, 2010

First result

First result of my Sunday programming.

Spheres in the grids are pressures (positive or negative), lines are velocities in the staggered grid.
Took a bit of time to show Karman vortex.
I will take several source codes before making it 3D.

Sunday, November 7, 2010

40 days passed since I started weight control









Yellow: body fat
Green: lean body weight
Blue spot: workout
Red spot: went for a drink

Coq Proof Assistant

From the homepage.

Coq is a formal proof management system. It provides a formal language to write mathematical definitions, executable algorithms and theorems together with an environment for semi-interactive development of machine-checked proofs.
I studied basic symbolic logic to learn Coq, but its still very difficult. I still have no idea about correspondence between "A's type is B" and "A is a proof of B" (Curry–Howard correspondence).

From my note (Fluid)

Please let me know if something is wrong.

* [001]Simulating Ocean Water
- Jerry Tessendorf
* [002]Deep-Water Animation and Rendering
- http://www.gamasutra.com/gdce/2001/jensen/jensen_01.htm
- Lasse Staff Jensen and Robert Golias
* [003]A Novel Algorithm for Incompressible Flow Using Only A Coarse Grid Projection
- physbam.stanford.edu/~eenglish/tmp/refinement.pdf
- Michael Lentine, Wen Zheng, Ronald Fedkiw
- Read.
* [004]Filament based smoke with vortex shedding and variational reconnection
- Steffen Weißmann and Ulrich Pinkall
- That filament based stuff.
* [005]Animating Sand as a Fluid
- Yongning Zhu and Robert Bridson
- Bridson's page http://www.cs.ubc.ca/~rbridson/
- First paper of Flip in CG.
* [006]Basic knowledge to learn weather dynamics(Japanese)
- for [005] (strain rate tensor, etc.)
- http://epa.scitec.kobe-u.ac.jp/~ykawai/project/meteo_basic/meteo_basic.html
- http://epa.scitec.kobe-u.ac.jp/~ykawai/project/meteo_basic/node15.html
* [007]A Controllable, Fast and Stable Basis for Vortex Based Smoke Simulation
- http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.101.6870&rep=rep1&type=pdf
- Alexis Angelidis, Fabrice Neyret, Karan Singh, Derek Nowrouzezahrai
- one of original paper of [004].
* [008]Computation of Vortex Ring Dynamics
- http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.101.6870&rep=rep1&type=pdf
- Robert KRASNY and Leon KAGANOVSKIY
- For [004] tutorial.

* Vorticity Structure and Evolution in a Transverse Jet with New Algorithms for Scalable Particle Simulation http://dspace.mit.edu/bitstream/handle/1721.1/27103/56835888.pdf?sequence=1
- Fro [004] Looks good explanation for rosenhead-moore.
* [009]FLIP: A LOW-DISSIPATION, PARTICLE-IN-CELL METhOD FOR FLUID FLOW
- J.U. BRACKBILL, D.B. KOTHE and H.M. RUPPEL
- Flip.
* [010]A new doubly discrete analogue of smoke ring flow and the real time simulation of fluid flow.
- Written by Pinkall, author of Philament based ...
* [011]Fluid Simulation For Computer Graphics: A Tutorial in Grid Based and Particle Based Methods
- http://www.colinbraley.com/Pubs/FluidSimColinBraley.pdf
- Found when googled "MAC grid" while reading Animating Sand as a Fluid
* [012]strain and rotation(Japanese)
- http://solid4.mech.okayama-u.ac.jp/ひずみと回転.pdf
- Written by a prof. of Okayama univ. For Animating Sand as a Fluid. Good.
* [013]Strain and stress
- http://www.mech.kyushu-u.ac.jp/lab/chi10/jp/chap3.pdf
- Written by a prof. of Kyusyu univ. For Animating Sand as a Fluid. Good.
* [014]FLUID SIMULATION SIGGRAPH 2007 Course Notes
- http://www.cs.ubc.ca/~rbridson/fluidsimulation/fluids_notes.pdf
- Famous one by Bridson, authoer of Animating Sand as a Fluid. SUPER GOOD.
* [015]A forward-trajectory global semi-Lagrangian transport scheme
- Detailed documents about semi-Lagrangian method.
* [016](Japanese)
- www.sr3.t.u-tokyo.ac.jp/~matsuo/lecture/09suchi/shiryo8.pdf
* [017]Wavelet Turbulence for Fluid Simulation
- That Wavelet Trubulence one.
* [018]Real-time Fluid Simulations with Wavelet Turbulence
- Student's paper. His professor is the author of Wavelet Trubulence.
* [019]Real-Time Simulation and Rendering of 3D Fluids
- GPU Gems 3 chapter30. Haven't read.
- http://geometry.caltech.edu/~keenan/pdf/rtsr3df.pdf
* [020]Animation and Rendering of Complex Water Surfaces
- Origin of particle level set. Haven't read.
* [021]A Hybrid Particle Level Set Method for Improved Interface Capturing
- Origin of Particle level set. Havne't read.
* [022]Meshless Approximation Methods and Applications in Physics Based Modeling and Animation Bart Adams, Martin Wicke Eurographics 2009 Tutorial(未)
- http://graphics.stanford.edu/~wicke/publications.html
- Like a course note about Meshles. Haven't read.
* [023]FlowFixer?: Using BFECC for Fluid Simulation
- http://www.gvu.gatech.edu/~jarek/papers/FlowFixer.pdf
- Haven't read.
* [024]Fluid Simulation for Computer Animation
- PPT slide when googled "Mark Carlson bfecc". Haven't read.
- www.cc.gatech.edu/~turk/powerpoint_presentations/fluids.ppt

From my note (PRT)

Please let me know if something is wrong.

PRT
* [001]PRT (Japanese)
- http://www.pyramid-inc.net/technical/index.php
- explanation of :http://journal.mycom.co.jp/articles/2006/09/23/cedec4/(Japanese)

* [002]Spherical Harmonic Lighting: The Gritty Details
http://www.research.scea.com/gdc2003/spherical-harmonic-lighting.html
- [001] says read this for docs about SH Rotation.

* [003]All-frequency precomputed radiance transfer using spherical radial basis functions and clustered tensor approximation
- http://www.cis.nctu.edu.tw/~gis91812/
- Tsai, Yu-Ting and Shih, Zen-Chung.
- Proceedings of ACM SIGGRAPH 2006, pp. 967-976, 2006.
- SRBF for PRT. Half read.

* [004]All-Frequency Precomputed Radiance Transfer for Glossy Objects
- Read for [003]. Uses PRT for glossy materials by high compression with a combination of wavelet, CPCA, BRDF factorization

* [005]All Frequency Shadows Using Non linear Wavelet Lighting Approximation
- Read for [003] [004]Uses wavelet for PRT.

* [006]Matrix Radiance Transfer
- Read for [003] [004]. Uses CPCA.

* [007]Interactive Rendering with Arbitrary BRDFs using Separable Approximations
- Read for [004]. BRDF factorization。

* [008]Nonstationary Wavelets on them-Sphere for Scattered Data
- [003] says detailed explanation for SRBF convolution, i.e. spherical sigular integral. Haven't read.

* [009]Triple Product Wavelet Integrals for. All-Frequency Relighting
- [003]Referenced. Came after[005]. Haven't read.

* [010]Is There Anything Comparable to Spherical Harmonics But Simpler?
- http://www.cse.cuhk.edu.hk/~ttwong/papers/srbf/srbf.html
- srbf.pps http://appsrv.cse.cuhk.edu.hk/~ttwong/cgi-bin/paper-download/download.cgi?path=srbf&dl=srbf.pps
- Good document of SRBF for PRT.
- Probabably the base of this is "An RBF-based Image Compression Method for Image-based Rendering" written by the same author. Couldn't find on the web.

* [011]
- Stupid Spherical Harmonics (SH) Tricks
- SH (and PRT?) document by Sloan. Notes on Zonal harmonics.
- Haven't read

* [012]
- Nonstationary Wavelets on the m-Sphere for Scattered Data
- Francis J. Narcowich, Joseph D.Ward
- [003] referenced for spherical functionのconvolution

* [013]
- An Efficient Representation for Irradiance Environment Maps
- For test implementation in Nuke

* [014]
- On the Relationship between Radiance and Irradiance: Determining the illumination from images of a convex Lambertian object
- [013] referenced.


* [100]Hierarchical RBF
- http://en.wikipedia.org/wiki/Hierarchical_RBF
- Looks model generation from a point cloud, haven't read.

* [101]Cinematic Wavelet Lighting
- www.pyramid-inc.net/technical/rd_file/wavelet_jp.pdf(Japanese)
- Pyramid published at CEDEC2004

* [102]Wavelet Lighting(Japanese)
- www.pyramid-inc.net/technical/rd_file/wavelet_jp.pdf
- Comes with [101]

* [200]
- All-Frequency Relighting of Non-Diffuse Objects
- Haven't red, looks famous.
- Simpler than [004], fast

Tuesday, November 2, 2010

Re-opened hohehohe2's OpenMaya tutorial

It's moved here!
http://www.daisukemaki.com/archive/koichi/0mokuji.html

Thank you Maki for hosting it.