samy
Active Member

- Joined
- Dec 1, 2005
- Sythe Gold
- 0
- Messages
- 168
I made this program for my java class, I thought it was cool.
I would appreciate any suggestions related to the structure of my code.
I will try to answer as many questions as I can.
Features:
Graphs a polynomial function using the values from the sliders as input.
Repaints after every slider change.
Window can be changed via text fields. Pressing the draw button after.
Pics:
Things to note:
1.Each X pixel of the graph has its y value calculated, then a line is drawn connecting the two. This method technically could produce a faulty graph, though it is very unlikely unless it is given a very small space.
2.It would be very easy to add more things for this to graph.
Challenge:
Add the ability to graph an input equation. Ex. A user can input 3x^4-6x^2 and that will be graphed as such.
I would appreciate any suggestions related to the structure of my code.
I will try to answer as many questions as I can.
Features:
Graphs a polynomial function using the values from the sliders as input.
Repaints after every slider change.
Window can be changed via text fields. Pressing the draw button after.
Pics:
Things to note:
1.Each X pixel of the graph has its y value calculated, then a line is drawn connecting the two. This method technically could produce a faulty graph, though it is very unlikely unless it is given a very small space.
2.It would be very easy to add more things for this to graph.
Challenge:
Add the ability to graph an input equation. Ex. A user can input 3x^4-6x^2 and that will be graphed as such.

