Skip to content

Instantly share code, notes, and snippets.

View feliwir's full-sized avatar
👨‍💻
Coding along

Stephan Vedder feliwir

👨‍💻
Coding along
  • mbits imaging GmbH
  • Germany
View GitHub Profile
void computeCubicSplineCoefficients(double** a, double* x, double* y, int n)
{
double** matrix = new double*[n-1];
for (int i=0; i<n-1; i++)
matrix[i] = new double[n-1];
double* sol = new double[n-1];
double* rhs = new double[n-1];
//create our h array
double* h = new double[n-1];
void computeCubicSplineCoefficients(double** a, double* x, double* y, int n)
{
double** matrix = new double*[n-1];
for (int i=0; i<n-1; i++)
matrix[i] = new double[n-1];
double* sol = new double[n-1];
double* rhs = new double[n-1];
/* Füllen Sie hier die Matrix und die rechte Seite mit den entsprechenden Werten. */
for(int i=0;i<n-1;++i)
void computeCubicSplineCoefficients(double** a, double* x, double* y, int n)
{
double** matrix = new double*[n-1];
for (int i=0; i<n-1; i++)
matrix[i] = new double[n-1];
double* sol = new double[n-1];
double* rhs = new double[n-1];
/* Füllen Sie hier die Matrix und die rechte Seite mit den entsprechenden Werten. */
for(int i=0;i<n-1;++i)
void computeCubicSplineCoefficients(double** a, double* x, double* y, int n)
{
double** matrix = new double*[n-1];
for (int i=0; i<n-1; i++)
matrix[i] = new double[n-1];
double* sol = new double[n-1];
double* rhs = new double[n-1];
/* Füllen Sie hier die Matrix und die rechte Seite mit den entsprechenden Werten. */
for(int i=0;i<n-1;++i)
void computeCubicSplineCoefficients(double** a, double* x, double* y, int n)
{
double** matrix = new double*[n-1];
for (int i=0; i<n-1; i++)
matrix[i] = new double[n-1];
double* sol = new double[n-1];
double* rhs = new double[n-1];
/* Füllen Sie hier die Matrix und die rechte Seite mit den entsprechenden Werten. */
for(int i=0;i<n-1;++i)
/*
VERTEX SHADER FOR SIMPLE LIGHT MODELS
created by Daniel Jungblut, IWR Heidelberg, February 2008
refined by Bastian Rieck, IWR Heidelberg, May 2010
Simplified Blinn-Phong shading model for a single light source. Hit SPACE in
order to move the light source. All vector calculations should be made in
world coordinates.
#pragma once
#include <map>
namespace anvil
{
template<class xtype, class ytype>
class Interpolate
{
public:
inline void AddPoint(const xtype x, const ytype y)
{
void JsonLoader::LoadMaterial(const std::string &name, const std::string &path)
{
std::shared_ptr<Material> mat;
std::ifstream fin(path, std::ios::in);
if (fin.fail())
throw AnvilException("Failed to open material file: " + path, __FILE__, __LINE__);
IStreamWrapper isw(fin);
Document d;
ParseResult ok = d.ParseStream(isw);
#version 400 core
in vec3 position;
in vec2 uv;
in vec3 normal;
in vec3 material;
uniform vec3 cameraPos;
uniform vec3 lightDir;
uniform sampler2DArray albedoTex;
#version 400 core
in vec3 position;
in vec2 uv;
in vec3 normal;
in vec3 material;
in mat3 TBN;
uniform vec3 cameraPos;
uniform vec3 lightDir;