From 96b82ca335c61203cc63c646eb20f3dd110dcffd Mon Sep 17 00:00:00 2001 From: Andinus Date: Sun, 10 Oct 2021 00:35:01 +0530 Subject: line-drawing/dda: Print chart after solving --- src/algorithms/line-drawing/DDA.svelte | 101 ++++++++++++++++++++++----------- 1 file changed, 69 insertions(+), 32 deletions(-) (limited to 'src/algorithms') diff --git a/src/algorithms/line-drawing/DDA.svelte b/src/algorithms/line-drawing/DDA.svelte index b2cc558..fe5e8e5 100644 --- a/src/algorithms/line-drawing/DDA.svelte +++ b/src/algorithms/line-drawing/DDA.svelte @@ -1,6 +1,12 @@ + + +

Digital differential analyzer

-   +   - +
-   +   - +
{#if solved === true && steps > 0}
+

Solution

+
-
+
-
+

-
- - - - - - - - - - - - - {#each x_axis as _, i} +
+ + Table + +
Iterationxyx (plot)y (plot)
+ - - - - - + + + + + - {/each} - - -
{i + 1}{x_axis[i]}{y_axis[i]}{x_axis_floored[i]}{y_axis_floored[i]}Iterationxyx (plot)y (plot)
+ + + + {#each x_axis as _, i} + + {i + 1} + {x_axis[i]} + {y_axis[i]} + {x_axis_floored[i]} + {y_axis_floored[i]} + + {/each} + + + + + + {#if plotlyReady === false} +

+ Cannot plot graph: Plotly is not ready. +

+ {/if} {/if} +
+ -- cgit 1.4.1-2-gfad0