![]() |
| ||
| Applet - Graphing Quadratic Function Help Hi! Im making an applet to graph a quadratic function...now im not going to be rude and say "tell me how to do it!" but i was just wondering if i could get some assistance on making it... Now of course, i've had a go at it, and i've made an applet to display the z intercepts, y intercept, and vertex (turning point). This is determined by the user inputs of the three coefficients a, b, and c. First question, is this all the information i will need? Secondly, i am struggling to figure out how to put this information into a graph and make it a parabola... Thank you very much for your help! Ps. my applet is below if you wish to have a look, i've made a crude graph if that helps as well... import java.applet.*; -Crawf |
| ||
| Re: Applet - Graphing Quadratic Function Help Couple of things... There is a package called swingx which may be of interest to you. However, like all the java api it requires a lot of reading to get the basic gist of how it works. Quote:
or could they possibly be in the form:- whereby after expanding and simplifying yields another quadratic equation? If you are handing the second example as well your current program is insufficient. My guess is you would have to write an equation parser or something similar to handle those cases. Quote:
Remember you should be obtaining coordinates, once you have those coordinates you just join them up. The smaller the distance between the coordinates the more accurate your graph will be. |
| ||
| Re: Applet - Graphing Quadratic Function Help the input will always be in the form ax^2+bx+c, its only meant to be simple... As for obtaining the coordinates, just how should i go about this? and which coordinates will i need to find? Sorry if i'm asking too much! Thanks for the reply too! -Crawf |
| ||
| Re: Applet - Graphing Quadratic Function Help Quote:
So, let's assume we have an arbitary function, where x does not belong to the set of complex numbers... Now we choose a range for our x values. Say -10 to 10. And we substitute these values into out function to obtain the y value. Thus:- And so on. Plotting the coordinates. Simple as pie |
| ||
| Re: Applet - Graphing Quadratic Function Help aha! i get you!! it really is simple! thats awesome! thanks very much for that! you've been very helpful! :) You are a champion! -Crawf |
| All times are GMT -4. The time now is 11:39 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC