Reflection from a Polynomial Mirror

Manipulate[With[{p=ax^3+bx^2+c x,left=-4,right=4},With[{pp=D[p,x]},Plot[p,{x,left,right},Filling->-100,Axes->False,PlotRange->{{left,right},{-.75,4.5}},FillingStyle->RGBColor[0.848,0.848,0.92],AspectRatio->Automatic,PlotRangeClipping->True,ImageSize->{500,340},Prolog->{Lighter[Orange],Table[{Line[{{xi,p/.x->xi},{xi,Max[10,p/.x->xi]}}],
Orange,Line[{{xi,p/.x->xi},N[{xi-len((2pp)/(1+(pp^2))),p+len(-1+(2/(1+(pp^2))))}]}/.x->xi]},{xi,left,right,(right-left)/20}]}]]],
"mirror shape coefficients",
{{c,0,"linear"},-1,1},
{{b,1/4,"quadratic"},-1/2,1},
{{a,0,"cubic"},-0.05,0.05},Delimiter,
{{len,8,"length of rays"},0.5,8}]

CAPTION

A parabolic mirror reflects parallel rays of light to a single focal point. Other mirror shapes can produce very different behaviors.

THIS NOTEBOOK IS THE SOURCE CODE FROM

"Reflection from a Polynomial Mirror" from the Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/ReflectionFromAPolynomialMirror/

Contributed by: Stephen Wolfram

A full-function Wolfram Mathematica system (Version 6 or higher) is required to edit this notebook.
GET WOLFRAM MATHEMATICA »

© Wolfram Demonstrations Project & Contributors   |   Terms of Use   |   Make a new version of this Demonstration »