Ploting general equation of conics

  • Thread starter Thread starter ahmadriaz
  • Start date Start date
  • Tags Tags
    Conics General
AI Thread Summary
The discussion centers around creating a program that analyzes and graphs conic sections represented by the equation Ax^2 + By^2 + Cxy + Dx + Ey + F = 0. The user seeks guidance on how to plot these curves, particularly using Flash MX, and expresses concern about handling rotated conics. Suggestions include using parametric equations for better graphing and leveraging the graphics library in Turbo C++ for plotting. The importance of reducing the conic to its general form before plotting is emphasized, along with the need to account for rotation by applying transformations to the coordinates. The potential of polar forms for graphing is also mentioned as a viable option. Overall, the conversation focuses on practical coding solutions and mathematical approaches to effectively visualize conic sections.
ahmadriaz
Messages
4
Reaction score
0
i have made a program that takes input of Ax^2+By^2+Cxy+Dx+Ey+F=0

it determines the type pf curve and finds all the related elements...now i want to ad the GRAPHS as well...but i can't find a way...i just completed my 12th standard so i don't have enough knowlege...even i can't find related pages on GOOGLE... can u please please guide me how to plote Ax^2+By^2+Cxy+Dx+Ey+F=0

please do help...coz the program means a lot to me...

i think polar form will solve my prob...please guide me
REGARDS
AHMAD
 
Technology news on Phys.org
You are right, if you use parametric equations, you can get a pretty good graph. I assume you're using Turbo C++? If you want, I've done the code already and I'd be happy to show it to you. If you want to analyze the coefficients and decide which conic the equation represents, we could do that too.
 
sir...my current program can analyse the type of conic...i just need help in how to draw graph of eqs of the form
10x^2+4y^2+3xy+4x+6y+8=0

my current program finds the vertices, directrices, axxis, centre, etc...
 
If you could show us the code, perhaps we could look at it and tell you. If you've got everything else sorted out and are using Borland Turbo C++ 3.0 or thereabouts, the compiler has a graphics library, graphics.h. Look into the examples for the function initgraph(). You basically need initgraph(), putpixel(), and closegraph() for actual plotting.

You will be restricted to 16 colors, and you would get the best resolution using parametric equations. To further streamline the code, you would need to use symmetry to plot the points. To do that, I would suggest that after you figure out what conic it is that you want to plot, you try to reduce it to its general equation and plot that instead of the general second degree equation. You would need to solve some of this on paper before you could program it in, but that shouldn't be too difficult.
 
well i am using flash mx...n i have done the DIFICULT PAPER WORK..i have reduced the conics to their general forms...but i think those general forms are the ROTATED equations...if u plot them/...i will only get a standard curse with axis x=0 or y=0...but the actual curve is rotated at some angle right?i am having problem with that...and how to show you the code of FLASH..i will have to send u abc.FLA file for that,,,,but isn't there any method for ploting GENERAL EQ of CONICS>>>?without using those graphics libraries?i mean how to find out the cordinates?i can plot them in flash..but i dun know how to find coordinated...can POLAR FORM be suitable for this>??
 
Yeah, youre right. In most cases you will get a rotated axis. You can counter for that of course by assuming that the original axis differs from the rotated axis by an angle \theta and the rotated coordinates are:

x*=xcos\theta - ysin\theta
y*=xsin\theta + ycos\theta where x and y are the original coordinates and x*, y* are the coordinates you see in your equation.

I don't know much about flash, all the code I've written is in C++, I was thinking along the lines of reducing the general equation to the standard form and from there to the parametric form to get better resolution. Like I said before, you can get very good resolution with polar form.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top