From 5f0c1320f8e678361a2e7ac0dca310c897b08a41 Mon Sep 17 00:00:00 2001 From: George Avdella Date: Wed, 16 Apr 2025 17:08:36 -0400 Subject: [PATCH 1/2] setup limit for frontend --- calc-frontend/src/App/RoutesList.tsx | 20 +++++++++++++++++++ .../src/components/Cosine/CosineLim.tsx | 0 .../src/components/Cosine/CosineLimGraph.tsx | 0 .../src/components/Cubic/CubicLim.tsx | 0 .../src/components/Cubic/CubicLimGraph.tsx | 0 .../src/components/Custom/LimCustomGraph.tsx | 0 .../src/components/Euler/EulerLim.tsx | 0 .../src/components/Euler/EulerLimGraph.tsx | 0 calc-frontend/src/components/Line/LineLim.tsx | 0 .../src/components/Line/LineLimGraph.tsx | 0 .../src/components/NatLog/NatLogLim.tsx | 0 .../src/components/NatLog/NatLogLimGraph.tsx | 0 .../src/components/Quadratic/QuadraticLim.tsx | 0 .../Quadratic/QuadraticLimGraph.tsx | 0 calc-frontend/src/components/Sine/SineLim.tsx | 0 .../src/components/Sine/SineLimGraph.tsx | 0 .../src/components/Tangent/TangentLim.tsx | 0 .../components/Tangent/TangentLimGraph.tsx | 0 calc-frontend/src/pages/CustomLimit.tsx | 0 19 files changed, 20 insertions(+) create mode 100644 calc-frontend/src/components/Cosine/CosineLim.tsx create mode 100644 calc-frontend/src/components/Cosine/CosineLimGraph.tsx create mode 100644 calc-frontend/src/components/Cubic/CubicLim.tsx create mode 100644 calc-frontend/src/components/Cubic/CubicLimGraph.tsx create mode 100644 calc-frontend/src/components/Custom/LimCustomGraph.tsx create mode 100644 calc-frontend/src/components/Euler/EulerLim.tsx create mode 100644 calc-frontend/src/components/Euler/EulerLimGraph.tsx create mode 100644 calc-frontend/src/components/Line/LineLim.tsx create mode 100644 calc-frontend/src/components/Line/LineLimGraph.tsx create mode 100644 calc-frontend/src/components/NatLog/NatLogLim.tsx create mode 100644 calc-frontend/src/components/NatLog/NatLogLimGraph.tsx create mode 100644 calc-frontend/src/components/Quadratic/QuadraticLim.tsx create mode 100644 calc-frontend/src/components/Quadratic/QuadraticLimGraph.tsx create mode 100644 calc-frontend/src/components/Sine/SineLim.tsx create mode 100644 calc-frontend/src/components/Sine/SineLimGraph.tsx create mode 100644 calc-frontend/src/components/Tangent/TangentLim.tsx create mode 100644 calc-frontend/src/components/Tangent/TangentLimGraph.tsx create mode 100644 calc-frontend/src/pages/CustomLimit.tsx diff --git a/calc-frontend/src/App/RoutesList.tsx b/calc-frontend/src/App/RoutesList.tsx index 4676c9e..2c1a05c 100644 --- a/calc-frontend/src/App/RoutesList.tsx +++ b/calc-frontend/src/App/RoutesList.tsx @@ -4,31 +4,41 @@ import RootLayout from "./RootLayout"; import Home from "../pages/Home"; +import QuadraticLim from "../components/Quadratic/QuadraticLim"; import QuadraticDeriv from "../components/Quadratic/QuadraticDeriv"; import QuadraticInt from "../components/Quadratic/QuadraticInt"; +import CubicLim from "../components/Cubic/CubicLim"; import CubicDeriv from "../components/Cubic/CubicDeriv"; import CubicInt from "../components/Cubic/CubicInt"; +import CosineLim from "../components/Cosine/CosineLim"; import CosineDeriv from "../components/Cosine/CosineDeriv"; import CosineInt from "../components/Cosine/CosineInt"; +import SineLim from "../components/Sine/SineLim"; import SineDeriv from "../components/Sine/SineDeriv"; import SineInt from "../components/Sine/SineInt"; +import TangentLim from "../components/Tangent/TangentLim"; import TangentDeriv from "../components/Tangent/TangentDeriv"; import TangentInt from "../components/Tangent/TangentInt"; +import NatLogLim from "../components/NatLog/NatLogLim"; import NatLogDeriv from "../components/NatLog/NatLogDeriv"; import NatLogInt from "../components/NatLog/NatLogInt"; +import LineLim from "../components/Line/LineLim"; import LineDeriv from "../components/Line/LineDeriv"; import LineInt from "../components/Line/LineInt"; +import EulerLim from "../components/Euler/EulerLim"; import EulerDeriv from "../components/Euler/EulerDeriv"; import EulerInt from "../components/Euler/EulerInt"; + import ErrorPage from "../pages/ErrorPage"; +import CustomLim from "../pages/CustomLimit"; import CustomInt from "../pages/CustomIntegral"; import CustomDeriv from "../pages/CustomDerivative"; @@ -47,6 +57,16 @@ const RoutesList = } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> } /> } /> diff --git a/calc-frontend/src/components/Cosine/CosineLim.tsx b/calc-frontend/src/components/Cosine/CosineLim.tsx new file mode 100644 index 0000000..e69de29 diff --git a/calc-frontend/src/components/Cosine/CosineLimGraph.tsx b/calc-frontend/src/components/Cosine/CosineLimGraph.tsx new file mode 100644 index 0000000..e69de29 diff --git a/calc-frontend/src/components/Cubic/CubicLim.tsx b/calc-frontend/src/components/Cubic/CubicLim.tsx new file mode 100644 index 0000000..e69de29 diff --git a/calc-frontend/src/components/Cubic/CubicLimGraph.tsx b/calc-frontend/src/components/Cubic/CubicLimGraph.tsx new file mode 100644 index 0000000..e69de29 diff --git a/calc-frontend/src/components/Custom/LimCustomGraph.tsx b/calc-frontend/src/components/Custom/LimCustomGraph.tsx new file mode 100644 index 0000000..e69de29 diff --git a/calc-frontend/src/components/Euler/EulerLim.tsx b/calc-frontend/src/components/Euler/EulerLim.tsx new file mode 100644 index 0000000..e69de29 diff --git a/calc-frontend/src/components/Euler/EulerLimGraph.tsx b/calc-frontend/src/components/Euler/EulerLimGraph.tsx new file mode 100644 index 0000000..e69de29 diff --git a/calc-frontend/src/components/Line/LineLim.tsx b/calc-frontend/src/components/Line/LineLim.tsx new file mode 100644 index 0000000..e69de29 diff --git a/calc-frontend/src/components/Line/LineLimGraph.tsx b/calc-frontend/src/components/Line/LineLimGraph.tsx new file mode 100644 index 0000000..e69de29 diff --git a/calc-frontend/src/components/NatLog/NatLogLim.tsx b/calc-frontend/src/components/NatLog/NatLogLim.tsx new file mode 100644 index 0000000..e69de29 diff --git a/calc-frontend/src/components/NatLog/NatLogLimGraph.tsx b/calc-frontend/src/components/NatLog/NatLogLimGraph.tsx new file mode 100644 index 0000000..e69de29 diff --git a/calc-frontend/src/components/Quadratic/QuadraticLim.tsx b/calc-frontend/src/components/Quadratic/QuadraticLim.tsx new file mode 100644 index 0000000..e69de29 diff --git a/calc-frontend/src/components/Quadratic/QuadraticLimGraph.tsx b/calc-frontend/src/components/Quadratic/QuadraticLimGraph.tsx new file mode 100644 index 0000000..e69de29 diff --git a/calc-frontend/src/components/Sine/SineLim.tsx b/calc-frontend/src/components/Sine/SineLim.tsx new file mode 100644 index 0000000..e69de29 diff --git a/calc-frontend/src/components/Sine/SineLimGraph.tsx b/calc-frontend/src/components/Sine/SineLimGraph.tsx new file mode 100644 index 0000000..e69de29 diff --git a/calc-frontend/src/components/Tangent/TangentLim.tsx b/calc-frontend/src/components/Tangent/TangentLim.tsx new file mode 100644 index 0000000..e69de29 diff --git a/calc-frontend/src/components/Tangent/TangentLimGraph.tsx b/calc-frontend/src/components/Tangent/TangentLimGraph.tsx new file mode 100644 index 0000000..e69de29 diff --git a/calc-frontend/src/pages/CustomLimit.tsx b/calc-frontend/src/pages/CustomLimit.tsx new file mode 100644 index 0000000..e69de29 From 6ab1ad615601b643811d59e14900374f6d128c05 Mon Sep 17 00:00:00 2001 From: George Avdella Date: Wed, 16 Apr 2025 17:48:51 -0400 Subject: [PATCH 2/2] limit notation frontend --- calc-frontend/src/App/RoutesList.tsx | 4 +-- .../src/components/Cosine/CosineLim.tsx | 26 +++++++++++++++++++ .../src/components/Cubic/CubicLim.tsx | 26 +++++++++++++++++++ .../src/components/Euler/EulerLim.tsx | 26 +++++++++++++++++++ calc-frontend/src/components/Line/LineLim.tsx | 26 +++++++++++++++++++ .../src/components/NatLog/NatLogLim.tsx | 26 +++++++++++++++++++ .../src/components/Quadratic/QuadraticLim.tsx | 26 +++++++++++++++++++ calc-frontend/src/components/Sine/SineLim.tsx | 26 +++++++++++++++++++ .../src/components/Tangent/TangentLim.tsx | 26 +++++++++++++++++++ calc-frontend/src/pages/Home.tsx | 16 ++++++------ 10 files changed, 218 insertions(+), 10 deletions(-) diff --git a/calc-frontend/src/App/RoutesList.tsx b/calc-frontend/src/App/RoutesList.tsx index 2c1a05c..d896d57 100644 --- a/calc-frontend/src/App/RoutesList.tsx +++ b/calc-frontend/src/App/RoutesList.tsx @@ -38,7 +38,7 @@ import EulerInt from "../components/Euler/EulerInt"; import ErrorPage from "../pages/ErrorPage"; -import CustomLim from "../pages/CustomLimit"; +//import CustomLim from "../pages/CustomLimit"; import CustomInt from "../pages/CustomIntegral"; import CustomDeriv from "../pages/CustomDerivative"; @@ -57,7 +57,7 @@ const RoutesList = } /> - } /> + {/*} /> */} } /> } /> } /> diff --git a/calc-frontend/src/components/Cosine/CosineLim.tsx b/calc-frontend/src/components/Cosine/CosineLim.tsx index e69de29..d8137d7 100644 --- a/calc-frontend/src/components/Cosine/CosineLim.tsx +++ b/calc-frontend/src/components/Cosine/CosineLim.tsx @@ -0,0 +1,26 @@ +import { useLayoutEffect, useRef } from "react"; +// import CosineLimGraph from "./CosineLimGraph" + +function CosineLim() { + + const container = useRef(null); + + useLayoutEffect(() =>{ + //@ts-ignore + let MQ = MathQuill.getInterface(2); + MQ.StaticMath(container.current, { }) + + }, []); + + return ( + +
+
+ \lim_{x\to0}\cos(x) +
+
+ + ) +} + +export default CosineLim \ No newline at end of file diff --git a/calc-frontend/src/components/Cubic/CubicLim.tsx b/calc-frontend/src/components/Cubic/CubicLim.tsx index e69de29..fc8945d 100644 --- a/calc-frontend/src/components/Cubic/CubicLim.tsx +++ b/calc-frontend/src/components/Cubic/CubicLim.tsx @@ -0,0 +1,26 @@ +import { useLayoutEffect, useRef } from "react"; +// import CubicLimGraph from "./CubicLimGraph" + +function CubicLim() { + + const container = useRef(null); + + useLayoutEffect(() =>{ + //@ts-ignore + let MQ = MathQuill.getInterface(2); + MQ.StaticMath(container.current, { }) + + }, []); + + return ( + +
+
+ \lim_{x\to0} \quad x^{3} +
+
+ + ) +} + +export default CubicLim \ No newline at end of file diff --git a/calc-frontend/src/components/Euler/EulerLim.tsx b/calc-frontend/src/components/Euler/EulerLim.tsx index e69de29..384dd3b 100644 --- a/calc-frontend/src/components/Euler/EulerLim.tsx +++ b/calc-frontend/src/components/Euler/EulerLim.tsx @@ -0,0 +1,26 @@ +import { useLayoutEffect, useRef } from "react"; +// import EulerLimGraph from "./EulerLimGraph" + +function EulerLim() { + + const container = useRef(null); + + useLayoutEffect(() =>{ + //@ts-ignore + let MQ = MathQuill.getInterface(2); + MQ.StaticMath(container.current, { }) + + }, []); + + return ( + +
+
+ \lim_{x\to0} \quad e^{x} +
+
+ + ) +} + +export default EulerLim \ No newline at end of file diff --git a/calc-frontend/src/components/Line/LineLim.tsx b/calc-frontend/src/components/Line/LineLim.tsx index e69de29..61bfd50 100644 --- a/calc-frontend/src/components/Line/LineLim.tsx +++ b/calc-frontend/src/components/Line/LineLim.tsx @@ -0,0 +1,26 @@ +import { useLayoutEffect, useRef } from "react"; +// import LineLimGraph from "./LineLimGraph" + +function LineLim() { + + const container = useRef(null); + + useLayoutEffect(() =>{ + //@ts-ignore + let MQ = MathQuill.getInterface(2); + MQ.StaticMath(container.current, { }) + + }, []); + + return ( + +
+
+ \lim_{x\to0}\quad x +
+
+ + ) +} + +export default LineLim \ No newline at end of file diff --git a/calc-frontend/src/components/NatLog/NatLogLim.tsx b/calc-frontend/src/components/NatLog/NatLogLim.tsx index e69de29..bf72334 100644 --- a/calc-frontend/src/components/NatLog/NatLogLim.tsx +++ b/calc-frontend/src/components/NatLog/NatLogLim.tsx @@ -0,0 +1,26 @@ +import { useLayoutEffect, useRef } from "react"; +// import NatLogLimGraph from "./NatLogLimGraph" + +function NatLogLim() { + + const container = useRef(null); + + useLayoutEffect(() =>{ + //@ts-ignore + let MQ = MathQuill.getInterface(2); + MQ.StaticMath(container.current, { }) + + }, []); + + return ( + +
+
+ \lim_{x\to0}\ln(x) +
+
+ + ) +} + +export default NatLogLim \ No newline at end of file diff --git a/calc-frontend/src/components/Quadratic/QuadraticLim.tsx b/calc-frontend/src/components/Quadratic/QuadraticLim.tsx index e69de29..667c3f9 100644 --- a/calc-frontend/src/components/Quadratic/QuadraticLim.tsx +++ b/calc-frontend/src/components/Quadratic/QuadraticLim.tsx @@ -0,0 +1,26 @@ +import { useLayoutEffect, useRef } from "react"; +// import QuadraticLimGraph from "./QuadraticLimGraph" + +function QuadraticLim() { + + const container = useRef(null); + + useLayoutEffect(() =>{ + //@ts-ignore + let MQ = MathQuill.getInterface(2); + MQ.StaticMath(container.current, { }) + + }, []); + + return ( + +
+
+ \lim_{x\to0} \quad x^{2} +
+
+ + ) +} + +export default QuadraticLim \ No newline at end of file diff --git a/calc-frontend/src/components/Sine/SineLim.tsx b/calc-frontend/src/components/Sine/SineLim.tsx index e69de29..e73ade3 100644 --- a/calc-frontend/src/components/Sine/SineLim.tsx +++ b/calc-frontend/src/components/Sine/SineLim.tsx @@ -0,0 +1,26 @@ +import { useLayoutEffect, useRef } from "react"; +// import SineLimGraph from "./SineLimGraph" + +function SineLim() { + + const container = useRef(null); + + useLayoutEffect(() =>{ + //@ts-ignore + let MQ = MathQuill.getInterface(2); + MQ.StaticMath(container.current, { }) + + }, []); + + return ( + +
+
+ \lim_{x\to0}\sin(x) +
+
+ + ) +} + +export default SineLim \ No newline at end of file diff --git a/calc-frontend/src/components/Tangent/TangentLim.tsx b/calc-frontend/src/components/Tangent/TangentLim.tsx index e69de29..cc20f79 100644 --- a/calc-frontend/src/components/Tangent/TangentLim.tsx +++ b/calc-frontend/src/components/Tangent/TangentLim.tsx @@ -0,0 +1,26 @@ +import { useLayoutEffect, useRef } from "react"; +// import TangentLimGraph from "./TangentLimGraph" + +function TangentLim() { + + const container = useRef(null); + + useLayoutEffect(() =>{ + //@ts-ignore + let MQ = MathQuill.getInterface(2); + MQ.StaticMath(container.current, { }) + + }, []); + + return ( + +
+
+ \lim_{x\to0}\tan(x) +
+
+ + ) +} + +export default TangentLim \ No newline at end of file diff --git a/calc-frontend/src/pages/Home.tsx b/calc-frontend/src/pages/Home.tsx index 344bc99..d501570 100644 --- a/calc-frontend/src/pages/Home.tsx +++ b/calc-frontend/src/pages/Home.tsx @@ -105,42 +105,42 @@ function Home() {
- +
x
- +
x^{2}
- +
{"e^{x}"}{/*Expnential*/}
- +
ln(x){/*Log*/}
- +
sin(x){/*Sine*/}
- +
cos(x){/*Cos*/}
- +
tan(x){/*Tan*/}
- +
Custom{/*Custom*/}