C语言
Toblerone_Wind
xC3xDCxC2xEB
展开
-
递归解决汉诺塔问题
问题描述有三个汉诺塔A、B、C,现需要将A的所有块移动到C,每次移动必须保证数字大的块在数字小的块之下。输入3输出move 1 from A to Cmove 2 from A to Bmove 1 from C to Bmove 3 from A to Cmove 1 from B to Amove 2 from B to Cmove 1 from A to C问题分析起始状态S0:A上数字为[1, 2, ..., n](自上而下),B、C无数字;终止状态S..原创 2021-11-06 15:30:30 · 204 阅读 · 0 评论 -
C语言实现EPSG:4326和EPSG:3857的互转
EPSG:4326是我们熟悉的WGS84,EPSG:3857又称EPSG:900913,是Pseudo-Mercator,互联网地图一般都采用EPSG:3857参考GitHub项目Gcoord:https://github.com/hujiulong/gcoord#include<stdio.h>#include<math.h>#define PI 3.1415926535897932double D2R = PI / 180;double R2D = 180 /原创 2021-09-27 19:30:50 · 934 阅读 · 0 评论 -
计算机图形学N次Bezier曲线绘制的理解及代码(基于OpenGL和vc)
二次Bezier曲线三次Bezier曲线n次Bezier曲线的函数double B(int n,int i,float t){ int sum=1; if(i==n||i==0) return pow(t,i)*pow(1-t,n-i); int j; for(j=n-i+1;j<=n;j++) sum*=j;...原创 2019-04-14 20:30:19 · 3736 阅读 · 0 评论