歯車について勉強する3 の履歴(No.2)
更新- 履歴一覧
- 差分 を表示
- 現在との差分 を表示
- ソース を表示
- 工作/歯車について勉強する3 へ行く。
はすば歯車設計†
LANG:p5js_live
function input(i, label, value, func) {
p.createSpan(label).position(0, 26 * i + 10);
myInput = p.createInput(value).position(150, 26 * i + 10);
if (func) {
myInput.input(func);
} else {
myInput.elt.disabled = true;
}
return myInput;
}
const inputs = {};
const recalc = () => {
inputs.pitch.value(inputs.m.value() * Math.PI);
inputs.mn.value(
inputs.m.value() / Math.cos((inputs.beta.value() / 180) * Math.PI)
);
inputs.pitchn.value(inputs.mn.value() * Math.PI);
inputs.dp.value(inputs.mn.value() * inputs.z.value());
}
p.setup = () => {
p.createCanvas(300,240)
inputs.m = input(1, "歯直角モジュール", 4, recalc);
inputs.z = input(2, "歯数", 12, recalc);
inputs.beta = input(3, "ねじれ角", 0, recalc);
inputs.pitch = input(5, "歯直角ピッチ", 0);
inputs.mn = input(6, "正面モジュール", 4);
inputs.pitchn = input(7, "正面ピッチ", 0);
inputs.dp = input(8, "基準円直径", 0);
recalc();
}
ウォームギア設計†
LANG:p5js_live
function input(i, label, value, func) {
p.createSpan(label).position(0, 20 * i + 10);
myInput = p.createInput(value).position(150, 20 * i + 10);
if (func) {
myInput.input(func);
} else {
myInput.elt.disabled = true;
}
return myInput;
}
const inputs = {};
function recalc() {
inputs.beta.value(Math.asin(inputs.n.value() * inputs.m.value() / inputs.dp.value())/Math.PI*180)
inputs.pitch.value(inputs.m.value() * Math.PI);
inputs.mn.value(
inputs.m.value() / Math.cos((inputs.beta.value() / 180) * Math.PI)
);
inputs.pitchn.value(
Math.PI * inputs.mn.value()
);
inputs.vdp.value(
inputs.dp.value()/Math.sin(inputs.beta.value()/180*Math.PI)
)
}
p.setup = () => {
p.createCanvas(300,240)
inputs.m = input(1, "歯直角モジュール", 4, recalc);
inputs.dp = input(2, "基準円直径", 30, recalc);
inputs.n = input(3, "条数", 1, recalc);
inputs.pitch = input(5, "歯直角ピッチ", 0);
inputs.beta = input(6, "ねじれ角", 0);
inputs.mn = input(7, "正面モジュール", 4);
inputs.pitchn = input(8, "正面ピッチ", 0);
inputs.vdp = input(9, "仮想基準円直径", 0)
recalc();
}
Counter: 1671 (from 2010/06/03),
today: 3,
yesterday: 8