Skip to content

Instantly share code, notes, and snippets.

View mudream4869's full-sized avatar
📚
Mukyu Learning

神楽坂帕琪 mudream4869

📚
Mukyu Learning
View GitHub Profile
@mudream4869
mudream4869 / raytracing.py
Created March 22, 2017 16:37 — forked from rossant/raytracing.py
Very simple ray tracing engine in (almost) pure Python. Depends on NumPy and Matplotlib. Diffuse and specular lighting, simple shadows, reflections, no refraction. Purely sequential algorithm, slow execution.
import numpy as np
import matplotlib.pyplot as plt
w = 400
h = 300
def normalize(x):
x /= np.linalg.norm(x)
return x
@mudream4869
mudream4869 / ipm.cpp
Created August 19, 2017 15:30 — forked from censored--/ipm.cpp
IPM
#include <Eigen/Core>
#include <Eigen/Sparse>
using namespace std;
using namespace Eigen;
void sinitialize(VectorXd &s,double mu,unsigned int sizex,VectorXd &x)
{
for (unsigned int i=0;i<sizex;i++)
if (x[i]!=0)s[i] = mu/x[i];
else s[i]=0.1;
@mudream4869
mudream4869 / CHANGELOG.md
Created March 2, 2022 04:04 — forked from juampynr/CHANGELOG.md
Sample CHANGELOG

Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased] - yyyy-mm-dd

Here we write upgrading notes for brands. It's a team effort to make them as