figviz
Create diagram
AI-Powered

Ray Diagram Generator Ray Diagrams

Describe a lens or mirror setup and get a clean, labeled ray diagram in seconds, with the principal axis, focal points, object and image arrows, and all three principal rays drawn. Converging and diverging lenses, concave and convex mirrors, and more.

Lenses & mirrorsPrincipal rays labeledReal & virtual imagesSlide & print readyLast updated: 2026-06-21

Ray Diagram Examples

Browse ray diagrams made with Figviz, or generate your own above

Converging Lens, Object Beyond 2F

A convex lens ray diagram with the object beyond 2F, showing a real, inverted, diminished image between F and 2F on the far side.

converging lensconvexreal image

Diverging Lens, Virtual Upright Image

A concave lens ray diagram showing how all three principal rays diverge and appear to originate from a virtual, upright, diminished image.

diverging lensconcavevirtual image

Concave Mirror, Real Inverted Image

A concave (converging) mirror ray diagram with the object beyond F, showing three principal rays converging to form a real, inverted image.

concave mirrorconvergingreal image

Convex Mirror, Virtual Upright Image

A convex (diverging) mirror ray diagram where reflected rays diverge and the virtual image appears behind the mirror surface.

convex mirrordivergingvirtual image

Plane Mirror, Reflection Ray Diagram

A plane mirror ray diagram showing the law of reflection, with the virtual image located the same distance behind the mirror as the object is in front.

plane mirrorreflectionvirtual image

Refraction Through a Glass Block

A refraction diagram showing a ray bending toward the normal as it enters a denser glass block and bending away as it exits, with angles labeled.

refractionglass blockSnell law

Ray diagram prompts you can copy

Choose an optics setup below, then change the lens, mirror, or object position to match your problem.

Convex lens inside the focal length

A virtual, upright, magnified image case.

Create a ray diagram of a converging convex lens with the object between the lens and focal point F. Show the principal axis, lens, F and 2F on both sides, an upright object arrow, three principal rays, and dashed backward extensions that meet at a virtual upright magnified image on the object side. Label the image as virtual, upright, and magnified. Classic physics textbook style, white background.

Concave mirror at center of curvature

Show the special case where the image equals the object size.

Create a ray diagram of a concave mirror with an object placed at the center of curvature C (2F). Show the principal axis, mirror on the right, C and F in front of the mirror, and two principal reflected rays. Show the real inverted image forming at C, equal in size to the object. Label all points and rays clearly. White background.

Refraction from air into water

A simple Snell-law diagram for an introductory physics lesson.

Create a labeled refraction ray diagram of light traveling from air into water. Draw a horizontal boundary, air above and water below, a dashed normal at the point of incidence, an incident ray at 45 degrees, and a refracted ray bending toward the normal in water. Label angle of incidence, angle of refraction, and both media. Clean educational physics style, white background.

What is a ray diagram?

A ray diagram (also called an optical diagram or light ray diagram) is a scaled drawing that shows how light rays travel through a lens or reflect off a mirror to form an image. The diagram uses a horizontal principal axis, a symbol for the lens or mirror at the centre, labeled focal points, and a set of standard rays that follow predictable paths. Where the rays converge, or where they appear to diverge from, tells you the position, size, and nature (real or virtual, upright or inverted) of the image. Figviz draws the complete labeled diagram from a plain description of your setup, so you get the geometry right without drawing by hand.

How to draw a ray diagram

Draw a horizontal line for the principal axis.
Mark the lens or mirror at the centre, and label the focal points (F) and the centre of curvature (2F or C) on both sides.
Draw an upright arrow on the left side of the lens or in front of the mirror to represent the object.
Trace the three principal rays: (1) a ray parallel to the axis that refracts or reflects through the far focal point; (2) a ray through the optical centre that passes straight through (lens) or reflects at equal angles (mirror); (3) a ray through the near focal point that exits parallel to the axis.
Mark the point where the rays converge, that is the real image. If they diverge, extend them backward with dashed lines to find the virtual image.
Check the image is upright or inverted, magnified or diminished, real or virtual.

Lenses vs mirrors

Lenses refract light, so they have two focal points, one on each side. A converging (convex) lens bends parallel rays inward to a real focal point on the far side, while a diverging (concave) lens bends them outward and the focal point is virtual, on the same side as the incoming light. Mirrors reflect light, so both focal points are in front of the mirror surface. A concave (converging) mirror reflects parallel rays inward to a real focal point, while a convex (diverging) mirror reflects them outward with a virtual focal point behind the surface. The principal ray rules differ slightly between the two, but the logic for locating the image is the same.

Real vs virtual images

A real image forms where refracted or reflected rays actually meet in front of the lens or mirror. It can be projected onto a screen and is always inverted. A virtual image forms where rays only appear to meet when extended backward with dashed lines, it cannot be projected and is always upright. Converging lenses produce real images when the object is beyond the focal point, and virtual images when the object is inside F. Diverging lenses and convex mirrors always produce virtual images. Plane mirrors always produce virtual images the same size as the object.

Tips for accurate optics diagrams

Always specify the object position relative to F or 2F, that single detail determines everything about the image. State the lens or mirror type clearly (converging/diverging, concave/convex). If you need specific measurements or magnification labels, include them in your prompt. For refraction diagrams through prisms or glass blocks, mention the incoming angle and the shape of the medium. Regenerate with "minimal style" for cleaner print versions, or "colorful" to color-code each principal ray for teaching.

Frequently asked questions

A ray diagram generator is a tool that draws an optics diagram for you. With Figviz you describe the lens or mirror type and object position, and the AI produces a clean, labeled diagram showing the principal axis, focal points, all three principal rays, and the resulting image, in seconds.

Make your own ray diagram with Figviz

Create a free account and get starter credits to generate your own. No credit card required.

Sign up free →