Skip to content

Instantly share code, notes, and snippets.

View danilogr's full-sized avatar

Danilo Gasques danilogr

View GitHub Profile
@dwilliamson
dwilliamson / ModifiedMarchingCubes.js
Created February 8, 2022 16:20
Transvoxel's Modified Marching Cubes Lookup Tables
//
// Lookup Tables for Transvoxel's Modified Marching Cubes
//
// Unlike the original paper (Marching Cubes: A High Resolution 3D Surface Construction Algorithm), these tables guarantee
// a closed mesh "whose connected components are continuous and free of holes."
//
// Rotations are prioritised over inversions so that 3 of the 6 cases containing ambiguous faces are never added. 3 extra
// cases are added as a post-process, overriding inverses through custom-build rotations to eliminate the rest.
//
// Uses the exact same co-ordinate system as https://gist.github.com/dwilliamson/c041e3454a713e58baf6e4f8e5fffecd
@snowzurfer
snowzurfer / 3DPointsFromDepth.swift
Last active March 24, 2024 05:52
3D world points from ARKit depth
import ARKit
import SceneKit
let horizontalPoints = 256 / 2
let verticalPoints = 192 / 2
var depthNodes = [SCNNode]()
var parentDebugNodes = SCNNode()
var sceneView: ARSCNView!
// Somewhere during setup
@shubhamwagh
shubhamwagh / TexturedMeshSteps.md
Last active April 24, 2024 14:26
Steps to create textured mesh from point cloud using Meshlab

Steps to create Textured Mesh from Point Cloud using Meshlab

Get your PointCloud into MeshLab

  • Import the pointcloud file in ".ply" file format in Meshlab. Before importing make sure you do some pre-processing / cleaning on point cloud so as to ease the process of meshing.

Point Cloud Simplification and Normals Computation

  • Next we need to reduce the number of point samples for smooth meshing.
    • So go to Filters -> Point Set -> Point Cloud Simplification. Enter Number of samples circa 5% of original number of points. Make sure Best Sample Heuristic is checked.
  • After point cloud simplification, make sure to select Simplified point cloud in the Show Layer Dialog on the right hand side. If not visible, it can be opened by navigating to View -> Show Layer Dialog. Now we need to compute normals for point set.
  • So go to Filters -> Point Set -> Compute normals for point sets . Enter Neighbour num between 10 - 100. Initially try with 10 and
const serialize = uri => decodeURIComponent(uri).split('&').map(uri => ({ [uri.split('=')[0]]: uri.split('=')[1] })).reduce((a,b) => Object.assign(a,b))
console.log(serialize("_id%3D58c43d995cb9191a2f676b25%26index%3D0%26guid%3D798ebd68-22d5-4465-9d34-d4717891901d%26isActive%3Dfalse%26balance%3D%242%2C569.51%26picture%3Dhttp%3A%2F%2Fplacehold.it%2F32x32%26age%3D33%26eyeColor%3Dgreen%26name%3DDesiree%20Cervantes%26gender%3Dfemale%26company%3DSYNKGEN%26email%3Ddesireecervantes%40synkgen.com%26phone%3D%2B1%20(975)%20536-2019%26address%3D855%20Hendrickson%20Street%2C%20Libertytown%2C%20Marshall%20Islands%2C%205292%26about%3DElit%20anim%20occaecat%20proident%20consectetur%20veniam%20et%20deserunt%20irure.%20Sint%20aliquip%20fugiat%20aute%20tempor%20veniam%20eu%20duis%20mollit%20eiusmod%20aliquip%20ipsum%20enim%20do%20in.%20Pariatur%20nisi%20proident%20commodo%20duis%20nisi%20id%20ut%20commodo%20aute%20irure.%20Minim%20ut%20tempor%20in%20tempor%20dolor%20ex%20veniam%20fugiat.%20Sint%20cillum%20non%20qui%20elit%20a
@LotteMakesStuff
LotteMakesStuff / ReadOnlyAttribute.cs
Created January 17, 2017 00:17
ReadOnly property drawer for Unity~ Add a [ReadOnly] attribute to a property to make it show up as read only in the inspector
// NOTE DONT put in an editor folder
using UnityEngine;
public class ReadOnlyAttribute : PropertyAttribute { }
@drscotthawley
drscotthawley / greenscreen.py
Last active December 10, 2021 07:21
greenscreen.py: Greenscreen effect without a physical green screen, via OpenCV and Python
#! /usr/bin/env python
'''
greenscreen.py: Greenscreen effect without a physical green screen
This performs background subtraction, and sets the background to "green" for use with "key frame" video editing software
Author: Scott Hawley, https://github.com/drscotthawley
Requirements:
Python, NumPy and OpenCV
I got these via Macports, but Homebrew, etc. work.
@alexcasalboni
alexcasalboni / README.md
Last active April 5, 2024 10:49
Google Vision API Examples - FACE DETECTION
@miguelsaddress
miguelsaddress / octave.md
Created January 6, 2016 20:25 — forked from obstschale/octave.md
An Octave introduction cheat sheet.

Octave CheatSheet

GNU Octave is a high-level interpreted language, primarily intended for numerical computations.
(via GNU Octave)

Basics

  • not equal ~=
  • logical AND &&
@ocornut
ocornut / imgui_node_graph_test.cpp
Last active April 23, 2024 19:02
Node graph editor basic demo for ImGui
// Creating a node graph editor for Dear ImGui
// Quick sample, not production code!
// This is quick demo I crafted in a few hours in 2015 showcasing how to use Dear ImGui to create custom stuff,
// which ended up feeding a thread full of better experiments.
// See https://github.com/ocornut/imgui/issues/306 for details
// Fast forward to 2023, see e.g. https://github.com/ocornut/imgui/wiki/Useful-Extensions#node-editors
// Changelog
// - v0.05 (2023-03): fixed for renamed api: AddBezierCurve()->AddBezierCubic().