Skip to content

Instantly share code, notes, and snippets.

View sdkfz181tiger's full-sized avatar
👾

Kajiru sdkfz181tiger

👾
View GitHub Profile
@sdkfz181tiger
sdkfz181tiger / main.js
Last active May 31, 2024 15:24
迷路03_壁伸ばし法(p5.js)
"use strict"
// URL: https://openprocessing.org/sketch/2288416
const WHITE = "#eeeeee";
const BLACK = "#333333";
const RED = "#dd6624";
const ROWS = 13;// 迷路の大きさ(行数)
const COLS = 13;// 迷路の大きさ(列数)
@sdkfz181tiger
sdkfz181tiger / main.js
Last active May 31, 2024 12:03
迷路02_穴掘り法(p5.js)
"use strict"
// URL: https://openprocessing.org/sketch/2288405
const WHITE = "#eeeeee";
const BLACK = "#333333";
const RED = "#dd6624";
const ROWS = 13;// 迷路の大きさ(行数)
const COLS = 13;// 迷路の大きさ(列数)
@sdkfz181tiger
sdkfz181tiger / main.js
Last active June 10, 2024 01:20
迷路01_壁倒し法(p5.js)
"use strict"
// URL: https://openprocessing.org/sketch/2288369
const WHITE = "#eeeeee";
const BLACK = "#333333";
const RED = "#dd6624";
const ROWS = 13;// 迷路の大きさ(行数)
const COLS = 13;// 迷路の大きさ(列数)
@sdkfz181tiger
sdkfz181tiger / main.js
Last active May 28, 2024 09:54
フラクタル04_シェルピンスキーの曲線(L-System)
"use strict"
// URL: https://openprocessing.org/sketch/2283736
const WHITE = "#eeeeee";
const BLACK = "#2f6690";
function setup(){
createCanvas(windowWidth, windowHeight);
angleMode(DEGREES);
@sdkfz181tiger
sdkfz181tiger / main.js
Last active May 28, 2024 09:53
フラクタル03_シェルピンスキーのカーペット
"use strict"
// URL: https://openprocessing.org/sketch/2281136
const WHITE = "#eeeeee";
const BLACK = "#2f6690";
function setup(){
createCanvas(windowWidth, windowHeight);
angleMode(DEGREES);
@sdkfz181tiger
sdkfz181tiger / main.js
Last active May 28, 2024 09:53
フラクタル02_シェルピンスキーのギャスケット
"use strict"
// URL: https://openprocessing.org/sketch/2279929
const WHITE = "#eeeeee";
const BLACK = "#2f6690";
function setup(){
createCanvas(windowWidth, windowHeight);
angleMode(DEGREES);
@sdkfz181tiger
sdkfz181tiger / main.js
Last active May 28, 2024 09:53
フラクタル01_Lévy C curve
"use strict"
// URL: https://openprocessing.org/sketch/2278937
const WHITE = "#eeeeee";
const BLACK = "#2f6690";
function setup(){
createCanvas(windowWidth, windowHeight);
angleMode(DEGREES); noLoop();
@sdkfz181tiger
sdkfz181tiger / main_23.cpp
Last active May 18, 2024 05:13
C/C++課題ネタ10_文字列の操作
//==========
// 数値から文字列への変換
// 1, Compile
// g++ -std=c++17 -Wall -Wextra main.cpp
// 2, Run
// ./a.out
#include <math.h>
#include <stdio.h>
#include <string>
@sdkfz181tiger
sdkfz181tiger / main_19.cpp
Last active May 17, 2024 14:12
C/C++課題ネタ09_テンプレートx可変長引数
//==========
// 任意個数の要素をコンテナに追加
// 1, Compile
// g++ -std=c++17 -Wall -Wextra main.cpp
// 2, Run
// ./a.out
#include <math.h>
#include <stdio.h>
#include <vector>
@sdkfz181tiger
sdkfz181tiger / Mtx3xX.cpp
Last active May 17, 2024 22:17
C/C++課題ネタ08_マトリクス演算クラス(演算子オーバーロード)
#include "Mtx3xX.h"
bool Mtx3x3::operator==(const Mtx3x3 &rhs) const{
for(size_t r=0; r<size; r++){
for(size_t c=0; c<size; c++){
if(mtx[r][c] != rhs.mtx[r][c]) return false;
}
}
return true;
}