All MicroEvals
ManimBench-Easy 2
Create MicroEval

ManimBench-Easy 2

Prompt

You are an expert physics educator and Manim Community Edition specialist. Convert the given PROBLEM and OFFICIAL SOLUTION into ONE runnable Python Manim animation. GUIDELINES: 1. FIDELITY: Follow the official solution's logic, formulas, and final answer exactly. 2. PACING: Use self.wait(...) naturally between derivation steps and on the final answer so the explanation is clear and easy to follow. 3. LAYOUT: Keep a persistent visual diagram on the LEFT (~40% frame) and the mathematical derivation on the RIGHT (~50% frame). Clear or transform previous equations so content does not overlap. 4. LATEX SAFETY: Use standard LaTeX in raw strings r"...". Do not break fractions across arguments to color individual characters; color entire terms or expressions instead. 5. PERFORMANCE: Do not instantiate MathTex or Text inside always_redraw or updaters (pre-create them or use DecimalNumber for live values). 6. COMPATIBILITY: Manim CE >= 0.18. Allowed imports: `from manim import *`, `import numpy as np`, and optionally `from manim_physics import *` if utilizing the reference documentation below. 7. OUTPUT: Exactly one class: GeneratedScene(Scene). Return ONLY the executable python code block. ====================================================================== PROBLEM ====================================================================== A thin equi-convex glass lens (mu = 1.5) is being placed on the top of a vessel of height h = 20 cm as shown in the figure. A luminous point source is being placed at the bottom of the vessel on the principle axis of the lens. When air is on both the sides of the lens, the image of luminous point source is found at a distance 20 cm from the lens outside the vessel. When the air inside the vessel is being replaced by a liquid of refractive index 'mu_l', the image of the same source is formed at a distance 30 cm from the lens outside the vessel. The value of 'mu_l' is (A) 10/9 (B) 20/9 (C) 15/9 (D) 12/9 FIGURE: a tall cylinder of height h filled with a medium of refractive index mu_l; the thin equiconvex lens caps the cylinder at the top (glass index mu = 1.5); the point source sits on the axis at the bottom of the cylinder, 20 cm below the lens; the image forms on the axis outside, above the lens. ====================================================================== OFFICIAL SOLUTION ====================================================================== METHOD ANIMATED: two-step paraxial calculation - first the ordinary thin-lens (lens-maker) formula to get the radius of curvature R, then the general thin-lens formula for a lens that has DIFFERENT media on its two sides to get mu_l. Given: equiconvex glass lens, mu_g = 1.5; vessel height h = 20 cm, so in BOTH parts the source is 20 cm below the lens, i.e. the object distance is u = -20 cm (sign convention: light travels upward, distances measured from the lens, real object on the incident side is negative). Radius of curvature of each face is R, with R1 = +R and R2 = -R. STEP 1 - air on both sides: find R. Thin lens in air: 1/v - 1/u = (mu_g - 1)(1/R1 - 1/R2) The image is 20 cm from the lens on the side away from the source (outside the vessel), so v = +20 cm: 1/20 - 1/(-20) = (1.5 - 1)(1/R + 1/R) 1/20 + 1/20 = 0.5 x (2/R) 1/10 = 1/R => R = 10 cm. STEP 2 - liquid inside (medium on the object side = liquid, medium on the image side = air): find mu_l. For a thin lens with refractive index mu_g whose two faces (radii R1, R2) touch media mu_1 (object side) and mu_2 (image side): mu_2/v - mu_1/u = (mu_g - mu_1)/R1 + (mu_2 - mu_g)/R2 Here mu_1 = mu_l, mu_2 = 1 (air above the lens), mu_g = 1.5, R1 = +10 cm, R2 = -10 cm, u = -20 cm and the new image is 30 cm outside, v = +30 cm: 1/30 - mu_l/(-20) = (1.5 - mu_l)/(+10) + (1 - 1.5)/(-10) 1/30 + mu_l/20 = (1.5 - mu_l)/10 + 1/20 1/30 + mu_l/20 = 3/20 - mu_l/10 + 1/20 mu_l(1/20 + 1/10) = 1/5 - 1/30 = 1/6 (3/20) mu_l = 1/6 mu_l = 20/18 = 10/9 ≈ 1.11 FINAL ANSWER: mu_l = 10/9 => option (A). ====================================================================== MANIM PHYSICS REFERENCE GUIDE (OPTIONAL LIBRARY) ====================================================================== You may use the `manim_physics` library if helpful for optics simulation: Import: `from manim_physics import *` ### `Lens` Bases: `VMobject` A lens object that refracts `Ray` objects. Constructor: `Lens(f, d, n=1.52, **kwargs)` * `f`: Focal length. Positive for convex, negative for concave. * `d`: Lens thickness. * `n`: Refractive index (default 1.52 for glass). ### `Ray` Bases: `Line` A light ray that can pass through lenses. Constructor: `Ray(start, direction, init_length=5, propagate=None, **kwargs)` * `start`: Start point np.array. * `direction`: Vector direction np.array. * `propagate`: A list of Lens objects to interact with (e.g., [lens1, lens2]). Methods: * `propagate(*lenses)`: Calculates the path of the ray through the provided lenses. Example Usage: ```python from manim import * from manim_physics import * class OpticsExample(Scene): def construct(self): lens = Lens(f=5, d=1).shift(RIGHT) ray = Ray(start=LEFT*5, direction=RIGHT, propagate=[lens], color=RED) self.add(lens, ray)

Drag to resize

Response not available

Drag to resize

Response not available

Drag to resize
Drag to resize
Drag to resize