'''
Created on 20-Jan-2022

@author: bthakur
'''

import inspect
import traceback

import matplotlib.pyplot as plt
from numpy import sin, cos, pi, linspace

from xv.km.ui import SvgHelper
from xv.util.data import CacheUtil
from xv.util import strip_source_code_tabs, get_function_source_code

import numpy as np
import sympy as sp

# _basic_geometry_helper
# BasicGeometryHelper

class BasicGeometryHelper:
    def __init__(self, **kwargs):
        self.verbose = kwargs.get('verbose', False)
        pass
    
    
    def get_point_forms_in_2d(self):
        x, y = sp.symbols('x, y')
        
        
        
        
        soln_stmt = r"""
        <h3>2-Dimensional Space:</h3>
        $\displaystyle 
        \begin{array}{ll}
        (x, y) & \text { 2D  Cartesian } \\

        (r, \theta) & \text { 2D polar } \\

        (r, \alpha_1, \alpha_2) & \text { 2D polar where } \alpha_2 = \frac{\pi}{2} - \alpha_1 \\

        r \left( \cos \theta, \sin \theta \right) & \text { 2D polar } \\

        r \left( \cos \alpha_1, \cos \alpha_2 \right) 
        & \text { 2D polar where } \alpha_2 = \frac{\pi}{2} - \alpha_1 \\\\

        x \hat{i}+y \hat{j} & \text { 2D vector } \\

        r \left( \cos \theta  \hat{i}
                +\sin \theta  \hat{j} 
          \right) & \text { 2D vector } \\

        r \left( \cos \alpha_1  \hat{i}
                +\cos \alpha_2  \hat{j} 
          \right) & \text { 2D vector } \\\\

        x+i y & \text { imaginary space } \\

        r \left( \cos \theta+i \sin \theta \right) & \text { imaginary polar } \\

        r e^{i \theta} & \text { Euler number expression }
        \end{array}
        $
        """
        
        pass
    
    
    
    
    def plot_a_point(self, x, y, color = "red"):
        import matplotlib.pyplot as plt
        
        plt.plot(x, y, marker = 'o', color = color)
        
        pass
    
    pass
#class BasicGeometryHelper:
