Conic Section and Line Equation Generator

This project is a simple web-based tool that allows users to generate equations for various conic sections (circle, parabola, ellipse, hyperbola) and lines by providing specific points.

Features

  • Generate equations for:
    • Circle
    • Parabola
    • Ellipse
    • Hyperbola
    • Line
  • Responsive design for easy use on various devices

Usage

  1. Select the type of conic section or line from the dropdown menu.
  2. Enter the required points (x1, y1) and (x2, y2) in the input fields.
  3. Click the "Generate Equation" button to display the equation.

Points Required for Each Conic Section

  • Circle: Enter the center (x1, y1) and a point on the circle (x2, y2).
  • Parabola: Enter the vertex (x1, y1) and a point on the parabola (x2, y2).
  • Ellipse: Enter the center (x1, y1) and the endpoints of the major and minor axes (x2, y2).
  • Hyperbola: Enter the center (x1, y1) and the vertices (x2, y2).
  • Line: Enter two points on the line (x1, y1) and (x2, y2).

How the Code Works

The HTML file contains a form for user input and a script that handles the generation of the equations based on the selected conic section and the provided points. The script uses basic geometric formulas to calculate the equations.

When the user selects a conic section, the updateInstructions() function updates the instructions for the required points. When the "Generate Equation" button is clicked, the generateEquation() function calculates the equation based on the selected conic section and the provided points.