I'm trying to illustrate the solutions to a textbook problem dealing with quadratic functions.
This will involve plotting a quadratic and overlaying the plot and the image.
Here is the textbook scan.....
The idea of the problem is to find several possible quadratic models that would go through the hoop.
I imported this image into a variable, call it img1
I wanted to establish a "baseline" so I started with a simple plot, x intercepts of 0 and 18, and vertex at (9,14). I know, NOT a solution to the problem but I wanted to see how the plot and image would match up.
I created the plot
g2 = Plot[-14/81 x (x - 18), {x, -1, 19}, PlotStyle -> Thick]
Then I put them together and tweaked the placement of the plot based on the image size.
ImageCompose[img1, g2, {983/2, 811/2}]
Which gives me this...
The vertex is in the right place, but the axes don't line up.
Sorry if this is a dumb question, I'm not at all sure how I could get my plot to match the background image so the axes in the image would be the same as the axes in my plot....
Do I need to scale my plot, or scale my image.. or something obvious that I am missing.
Any help is appreciated
Plot
's coordinate system. Alternatively, instead of using an image with a grid on it, could use only an image of a boy with a basketball, and place that image on the plot using theEpilog
option. You could also place a basket :-) $\endgroup$Manipulate
reminded me of this question: Animate ParametricPlot3D for two different parametric equations $\endgroup$