
图形学
文章平均质量分 57
cg
Zih_An
坐科
展开
-
使用libigl绘制implicit function图像
转换为mesh网格,常用的算法是marching cubes算法(siggraph 87’原创 2023-03-19 22:52:07 · 282 阅读 · 1 评论 -
win11: cmake+glfw+imgui
win11: cmake+glfw+imgui原创 2022-12-10 23:12:07 · 1411 阅读 · 0 评论 -
win11:clion + cmake + mingw + glfw
win11: clion+cmake+mingw+glfw原创 2022-12-10 20:45:27 · 1124 阅读 · 0 评论 -
Squarified Treemaps 论文算法复现
Squarified Treemaps复现了论文Squarified Treemaps的算法,将层次结构可视化为宽高比适宜的矩形划分图GitHub完整代码实验环境windows10visual studio 2017opengl: GLFWc++可视化效果使用论文中的测试数据测试数据同论文Squarified Treemaps中样例(按100的比例扩大),结果标注面积如图所示(由于本次实现坐标从左上角开始计算,因此行4 3和行2 2 1位置不同,但没有任何影响)数据:vector原创 2020-11-28 01:54:30 · 1545 阅读 · 1 评论 -
使用libigl显示距离场效果
代码#pragma warning(disable:4996)#include<iostream>#include<igl/readOBJ.h>#include<igl/opengl/glfw/Viewer.h>#include<igl/png/readPNG.h>#include <igl/unproject_onto_mesh.h>// distance field algorithm#include<stdafx.h&原创 2020-11-08 01:20:37 · 566 阅读 · 0 评论 -
b样条曲线:OpenGL GLFW实现交互绘制b样条曲线(含闭合曲线及多种节点向量)
代码/*INTRODUCTION// Mouse:// - LEFT button:// 1. add/move a control points// 2. with keyboard DELETE: delete control points// - RIGHT button:// 1. PRESS: select a control points// 2. RELEASE: add a control point in front of the selected point//原创 2020-11-08 01:19:32 · 1392 阅读 · 1 评论 -
bezier曲线:OpenGL GLFW实现交互绘制bezier曲线
代码/*INTRODUCTION// Mouse:// - LEFT button:// 1. add/move a control points// 2. with keyboard DELETE: delete control points// - RIGHT button:// 1. PRESS: select a control points// 2. RELEASE: add a control point in front of the selected point//原创 2020-11-08 01:18:13 · 1225 阅读 · 0 评论 -
扫描线填充算法:OpenGL GLFW实现交互多边形填充
代码#include <GLFW/glfw3.h>#include<iostream>#include<vector>#define WIDTH 960.f // width of main window#define HEIGHT 600.f // height of main windowusing namespace std;const int MAXN = 600; // >= HEIGHT, 扫描线// hide the con原创 2020-11-08 01:17:06 · 965 阅读 · 0 评论 -
Sutherland-Hodgman算法:OpenGL GLFW实现交互的多边形裁剪
代码/*INTRODUCTION// Mouse:// - LEFT button:// 1. add point to draw the polygon// - RIGHT button:// clip the polygon// Keyboard:// - SPACE:// clear the window*/#include <GLFW/glfw3.h>#include<iostream>#include<vector>#defi原创 2020-11-08 01:15:47 · 890 阅读 · 0 评论 -
Liang-Barsky算法:OpenGL GLFW实现交互的直线段裁剪
代码/*INTRODUCTION// Mouse: // - LEFT button: // 1. draw a new line// 2. choose the endpoint to modify a line// - RIGHT button:// clip the lines// Keyboard:// - SPACE:// clear the window// - DELETE:// keep the clipped lines(black ones)原创 2020-11-08 01:14:07 · 733 阅读 · 1 评论 -
bresenham算法:OpenGL GLFW实现交互画直线
代码/*INTRODUCTION// Mouse:// - LEFT button:// 1. draw a new line// 2. choose the endpoint to modify a line// Keyboard:// - DELETE:// clear the window*/#include <GLFW/glfw3.h>#include<iostream>#include<vector>#include&l原创 2020-11-08 01:12:23 · 1217 阅读 · 2 评论 -
c++ OpenGL之GLFW/glfw3.h:windows+vs配置步骤
参考链接:https://www.youtube.com/watch?v=OR4fNpBjmq8&list=PLlrATfBNZ98foTJPJ_Ev03o2oq3-GGOS2&index=2一、官网下载链接:https://www.glfw.org/download.html选择32位(32-bit windows binaries)下载:二、创建vs项目(需要用到glfw的项目)1. 在该工程目录下新建文件夹,命名为“Dependencies”2. 在“Depende原创 2020-09-18 01:45:47 · 8344 阅读 · 3 评论