All MicroEvals
Your task is to take the provided technical description and ...
Create MicroEval
Header image for Your task is to take the provided technical description and ...

Your task is to take the provided technical description and ...

Prompt

Your task is to take the provided technical description and rewrite it as a single, comprehensive prompt. Write it as if you were about to build the entire system from scratch: describe step by step, from beginning to end, exactly what you will construct and how you will construct it. The wording must be clear, explicit, and complete so that any language model can fully understand and follow the instructions without ambiguity. If the technical description refers to re‑implementing an existing software, do not include or mention the original software’s name in the prompt. Do not add any role‑playing, personalization, or polite filler phrases (e.g., ‘You are a software developer’, ‘As an expert’, ‘Please kindly’). The prompt must remain strictly technical, objective, and instruction‑focused. Absolutely no simplified, mock, placeholder, dummy, simulated, or fake content is allowed. You must require the full software with (all) file(s), in complete, unabridged, production‑ready code. Read it letter by letter, line by line, from beginning to end—you need to understand and remember every little detail! Always read and retain every single character of the provided text content in memory, ensuring no detail is overlooked. Exclude security, rate limiting, billing, payments, subscriptions, limits, tests, documentation, and code comments from the system and deliverables. These exclusions override all completeness requirements. The Gemini 3 Flash model can now write and execute Python code to actively manipulate and inspect images. Use cases Zoom and inspect: The model implicitly detects when details are too small (e.g., reading a distant gauge) and writes code to crop and re-examine the area at higher resolution. Visual math: The model can run multi-step calculations using code (e.g., summing line items on a receipt). Image annotation: The model can annotate images to answer questions, such as drawing arrows to show relationships. Note: While the model automatically handles zooming for small details, you should prompt it explicitly to use code for other tasks, such as "Write code to count the number of gears" or "Rotate this image to make it upright". Enable Code Execution with images import { GoogleGenAI } from '@google/genai'; import type { Interactions } from '@google/genai'; const ai = new GoogleGenAI({ apiKey: process.env['GEMINI_API_KEY'], }); const tools: Interactions.Tool[] = [ { type: 'code_execution', }, { type: 'google_search', }, { type: 'url_context', }, ]; const generationConfig = { max_output_tokens: 65536, thinkingLevel: 'high', }; async function main() { const interaction = await ai.interactions.create({ model: 'models/gemini-3.8-flash', input: 'INSERT_INPUT_HERE', tools: tools, generation_config: generationConfig, }); console.log(interaction.steps?.at(-1)); } main(); I want a Facial golden ratio analizer. upload face image(s) and gemini 3.8 analize and give the real result. The backend must always be implemented in a single python file, and the frontend must always be contained in a single index.html file, including all subpages. frontend is ios optimized pwa Reactive Signal Engine Implement the reactive signal and easing architecture in JavaScript: LensSignal class implementing GlassMotionValue: Constructor accepts numeric scalar initial. Method get() returns current value. Method set(next) updates value if different and synchronously calls a copy of subscriber callbacks (this.subscribers.slice()). Method on("change", callback) adds listener and returns an unsubscribe closure. glassValue(initial) factory returning new LensSignal(initial). isGlassMotionValue(v) returning typeof v === "object" && v !== null && "get" in v && "on" in v. readGlassValue(v) returning isGlassMotionValue(v) ? v.get() : v. deriveGlass(deps, compute) returning a signal that auto-updates whenever any dependency in deps fires. cubicBezier(x1, y1, x2, y2) solver using Newton-Raphson (8 steps, tolerance 1e-6) with bisection fallback (tolerance 1e-7) solving the unit cubic bezier curve. Easing constant: glassEase = cubicBezier(0.34, 1.36, 0.42, 1). animateGlassValue(value, to, options): Options { duration = 0.3, ease = glassEase, onComplete }. Manages frame progress with requestAnimationFrame and supports cancellation via an active animation map. Section C: Signed Distance Field and Displacement Field Generator Implement createLensMapGenerator(size) producing a PNG data URL of dimension size x size (default 512): Formula constants: Constant DISPERSION_SPREAD = 0.22. Constant ERF_K = Math.sqrt(Math.PI). Function erf(x) = Math.tanh(ERF_K * x). Spherical cap geometry constants: cap = Math.max(0.01, Math.min(curvature * Math.min(halfW, halfH), Math.min(halfW, halfH) - 1)) Rx = (halfW * halfW + cap * cap) / (2 * cap) Ry = (halfH * halfH + cap * cap) / (2 * cap) meanX = (Rx - Math.sqrt(Rx * Rx - halfW * halfW)) / halfW meanY = (Ry - Math.sqrt(Ry * Ry - halfH * halfH)) / halfH scaleX = meanX > 0 ? 0.5 / meanX : 1 scaleY = meanY > 0 ? 0.5 / meanY : 1 Lookup table (LUT) of length size / 2 cached for column positions along X. Quadrant mirroring loop: Iterates row: 0 .. (size/2 - 1) and col: 0 .. (size/2 - 1). Coordinates: px = -((col + 0.5) * (2 * halfW / size) - halfW) py = -((row + 0.5) * (2 * halfH / size) - halfH) edgeX = px - halfW + radius edgeY = py - halfH + radius cornerDist = (edgeX > 0 || edgeY > 0) ? Math.sqrt(Math.max(0, edgeX)**2 + Math.max(0, edgeY)**2) : 0 sdf = cornerDist + (edgeX > edgeY ? (edgeX > 0 ? 0 : edgeX) : (edgeY > 0 ? 0 : edgeY)) - radius Outside clipping: When clipToShape && sdf >= 0, writes neutral grey [128, 128, 128, 255] across all four quadrant pixels. Directional vectors: dirX sampled from dome LUT or px / halfW; dirY sampled from dome calculation or py / halfH. Splay attenuation: Dampens vectors towards corners based on splay factor. Soft edge feather: depthPx = Math.min(depth * minHalf, minHalf - 1) innerHalfW = Math.max(0, halfW - depthPx) innerHalfH = Math.max(0, halfH - depthPx) innerRadius = Math.max(0, Math.min(radius, Math.min(innerHalfW, innerHalfH))) edgeOpacity = 0.5 * (1 + erf(innerSdf * (depthPx > 0 ? Math.SQRT1_2 / depthPx : 1e6))) Inner-edge meniscus refraction bump: s = sdf < 0 ? Math.max(0, 1 + sdf / Math.max(2, bendWidth * minHalf)) : 0 m = 6.75 * s * s * (1 - s) dx = 0.5 * dirX * edgeOpacity + dirX * (0.5 * bend * m * edgeOpacity / len) dy = 0.5 * dirY * edgeOpacity + dirY * (0.5 * bend * m * edgeOpacity / len) Specular highlight and glow: axisMain = Math.min(1, Math.abs((px/halfW) * Math.cos(angle) + (py/halfH) * Math.sin(angle)) * Math.SQRT1_2) axisCross = Math.min(1, Math.abs((px/halfW) * Math.cos(angle) - (py/halfH) * Math.sin(angle)) * Math.SQRT1_2) band = sdf < 0 ? Math.max(0, 1 + sdf / sheenWidth) : 0 sheenVal = sheen * Math.pow(band, sheenFalloff) * (0.16 + 0.84 * Math.pow(axis, 1.6)) glowVal = glow * Math.pow((1 - reach) * (1 - reach) * (3 - 2 * (1 - reach)), glowFalloff) * edgeOpacity * (0.6 + 0.4 * axis) Mirrored pixel encoding: rPos = ((0.5 + dx) * 255 + 0.5) | 0 rNeg = ((0.5 - dx) * 255 + 0.5) | 0 gPos = ((0.5 + dy) * 255 + 0.5) | 0 gNeg = ((0.5 - dy) * 255 + 0.5) | 0 bMain = (127 * specMain + 128 + 0.5) | 0 bCross = (127 * specCross + 128 + 0.5) | 0 Top-left: [rPos, gPos, bMain, 255]. Top-right: [rNeg, gPos, bCross, 255]. Bottom-left: [rPos, gNeg, bCross, 255]. Bottom-right: [rNeg, gNeg, bMain, 255]. Section D: WebGL2 Multi-Lens Refraction Engine Implement class GlassWebGLRenderer: Shaders: Shader VERT: #version 300 es in vec2 a_pos; out vec2 v_uv; void main() { v_uv = a_pos * 0.5 + 0.5; gl_Position = vec4(a_pos, 0.0, 1.0); } Shader BLIT_FRAG: #version 300 es precision highp float; in vec2 v_uv; out vec4 o; uniform sampler2D u_src; void main() { o = texture(u_src, v_uv); } Shader BLUR_FRAG: #version 300 es precision highp float; in vec2 v_uv; out vec4 o; uniform sampler2D u_src; uniform vec2 u_step; void main() { vec4 c = texture(u_src, v_uv) * 0.1857; c += (texture(u_src, v_uv + u_step) + texture(u_src, v_uv - u_step)) * 0.1671; c += (texture(u_src, v_uv + 2.0 * u_step) + texture(u_src, v_uv - 2.0 * u_step)) * 0.1227; c += (texture(u_src, v_uv + 3.0 * u_step) + texture(u_src, v_uv - 3.0 * u_step)) * 0.0768; c += (texture(u_src, v_uv + 4.0 * u_step) + texture(u_src, v_uv - 4.0 * u_step)) * 0.0414; o = c; } Shader LENS_FRAG: #version 300 es precision highp float; in vec2 v_uv; out vec4 o; uniform sampler2D u_src; uniform sampler2D u_blur; uniform sampler2D u_disp; uniform vec2 u_origin; uniform vec2 u_size; uniform vec2 u_scale; uniform vec2 u_lenspx; uniform float u_radiuspx; uniform float u_dispersion; uniform float u_sheen; uniform float u_frost; uniform float u_opacity; uniform float u_brightness; float sdRoundRect(vec2 p, vec2 b, float r) { vec2 q = abs(p) - b + r; return min(max(q.x, q.y), 0.0) + length(max(q, 0.0)) - r; } vec3 frosted(vec2 p, float mixAmt) { vec3 raw = texture(u_src, p).rgb; return mixAmt > 0.0 ? mix(raw, texture(u_blur, p).rgb, mixAmt) : raw; } void main() { vec2 lensUV = (v_uv - u_origin) / u_size; vec2 p = (lensUV - 0.5) * u_lenspx; float sdf = sdRoundRect(p, u_lenspx * 0.5, min(u_radiuspx, min(u_lenspx.x, u_lenspx.y) * 0.5)); float coverage = (1.0 - smoothstep(-1.0, 1.0, sdf)) * u_opacity; if (coverage <= 0.0) discard; vec4 d = texture(u_disp, clamp(lensUV, 0.0, 1.0)); vec2 disp = (d.rg - 0.5) * u_scale; vec2 uvR = v_uv + disp * (1.0 + u_dispersion * 0.22); vec2 uvG = v_uv + disp * (1.0 + u_dispersion * 0.11); vec2 uvB = v_uv + disp; vec3 lensCol = vec3(frosted(uvR, u_frost).r, frosted(uvG, u_frost).g, frosted(uvB, u_frost).b); lensCol += u_sheen * max(0.0, d.b - 0.5); if (u_brightness > 0.0) lensCol = mix(lensCol, vec3(1.0), clamp(u_brightness, 0.0, 1.0)); else if (u_brightness < 0.0) lensCol = mix(lensCol, vec3(0.0), clamp(-u_brightness, 0.0, 1.0)); vec3 backdrop = texture(u_src, v_uv).rgb; o = vec4(mix(backdrop, lensCol, coverage), 1.0); } Ping-pong blur targets for frosted refraction passes. Texture caching for independent per-lens displacement maps (dispTexFor(image)). Section E: DOM Refraction SVG Filter Chain Implement LensFilterContents rendering the SVG filter primitive pipeline: Flood: <feFlood floodColor="rgb(128,128,128)" floodOpacity="1" result="mapBg" /> Displacement map image: <feImage href={mapHref} preserveAspectRatio="none" result="rawMap" /> Composite: <feComposite in="rawMap" in2="mapBg" operator="over" result="map" /> Symmetric Chromatic Aberration Pipeline: Red pass: <feDisplacementMap in={sourceInput} in2={mapInput} scale={dispScale * (1 + 0.11 * dispersion)} xChannelSelector="R" yChannelSelector="G" /> <feColorMatrix type="matrix" values="1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0" result="refractR" /> Green pass: <feDisplacementMap in={sourceInput} in2={mapInput} scale={dispScale} xChannelSelector="R" yChannelSelector="G" /> <feColorMatrix type="matrix" values="0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0" result="refractG" /> Blue pass: <feDisplacementMap in={sourceInput} in2={mapInput} scale={dispScale * (1 - 0.11 * dispersion)} xChannelSelector="R" yChannelSelector="G" /> <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0" result="refractB" /> Channel composition: <feComposite in="refractR" in2="refractG" operator="arithmetic" k1="0" k2="1" k3="1" k4="0" result="refractRG" /> <feComposite in="refractRG" in2="refractB" operator="arithmetic" k1="0" k2="1" k3="1" k4="0" result="lensOut" /> 5. Specular highlight extraction: Standard sheen: <feColorMatrix in={specularFromRawMap ? "rawMap" : "map"} type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 1 0 -0.50196" result="sheenMask" /> <feComposite in="sheenMask" in2="lensOut" operator="arithmetic" k1="0" k2={specular} k3="1" k4="0" result="lensOut" /> Dark sheen: <feColorMatrix in={specularFromRawMap ? "rawMap" : "map"} type="matrix" values={"0 0 " + (-spec) + " 0 " + (1 + (128 * spec)/255) + " 0 0 " + (-spec) + " 0 " + (1 + (128 * spec)/255) + " 0 0 " + (-spec) + " 0 " + (1 + (128 * spec)/255) + " 0 0 0 0 1"} result="sheenMask" /> <feComposite in="sheenMask" in2="lensOut" operator="arithmetic" k1="1" k2="0" k3="0" k4="0" result="lensOut" /> 6. In-filter brightness veil and silhouette clipping with lensShapeMaskUri. Section F: Interactive Controls and Material Mode GlassMaterial: Applies backdrop-filter: blur(...) saturate(...) url(#id) in Blink/Chromium engines. Automatically inherits border radius from wrapped elements via computed styles. Renders dual-ring inset highlights: boxShadow: "inset 0 1px 0 rgba(255,255,255," + (0.55 * specular).toFixed(3) + "), inset 0 0 0 1px rgba(255,255,255," + (0.12 * specular).toFixed(3) + ")" useLensWobble(position, stretch, holdRef, kickRef): Spring simulation on stretch: accel = 176 * (target - displacement) - 13.6 * speedValue speedValue += accel * dt displacement += speedValue * dt rubberBand(excess, limit, range): Returns limit * t * (3 + t * (t - 3)) with t = Math.min(1, excess / range).