Monday, September 24, 2018

opengl compile error

Compiling Collisions, quadtrees, uniform grid.

https://github.com/MarcusMathiassen/P2D

$g++ Circle.cpp getTime64.cpp Process.cpp Utility.cpp Color.cpp      hwinfo.cpp Inputs.cpp Quadtree.cpp  Vec2.cpp Config.cpp main.cpp Rect.cpp FixedGrid.cpp Node.cpp Render.cpp -I ../include/  -lGL -lglut -lGLU -lGLEW -lpthread -lX11 -lglfw  -o q5


error while loading shared libraries: libGLEW.so.2.1: cannot open shared object file: No such file or directory

$sudo apt-get install libglew-dev
$locate libGLEW.so.2.1
...
/usr/lib64/libGLEW.so.2.1.0
/usr/local/lib/libGLEW.so.2.1
/usr/local/lib/libGLEW.so.2.1.0
...
...

sudo vi /etc/ld.so.conf.d/glew.conf
/usr/local/lib

$sudo ldconfig

Resources:
[1] https://sourceforge.net/projects/glew/files/glew/snapshots/

Friday, September 14, 2018

3D Models & tools


1) Open .obj 3D format

view3dscene
$sudo apt-get install view3dscene

meshlab - System for processing and editing triangular meshes
$sudo apt-get install meshlab

g3dviewer
$sudo apt-get install  g3dviewer

Other tools

  1. glc_player which is said to read-and-show '.3ds', '.obj', '.stl', '.off', '.3dxml', and Collada ('.dae') files
  2. g3dviewer which is said to read-and-show '.3ds', '.lwo', '.obj', '.dxf', '.md2', '.md3', '.wrl', '.vrml', '.dae' (COLLADA), '.ase' (ASCII Scene Exporter), '.ac' (AC3D)
  3. ivview which reads-and-shows '.iv' and VRML1 files
  4. paraview which reads-and-shows '.ply' and '.vt*' files
  5. varicad-view which reads-and-shows '.dwg' (2D), '.dxf' (2D only?), '.igs' (maybe?), '.stp' (3D) files 
  6. wings3d - Nendo-inspired 3D polygon mesh modeller (legacy)
  7. gmsh - Three-dimensional finite element mesh generator
  8. libadmesh-dev - Tool for processing triangulated solid meshes.
  9. libgmsh-dev - Three-dimensional finite element mesh generator.
  10. libmadlib-dev - mesh adaptation library
  11. libnglib-dev - Automatic 3d tetrahedral mesh generator development files
  12. libscotch-dev - programs and libraries for graph, mesh and hypergraph partitioning
  13. netgen - Automatic 3d tetrahedral mesh generator
  14. libtriangle-dev - High-quality 2-D mesh generator development files
Resources
 [1] mview http://mview.sourceforge.net/

Models
  [1] .max, .obj, blender, etc. www.turbosquid.com
  [1] http://tf3dm.com/

Thursday, September 13, 2018

Python extending functions from C/C++



References
[1] https://docs.python.org/3/library/ctypes.html

https://cython.readthedocs.io/en/latest/src/tutorial/cython_tutorial.html
https://opensourceforu.com/2010/05/extending-python-via-shared-libraries/
https://en.wikibooks.org/wiki/Python_Programming/Extending_with_C%2B%2B


Friday, September 07, 2018

Linear Regresion



[1] Regresion linear http://onlinestatbook.com/2/regression/intro.html
[2] https://towardsdatascience.com/linear-regression-with-example-8daf6205bd49


Wednesday, September 05, 2018

pip3 ImportError: cannot import name 'main'


In linux you need to change the file: /usr/bin/pip3 from:
 
from pip import main
if __name__ == '__main__':
    sys.exit(main())

to:

from pip import __main__
if __name__ == '__main__':
    sys.exit(__main__._main())
 
 

Monday, September 03, 2018

c++ realloc references



https://en.cppreference.com/w/c/memory/realloc
https://www.tutorialspoint.com/c_standard_library/c_function_realloc.htm

Firefox open multiple private window

    /opt/firefox/firefox-bin --profile $(mktemp -d) --private-window www.google.com www.bing.com