- Bluenoise in the game INSIDE (dithering, raymarching, reflections)
- Dithering, Ray marching, shadows etc
- A Survery of Blue Noise and Its Applications
- Moments In Graphics (void-and-cluster)
- Bart Wronski Implementation of Solid Angle algorithm
| #include <iostream> | |
| #include <fstream> | |
| // Windows specific: Uncomment the following line to open a console window for debug output | |
| #if _DEBUG | |
| #pragma comment(linker, "/subsystem:\"console\" /entry:\"WinMainCRTStartup\"") | |
| #endif | |
| // Simple OpenGL GLM/SDL demo | |
| // Renders a rotating pyramid, showing 3 of 4 sides (allowing back faces to be seen) |
| /* | |
| * Simple 2D NURBS renderer for OpenCV, reading DXF files | |
| * | |
| * The MIT License (MIT) | |
| * | |
| * Copyright (c) 2013 Roy Shilkrot | |
| * | |
| * Updated: Nov 2016 | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy |
| boundingSphere :: [(Float,Float,Float)] -> ((Float,Float,Float),Float) --takes a list of points in 3D to a pair (center,radius) | |
| boundingSphere points = | |
| case points of --induction on number of points: 0,1,2, or 3+ | |
| [] -> ((0,0,0),0) | |
| p:[] -> (p,0) | |
| (p1,p2,p3):(q1,q2,q3):[] -> (((p1+q1)/2,(p2+q2)/2,(p3+q3)/2),dist (p1,p2,p3) (q1,q2,q3)) | |
| p:pts -> let | |
| y@(y1,y2,y3) = head $ filter (\pt -> (dist pt p) - 0.1 < (maximum $ map (dist p) pts)) pts | |
| z@(z1,z2,z3) = head $ filter (\pt -> (dist pt y) - 0.1 < (maximum $ map (dist y) pts)) pts | |
| initSphere@(ctr,rad) = (((y1+z1)/2, (y2+z2)/2, (y3+z3)/2), dist y z / 2) |
| #pragma once | |
| // Code adapted from https://github.com/propanoid/DBSCAN | |
| #include <vector> | |
| #include <algorithm> | |
| #include <omp.h> | |
| // Any basic vector/matrix library should also work | |
| #include <Eigen/Core> |
| /// perform the Simplest Color Balancing algorithm | |
| void SimplestCB(Mat& in, Mat& out, float percent) { | |
| assert(in.channels() == 3); | |
| assert(percent > 0 && percent < 100); | |
| float half_percent = percent / 200.0f; | |
| vector<Mat> tmpsplit; split(in,tmpsplit); | |
| for(int i=0;i<3;i++) { | |
| //find the low and high precentile values (based on the input percentile) |
| /* | |
| Following file take opencv mat file as an input and run inception model on it | |
| Created by : Kumar Shubham | |
| Date : 27-03-2016 | |
| */ | |
| //Loading Opencv fIles for processing | |
| #include <opencv2/opencv.hpp> |
| /* | |
| Following file take opencv mat file as an input and convert it to proper tensor object | |
| Created by : Kumar Shubham | |
| Date : 27-03-2016 | |
| */ | |
| //Loading Opencv fIles for processing | |
| //#include <opencv2/opencv.hpp> |
| import java.util.ArrayList; | |
| import java.util.Arrays; | |
| import java.util.Comparator; | |
| import java.util.List; | |
| /** | |
| * http://www.geeksforgeeks.org/closest-pair-of-points-onlogn-implementation/ | |
| * https://www.youtube.com/watch?v=_pSl90jq-m0 another good explanation | |
| * Given coordinates of points find closest pair points distance. | |
| * |
| // A simple quickref for Eigen. Add anything that's missing. | |
| // Main author: Keir Mierle | |
| #include <Eigen/Dense> | |
| Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d. | |
| Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols. | |
| Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd. | |
| Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major. | |
| Matrix3f P, Q, R; // 3x3 float matrix. |