eulumdat-quiz 0.7.0

Photometric knowledge quiz engine for lighting professionals
Documentation
use crate::{Category, Difficulty, Question};

/// Questions about reading and interpreting photometric diagrams.
///
/// These questions reference the actual diagrams displayed alongside them:
/// - Fluorescent luminaire (symmetric, BothPlanes, 136 cd/klm max) — polar
/// - Road luminaire (asymmetric, PlaneC90C270, 534 cd/klm max) — polar
/// - Projector (narrow beam, PlaneC0C180, 831 cd/klm max) — polar
/// - Fluorescent luminaire heatmap (C-planes × gamma, blue→red colormap)
pub fn questions() -> Vec<Question> {
    vec![
        // --- Fluorescent luminaire (shown for DiagramReading) ---
        Question {
            id: 17001,
            category: Category::DiagramReading,
            difficulty: Difficulty::Beginner,
            text: "Looking at the polar diagram: which curve is shown in blue?".into(),
            options: vec![
                "The C90-C270 plane (crosswise)".into(),
                "The C0-C180 plane (lengthwise)".into(),
                "The horizontal illuminance".into(),
                "The spectral distribution".into(),
            ],
            correct_index: 1,
            explanation: "By convention, the blue curve represents the C0-C180 plane (lengthwise/longitudinal distribution). The red curve shows C90-C270 (crosswise/transverse).".into(),
            reference: Some("CIE 102:1993".into()),
        },
        Question {
            id: 17002,
            category: Category::DiagramReading,
            difficulty: Difficulty::Beginner,
            text: "In the displayed polar diagram, where is the highest intensity located?".into(),
            options: vec![
                "At the top (180°, zenith)".into(),
                "At the bottom (0°, nadir — straight down)".into(),
                "At the horizontal (90°)".into(),
                "Evenly distributed everywhere".into(),
            ],
            correct_index: 1,
            explanation: "The diagram shows highest intensity near nadir (0°, straight down), where the curve extends furthest from the center. This is typical for a downlight or ceiling-mounted luminaire.".into(),
            reference: None,
        },
        Question {
            id: 17003,
            category: Category::DiagramReading,
            difficulty: Difficulty::Beginner,
            text: "What do the concentric circles (grid) in the polar diagram represent?".into(),
            options: vec![
                "Distance from the luminaire in meters".into(),
                "Fixed intensity values (cd/klm) at regular intervals".into(),
                "Color temperature zones".into(),
                "Efficiency ratings".into(),
            ],
            correct_index: 1,
            explanation: "The concentric grid circles represent equal intensity levels in cd/klm. Each circle is a fixed increment, allowing you to read approximate intensity values where the curves cross them.".into(),
            reference: Some("CIE 102:1993".into()),
        },
        Question {
            id: 17004,
            category: Category::DiagramReading,
            difficulty: Difficulty::Intermediate,
            text: "When the blue and red curves nearly overlap in the polar diagram, what does this tell you about the luminaire?".into(),
            options: vec![
                "The luminaire is broken".into(),
                "The distribution is nearly the same in all directions around the vertical axis".into(),
                "The luminaire emits no light".into(),
                "The measurement data is incorrect".into(),
            ],
            correct_index: 1,
            explanation: "Overlapping C0-C180 (blue) and C90-C270 (red) curves indicate the luminaire has nearly the same light distribution in all C-planes — it is approximately rotationally symmetric.".into(),
            reference: None,
        },
        Question {
            id: 17005,
            category: Category::DiagramReading,
            difficulty: Difficulty::Intermediate,
            text: "If a polar diagram shows no red curve at all, only blue, what does this mean?".into(),
            options: vec![
                "The luminaire is defective".into(),
                "The luminaire has vertical axis symmetry (Isym=1) — all C-planes are identical".into(),
                "The C90-C270 data was not measured".into(),
                "The red curve is hidden behind the blue one".into(),
            ],
            correct_index: 1,
            explanation: "When a luminaire has rotational symmetry (Isym=1, e.g. a round downlight), C90-C270 is identical to C0-C180, so only one curve is displayed to avoid redundancy.".into(),
            reference: Some("EULUMDAT specification, Isym=1".into()),
        },
        Question {
            id: 17006,
            category: Category::DiagramReading,
            difficulty: Difficulty::Intermediate,
            text: "Compare the symmetric and asymmetric polar diagrams: how can you visually identify the asymmetric one?".into(),
            options: vec![
                "It has more grid circles".into(),
                "The left and right halves of the curve have different shapes".into(),
                "It uses thicker lines".into(),
                "It has a larger radius overall".into(),
            ],
            correct_index: 1,
            explanation: "An asymmetric luminaire (like a road light) has visibly different left and right halves in its polar diagram. The left side (C180) and right side (C0) have different intensity distributions.".into(),
            reference: None,
        },
        Question {
            id: 17007,
            category: Category::DiagramReading,
            difficulty: Difficulty::Intermediate,
            text: "A road luminaire's polar diagram shows most intensity thrown to one side. Which side represents the 'forward' (road-side) direction?".into(),
            options: vec![
                "The top of the diagram (zenith)".into(),
                "The right half (C0 side)".into(),
                "The left half (C180 side)".into(),
                "The bottom (nadir)".into(),
            ],
            correct_index: 1,
            explanation: "In the standard convention, C0 is the 'front' of the luminaire, shown on the right half of the polar diagram. For a road luminaire, this is the road-side throw direction.".into(),
            reference: Some("CIE S 017:2020".into()),
        },
        Question {
            id: 17008,
            category: Category::DiagramReading,
            difficulty: Difficulty::Expert,
            text: "Looking at the projector's polar diagram: what visual feature indicates a narrow beam?".into(),
            options: vec![
                "The curve fills the entire diagram area".into(),
                "The curve is a thin spike concentrated near nadir (0°) with very little spread".into(),
                "The curve is perfectly circular".into(),
                "There are many grid circles".into(),
            ],
            correct_index: 1,
            explanation: "A narrow-beam projector shows a sharp spike of intensity concentrated around nadir, dropping rapidly at wider angles. The curve appears as a thin lobe rather than a broad shape.".into(),
            reference: None,
        },
        Question {
            id: 17009,
            category: Category::DiagramReading,
            difficulty: Difficulty::Expert,
            text: "If a polar diagram's curve crosses the 3rd grid circle at nadir but only the 1st grid circle at 60°, approximately what fraction of peak intensity remains at 60°?".into(),
            options: vec![
                "About 1/3 (33%)".into(),
                "About 1/2 (50%)".into(),
                "About 2/3 (67%)".into(),
                "About 3/4 (75%)".into(),
            ],
            correct_index: 0,
            explanation: "Grid circles are equally spaced in intensity. If peak intensity reaches the 3rd circle and 60° reaches the 1st, the ratio is 1/3, meaning about 33% of peak intensity remains at that angle.".into(),
            reference: None,
        },
        Question {
            id: 17010,
            category: Category::DiagramReading,
            difficulty: Difficulty::Beginner,
            text: "In the polar diagram, what does '90°' on the horizontal axis represent?".into(),
            options: vec![
                "The luminaire's beam angle".into(),
                "The horizontal plane — light emitted sideways".into(),
                "The maximum intensity direction".into(),
                "The color temperature".into(),
            ],
            correct_index: 1,
            explanation: "90° on the polar diagram is the horizontal direction. Light emitted at gamma=90° travels horizontally from the luminaire. 0° is straight down, 180° is straight up.".into(),
            reference: Some("CIE S 017:2020".into()),
        },
        Question {
            id: 17011,
            category: Category::DiagramReading,
            difficulty: Difficulty::Expert,
            text: "A luminaire's polar diagram shows the curve touching the outermost grid circle only near nadir. The maximum grid value is 800 cd/klm. What is the approximate peak intensity?".into(),
            options: vec![
                "80 cd/klm".into(),
                "400 cd/klm".into(),
                "800 cd/klm".into(),
                "1600 cd/klm".into(),
            ],
            correct_index: 2,
            explanation: "The outermost grid circle represents the maximum scale value. If the curve just touches it, the peak intensity equals that grid value — approximately 800 cd/klm.".into(),
            reference: None,
        },
        Question {
            id: 17012,
            category: Category::DiagramReading,
            difficulty: Difficulty::Intermediate,
            text: "Looking at two polar diagrams side by side: one has a wide, flat curve while the other has a tall, narrow spike. Which luminaire has the wider beam angle?".into(),
            options: vec![
                "The narrow spike".into(),
                "The wide, flat curve".into(),
                "Both have the same beam angle".into(),
                "Beam angle cannot be read from polar diagrams".into(),
            ],
            correct_index: 1,
            explanation: "A wide, flat curve means intensity is distributed over a broad range of angles — a wide beam. A narrow spike concentrates intensity in a small angular range — a narrow beam or spot.".into(),
            reference: None,
        },
        // --- Heatmap questions (fluorescent luminaire) ---
        Question {
            id: 17013,
            category: Category::DiagramReading,
            difficulty: Difficulty::Beginner,
            text: "In the displayed heatmap, what do the X-axis and Y-axis represent?".into(),
            options: vec![
                "X = distance, Y = height".into(),
                "X = C-plane angle, Y = gamma angle".into(),
                "X = wavelength, Y = intensity".into(),
                "X = time, Y = power consumption".into(),
            ],
            correct_index: 1,
            explanation: "A photometric heatmap plots C-plane angles along the X-axis and gamma angles along the Y-axis. Each cell's color represents the luminous intensity at that combination of angles.".into(),
            reference: None,
        },
        Question {
            id: 17014,
            category: Category::DiagramReading,
            difficulty: Difficulty::Beginner,
            text: "In the heatmap, what does a red/warm-colored cell indicate?".into(),
            options: vec![
                "Low intensity".into(),
                "High intensity".into(),
                "High color temperature".into(),
                "An error in the measurement".into(),
            ],
            correct_index: 1,
            explanation: "The heatmap uses a blue→cyan→green→yellow→red colormap. Red/warm colors represent the highest intensity values, while blue/cool colors represent the lowest.".into(),
            reference: None,
        },
        Question {
            id: 17015,
            category: Category::DiagramReading,
            difficulty: Difficulty::Intermediate,
            text: "Looking at the heatmap: the brightest (red) band runs horizontally near gamma=0°. What does this tell you about the luminaire?".into(),
            options: vec![
                "It is broken".into(),
                "It directs most light straight down (nadir)".into(),
                "It emits light only upward".into(),
                "It has no directional preference".into(),
            ],
            correct_index: 1,
            explanation: "A bright horizontal band at gamma=0° means the luminaire emits its highest intensity at nadir (straight down) across all C-planes. This is characteristic of a ceiling-mounted downlight.".into(),
            reference: None,
        },
        Question {
            id: 17016,
            category: Category::DiagramReading,
            difficulty: Difficulty::Intermediate,
            text: "In a symmetric luminaire's heatmap, the color pattern repeats identically across all C-plane columns. What symmetry type is this?".into(),
            options: vec![
                "No symmetry (Isym=0)".into(),
                "Rotational symmetry (Isym=1)".into(),
                "C90-C270 plane symmetry (Isym=3)".into(),
                "Quarter symmetry (Isym=4)".into(),
            ],
            correct_index: 1,
            explanation: "When every C-plane column in the heatmap shows the same color pattern, the intensity distribution is identical in all directions around the vertical axis — this is rotational symmetry (Isym=1).".into(),
            reference: Some("EULUMDAT specification".into()),
        },
        Question {
            id: 17017,
            category: Category::DiagramReading,
            difficulty: Difficulty::Intermediate,
            text: "A heatmap shows a sharp transition from red to blue within a few gamma angle rows. What does this indicate?".into(),
            options: vec![
                "A measurement error".into(),
                "A narrow beam with rapid intensity drop-off".into(),
                "A wide-beam luminaire".into(),
                "A lamp failure during testing".into(),
            ],
            correct_index: 1,
            explanation: "A sharp color transition from red (high intensity) to blue (low intensity) over a small gamma angle range indicates the luminaire has a narrow beam that drops off rapidly — typical of a spot or projector.".into(),
            reference: None,
        },
        Question {
            id: 17018,
            category: Category::DiagramReading,
            difficulty: Difficulty::Expert,
            text: "In the heatmap, if the color legend shows a maximum of 136 cd/klm and a cell is green (roughly mid-scale), what is the approximate intensity at that angle?".into(),
            options: vec![
                "About 136 cd/klm".into(),
                "About 68 cd/klm".into(),
                "About 34 cd/klm".into(),
                "About 0 cd/klm".into(),
            ],
            correct_index: 1,
            explanation: "Green is approximately in the middle of the blue→red colormap. With a maximum of 136 cd/klm, a mid-scale green cell represents roughly 50% of the peak — about 68 cd/klm.".into(),
            reference: None,
        },
        Question {
            id: 17019,
            category: Category::DiagramReading,
            difficulty: Difficulty::Expert,
            text: "What advantage does a heatmap have over a polar diagram for understanding a luminaire's light distribution?".into(),
            options: vec![
                "It is more colorful".into(),
                "It shows ALL C-planes simultaneously, revealing asymmetries invisible in a 2-plane polar diagram".into(),
                "It shows color temperature".into(),
                "It is always more accurate".into(),
            ],
            correct_index: 1,
            explanation: "A polar diagram typically shows only 2 C-planes (C0-C180 and C90-C270). A heatmap displays intensity for every measured C-plane and gamma angle, revealing asymmetries or patterns between planes that would be invisible in a standard polar diagram.".into(),
            reference: None,
        },
        Question {
            id: 17020,
            category: Category::DiagramReading,
            difficulty: Difficulty::Beginner,
            text: "In the heatmap color legend, which end represents zero intensity?".into(),
            options: vec![
                "The red end".into(),
                "The blue/dark end".into(),
                "The green middle".into(),
                "There is no zero in a heatmap".into(),
            ],
            correct_index: 1,
            explanation: "The heatmap colormap runs from dark blue (zero/minimum intensity) through cyan, green, and yellow to red (maximum intensity). The blue/dark end represents the lowest values.".into(),
            reference: None,
        },
    ]
}