Thursday, September 12, 2019

SPH on Python

Based on https://pysph.readthedocs.io/en/1.0a1/installation.html
                https://pysph.readthedocs.io/en/latest/installation.html
Examples https://pypi.org/project/PySPH/

python3.2 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
python3 -m venv /path/to/new/virtual/environment
 
 
Object arrays cannot be loaded when allow_pickle=False
pip install numpy==1.16.1
pip3 install PyQt5

 [1] SPH on Python https://github.com/pypr/pysph

Saturday, August 31, 2019

Word cloud

Python codes
[1] https://www.geeksforgeeks.org/generating-word-cloud-python/

Computer Graphics books




Basic in Fluids
Fluid Simulation for Computer Graphics Robert Bridson
The Art of Fluid Animation Jos Stam
Fluid Engine Development Doyub Kim


Fluid Simulations
 

 [1] Mathematics for 3D Game Programming and Computer Graphics


http://canvas.projekti.info/ebooks/Mathematics%20for%203D%20Game%20Programming%20and%20Computer%20Graphics,%20Third%20Edition.pdf
 [2] Computer Graphics Programming in OpenGL with C++
 [3] Opengl http://newton.uam.mx/xgeorge/uea/graficacion/(Morgan%20Kaufmann)%20Advanced%20Graphics%20Programming%20Using%20OpenGL%20(2005).pdf
 [4] 3D Graphics http://www.cse.chalmers.se/edu/year/2018/course/TDA361/LearningModern3DGraphicsProgramming.pdf
 [5]Foundations of 3D Computer Graphics
 [6] Interactive Computer Graphics https://inspirit.net.in/books/academic/Interactive%20Computer%20Graphics.pdf







Thursday, August 29, 2019

Anti Aliasing Lectures


Lectures
[1] http://cs248.stanford.edu/winter19content/lectures/02_drawtriangle/02_drawtriangle_slides.pdf
[2] http://graphics.stanford.edu/courses/cs348b-19-spring-content/lectures/08_sampling/08_sampling_slides.pdf
[3] http://www8.cs.umu.se/kurser/TDBC07/HT04/handouts/HO-lecture5.pdf


References:
[1] Super Sample http://hhoppe.com/proj/supersample/
Amortized Supersampling  http://hhoppe.com/supersample.pdf
[2] Sampling https://noahmjacobs.com/graphics/rasterizer/
[3] MultiSampling https://learnopengl.com/Advanced-OpenGL/Anti-Aliasing
[4] Anti Aliasing https://vr.arvilab.com/blog/anti-aliasing

Super-sampling Anti-aliasing Analyzed https://pdfs.semanticscholar.org/ebd9/ddb08c4244fc7df00672cacb420212cdde54.pdf

Comparison for R.T. Applications http://jacoblongazo.com/documents/Anti-Aliasing%20Paper.pdf


Related:
[1] Deep Learning Super resolution (2019) https://arxiv.org/pdf/1808.03344.pdf

Machine intelligence







Google brain https://research.google.com/bigpicture/

Mathematical Morphology on Graphs



References:
[1] A graph-based mathematical morphology reader https://arxiv.org/pdf/1404.7748.pdf
[2] Morphological filtering on graphs https://hal.archives-ouvertes.fr/hal-00700784v1/document

Monday, August 26, 2019

CGAL Alpha Shape Demos


Install CGAL
sudo apt-get install libcgal-dev

Compiling
g++ ex_alpha_shapes3.cpp -o ex1 -lCGAL -lgmp -frounding-math

Install Dependences for AlphaShape code

qtscript5-dev
libqt5opengl5-dev
libqt5svg5-dev

Others
[1] Poisson Disk Sample http://devmag.org.za/2009/05/03/poisson-disk-sampling/

Projection Resources

T-SNE SAMMON ...

Resources:
[1] t-sne tutorial https://distill.pub/2016/misread-tsne/
[2] umap python code https://colab.research.google.com/drive/1x22doRqgtsfnjFNB4MAYQPkruT2n3fmE

Source Code:
[1] https://github.com/tompollard/sammon

Friday, August 23, 2019

3D Contouring, Surface Reconstruction

IO/Tools
[1] Read OBJ file https://github.com/pywavefront/PyWavefront

Marching Squares
[1] Reading Metaballs and MS http://jamie-wong.com/2014/08/19/metaballs-and-marching-squares/
[2] https://github.com/SushantKafle/MarchingSquares

Marching cubes Python
[1] Python Code https://scikit-image.org/docs/dev/auto_examples/edges/plot_marching_cubes.html
[2] Python and OpenGL(Fast) https://github.com/ilastik/marching_cubes
[2.1] http://www.pyqtgraph.org/documentation/_modules/pyqtgraph/opengl/GLViewWidget.html
[2.2] http://www.pyqtgraph.org/ 

