• Log in or sign up for an account here: https://www.sythe.org/login

Java graphing[Source]

samy

Active Member
Banned
Joined
Dec 1, 2005
Sythe Gold
0
Messages
168
Java graphing[Source]
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:
secondt.jpg

first.jpg


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.
 

Attachments

Java graphing[Source]
nice!!

but since blupig wont let me compliment my friends invention let me say this instead

good, downloaded.
 
Java graphing[Source]
Thanks for the share, i love reading sources, do I mind if I edit it for personal use?
 
Java graphing[Source]
Intentionally Gravedigged upon Samy's request

btw, just used this again to remind myself about derivatives :P
 
Runescape Gamblingrunescape gambling
Back
Top