import React from 'react'; interface Props { sds?: number; sd1?: number; tl?: number; t?: number; // Period of the structure } export const SeismicResponseSpectrumDiagram: React.FC = ({ sds = 0.527, sd1 = 0.307, tl = 6, t }) => { // Derived values for plotting const to = 0.2 * (sd1 / sds); const ts = sd1 / sds; // Scale factors for SVG // width 400, height 250. // X scale: 0 to TL+2? Say 0 to 8s usually. // Y scale: 0 to Sds * 1.2 // Simplification: Keeping the "Schematic" look but updating label values. // If we want a real plot we need d3 or similar. // The user screenshot shows a schematic curve with equations, // but the values in the table below it are real. // The screenshot has text: "T0 = 0.116", "Ts = 0.582". // I will update the TEXT labels to use the props. return ( {/* Axes */} {/* X Axis - Period T */} {/* Y Axis - Sa */} Period, T (sec) Spectral Response Acceleration, Sa (g) {/* Spectrum Curve (Schematic representation, not strictly to scale of props) */} {/* Dashed lines dimensions */} {/* Sds line */} SDS {sds.toFixed(3)} {/* Sd1 line (intercept at T=1) - conceptually */} SD1 {sd1.toFixed(3)} {/* T0 line */} T0 {to.toFixed(3)}s {/* Ts line */} Ts {ts.toFixed(3)}s {/* TL line (far right) */} TL {tl}s {/* Labels on Curve */} Sa = SD1 / T Sa = (SD1*TL)/T² {/* Title */} TWO-PERIOD DESIGN RESPONSE SPECTRUM {/* ELF text box */} Not used for ELF {/* Magenta Arrow for ELF "Not Used" point to ramp up? */} {/* Show T if provided */} {t !== undefined && ( {/* Just a marker for T. Position is schematic. */} {/* We don't map T exactly to X pixel because the curve is arbitrary SVG path. */} )} ); };