[3] https://github.com/pmneila/PyMCubes





Marching cubes C/C++
[0 http://paulbourke.net/geometry/polygonise/

[1] On OpenGl  http://paulbourke.net/geometry/polygonise/
     For compile :
     $g++ filename.cpp -o filename -lGL -lglut -lGLU

[2] On OpenGl https://github.com/nsf/mc

[3] Marching Cubes 33
         https://github.com/liscustodio/modified_mc33
         http://liscustodio.github.io/C_MC33/
[4] http://www.angelfire.com/linux/myp/MC/index.html

[5] Read  Wavefront obj file https://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadOBJ

[6] https://lorensen.github.io/VTKExamples/site/Cxx/Modelling/DiscreteMarchingCubes/

Lectures:
[1] O Marching Cubes(pt) http://fei.edu.br/~psergio/CG_arquivos/Marching%20Cubes.pdf

Thursday, August 22, 2019

Audio Feature Extraction



https://github.com/tuwien-musicir/rp_extract
https://github.com/tyiannak/pyAudioAnalysis

Saturday, August 17, 2019

Fluid Simulation:Compile Position Based Dynamics


PositionBasedDynamics is a library for the physically-based simulation of rigid bodies, deformable solids and fluids.

mkdir build
cd build
cmake ..

vi ../Demos/CMakeLists.txt

find_package(OpenMP)
if (OPENMP_FOUND)
     set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif(OPENMP_FOUND)

New Challenges:
Cuda version https://github.com/eric1221bday/PBF_15418

https://github.com/ebirenbaum/ParticleSolver
https://github.com/StoneBird/CIS565-FinalProject
https://github.com/chiwsy/Position_Based_Fluids

Resources:
[1] PBD https://github.com/InteractiveComputerGraphics/PositionBasedDynamics/




OpenCL version
[1] https://github.com/bwiberg/position-based-fluids

$git clone https://github.com/bwiberg/position-based-fluids.git
$cd position-based-fluids
$git submodule update --init --recursive #call dependences
$cmake -DCMAKE_BUILD_TYPE=Debug ..







Gaussian blur/filter


Resources:
OpenCL:

$clinfo

 [1] 2D Gauss+SIPL https://www.eriksmistad.no/gaussian-blur-using-opencl-and-the-built-in-images-textures/


[2] Gaussian blur  https://github.com/mnmnc/gaussian_blur_opencl
$locate CL/cl.h
$sudo apt install ocl-icd-opencl-dev
$g++ main.cpp lodepng.cpp -lOpenCL -std=c++11 -o gb -I /usr/include





Cuda:
[1] Compile by Cuda 8 https://github.com/yanji84/cuda-blur
$nvcc -c -arch=sm_20 blur.cu -I /usr/local/cuda-8.0/samples/common/inc/
$g++ main.cpp reference_cal.cpp util.cpp -I /usr/local/cuda-8.0/samples/common/inc/ `pkg-config --cflags --libs opencv` -lcuda  -I /usr/local/cuda-8.0/targets/x86_64-linux/include/ blur.o  -std=c++11 -L /usr/local/cuda-8.0/targets/x86_64-linux/lib/ -lcudart


[2] Gaussian kd-tree https://melhorum.blogspot.com/search?q=Gaussian

Cuda Makefile:
all: program

program: cudacode.o
    g++ -o program -L/usr/local/cuda/lib64 -lcuda -lcudart main.cpp  cudacode.o 

cudacode.o:
    nvcc -c -arch=sm_20 cudacode.cu 

clean: rm -rf *o program
 
Cuda Tutorials:
[1] Hello https://cuda-tutorial.readthedocs.io/en/latest/tutorials/tutorial01/
[2] Summary http://www.icl.utk.edu/~mgates3/docs/cuda.html
[1] locate convolutionSeparable #example from cuda
[2] Samples https://docs.nvidia.com/cuda/cuda-samples/index.html#cuda-separable-convolution
[3] Compiling https://devblogs.nvidia.com/easy-introduction-cuda-c-and-c/
[4] Find Cuda https://github.com/dusty-nv/jetson-utils/tree/master/cuda
[5] Image to GL https://github.com/zchee/cuda-sample/tree/master/3_Imaging/simpleCUDA2GL
[6] Image processing http://developer.download.nvidia.com/compute/DevZone/C/html/Image_Processing.html

References:


Monday, August 12, 2019

Fluid Simulation Lectures and Code

MPM From FLIP From PIC

Lectures:

[1] https://en.wikipedia.org/wiki/Material_point_method
[2] SPH Simulation lecture http://web.cse.ohio-state.edu/~wang.3602/courses/cse788-2011-fall/results/Yi_Liu/SPH%20Water%20Simulation.htm

 Video Lectures
[1] Introduction to SPH https://www.youtube.com/watch?v=tAXHCAEgSuE #Spectral processing
[1] SPH Theory https://www.youtube.com/watch?v=3BGKn8PyIHo

Codes:
[1] http://rlguy.com/gridfluidsim/
[2] http://kbladin.se/dmt_projects/fluid_simulation.php

Saturday, August 10, 2019

PolĆ­tica Peruana - Historia


[1] Haya de la torre y el Apra

https://materialesfopep.files.wordpress.com/2010/04/enriquez-luis-eduardo-la-estafa.pdf

Arequipa 1800

Mapas

[1]
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3zUBhdrW4ma8ghFCeuCXX8PYb8TicCJo7ls7unWUGPmf7h0RxnUjoDJxcEQKdQPHtqe1Y2yHUoMsTVtKW1UNWv8GD2lfUMqJPRbH9tWaX3AWz81ymnvhq4wWVfxv0wzm6TcqMeg/s1600/Arequipa+-+Detalle.jpg


[2] https://www.davidrumsey.com/luna/servlet/view/all/where/Arequipa%2B%2528Peru%2529/

[3]Virreinado del Rio de la plata
[4] Virreinato de americ 17xx


TĆ©rminos
[1] lloclla
s. f. PerĆŗ METEOROLOGƍA Avenida anegada de agua a causa de las lluvias torrenciales.

Friday, August 09, 2019

Computer Animation


Resources:
[1] AnimaciĆ³n y SimulaciĆ³n Avanzada http://www.mastergraficos.com/asignatura/animacion-simulacion-avanzada/



DualSPHysics Compile



Resources:
[1] code https://github.com/DualSPHysics/DualSPHysics
[2] scripts to execute models https://github.com/fincahuanaco/DualSPHysicsScripts


[3] https://dual.sphysics.org/index.php/downloads/
[4] https://dual.sphysics.org/files/3313/8753/4540/DualSPHysics_v3.0_GUIDE.pdf
[5] https://github.com/DualSPHysics/DualSPHysics/wiki/12.-Testcases#obc7

Update 2021

compile GPU version (CMakeLists.txt will find cuda, display ${CUDA_VERSION} to verify if is getting the right version).

See https://melhorum.blogspot.com/2021/03/cuda-8-on-linux18.html to install CUDA and requeriments.

on DualSPHysics/src/source


mkdir build

cd build

export CC=/usr/bin/gcc-5;CXX=/usr/bin/g++-5 #for cuda 8


export CC=/usr/bin/gcc-6;CXX=/usr/bin/g++-6 #for cuda 9

cmake ..

make In some cases you need to reduce cuda version to execute simulation. in case of GeForce GTX 460(with Driver Version: 390.59). I was forced to change from cuda9(supported) to cuda8(supported too) to execute simulations with around 360k particles.


Make Model

[1] https://www.freecadweb.org/




SPH Solvers and related


Resources:
[1] Code Catalog https://spheric-sph.org/sph-projects-and-codes
[2] GPUSPH https://www.gpusph.org/downloads/
Not compile by g++>4.9 (require Cuda)

$git clone https://github.com/gpusph/gpusph.git
$CC=/usr/bin/gcc-4.9 CXX=/usr/bin/g++-4.9 make
$make
 
[3] Crixus(Boundary definition) https://github.com/Azrael3000/Crixus

[4] C++ library that enables computations over a set of particles or points in N-dimensional space (cell list, kd-tree or hyper oct-tree) https://github.com/aboria/Aboria
[5] Previous to Aboria https://github.com/martinjrobins/SPH-DEM



Thursday, August 08, 2019

Ocean References - Sources


https://www.fxguide.com/fxfeatured/siggraph-day-1-and-digipro/
ocean android https://arm-software.github.io/opengl-es-sdk-for-android/ocean_f_f_t.html
blender flip https://blendermarket.com/posts/flip-fluids-10-tips-to-improve-your-blender-workflow
standfor physic animation http://physbam.stanford.edu/

fast gpu fluid gvdb http://www.cs.utah.edu/~kwu/gvdb_sim.html

cuda openpbd http://joelgross.me/projects/pbf.html

others
[1] https://www.cs.cmu.edu/~kmcrane/Projects/GPUFluid/
[2] https://www.yiningkarlli.com/projects/arielflip.html
[3] https://developer.nvidia.com/nvidia-flow
[4] https://github.com/rlguy/Blender-FLIP-Fluids
[5] http://www.smart-coding.net/tag/irregular-sea-wave/
[6] http://revers.keep.pl/
[7] https://developer.nvidia.com/content/fluid-simulation-alice-madness-returns
[8] http://peterkutz.com/sph/

Ubuntu Forware port 80

  #!/bin/bash iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8069 iptables -t nat -A PREROUTING -i eth0 -p tc...