本文へ移動
日本語
「電磁誘導」は Pro に含まれます。解除するとプレビューが表示されます。

仕組み

A textbook figure of Faraday's law. A bar magnet slides along the axis of a coil wired to a centre-zero voltmeter; the voltage induced is ε = −dΦ/dt, where Φ is the flux of the magnet through the coil. The needle and the trace under it show what the law predicts: no voltage while the magnet is still, a pulse one way while it approaches and the other way while it leaves, taller and shorter pulses for a faster pass, and the mirror image when the magnet is flipped. Each movement is kept as a trace, the current one in the accent colour and up to three before it in grey, and the line under the plot reads the two peaks of the last pass. Drag the magnet (or anywhere on the figure), or run a slow or a fast pass.

向いている場面

  • Teach Faraday's and Lenz's laws: the voltage depends on how fast the flux changes, not on how much flux there is.
  • Compare a slow and a fast pass, or a flipped magnet, side by side on the same plot.

向かない場面

  • For real measurements from a data logger, use a time-series chart: this figure is an ideal model with a fixed coil and magnet.

使い方

import React from 'react'
import { MagneticTagRecorder } from './MagneticTagRecorder.jsx'

export function InductionLesson() {
  return (
    <MagneticTagRecorder
      defaultPosition={-10}
      onPass={({ peaks }) => console.log('peaks in mV', peaks)}
      labels={{ title: 'Pass a magnet through a coil' }}
    />
  )
}

プロパティ

プロパティ型既定値説明
defaultPositionnumber-10磁石の開始位置で、リセットで戻る位置です。コイルの中心からのセンチメートルで、−12〜12。
defaultFlippedbooleanfalse磁石を反転させた状態(S 極が右向き)で始めます。リセットでこの状態に戻ります。
onPass({ peaks, samples }) => void—動きが終わったとき(半秒静止)に呼ばれます。peaks は最大の負と正の電圧(mV)を起きた順に、samples は記録を { t, v }(秒、mV)の配列で渡します。
labelsobject—組み込みの文言を置き換えます:title、caption、magnet、positionText('{x}'、'{v}')、north、south、voltage、earlier、slow、fast、flip、hint、result('{first}'、'{second}')、single('{first}')、none、voltUnit、timeUnit、reset。
localestring'en'数値の表示に使う言語タグです。
classNamestring—カードに追加するクラス名です。幅の指定などに使います(既定は 30rem、コンテナより広くなりません)。

アクセシビリティ

  • The magnet is a slider: its value is the position in centimetres and its value text reads the position and the voltage. Arrow keys glide it 1 cm (Shift 4 cm), Home and End to the ends of the track, so a keyboard user produces a pass at a steady speed.
  • Slow pass and Fast pass are buttons that run the magnet through the coil to the far side. The flip button is a toggle with aria-pressed and a name. Reset is a button, marked unavailable while nothing has changed.
  • The line under the plot is a polite live region: it reads the two peak voltages of the last pass in the order they happened. The pass buttons point to it with aria-describedby.
  • Dragging uses pointer capture and moves the magnet by the pointer's horizontal travel from anywhere on the figure, so it never jumps. The figure sets touch-action: pan-y, so a vertical swipe still scrolls the page; a cancelled gesture puts the magnet back and drops its trace.
  • Colour is not the only key: the poles carry N and S, the meter has − and + ends and a number, and the legend names the current and the earlier traces.

モーション

The magnet moves at the speed of the pass (8 or 24 cm/s, 12 cm/s for keys) and the needle and the trace follow it frame by frame; a drag follows the pointer directly. With reduced motion a pass or a key move lands at once with its whole trace drawn, and nothing in the card transitions.

プロジェクトに追加

Pro メンバーはプロンプトをコピーし、コーディングエージェントが無料コンポーネントと同じ手順でソースを導入します。

MagneticTagRecorder.jsxmagnetic-tag-recorder.csstokens.cssREADME.md

2 つのファイルを一緒に導入します。スタイルは tokens.css の変数を読み、予備の値も持つため、単体でも表示できます。

グラフ
「三辺測位」は Pro に含まれます。解除するとプレビューが表示されます。