Copy link to clipboard
Copied
Hi,
I need to design a 2D cartesian co-ordinate system to plot quadratic equations on the graph using pure action script. Quadratic equations are of the form y = ax^2 + bx + c where a,b and c are the variables for which the values need to accepted from the user as input. Accordingly, the curve needs to be plotted on the graph.
Could anybody kindly help me to write an action script 3.0 code to suffice the above requirement?
Thanks in advance.
Cheers,
Pratik.
Copy link to clipboard
Copied
that will take more work than doable in a forum. to start, you need to find the roots of your equation (use the quadratic formula) and make sure the real roots are towards the center of your x-axis. the two parts where y tends towards (+infinity or -infinity) do not require much display.
if there is only 1 or 0 roots, put that equation in vertex form and use an x-axis centered around the vertex.
for a sample of how this can be done: http://www.kglad.com > snippets > function graphs.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now