- setup() や draw() のループ https://processing.org/reference/loop_.html
- 描画色の変え方 https://processing.org/reference/stroke_.html
- 再帰呼び出し https://processing.org/examples/recursion.html
- マウスの状態を取得して線を描画 https://processing.org/examples/continuouslines.html
- マウスの状態を取得して十字を描画https://processing.org/examples/mousepress.html
- 補完 https://processing.org/examples/interpolate.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main( int argc, char** argv ); | |
int main( int argc, char** argv ) | |
{ | |
int pid; | |
printf( "Start main function.(%d)\n", __LINE__ ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#(1 2 3) permutationsDo: [:each | Transcript cr; show: each printString] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
import math | |
def my_handler(scene): | |
cf = bpy.context.scene.frame_current | |
r = (cf * 10) | |
bpy.context.object.rotation_euler[2] = math.radians(r) | |
bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// str の中身を一文字ずつ出力するプログラムを書きなさい | |
// ex) h | |
// o | |
// g | |
// ... | |
// o | |
// ヒント) P57, P69, P92, P96 | |
let str = 'hogepiyo'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// str から 'o'(オー) の個数を数えて出力するプログラムを書き Gist を使って #phh_2017_yuichi チャンネルで共有しなさい | |
// ex) 2 個 | |
let str = 'hogepiyopiyo'; | |
let count = 0; | |
for (let elem of str) { | |
if (elem === 'o') { | |
count++; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function outputString (/* 入力 */) { | |
let str = 'hogepiyo'; // 処理 | |
return str; // 出力 | |
} | |
// 'にゃん'の個数を指定出来るようにしなさい | |
// ex) outputStringAddNyan ('難しい', 2) | |
// '難しいにゃんにゃん' | |
function outputStringAddNyan (input, number) { | |
for (let i = 0; i < number; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 目的:何かと何かを対応付けたい | |
// 理由:名前(あるていど何でも良い)をつけておくと便利 | |
let x = 86; | |
// 目的:繰り返したい | |
// 理由:同じ処理を沢山書くのは大変 | |
// 条件式 | |
// 評価した結果 true か false になる式 | |
while (条件式) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let x = 3; | |
let y = 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var x = 4; x < 9; x++) { | |
console.log ('xの値は' + x); | |
} |
OlderNewer