Skip to content

Instantly share code, notes, and snippets.

Avatar
👩‍🔬
Ph.D. student

Misaki Sakashita marty958

👩‍🔬
Ph.D. student
View GitHub Profile
@marty958
marty958 / SaveOpenGLWidowWithOpenCV.cpp
Created Jun 20, 2020
Save a OpenGL widow image with OpenCV
View SaveOpenGLWidowWithOpenCV.cpp
#include <iostream>
#include <OpenGL/OpenGL.h>
#include <GLUT/GLUT.h>
#include "opencv2/opencv.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/imgcodecs.hpp"
const int WindowSize = 600;
void display(void){
@marty958
marty958 / main.cpp
Last active Dec 20, 2019
Use Marching Cubes
View main.cpp
#include "CIsoSurface.h"
using namespace std;
int main() {
const int pnum = 2;
float field[pnum][pnum][pnum] = {1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
CIsoSurface<float> *ciso = new CIsoSurface<float>();
ciso->GenerateSurface(&field[0][0][0], 0.5, pnum - 1, pnum - 1, pnum - 1, 1.0, 1.0, 1.0);
return 0;
}
View PrintVTK.cpp
template <class T>
void CIsoSurface<T>::PrintVTK(int step, string _foldername) {
if(!IsSurfaceValid()) {
cout << "Isosurface is not valid!" << endl;
exit(1);
}
ostringstream oss_step;
oss_step.setf(ios::right);
oss_step.fill('0');
oss_step.width(8);
@marty958
marty958 / dla.pde
Last active Mar 31, 2017
DLAprogram
View dla.pde
ArrayList<Seed> seeds;
ArrayList<Particle> particles;
ArrayList<Integer> changes;
int i, j;
int count;
float dx;
float dy;
float dist;
float mindist;
int minnum;